@vived/host 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/cjs/Assets/UCs/GetAssetBlobURLUC.js +104 -27
  2. package/dist/cjs/Assets/UCs/GetAssetBlobURLUC.js.map +1 -1
  3. package/dist/cjs/Assets/UCs/GetAssetFileUC.js +111 -34
  4. package/dist/cjs/Assets/UCs/GetAssetFileUC.js.map +1 -1
  5. package/dist/cjs/Cache/Controllers/clearCache.js +13 -0
  6. package/dist/cjs/Cache/Controllers/clearCache.js.map +1 -0
  7. package/dist/cjs/Cache/Controllers/index.js +18 -0
  8. package/dist/cjs/Cache/Controllers/index.js.map +1 -0
  9. package/dist/cjs/Cache/Entities/AssetCacheEntity.js +95 -0
  10. package/dist/cjs/Cache/Entities/AssetCacheEntity.js.map +1 -0
  11. package/dist/cjs/Cache/Entities/CacheEntity.js +54 -0
  12. package/dist/cjs/Cache/Entities/CacheEntity.js.map +1 -0
  13. package/dist/cjs/Cache/Entities/ScriptCacheEntity.js +137 -0
  14. package/dist/cjs/Cache/Entities/ScriptCacheEntity.js.map +1 -0
  15. package/dist/cjs/Cache/Entities/index.js +25 -0
  16. package/dist/cjs/Cache/Entities/index.js.map +1 -0
  17. package/dist/cjs/Cache/Factories/index.js +18 -0
  18. package/dist/cjs/Cache/Factories/index.js.map +1 -0
  19. package/dist/cjs/Cache/Factories/setupCache.js +27 -0
  20. package/dist/cjs/Cache/Factories/setupCache.js.map +1 -0
  21. package/dist/cjs/Cache/Mocks/MockCacheEntity.js +22 -0
  22. package/dist/cjs/Cache/Mocks/MockCacheEntity.js.map +1 -0
  23. package/dist/cjs/Cache/Mocks/MockGetAssetFromCacheUC.js +19 -0
  24. package/dist/cjs/Cache/Mocks/MockGetAssetFromCacheUC.js.map +1 -0
  25. package/dist/cjs/Cache/Mocks/MockGetScriptFromCacheUC.js +22 -0
  26. package/dist/cjs/Cache/Mocks/MockGetScriptFromCacheUC.js.map +1 -0
  27. package/dist/cjs/Cache/Mocks/MockStoreAssetInCacheUC.js +17 -0
  28. package/dist/cjs/Cache/Mocks/MockStoreAssetInCacheUC.js.map +1 -0
  29. package/dist/cjs/Cache/Mocks/MockStoreScriptInCacheUC.js +22 -0
  30. package/dist/cjs/Cache/Mocks/MockStoreScriptInCacheUC.js.map +1 -0
  31. package/dist/cjs/Cache/Mocks/index.js +22 -0
  32. package/dist/cjs/Cache/Mocks/index.js.map +1 -0
  33. package/dist/cjs/Cache/UCs/GetAssetFromCacheUC.js +40 -0
  34. package/dist/cjs/Cache/UCs/GetAssetFromCacheUC.js.map +1 -0
  35. package/dist/cjs/Cache/UCs/GetScriptFromCacheUC.js +49 -0
  36. package/dist/cjs/Cache/UCs/GetScriptFromCacheUC.js.map +1 -0
  37. package/dist/cjs/Cache/UCs/StoreAssetInCacheUC.js +39 -0
  38. package/dist/cjs/Cache/UCs/StoreAssetInCacheUC.js.map +1 -0
  39. package/dist/cjs/Cache/UCs/StoreScriptInCacheUC.js +48 -0
  40. package/dist/cjs/Cache/UCs/StoreScriptInCacheUC.js.map +1 -0
  41. package/dist/cjs/Cache/UCs/index.js +26 -0
  42. package/dist/cjs/Cache/UCs/index.js.map +1 -0
  43. package/dist/cjs/Cache/index.js +21 -0
  44. package/dist/cjs/Cache/index.js.map +1 -0
  45. package/dist/cjs/index.js +1 -0
  46. package/dist/cjs/index.js.map +1 -1
  47. package/dist/esm/Assets/UCs/GetAssetBlobURLUC.js +104 -27
  48. package/dist/esm/Assets/UCs/GetAssetBlobURLUC.js.map +1 -1
  49. package/dist/esm/Assets/UCs/GetAssetFileUC.js +111 -34
  50. package/dist/esm/Assets/UCs/GetAssetFileUC.js.map +1 -1
  51. package/dist/esm/Cache/Controllers/clearCache.js +10 -0
  52. package/dist/esm/Cache/Controllers/clearCache.js.map +1 -0
  53. package/dist/esm/Cache/Controllers/index.js +2 -0
  54. package/dist/esm/Cache/Controllers/index.js.map +1 -0
  55. package/dist/esm/Cache/Entities/AssetCacheEntity.js +90 -0
  56. package/dist/esm/Cache/Entities/AssetCacheEntity.js.map +1 -0
  57. package/dist/esm/Cache/Entities/CacheEntity.js +49 -0
  58. package/dist/esm/Cache/Entities/CacheEntity.js.map +1 -0
  59. package/dist/esm/Cache/Entities/ScriptCacheEntity.js +132 -0
  60. package/dist/esm/Cache/Entities/ScriptCacheEntity.js.map +1 -0
  61. package/dist/esm/Cache/Entities/index.js +9 -0
  62. package/dist/esm/Cache/Entities/index.js.map +1 -0
  63. package/dist/esm/Cache/Factories/index.js +2 -0
  64. package/dist/esm/Cache/Factories/index.js.map +1 -0
  65. package/dist/esm/Cache/Factories/setupCache.js +24 -0
  66. package/dist/esm/Cache/Factories/setupCache.js.map +1 -0
  67. package/dist/esm/Cache/Mocks/MockCacheEntity.js +17 -0
  68. package/dist/esm/Cache/Mocks/MockCacheEntity.js.map +1 -0
  69. package/dist/esm/Cache/Mocks/MockGetAssetFromCacheUC.js +14 -0
  70. package/dist/esm/Cache/Mocks/MockGetAssetFromCacheUC.js.map +1 -0
  71. package/dist/esm/Cache/Mocks/MockGetScriptFromCacheUC.js +17 -0
  72. package/dist/esm/Cache/Mocks/MockGetScriptFromCacheUC.js.map +1 -0
  73. package/dist/esm/Cache/Mocks/MockStoreAssetInCacheUC.js +12 -0
  74. package/dist/esm/Cache/Mocks/MockStoreAssetInCacheUC.js.map +1 -0
  75. package/dist/esm/Cache/Mocks/MockStoreScriptInCacheUC.js +17 -0
  76. package/dist/esm/Cache/Mocks/MockStoreScriptInCacheUC.js.map +1 -0
  77. package/dist/esm/Cache/Mocks/index.js +6 -0
  78. package/dist/esm/Cache/Mocks/index.js.map +1 -0
  79. package/dist/esm/Cache/UCs/GetAssetFromCacheUC.js +35 -0
  80. package/dist/esm/Cache/UCs/GetAssetFromCacheUC.js.map +1 -0
  81. package/dist/esm/Cache/UCs/GetScriptFromCacheUC.js +44 -0
  82. package/dist/esm/Cache/UCs/GetScriptFromCacheUC.js.map +1 -0
  83. package/dist/esm/Cache/UCs/StoreAssetInCacheUC.js +34 -0
  84. package/dist/esm/Cache/UCs/StoreAssetInCacheUC.js.map +1 -0
  85. package/dist/esm/Cache/UCs/StoreScriptInCacheUC.js +43 -0
  86. package/dist/esm/Cache/UCs/StoreScriptInCacheUC.js.map +1 -0
  87. package/dist/esm/Cache/UCs/index.js +10 -0
  88. package/dist/esm/Cache/UCs/index.js.map +1 -0
  89. package/dist/esm/Cache/index.js +5 -0
  90. package/dist/esm/Cache/index.js.map +1 -0
  91. package/dist/esm/index.js +1 -0
  92. package/dist/esm/index.js.map +1 -1
  93. package/dist/types/Assets/UCs/GetAssetBlobURLUC.d.ts.map +1 -1
  94. package/dist/types/Cache/Controllers/clearCache.d.ts +3 -0
  95. package/dist/types/Cache/Controllers/clearCache.d.ts.map +1 -0
  96. package/dist/types/Cache/Controllers/index.d.ts +2 -0
  97. package/dist/types/Cache/Controllers/index.d.ts.map +1 -0
  98. package/dist/types/Cache/Entities/AssetCacheEntity.d.ts +43 -0
  99. package/dist/types/Cache/Entities/AssetCacheEntity.d.ts.map +1 -0
  100. package/dist/types/Cache/Entities/CacheEntity.d.ts +57 -0
  101. package/dist/types/Cache/Entities/CacheEntity.d.ts.map +1 -0
  102. package/dist/types/Cache/Entities/ScriptCacheEntity.d.ts +64 -0
  103. package/dist/types/Cache/Entities/ScriptCacheEntity.d.ts.map +1 -0
  104. package/dist/types/Cache/Entities/index.d.ts +9 -0
  105. package/dist/types/Cache/Entities/index.d.ts.map +1 -0
  106. package/dist/types/Cache/Factories/index.d.ts +2 -0
  107. package/dist/types/Cache/Factories/index.d.ts.map +1 -0
  108. package/dist/types/Cache/Factories/setupCache.d.ts +6 -0
  109. package/dist/types/Cache/Factories/setupCache.d.ts.map +1 -0
  110. package/dist/types/Cache/Mocks/MockCacheEntity.d.ts +13 -0
  111. package/dist/types/Cache/Mocks/MockCacheEntity.d.ts.map +1 -0
  112. package/dist/types/Cache/Mocks/MockGetAssetFromCacheUC.d.ts +8 -0
  113. package/dist/types/Cache/Mocks/MockGetAssetFromCacheUC.d.ts.map +1 -0
  114. package/dist/types/Cache/Mocks/MockGetScriptFromCacheUC.d.ts +9 -0
  115. package/dist/types/Cache/Mocks/MockGetScriptFromCacheUC.d.ts.map +1 -0
  116. package/dist/types/Cache/Mocks/MockStoreAssetInCacheUC.d.ts +8 -0
  117. package/dist/types/Cache/Mocks/MockStoreAssetInCacheUC.d.ts.map +1 -0
  118. package/dist/types/Cache/Mocks/MockStoreScriptInCacheUC.d.ts +9 -0
  119. package/dist/types/Cache/Mocks/MockStoreScriptInCacheUC.d.ts.map +1 -0
  120. package/dist/types/Cache/Mocks/index.d.ts +6 -0
  121. package/dist/types/Cache/Mocks/index.d.ts.map +1 -0
  122. package/dist/types/Cache/UCs/GetAssetFromCacheUC.d.ts +8 -0
  123. package/dist/types/Cache/UCs/GetAssetFromCacheUC.d.ts.map +1 -0
  124. package/dist/types/Cache/UCs/GetScriptFromCacheUC.d.ts +13 -0
  125. package/dist/types/Cache/UCs/GetScriptFromCacheUC.d.ts.map +1 -0
  126. package/dist/types/Cache/UCs/StoreAssetInCacheUC.d.ts +8 -0
  127. package/dist/types/Cache/UCs/StoreAssetInCacheUC.d.ts.map +1 -0
  128. package/dist/types/Cache/UCs/StoreScriptInCacheUC.d.ts +13 -0
  129. package/dist/types/Cache/UCs/StoreScriptInCacheUC.d.ts.map +1 -0
  130. package/dist/types/Cache/UCs/index.d.ts +10 -0
  131. package/dist/types/Cache/UCs/index.d.ts.map +1 -0
  132. package/dist/types/Cache/index.d.ts +5 -0
  133. package/dist/types/Cache/index.d.ts.map +1 -0
  134. package/dist/types/index.d.ts +1 -0
  135. package/dist/types/index.d.ts.map +1 -1
  136. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Cache Use Cases
3
+ *
4
+ * Implementation of specific cache operations
5
+ */
6
+ export * from "./GetScriptFromCacheUC";
7
+ export * from "./StoreScriptInCacheUC";
8
+ export * from "./GetAssetFromCacheUC";
9
+ export * from "./StoreAssetInCacheUC";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Cache/UCs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC","sourcesContent":["/**\r\n * Cache Use Cases\r\n *\r\n * Implementation of specific cache operations\r\n */\r\n\r\nexport * from \"./GetScriptFromCacheUC\";\r\nexport * from \"./StoreScriptInCacheUC\";\r\nexport * from \"./GetAssetFromCacheUC\";\r\nexport * from \"./StoreAssetInCacheUC\";\r\n"]}
@@ -0,0 +1,5 @@
1
+ export * from "./Entities";
2
+ export * from "./Factories";
3
+ export * from "./Mocks";
4
+ export * from "./UCs";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Cache/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA","sourcesContent":["\r\nexport * from \"./Entities\"\r\nexport * from \"./Factories\"\r\nexport * from \"./Mocks\"\r\nexport * from \"./UCs\""]}
package/dist/esm/index.js CHANGED
@@ -2,6 +2,7 @@ export * from "./Apps";
2
2
  export * from "./AppSandbox";
3
3
  export * from "./AssetPlugin";
4
4
  export * from "./Assets";
5
+ export * from "./Cache";
5
6
  export * from "./ChallengeResults";
6
7
  export * from "./Dialog";
7
8
  export * from "./Dispatcher";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./Apps\";\r\nexport * from \"./AppSandbox\";\r\nexport * from \"./AssetPlugin\";\r\nexport * from \"./Assets\";\r\nexport * from \"./ChallengeResults\";\r\nexport * from \"./Dialog\";\r\nexport * from \"./Dispatcher\";\r\nexport * from \"./Events\";\r\nexport * from \"./Handler\";\r\nexport * from \"./Logger\";\r\nexport * from \"./Snackbar\";\r\nexport * from \"./StateMachine\";\r\nexport * from \"./ThemeColors\";\r\nexport * from \"./VivedAPI\";\r\nexport * from \"./ZSpaceHost\";\r\n\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./Apps\";\r\nexport * from \"./AppSandbox\";\r\nexport * from \"./AssetPlugin\";\r\nexport * from \"./Assets\";\r\nexport * from \"./Cache\";\r\nexport * from \"./ChallengeResults\";\r\nexport * from \"./Dialog\";\r\nexport * from \"./Dispatcher\";\r\nexport * from \"./Events\";\r\nexport * from \"./Handler\";\r\nexport * from \"./Logger\";\r\nexport * from \"./Snackbar\";\r\nexport * from \"./StateMachine\";\r\nexport * from \"./ThemeColors\";\r\nexport * from \"./VivedAPI\";\r\nexport * from \"./ZSpaceHost\";\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GetAssetBlobURLUC.d.ts","sourceRoot":"","sources":["../../../../src/Assets/UCs/GetAssetBlobURLUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,aAAa,CAAC;AAMrB,8BAAsB,iBAAkB,SAAQ,WAAW;IACzD,MAAM,CAAC,IAAI,SAAuB;IAElC,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE1D,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,GAAG,SAAS;CAMrE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAE7E"}
1
+ {"version":3,"file":"GetAssetBlobURLUC.d.ts","sourceRoot":"","sources":["../../../../src/Assets/UCs/GetAssetBlobURLUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,aAAa,CAAC;AAOrB,8BAAsB,iBAAkB,SAAQ,WAAW;IACzD,MAAM,CAAC,IAAI,SAAuB;IAElC,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE1D,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,GAAG,SAAS;CAMrE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAE7E"}
@@ -0,0 +1,3 @@
1
+ import { AppObjectRepo } from "@vived/core";
2
+ export declare function clearCache(appObjects: AppObjectRepo): Promise<void>;
3
+ //# sourceMappingURL=clearCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearCache.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Controllers/clearCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,wBAAgB,UAAU,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAQnE"}
@@ -0,0 +1,2 @@
1
+ export * from "./clearCache";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "@vived/core";
2
+ /**
3
+ * AssetCacheEntity provides functionality for caching binary assets in the application.
4
+ * It serves as a specialized cache storage for assets such as images, videos, or other binary content.
5
+ * This entity is implemented as a singleton component and requires a CacheEntity instance to function.
6
+ */
7
+ export declare abstract class AssetCacheEntity extends AppObjectEntity {
8
+ static readonly type = "AssetCacheEntity";
9
+ /**
10
+ * Retrieves an asset from the cache by its unique identifier.
11
+ * @param assetId - The unique identifier of the asset to retrieve
12
+ * @returns A Promise that resolves to the cached Blob if found, otherwise undefined
13
+ */
14
+ abstract getAsset(assetId: string): Promise<Blob | undefined>;
15
+ /**
16
+ * Stores an asset in the cache with the specified identifier.
17
+ * @param assetId - The unique identifier to associate with the asset
18
+ * @param content - The binary content to cache as a Blob
19
+ * @param contentType - Optional MIME type of the content
20
+ * @returns A Promise that resolves when the asset has been stored
21
+ */
22
+ abstract storeAsset(assetId: string, content: Blob, contentType?: string): Promise<void>;
23
+ /**
24
+ * Checks if an asset exists in the cache.
25
+ * @param assetId - The unique identifier of the asset to check
26
+ * @returns A Promise that resolves to true if the asset exists, otherwise false
27
+ */
28
+ abstract hasAsset(assetId: string): Promise<boolean>;
29
+ /**
30
+ * Removes an asset from the cache.
31
+ * @param assetId - The unique identifier of the asset to invalidate
32
+ * @returns A Promise that resolves when the asset has been invalidated
33
+ */
34
+ abstract invalidateAsset(assetId: string): Promise<void>;
35
+ /**
36
+ * Gets the singleton instance of AssetCacheEntity from the app objects repository.
37
+ * @param appObjects - The app objects repository
38
+ * @returns The AssetCacheEntity instance if found, otherwise undefined
39
+ */
40
+ static get(appObjects: AppObjectRepo): AssetCacheEntity | undefined;
41
+ }
42
+ export declare function makeAssetCacheEntity(appObject: AppObject): AssetCacheEntity;
43
+ //# sourceMappingURL=AssetCacheEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetCacheEntity.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Entities/AssetCacheEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAEd,MAAM,aAAa,CAAC;AAGrB;;;;GAIG;AACH,8BAAsB,gBAAiB,SAAQ,eAAe;IAC5D,MAAM,CAAC,QAAQ,CAAC,IAAI,sBAAsB;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAE7D;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,IAAI,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpD;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAExD;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,gBAAgB,GAAG,SAAS;CAMpE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,CAE3E"}
@@ -0,0 +1,57 @@
1
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "@vived/core";
2
+ /**
3
+ * Abstract entity that provides caching functionality for the application.
4
+ * CacheEntity is a singleton component that stores key-value pairs with optional metadata.
5
+ * It provides methods for storing, retrieving, checking existence, and invalidating cached values.
6
+ */
7
+ export declare abstract class CacheEntity extends AppObjectEntity {
8
+ static readonly type = "CacheEntity";
9
+ /**
10
+ * Retrieves a value from the cache by its key.
11
+ * @param key - The unique identifier for the cached item
12
+ * @returns Promise resolving to an object containing the cached value and optional metadata
13
+ * @throws Error if the key does not exist in the cache
14
+ */
15
+ abstract get(key: string): Promise<{
16
+ value: any;
17
+ metadata?: Record<string, any>;
18
+ }>;
19
+ /**
20
+ * Stores a value in the cache with an associated key and optional metadata.
21
+ * @param key - The unique identifier for the cached item
22
+ * @param value - The value to cache
23
+ * @param metadata - Optional metadata associated with the cached value
24
+ * @returns Promise that resolves when the value has been stored
25
+ */
26
+ abstract store(key: string, value: any, metadata?: Record<string, any>): Promise<void>;
27
+ /**
28
+ * Checks if a key exists in the cache.
29
+ * @param key - The key to check
30
+ * @returns Promise resolving to boolean indicating if the key exists
31
+ */
32
+ abstract has(key: string): Promise<boolean>;
33
+ /**
34
+ * Removes an item from the cache by its key.
35
+ * @param key - The key to remove
36
+ * @returns Promise that resolves when the key has been invalidated
37
+ */
38
+ abstract invalidate(key: string): Promise<void>;
39
+ /**
40
+ * Removes all items from the cache.
41
+ * @returns Promise that resolves when the cache has been cleared
42
+ */
43
+ abstract clear(): Promise<void>;
44
+ /**
45
+ * Gets the number of items in the cache.
46
+ * @returns Promise resolving to the number of cached items
47
+ */
48
+ abstract size(): Promise<number>;
49
+ /**
50
+ * Gets the singleton instance of CacheEntity from the AppObjectRepo.
51
+ * @param appObjects - The application object repository
52
+ * @returns The CacheEntity instance or undefined if not registered
53
+ */
54
+ static get(appObjects: AppObjectRepo): CacheEntity | undefined;
55
+ }
56
+ export declare function makeCacheEntity(appObject: AppObject): CacheEntity;
57
+ //# sourceMappingURL=CacheEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheEntity.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Entities/CacheEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,8BAAsB,WAAY,SAAQ,eAAe;IACvD,MAAM,CAAC,QAAQ,CAAC,IAAI,iBAAiB;IAErC;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CACV,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAC;IAE1D;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,GAAG,EACV,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAE3C;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE/C;;;OAGG;IACH,QAAQ,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAE/B;;;OAGG;IACH,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS;CAG/D;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAEjE"}
@@ -0,0 +1,64 @@
1
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "@vived/core";
2
+ /**
3
+ * Entity responsible for managing script caching operations.
4
+ * Provides functionality to store, retrieve, check existence, and invalidate scripts
5
+ * in the cache based on app ID, version, and script path.
6
+ */
7
+ export declare abstract class ScriptCacheEntity extends AppObjectEntity {
8
+ static readonly type = "ScriptCacheEntity";
9
+ /**
10
+ * Retrieves a script from the cache.
11
+ * @param appId - Unique identifier of the app
12
+ * @param version - Version of the app
13
+ * @param scriptPath - Path of the script within the app
14
+ * @returns Promise with the script content if found, undefined otherwise
15
+ */
16
+ abstract getScript(appId: string, version: string, scriptPath: string): Promise<string | undefined>;
17
+ /**
18
+ * Stores a script in the cache.
19
+ * @param appId - Unique identifier of the app
20
+ * @param version - Version of the app
21
+ * @param scriptPath - Path of the script within the app
22
+ * @param content - Content of the script to store
23
+ */
24
+ abstract storeScript(appId: string, version: string, scriptPath: string, content: string): Promise<void>;
25
+ /**
26
+ * Checks if a script exists in the cache.
27
+ * @param appId - Unique identifier of the app
28
+ * @param version - Version of the app
29
+ * @param scriptPath - Path of the script within the app
30
+ * @returns Promise resolving to true if script exists, false otherwise
31
+ */
32
+ abstract hasScript(appId: string, version: string, scriptPath: string): Promise<boolean>;
33
+ /**
34
+ * Invalidates scripts in the cache.
35
+ * Can invalidate a specific script, all scripts for a version, or all scripts for an app.
36
+ * @param appId - Unique identifier of the app
37
+ * @param version - Optional version of the app
38
+ * @param scriptPath - Optional path of the script within the app
39
+ */
40
+ abstract invalidateScript(appId: string, version?: string, scriptPath?: string): Promise<void>;
41
+ /**
42
+ * Extracts app ID, version, and script path from a script URL.
43
+ * @param url - The URL to parse
44
+ * @returns Object containing extracted appId, version, and scriptPath
45
+ */
46
+ abstract extractScriptInfo(url: string): {
47
+ appId: string;
48
+ version: string;
49
+ scriptPath: string;
50
+ };
51
+ /**
52
+ * Gets the singleton ScriptCacheEntity instance from the AppObjectRepo.
53
+ * @param appObjects - Repository of application objects
54
+ * @returns ScriptCacheEntity instance if registered, undefined otherwise
55
+ */
56
+ static get(appObjects: AppObjectRepo): ScriptCacheEntity | undefined;
57
+ }
58
+ /**
59
+ * Factory function to create a new ScriptCacheEntity instance.
60
+ * @param appObject - The parent AppObject
61
+ * @returns A new ScriptCacheEntity instance
62
+ */
63
+ export declare function makeScriptCacheEntity(appObject: AppObject): ScriptCacheEntity;
64
+ //# sourceMappingURL=ScriptCacheEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptCacheEntity.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Entities/ScriptCacheEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAEd,MAAM,aAAa,CAAC;AAGrB;;;;GAIG;AACH,8BAAsB,iBAAkB,SAAQ,eAAe;IAC7D,MAAM,CAAC,QAAQ,CAAC,IAAI,uBAAuB;IAE3C;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAE9B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;QACvC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,GAAG,SAAS;CAMrE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAE7E"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Cache Entities
3
+ *
4
+ * Core domain models for the Cache feature
5
+ */
6
+ export * from "./CacheEntity";
7
+ export * from "./ScriptCacheEntity";
8
+ export * from "./AssetCacheEntity";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Entities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./setupCache";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Factories/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { AppObjectRepo } from "@vived/core";
2
+ /**
3
+ * Sets up the Cache feature components
4
+ */
5
+ export declare function setupCache(appObjects: AppObjectRepo): void;
6
+ //# sourceMappingURL=setupCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupCache.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Factories/setupCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C;;GAEG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAc1D"}
@@ -0,0 +1,13 @@
1
+ import { AppObject, AppObjectRepo } from "@vived/core";
2
+ import { CacheEntity } from "../Entities/CacheEntity";
3
+ export declare class MockCacheEntity extends CacheEntity {
4
+ get: jest.Mock<any, any, any>;
5
+ store: jest.Mock<any, any, any>;
6
+ has: jest.Mock<any, any, any>;
7
+ invalidate: jest.Mock<any, any, any>;
8
+ clear: jest.Mock<any, any, any>;
9
+ size: jest.Mock<any, any, any>;
10
+ constructor(appObject: AppObject);
11
+ }
12
+ export declare function makeMockCacheEntity(appObjects: AppObjectRepo): MockCacheEntity;
13
+ //# sourceMappingURL=MockCacheEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockCacheEntity.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/MockCacheEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,GAAG,2BAAuD;IAC1D,KAAK,2BAA0C;IAC/C,GAAG,2BAAqC;IACxC,UAAU,2BAA0C;IACpD,KAAK,2BAA0C;IAC/C,IAAI,2BAAkC;gBAE1B,SAAS,EAAE,SAAS;CAIjC;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,mBAE5D"}
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo } from "@vived/core";
2
+ import { GetAssetFromCacheUC } from "../UCs/GetAssetFromCacheUC";
3
+ export declare class MockGetAssetFromCacheUC extends GetAssetFromCacheUC {
4
+ getAsset: jest.Mock<any, any, any>;
5
+ constructor(appObject: AppObject);
6
+ }
7
+ export declare function makeMockGetAssetFromCacheUC(appObjects: AppObjectRepo): MockGetAssetFromCacheUC;
8
+ //# sourceMappingURL=MockGetAssetFromCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockGetAssetFromCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/MockGetAssetFromCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,QAAQ,2BAEiE;gBAE7D,SAAS,EAAE,SAAS;CAIjC;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,aAAa,2BAIpE"}
@@ -0,0 +1,9 @@
1
+ import { AppObject, AppObjectRepo } from "@vived/core";
2
+ import { GetScriptFromCacheUC } from "../UCs/GetScriptFromCacheUC";
3
+ export declare class MockGetScriptFromCacheUC extends GetScriptFromCacheUC {
4
+ getScript: jest.Mock<any, any, any>;
5
+ extractScriptInfo: jest.Mock<any, any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeMockGetScriptFromCacheUC(appObjects: AppObjectRepo): MockGetScriptFromCacheUC;
9
+ //# sourceMappingURL=MockGetScriptFromCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockGetScriptFromCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/MockGetScriptFromCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,qBAAa,wBAAyB,SAAQ,oBAAoB;IAChE,SAAS,2BAA6D;IACtE,iBAAiB,2BAId;gBAES,SAAS,EAAE,SAAS;CAIjC;AAED,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,aAAa,4BAIrE"}
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo } from "@vived/core";
2
+ import { StoreAssetInCacheUC } from "../UCs/StoreAssetInCacheUC";
3
+ export declare class MockStoreAssetInCacheUC extends StoreAssetInCacheUC {
4
+ storeAsset: jest.Mock<any, any, any>;
5
+ constructor(appObject: AppObject);
6
+ }
7
+ export declare function makeMockStoreAssetInCacheUC(appObjects: AppObjectRepo): MockStoreAssetInCacheUC;
8
+ //# sourceMappingURL=MockStoreAssetInCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockStoreAssetInCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/MockStoreAssetInCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,UAAU,2BAA0C;gBAExC,SAAS,EAAE,SAAS;CAIjC;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,aAAa,2BAIpE"}
@@ -0,0 +1,9 @@
1
+ import { AppObject, AppObjectRepo } from "@vived/core";
2
+ import { StoreScriptInCacheUC } from "../UCs/StoreScriptInCacheUC";
3
+ export declare class MockStoreScriptInCacheUC extends StoreScriptInCacheUC {
4
+ storeScript: jest.Mock<any, any, any>;
5
+ extractScriptInfo: jest.Mock<any, any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeMockStoreScriptInCacheUC(appObjects: AppObjectRepo): MockStoreScriptInCacheUC;
9
+ //# sourceMappingURL=MockStoreScriptInCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockStoreScriptInCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/MockStoreScriptInCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,qBAAa,wBAAyB,SAAQ,oBAAoB;IAChE,WAAW,2BAA0C;IACrD,iBAAiB,2BAId;gBAES,SAAS,EAAE,SAAS;CAIjC;AAED,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,aAAa,4BAIrE"}
@@ -0,0 +1,6 @@
1
+ export * from "./MockCacheEntity";
2
+ export * from "./MockGetAssetFromCacheUC";
3
+ export * from "./MockGetScriptFromCacheUC";
4
+ export * from "./MockStoreAssetInCacheUC";
5
+ export * from "./MockStoreScriptInCacheUC";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Cache/Mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "@vived/core";
2
+ export declare abstract class GetAssetFromCacheUC extends AppObjectUC {
3
+ static readonly type = "GetAssetFromCacheUC";
4
+ abstract getAsset(assetId: string): Promise<Blob | undefined>;
5
+ static get(appObjects: AppObjectRepo): GetAssetFromCacheUC | undefined;
6
+ }
7
+ export declare function makeGetAssetFromCacheUC(appObject: AppObject): GetAssetFromCacheUC;
8
+ //# sourceMappingURL=GetAssetFromCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetAssetFromCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/UCs/GetAssetFromCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EAEZ,MAAM,aAAa,CAAC;AAGrB,8BAAsB,mBAAoB,SAAQ,WAAW;IAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAyB;IAE7C,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAE7D,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS;CAGvE;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,GACnB,mBAAmB,CAErB"}
@@ -0,0 +1,13 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "@vived/core";
2
+ export declare abstract class GetScriptFromCacheUC extends AppObjectUC {
3
+ static readonly type = "GetScriptFromCacheUC";
4
+ abstract getScript(url: string): Promise<string | undefined>;
5
+ abstract extractScriptInfo(url: string): {
6
+ appId: string;
7
+ version: string;
8
+ scriptPath: string;
9
+ };
10
+ static get(appObjects: AppObjectRepo): GetScriptFromCacheUC | undefined;
11
+ }
12
+ export declare function makeGetScriptFromCacheUC(appObject: AppObject): GetScriptFromCacheUC;
13
+ //# sourceMappingURL=GetScriptFromCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetScriptFromCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/UCs/GetScriptFromCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EAEZ,MAAM,aAAa,CAAC;AAGrB,8BAAsB,oBAAqB,SAAQ,WAAW;IAC5D,MAAM,CAAC,QAAQ,CAAC,IAAI,0BAA0B;IAE9C,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;QACvC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB;IAED,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,oBAAoB,GAAG,SAAS;CAGxE;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,GACnB,oBAAoB,CAEtB"}
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "@vived/core";
2
+ export declare abstract class StoreAssetInCacheUC extends AppObjectUC {
3
+ static readonly type = "StoreAssetInCacheUC";
4
+ abstract storeAsset(assetId: string, content: Blob, contentType?: string): Promise<void>;
5
+ static get(appObjects: AppObjectRepo): StoreAssetInCacheUC | undefined;
6
+ }
7
+ export declare function makeStoreAssetInCacheUC(appObject: AppObject): StoreAssetInCacheUC;
8
+ //# sourceMappingURL=StoreAssetInCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreAssetInCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/UCs/StoreAssetInCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EAEZ,MAAM,aAAa,CAAC;AAGrB,8BAAsB,mBAAoB,SAAQ,WAAW;IAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAyB;IAE7C,QAAQ,CAAC,UAAU,CACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,IAAI,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAEhB,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS;CAGvE;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,GACnB,mBAAmB,CAErB"}
@@ -0,0 +1,13 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "@vived/core";
2
+ export declare abstract class StoreScriptInCacheUC extends AppObjectUC {
3
+ static readonly type = "StoreScriptInCacheUC";
4
+ abstract storeScript(url: string, content: string): Promise<void>;
5
+ abstract extractScriptInfo(url: string): {
6
+ appId: string;
7
+ version: string;
8
+ scriptPath: string;
9
+ };
10
+ static get(appObjects: AppObjectRepo): StoreScriptInCacheUC | undefined;
11
+ }
12
+ export declare function makeStoreScriptInCacheUC(appObject: AppObject): StoreScriptInCacheUC;
13
+ //# sourceMappingURL=StoreScriptInCacheUC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreScriptInCacheUC.d.ts","sourceRoot":"","sources":["../../../../src/Cache/UCs/StoreScriptInCacheUC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EAEZ,MAAM,aAAa,CAAC;AAGrB,8BAAsB,oBAAqB,SAAQ,WAAW;IAC5D,MAAM,CAAC,QAAQ,CAAC,IAAI,0BAA0B;IAE9C,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACjE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;QACvC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB;IAED,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,oBAAoB,GAAG,SAAS;CAGxE;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,GACnB,oBAAoB,CAEtB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Cache Use Cases
3
+ *
4
+ * Implementation of specific cache operations
5
+ */
6
+ export * from "./GetScriptFromCacheUC";
7
+ export * from "./StoreScriptInCacheUC";
8
+ export * from "./GetAssetFromCacheUC";
9
+ export * from "./StoreAssetInCacheUC";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Cache/UCs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./Entities";
2
+ export * from "./Factories";
3
+ export * from "./Mocks";
4
+ export * from "./UCs";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Cache/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -2,6 +2,7 @@ export * from "./Apps";
2
2
  export * from "./AppSandbox";
3
3
  export * from "./AssetPlugin";
4
4
  export * from "./Assets";
5
+ export * from "./Cache";
5
6
  export * from "./ChallengeResults";
6
7
  export * from "./Dialog";
7
8
  export * from "./Dispatcher";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/host",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "Public Host package for the VIVED Learning App system",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",