@hot-updater/react-native 1.0.0-rc.4 → 1.0.0-rc.41

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 (317) hide show
  1. package/android/build.gradle +13 -2
  2. package/android/proguard-rules.pro +8 -2
  3. package/android/src/bridge/BridgeReactInstance.kt +38 -0
  4. package/android/src/bridgeless/BridgeReactInstance.kt +24 -0
  5. package/android/src/main/java/com/hotupdater/ActivityStartGate.kt +94 -0
  6. package/android/src/main/java/com/hotupdater/BuiltInAssetResolver.kt +286 -0
  7. package/android/src/main/java/com/hotupdater/BundleFileStorageService.kt +1064 -844
  8. package/android/src/main/java/com/hotupdater/BundleMetadata.kt +50 -11
  9. package/android/src/main/java/com/hotupdater/FileManagerService.kt +45 -0
  10. package/android/src/main/java/com/hotupdater/HotUpdaterException.kt +287 -22
  11. package/android/src/main/java/com/hotupdater/HotUpdaterImpl.kt +46 -30
  12. package/android/src/main/java/com/hotupdater/HotUpdaterRecoveryManager.kt +75 -192
  13. package/android/src/main/java/com/hotupdater/HotUpdaterRecoveryState.kt +64 -0
  14. package/android/src/main/java/com/hotupdater/InstallIdentityService.kt +37 -0
  15. package/android/src/main/java/com/hotupdater/KeyValueStorageService.kt +86 -0
  16. package/android/src/main/java/com/hotupdater/NetworkState.kt +31 -0
  17. package/android/src/main/java/com/hotupdater/NoBackupStorage.kt +17 -0
  18. package/android/src/main/java/com/hotupdater/OkHttpDownloadService.kt +127 -50
  19. package/android/src/main/java/com/hotupdater/ReactNativeValueConverters.kt +34 -0
  20. package/android/src/main/java/com/hotupdater/TarArchiveInputStream.kt +214 -375
  21. package/android/src/main/java/com/hotupdater/TarBrArchiveExtractor.kt +119 -0
  22. package/android/src/newarch/HotUpdater.kt +7 -9
  23. package/android/src/newarch/HotUpdaterModule.kt +109 -84
  24. package/android/src/newarch/JavaScriptExceptionHooks.kt +48 -0
  25. package/android/src/newarch/ReactIntegrationManager.kt +6 -32
  26. package/android/src/oldarch/HotUpdater.kt +7 -9
  27. package/android/src/oldarch/HotUpdaterModule.kt +98 -74
  28. package/android/src/oldarch/HotUpdaterSpec.kt +4 -6
  29. package/android/src/oldarch/JavaScriptExceptionHooks.kt +71 -0
  30. package/ios/HotUpdater/Internal/BrotliFileDecompressor.swift +167 -0
  31. package/ios/HotUpdater/Internal/BuiltInAssetResolver.swift +196 -0
  32. package/ios/HotUpdater/Internal/BundleFileStorageService.swift +1032 -1116
  33. package/ios/HotUpdater/Internal/BundleMetadata.swift +61 -54
  34. package/ios/HotUpdater/Internal/FileManagerService.swift +48 -0
  35. package/ios/HotUpdater/Internal/FileUtilities.swift +64 -0
  36. package/ios/HotUpdater/Internal/HotUpdater-Bridging-Header.h +0 -1
  37. package/ios/HotUpdater/Internal/HotUpdater.mm +32 -67
  38. package/ios/HotUpdater/Internal/HotUpdaterImpl.swift +229 -73
  39. package/ios/HotUpdater/Internal/KeyValueStorageService.swift +71 -0
  40. package/ios/HotUpdater/Internal/NotificationExtension.swift +0 -2
  41. package/ios/HotUpdater/Internal/TarArchiveExtractor.swift +182 -311
  42. package/ios/HotUpdater/Internal/URLSessionDownloadService.swift +119 -71
  43. package/ios/HotUpdater/Internal/UpdateFailure.swift +390 -0
  44. package/ios/HotUpdater/Recovery/HotUpdaterRecovery.h +16 -0
  45. package/ios/HotUpdater/Recovery/HotUpdaterRecovery.mm +83 -0
  46. package/ios/HotUpdater/Recovery/HotUpdaterRecoveryHooks.mm +49 -0
  47. package/lib/commonjs/appReady.js +96 -0
  48. package/lib/commonjs/appReady.js.map +1 -0
  49. package/lib/commonjs/checkForUpdate.js +121 -69
  50. package/lib/commonjs/checkForUpdate.js.map +1 -1
  51. package/lib/commonjs/clientPlugin.js +13 -0
  52. package/lib/commonjs/clientPlugin.js.map +1 -0
  53. package/lib/commonjs/error.js +5 -14
  54. package/lib/commonjs/error.js.map +1 -1
  55. package/lib/commonjs/fetchJSON.js +16 -27
  56. package/lib/commonjs/fetchJSON.js.map +1 -1
  57. package/lib/commonjs/fetchUpdateResponse.js +60 -0
  58. package/lib/commonjs/fetchUpdateResponse.js.map +1 -0
  59. package/lib/commonjs/httpClient.js +64 -95
  60. package/lib/commonjs/httpClient.js.map +1 -1
  61. package/lib/commonjs/index.js +355 -324
  62. package/lib/commonjs/index.js.map +1 -1
  63. package/lib/commonjs/init.types.js +6 -0
  64. package/lib/commonjs/init.types.js.map +1 -0
  65. package/lib/commonjs/native.js +77 -63
  66. package/lib/commonjs/native.js.map +1 -1
  67. package/lib/commonjs/pluginHost.js +41 -0
  68. package/lib/commonjs/pluginHost.js.map +1 -0
  69. package/lib/commonjs/releaseCatalogCache.js +36 -87
  70. package/lib/commonjs/releaseCatalogCache.js.map +1 -1
  71. package/lib/commonjs/sdkVersion.js +1 -1
  72. package/lib/commonjs/sdkVersion.js.map +1 -1
  73. package/lib/commonjs/specs/NativeHotUpdater.js.map +1 -1
  74. package/lib/commonjs/store.js +3 -10
  75. package/lib/commonjs/store.js.map +1 -1
  76. package/lib/commonjs/updateError.js +145 -0
  77. package/lib/commonjs/updateError.js.map +1 -0
  78. package/lib/commonjs/wrap.js +46 -38
  79. package/lib/commonjs/wrap.js.map +1 -1
  80. package/lib/module/appReady.js +90 -0
  81. package/lib/module/appReady.js.map +1 -0
  82. package/lib/module/checkForUpdate.js +114 -64
  83. package/lib/module/checkForUpdate.js.map +1 -1
  84. package/lib/module/clientPlugin.js +4 -0
  85. package/lib/module/clientPlugin.js.map +1 -0
  86. package/lib/module/error.js +5 -14
  87. package/lib/module/error.js.map +1 -1
  88. package/lib/module/fetchJSON.js +14 -26
  89. package/lib/module/fetchJSON.js.map +1 -1
  90. package/lib/module/fetchUpdateResponse.js +55 -0
  91. package/lib/module/fetchUpdateResponse.js.map +1 -0
  92. package/lib/module/httpClient.js +63 -94
  93. package/lib/module/httpClient.js.map +1 -1
  94. package/lib/module/index.js +335 -327
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/module/init.types.js +4 -0
  97. package/lib/module/init.types.js.map +1 -0
  98. package/lib/module/native.js +70 -56
  99. package/lib/module/native.js.map +1 -1
  100. package/lib/module/pluginHost.js +36 -0
  101. package/lib/module/pluginHost.js.map +1 -0
  102. package/lib/module/releaseCatalogCache.js +32 -82
  103. package/lib/module/releaseCatalogCache.js.map +1 -1
  104. package/lib/module/sdkVersion.js +1 -1
  105. package/lib/module/sdkVersion.js.map +1 -1
  106. package/lib/module/specs/NativeHotUpdater.js.map +1 -1
  107. package/lib/module/store.js +3 -10
  108. package/lib/module/store.js.map +1 -1
  109. package/lib/module/updateError.js +139 -0
  110. package/lib/module/updateError.js.map +1 -0
  111. package/lib/module/wrap.js +47 -38
  112. package/lib/module/wrap.js.map +1 -1
  113. package/lib/typescript/commonjs/appReady.d.ts +30 -0
  114. package/lib/typescript/commonjs/appReady.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/checkForUpdate.d.ts +20 -6
  116. package/lib/typescript/commonjs/checkForUpdate.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/clientPlugin.d.ts +2 -0
  118. package/lib/typescript/commonjs/clientPlugin.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/error.d.ts +5 -14
  120. package/lib/typescript/commonjs/error.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/fetchJSON.d.ts +5 -5
  122. package/lib/typescript/commonjs/fetchJSON.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/fetchUpdateResponse.d.ts +14 -0
  124. package/lib/typescript/commonjs/fetchUpdateResponse.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/httpClient.d.ts +5 -34
  126. package/lib/typescript/commonjs/httpClient.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/index.d.ts +124 -116
  128. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/init.types.d.ts +21 -0
  130. package/lib/typescript/commonjs/init.types.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/native.d.ts +32 -25
  132. package/lib/typescript/commonjs/native.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/pluginHost.d.ts +8 -0
  134. package/lib/typescript/commonjs/pluginHost.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/releaseCatalogCache.d.ts +8 -14
  136. package/lib/typescript/commonjs/releaseCatalogCache.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/sdkVersion.d.ts +1 -1
  138. package/lib/typescript/commonjs/sdkVersion.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts +35 -47
  140. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/store.d.ts +1 -3
  142. package/lib/typescript/commonjs/store.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/types.d.ts +1 -1
  144. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/updateError.d.ts +26 -0
  146. package/lib/typescript/commonjs/updateError.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/wrap.d.ts +2 -3
  148. package/lib/typescript/commonjs/wrap.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/wrap.types.d.ts +13 -41
  150. package/lib/typescript/commonjs/wrap.types.d.ts.map +1 -1
  151. package/lib/typescript/module/appReady.d.ts +30 -0
  152. package/lib/typescript/module/appReady.d.ts.map +1 -0
  153. package/lib/typescript/module/checkForUpdate.d.ts +20 -6
  154. package/lib/typescript/module/checkForUpdate.d.ts.map +1 -1
  155. package/lib/typescript/module/clientPlugin.d.ts +2 -0
  156. package/lib/typescript/module/clientPlugin.d.ts.map +1 -0
  157. package/lib/typescript/module/error.d.ts +5 -14
  158. package/lib/typescript/module/error.d.ts.map +1 -1
  159. package/lib/typescript/module/fetchJSON.d.ts +5 -5
  160. package/lib/typescript/module/fetchJSON.d.ts.map +1 -1
  161. package/lib/typescript/module/fetchUpdateResponse.d.ts +14 -0
  162. package/lib/typescript/module/fetchUpdateResponse.d.ts.map +1 -0
  163. package/lib/typescript/module/httpClient.d.ts +5 -34
  164. package/lib/typescript/module/httpClient.d.ts.map +1 -1
  165. package/lib/typescript/module/index.d.ts +124 -116
  166. package/lib/typescript/module/index.d.ts.map +1 -1
  167. package/lib/typescript/module/init.types.d.ts +21 -0
  168. package/lib/typescript/module/init.types.d.ts.map +1 -0
  169. package/lib/typescript/module/native.d.ts +32 -25
  170. package/lib/typescript/module/native.d.ts.map +1 -1
  171. package/lib/typescript/module/pluginHost.d.ts +8 -0
  172. package/lib/typescript/module/pluginHost.d.ts.map +1 -0
  173. package/lib/typescript/module/releaseCatalogCache.d.ts +8 -14
  174. package/lib/typescript/module/releaseCatalogCache.d.ts.map +1 -1
  175. package/lib/typescript/module/sdkVersion.d.ts +1 -1
  176. package/lib/typescript/module/sdkVersion.d.ts.map +1 -1
  177. package/lib/typescript/module/specs/NativeHotUpdater.d.ts +35 -47
  178. package/lib/typescript/module/specs/NativeHotUpdater.d.ts.map +1 -1
  179. package/lib/typescript/module/store.d.ts +1 -3
  180. package/lib/typescript/module/store.d.ts.map +1 -1
  181. package/lib/typescript/module/types.d.ts +1 -1
  182. package/lib/typescript/module/types.d.ts.map +1 -1
  183. package/lib/typescript/module/updateError.d.ts +26 -0
  184. package/lib/typescript/module/updateError.d.ts.map +1 -0
  185. package/lib/typescript/module/wrap.d.ts +2 -3
  186. package/lib/typescript/module/wrap.d.ts.map +1 -1
  187. package/lib/typescript/module/wrap.types.d.ts +13 -41
  188. package/lib/typescript/module/wrap.types.d.ts.map +1 -1
  189. package/package.json +8 -4
  190. package/src/appReady.ts +147 -0
  191. package/src/checkForUpdate.ts +156 -89
  192. package/src/clientPlugin.ts +21 -0
  193. package/src/error.ts +5 -15
  194. package/src/fetchJSON.ts +14 -30
  195. package/src/fetchUpdateResponse.ts +60 -0
  196. package/src/httpClient.ts +89 -160
  197. package/src/index.ts +413 -425
  198. package/src/init.types.ts +24 -0
  199. package/src/native.ts +101 -105
  200. package/src/pluginHost.ts +52 -0
  201. package/src/releaseCatalogCache.ts +43 -172
  202. package/src/sdkVersion.ts +1 -1
  203. package/src/specs/NativeHotUpdater.ts +34 -48
  204. package/src/store.ts +2 -23
  205. package/src/types.ts +1 -1
  206. package/src/updateError.ts +167 -0
  207. package/src/wrap.tsx +60 -43
  208. package/src/wrap.types.ts +18 -46
  209. package/android/src/main/java/com/hotupdater/DecompressService.kt +0 -89
  210. package/android/src/main/java/com/hotupdater/DecompressionStrategy.kt +0 -26
  211. package/android/src/main/java/com/hotupdater/TarBrDecompressionStrategy.kt +0 -117
  212. package/android/src/main/java/com/hotupdater/TarGzDecompressionStrategy.kt +0 -117
  213. package/android/src/main/java/com/hotupdater/ZipDecompressionStrategy.kt +0 -192
  214. package/android/src/test/java/com/hotupdater/BsdiffPatchTest.kt +0 -46
  215. package/android/src/test/java/com/hotupdater/BundleFileStorageServiceTest.kt +0 -799
  216. package/android/src/test/java/com/hotupdater/HotUpdaterImplTest.kt +0 -273
  217. package/android/src/test/java/com/hotupdater/NativeConfigUtilsTest.kt +0 -20
  218. package/android/src/test/java/com/hotupdater/OkHttpDownloadServiceTest.kt +0 -111
  219. package/android/src/test/java/com/hotupdater/RelativePathResolverTest.kt +0 -41
  220. package/android/src/test/java/com/hotupdater/ReleaseCatalogCacheServiceTest.kt +0 -118
  221. package/android/src/test/java/com/hotupdater/TarArchiveInputStreamTest.kt +0 -68
  222. package/ios/HotUpdater/Internal/ArchiveExtractionUtilities.swift +0 -178
  223. package/ios/HotUpdater/Internal/DecompressService.swift +0 -112
  224. package/ios/HotUpdater/Internal/DecompressionStrategy.swift +0 -22
  225. package/ios/HotUpdater/Internal/StreamingTarArchiveExtractor.swift +0 -370
  226. package/ios/HotUpdater/Internal/TarBrDecompressionStrategy.swift +0 -39
  227. package/ios/HotUpdater/Internal/TarGzDecompressionStrategy.swift +0 -59
  228. package/ios/HotUpdater/Internal/ZipArchiveExtractor.swift +0 -482
  229. package/ios/HotUpdater/Internal/ZipDecompressionStrategy.swift +0 -56
  230. package/lib/commonjs/catalogCacheNative.spec.js +0 -31
  231. package/lib/commonjs/catalogCacheNative.spec.js.map +0 -1
  232. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js +0 -616
  233. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js.map +0 -1
  234. package/lib/commonjs/httpClient.spec.js +0 -102
  235. package/lib/commonjs/httpClient.spec.js.map +0 -1
  236. package/lib/commonjs/index.spec.js +0 -302
  237. package/lib/commonjs/index.spec.js.map +0 -1
  238. package/lib/commonjs/iosInterop.spec.js +0 -18
  239. package/lib/commonjs/iosInterop.spec.js.map +0 -1
  240. package/lib/commonjs/native.spec.js +0 -883
  241. package/lib/commonjs/native.spec.js.map +0 -1
  242. package/lib/commonjs/notifyAppReadyInsights.boundary.spec.js +0 -218
  243. package/lib/commonjs/notifyAppReadyInsights.boundary.spec.js.map +0 -1
  244. package/lib/commonjs/notifyAppReadyInsights.js +0 -133
  245. package/lib/commonjs/notifyAppReadyInsights.js.map +0 -1
  246. package/lib/commonjs/notifyAppReadyInsights.spec.js +0 -246
  247. package/lib/commonjs/notifyAppReadyInsights.spec.js.map +0 -1
  248. package/lib/commonjs/notifyAppReadyInsights.test-utils.js +0 -24
  249. package/lib/commonjs/notifyAppReadyInsights.test-utils.js.map +0 -1
  250. package/lib/commonjs/notifyAppReadyInsights.transport.spec.js +0 -117
  251. package/lib/commonjs/notifyAppReadyInsights.transport.spec.js.map +0 -1
  252. package/lib/commonjs/releaseCatalogCache.spec.js +0 -195
  253. package/lib/commonjs/releaseCatalogCache.spec.js.map +0 -1
  254. package/lib/commonjs/releaseCatalogCacheNativeContract.spec.js +0 -64
  255. package/lib/commonjs/releaseCatalogCacheNativeContract.spec.js.map +0 -1
  256. package/lib/commonjs/store.notification.spec.js +0 -76
  257. package/lib/commonjs/store.notification.spec.js.map +0 -1
  258. package/lib/commonjs/store.spec.js +0 -316
  259. package/lib/commonjs/store.spec.js.map +0 -1
  260. package/lib/commonjs/wrap.spec.js +0 -329
  261. package/lib/commonjs/wrap.spec.js.map +0 -1
  262. package/lib/module/catalogCacheNative.spec.js +0 -31
  263. package/lib/module/catalogCacheNative.spec.js.map +0 -1
  264. package/lib/module/checkForUpdate.releaseCatalog.spec.js +0 -615
  265. package/lib/module/checkForUpdate.releaseCatalog.spec.js.map +0 -1
  266. package/lib/module/httpClient.spec.js +0 -102
  267. package/lib/module/httpClient.spec.js.map +0 -1
  268. package/lib/module/index.spec.js +0 -301
  269. package/lib/module/index.spec.js.map +0 -1
  270. package/lib/module/iosInterop.spec.js +0 -18
  271. package/lib/module/iosInterop.spec.js.map +0 -1
  272. package/lib/module/native.spec.js +0 -882
  273. package/lib/module/native.spec.js.map +0 -1
  274. package/lib/module/notifyAppReadyInsights.boundary.spec.js +0 -217
  275. package/lib/module/notifyAppReadyInsights.boundary.spec.js.map +0 -1
  276. package/lib/module/notifyAppReadyInsights.js +0 -128
  277. package/lib/module/notifyAppReadyInsights.js.map +0 -1
  278. package/lib/module/notifyAppReadyInsights.spec.js +0 -245
  279. package/lib/module/notifyAppReadyInsights.spec.js.map +0 -1
  280. package/lib/module/notifyAppReadyInsights.test-utils.js +0 -18
  281. package/lib/module/notifyAppReadyInsights.test-utils.js.map +0 -1
  282. package/lib/module/notifyAppReadyInsights.transport.spec.js +0 -116
  283. package/lib/module/notifyAppReadyInsights.transport.spec.js.map +0 -1
  284. package/lib/module/releaseCatalogCache.spec.js +0 -195
  285. package/lib/module/releaseCatalogCache.spec.js.map +0 -1
  286. package/lib/module/releaseCatalogCacheNativeContract.spec.js +0 -64
  287. package/lib/module/releaseCatalogCacheNativeContract.spec.js.map +0 -1
  288. package/lib/module/store.notification.spec.js +0 -77
  289. package/lib/module/store.notification.spec.js.map +0 -1
  290. package/lib/module/store.spec.js +0 -315
  291. package/lib/module/store.spec.js.map +0 -1
  292. package/lib/module/wrap.spec.js +0 -330
  293. package/lib/module/wrap.spec.js.map +0 -1
  294. package/lib/typescript/commonjs/notifyAppReadyInsights.d.ts +0 -13
  295. package/lib/typescript/commonjs/notifyAppReadyInsights.d.ts.map +0 -1
  296. package/lib/typescript/commonjs/notifyAppReadyInsights.test-utils.d.ts +0 -8
  297. package/lib/typescript/commonjs/notifyAppReadyInsights.test-utils.d.ts.map +0 -1
  298. package/lib/typescript/module/notifyAppReadyInsights.d.ts +0 -13
  299. package/lib/typescript/module/notifyAppReadyInsights.d.ts.map +0 -1
  300. package/lib/typescript/module/notifyAppReadyInsights.test-utils.d.ts +0 -8
  301. package/lib/typescript/module/notifyAppReadyInsights.test-utils.d.ts.map +0 -1
  302. package/src/catalogCacheNative.spec.ts +0 -63
  303. package/src/checkForUpdate.releaseCatalog.spec.ts +0 -612
  304. package/src/httpClient.spec.ts +0 -132
  305. package/src/index.spec.ts +0 -337
  306. package/src/iosInterop.spec.ts +0 -30
  307. package/src/native.spec.ts +0 -945
  308. package/src/notifyAppReadyInsights.boundary.spec.ts +0 -234
  309. package/src/notifyAppReadyInsights.spec.ts +0 -243
  310. package/src/notifyAppReadyInsights.test-utils.ts +0 -31
  311. package/src/notifyAppReadyInsights.transport.spec.ts +0 -130
  312. package/src/notifyAppReadyInsights.ts +0 -194
  313. package/src/releaseCatalogCache.spec.ts +0 -282
  314. package/src/releaseCatalogCacheNativeContract.spec.ts +0 -80
  315. package/src/store.notification.spec.ts +0 -92
  316. package/src/store.spec.ts +0 -372
  317. package/src/wrap.spec.ts +0 -406
@@ -1,25 +1,19 @@
1
- import { type ReleaseCatalog } from "@hot-updater/core";
2
- export declare const MAX_RELEASE_CATALOG_WIRE_BYTES: number;
1
+ import { type ExpectedReleaseCatalogScope, type ReleaseCatalog } from "@hot-updater/protocol";
2
+ import { type UpdateRequest } from "./fetchUpdateResponse";
3
3
  export declare const MAX_RELEASE_CATALOG_CACHE_ENTRY_BYTES: number;
4
- export type ExpectedReleaseCatalogScope = {
5
- readonly channelKey: string;
6
- readonly platform: "ios" | "android";
7
- } & ({
8
- readonly strategy: "APP_VERSION";
9
- readonly fingerprintHash?: never;
10
- } | {
11
- readonly strategy: "FINGERPRINT";
12
- readonly fingerprintHash: string;
13
- });
14
4
  type FetchReleaseCatalogInput = {
15
5
  readonly baseURL: string;
16
6
  readonly expectedScope: ExpectedReleaseCatalogScope;
17
7
  readonly requestHeaders?: Record<string, string>;
18
8
  readonly requestTimeout?: number;
19
9
  readonly url: string;
10
+ readonly onResponse?: UpdateRequest["onResponse"];
20
11
  };
21
- export declare const hasExpectedReleaseCatalogScope: (catalog: ReleaseCatalog, expected: ExpectedReleaseCatalogScope) => boolean;
22
12
  export declare const createReleaseCatalogCachePartition: (input: Pick<FetchReleaseCatalogInput, "baseURL" | "requestHeaders" | "url">) => string;
23
- export declare const fetchReleaseCatalogWithCache: (input: FetchReleaseCatalogInput) => Promise<ReleaseCatalog>;
13
+ /**
14
+ * Fetches a scope's catalog, or null when the server answers that the scope
15
+ * has none (a 404 with `x-hot-updater-catalog: none`).
16
+ */
17
+ export declare const fetchReleaseCatalogWithCache: (input: FetchReleaseCatalogInput) => Promise<ReleaseCatalog | null>;
24
18
  export {};
25
19
  //# sourceMappingURL=releaseCatalogCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"releaseCatalogCache.d.ts","sourceRoot":"","sources":["../../../src/releaseCatalogCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B,eAAO,MAAM,8BAA8B,QACA,CAAC;AAC5C,eAAO,MAAM,qCAAqC,QACG,CAAC;AAiCtD,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;CACtC,GAAG,CACA;IACE,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC;CAClC,GACD;IACE,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CA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,eAAO,MAAM,kCAAkC,UACtC,IAAI,CAAC,wBAAwB,EAAE,SAAS,GAAG,gBAAgB,GAAG,KAAK,CAAC,KAC1E,MAMC,CAAC;AA6EL;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAChC,wBAAwB,KAC9B,OAAO,CAAC,cAAc,GAAG,IAAI,CAa/B,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const HOT_UPDATER_SDK_VERSION = "1.0.0-rc.4";
1
+ export declare const HOT_UPDATER_SDK_VERSION = "1.0.0-rc.41";
2
2
  //# sourceMappingURL=sdkVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdkVersion.d.ts","sourceRoot":"","sources":["../../../src/sdkVersion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,eAAe,CAAC"}
1
+ {"version":3,"file":"sdkVersion.d.ts","sourceRoot":"","sources":["../../../src/sdkVersion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,gBAAgB,CAAC"}
@@ -1,46 +1,20 @@
1
1
  import type { TurboModule } from "react-native";
2
2
  import type { UnsafeObject } from "react-native/Libraries/Types/CodegenTypes";
3
- export interface ChangedAsset {
4
- file?: {
5
- compression?: "br" | null;
6
- url: string;
7
- } | null;
8
- fileHash: string;
9
- patch?: {
10
- algorithm: "bsdiff";
11
- baseBundleId: string;
12
- baseFileHash: string;
13
- patchFileHash: string;
14
- patchUrl: string;
15
- } | null;
16
- }
17
3
  export interface UpdateBundleParams {
18
4
  bundleId: string;
19
5
  channel?: string;
20
- fileUrl: string | null;
21
- /**
22
- * File hash for integrity/signature verification.
23
- *
24
- * Format depends on signing configuration:
25
- * - Signed: `sig:<base64_signature>` - Native will verify signature (and implicitly hash)
26
- * - Unsigned: `<hex_hash>` - Native will verify SHA256 hash only
27
- *
28
- * Native determines verification mode by checking for "sig:" prefix.
29
- */
30
- fileHash: string | null;
31
6
  /**
32
- * Optional signed manifest URL for manifest-driven installation.
7
+ * Signed manifest URL for installation.
33
8
  */
34
- manifestUrl?: string | null;
9
+ manifestUrl: string;
35
10
  /**
36
11
  * File hash/signature for the manifest file itself.
37
12
  */
38
- manifestFileHash?: string | null;
39
- /**
40
- * Per-file URLs for assets that must be downloaded instead of reused from
41
- * the currently active bundle.
42
- */
43
- changedAssets?: UnsafeObject | null;
13
+ manifestFileHash: string;
14
+ /** Optional tar.br URL; integrity and sizes come from the verified manifest. */
15
+ archiveUrl?: string | null;
16
+ /** Full protocol v1 target file descriptor map. */
17
+ assets: UnsafeObject;
44
18
  /** Full Release Catalog selection receipt committed with the staged Bundle. */
45
19
  selection?: UnsafeObject | null;
46
20
  }
@@ -56,18 +30,21 @@ export interface Spec extends TurboModule {
56
30
  * Downloads and applies a bundle update.
57
31
  *
58
32
  * @param params - Update bundle parameters
59
- * @returns Promise that resolves to true if successful
33
+ * @returns Promise that resolves, once the bundle is staged, to how it
34
+ * arrived: `{ delivery, patchFallback }`. `delivery` is "patch" when a
35
+ * bsdiff patch produced a file, "manifest" when only changed files were
36
+ * downloaded, or "archive" for the full archive; `patchFallback` is true
37
+ * when a patch was tried but the file or archive was downloaded instead.
60
38
  * @throws {HotUpdaterErrorCode} Rejects with one of the following error codes:
61
39
  *
62
40
  * Parameter validation:
63
41
  * - MISSING_BUNDLE_ID: Missing or empty bundleId
64
- * - INVALID_FILE_URL: Invalid fileUrl provided
42
+ * - INVALID_FILE_URL: Invalid manifest or asset URL provided
65
43
  *
66
44
  * Bundle storage:
67
45
  * - DIRECTORY_CREATION_FAILED: Failed to create bundle directory
68
46
  * - DOWNLOAD_FAILED: Failed to download bundle
69
47
  * - INCOMPLETE_DOWNLOAD: Download incomplete (size mismatch)
70
- * - EXTRACTION_FORMAT_ERROR: Invalid or corrupted archive format
71
48
  * - INVALID_BUNDLE: Bundle missing required platform files
72
49
  * - INSUFFICIENT_DISK_SPACE: Insufficient disk space
73
50
  * - MOVE_OPERATION_FAILED: Failed to move bundle files
@@ -82,8 +59,20 @@ export interface Spec extends TurboModule {
82
59
  *
83
60
  * Note: iOS normalizes rare signature/storage errors to SIGNATURE_VERIFICATION_FAILED
84
61
  * or UNKNOWN_ERROR to keep the JS error surface small.
85
- */
86
- updateBundle(params: UpdateBundleParams): Promise<boolean>;
62
+ *
63
+ * A rejection from the download or install also carries `userInfo`
64
+ * `{ stage, reason, resource?, httpStatus?, transport?, originCode? }`:
65
+ * `stage` is "download" (transfer and verification) or "install" (patch,
66
+ * extract, move into place); `reason` is one of "network", "http",
67
+ * "invalid_response", "hash_mismatch", "signature", "patch", "extract",
68
+ * "storage", or "unknown"; `resource` is what was being fetched or
69
+ * applied: "manifest", "file", "patch", or "archive". `httpStatus` is
70
+ * present when `reason` is "http", with `originCode`, the storage
71
+ * origin's XML error `<Code>` when the body names one. `transport` is
72
+ * present when no response arrived: "timeout", "dns", "tls",
73
+ * "connection", "offline", or "cancelled".
74
+ */
75
+ updateBundle(params: UpdateBundleParams): Promise<UnsafeObject>;
87
76
  /** Accepts and durably advances the catalog high-water for a scope. */
88
77
  acceptReleaseCatalog(params: UnsafeObject): boolean;
89
78
  /** Reads active/stable selection receipts and catalog high-water state. */
@@ -170,21 +159,20 @@ export interface Spec extends TurboModule {
170
159
  */
171
160
  getCohort: () => string;
172
161
  /**
173
- * Gets the persisted install id for this app installation.
162
+ * Gets the install id: a random id native creates once per app
163
+ * installation and keeps out of device backups.
174
164
  */
175
165
  getInstallId: () => string;
176
166
  /**
177
- * Gets the persisted nullable user id associated with this installation.
178
- */
179
- getUserId: () => string | null;
180
- /**
181
- * Gets the persisted nullable username associated with this installation.
167
+ * Reads a value from the SDK's persistent key-value store, which native
168
+ * keeps out of device backups. Returns null when the key has no value.
182
169
  */
183
- getUsername: () => string | null;
170
+ getStorageItem: (key: string) => string | null;
184
171
  /**
185
- * Persists nullable user identity fields associated with this installation.
172
+ * Writes a value to the SDK's persistent key-value store; null removes the
173
+ * key.
186
174
  */
187
- setUser: (userId: string | null, username: string | null) => void;
175
+ setStorageItem: (key: string, value: string | null) => void;
188
176
  addListener(eventName: string): void;
189
177
  removeListeners(count: number): void;
190
178
  readonly getConstants: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeHotUpdater.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeHotUpdater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE;QACL,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;QAC1B,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,IAAI,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE;QACN,SAAS,EAAE,QAAQ,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI,CAAC;CACV;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IAEvC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB;;;;OAIG;IACH,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AW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,CAAC;CACH"}
@@ -1,10 +1,8 @@
1
1
  import type { HotUpdaterDiffProgressDetails } from "./native";
2
2
  export type HotUpdaterState = {
3
3
  progress: number;
4
- downloadedBytes: number | undefined;
5
- totalBytes: number | undefined;
6
4
  isUpdateDownloaded: boolean;
7
- artifactType: "archive" | "diff" | null;
5
+ artifactType: "diff" | null;
8
6
  details: HotUpdaterDiffProgressDetails | null;
9
7
  };
10
8
  export declare const hotUpdaterStore: {
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,6BAA6B,EAE9B,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;CAC/C,CAAC;AAkMF,eAAO,MAAM,eAAe;;yBAnEE,OAAO,CAAC,eAAe,CAAC;0BAuDvB,MAAM,IAAI;CAYa,CAAC;AAEvD,eAAO,MAAM,kBAAkB,GAAI,CAAC,GAAG,eAAe,aAC1C,CAAC,QAAQ,EAAE,eAAe,KAAK,CAAC,MAQ3C,CAAC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,6BAA6B,EAE9B,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;CAC/C,CAAC;AA+KF,eAAO,MAAM,eAAe;;yBApDE,OAAO,CAAC,eAAe,CAAC;0BAwCvB,MAAM,IAAI;CAYa,CAAC;AAEvD,eAAO,MAAM,kBAAkB,GAAI,CAAC,GAAG,eAAe,aAC1C,CAAC,QAAQ,EAAE,eAAe,KAAK,CAAC,MAQ3C,CAAC"}
@@ -1,4 +1,4 @@
1
- export type HotUpdaterBaseURL = string | (() => string | Promise<string>);
1
+ export type { HotUpdaterBaseURL } from "@hot-updater/protocol";
2
2
  /**
3
3
  * Information about a signature verification failure.
4
4
  * This is a security-critical event that indicates the bundle
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAgBpE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,4BAA4B,CAS9B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAgBpE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,4BAA4B,CAS9B"}
@@ -0,0 +1,26 @@
1
+ import type { UpdateError, UpdateErrorResource, UpdateErrorStage } from "./clientPlugin";
2
+ import { HotUpdaterError } from "./error";
3
+ /**
4
+ * A response the SDK cannot use: a malformed or stale catalog, an artifact
5
+ * in another protocol, or an invalid URL.
6
+ */
7
+ export declare class InvalidUpdateResponseError extends HotUpdaterError {
8
+ constructor(message: string, options?: {
9
+ cause?: unknown;
10
+ });
11
+ }
12
+ /** A request the server answered with a status the SDK does not accept. */
13
+ export declare class UpdateHttpError extends HotUpdaterError {
14
+ readonly status: number;
15
+ constructor(status: number, statusText: string);
16
+ }
17
+ type Classification = Pick<UpdateError, "stage" | "reason" | "resource" | "httpStatus" | "originCode" | "transport">;
18
+ /**
19
+ * Where and why an update failed, or null when the error is not an update
20
+ * failure. Native rejections carry their own classification; an error the
21
+ * SDK's JavaScript raised happened in `stage`, fetching `resource` when one
22
+ * is given.
23
+ */
24
+ export declare const classifyUpdateError: (error: unknown, stage: UpdateErrorStage, resource?: UpdateErrorResource) => Classification | null;
25
+ export {};
26
+ //# sourceMappingURL=updateError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateError.d.ts","sourceRoot":"","sources":["../../../src/updateError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EAEX,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,eAAe;IAC7D,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAIzD;CACF;AAED,2EAA2E;AAC3E,qBAAa,eAAgB,SAAQ,eAAe;IAEhD,QAAQ,CAAC,MAAM,EAAE,MAAM;IADzB,YACW,MAAM,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAMnB;CACF;AAoCD,KAAK,cAAc,GAAG,IAAI,CACxB,WAAW,EACX,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CAC5E,CAAC;AAsCF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,UACvB,OAAO,SACP,gBAAgB,aACZ,mBAAmB,KAC7B,cAAc,GAAG,IA+CnB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import type { InternalInitOptions, InternalWrapOptions } from "./wrap.types";
3
- export type { AutoUpdateOptions, HotUpdaterFallbackComponentProps, HotUpdaterInitOptions, HotUpdaterOptions, InternalInitOptions, InternalWrapOptions, RunUpdateProcessResponse, } from "./wrap.types";
4
- export declare function init(options: InternalInitOptions): void;
2
+ import type { InternalWrapOptions } from "./wrap.types";
3
+ export type { HotUpdaterFallbackComponentProps, HotUpdaterWrapOptions, InternalWrapOptions, RunUpdateProcessResponse, } from "./wrap.types";
5
4
  export declare function wrap(options: InternalWrapOptions): <P extends object>(WrappedComponent: React.ComponentType<P>) => React.ComponentType<P>;
6
5
  //# sourceMappingURL=wrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../../../src/wrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,iBAAiB,EACjB,gCAAgC,EAChC,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,wBAAgB,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAEvD;AAED,wBAAgB,IAAI,CAClB,OAAO,EAAE,mBAAmB,GAC3B,CAAC,CAAC,SAAS,MAAM,EAClB,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KACrC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAuH1B"}
1
+ {"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../../../src/wrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,gCAAgC,EAChC,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,wBAAgB,IAAI,CAClB,OAAO,EAAE,mBAAmB,GAC3B,CAAC,CAAC,SAAS,MAAM,EAClB,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KACrC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAiJ1B"}
@@ -1,9 +1,6 @@
1
1
  import type React from "react";
2
- import type { HotUpdaterError } from "./error";
3
- import type { HotUpdaterHttpClient } from "./httpClient";
4
- import type { NotifyAppReadyResult } from "./native";
2
+ import type { CheckForUpdateOptions, CheckForUpdateResult } from "./checkForUpdate";
5
3
  import type { HotUpdaterState } from "./store";
6
- import type { HotUpdaterBaseURL } from "./types";
7
4
  export interface RunUpdateProcessResponse {
8
5
  status: "ROLLBACK" | "UPDATE" | "UP_TO_DATE";
9
6
  shouldForceUpdate: boolean;
@@ -14,51 +11,26 @@ export type UpdateStatus = "CHECK_FOR_UPDATE" | "UPDATING" | "UPDATE_PROCESS_COM
14
11
  export type HotUpdaterFallbackComponentProps = {
15
12
  status: Exclude<UpdateStatus, "UPDATE_PROCESS_COMPLETED">;
16
13
  progress: number;
17
- downloadedBytes: HotUpdaterState["downloadedBytes"];
18
- totalBytes: HotUpdaterState["totalBytes"];
19
14
  message: string | null;
20
15
  artifactType: HotUpdaterState["artifactType"];
21
16
  details: HotUpdaterState["details"];
22
17
  };
23
- interface CommonHotUpdaterOptions {
24
- /**
25
- * Sends app-ready transitions and same-Bundle Release adoptions to the
26
- * configured server. Defaults to `true`; set to `false` to disable client
27
- * reporting.
28
- */
29
- insights?: boolean;
30
- /** Base URL of a server exposing the Hot Updater v1 client HTTP protocol. */
31
- baseURL: HotUpdaterBaseURL;
32
- requestHeaders?: Record<string, string>;
33
- requestTimeout?: number;
34
- onNotifyAppReady?: (result: NotifyAppReadyResult) => void;
35
- onError?: (error: HotUpdaterError | Error | unknown) => void;
36
- }
37
- export type AutoUpdateOptions = CommonHotUpdaterOptions & {
38
- updateStrategy: "fingerprint" | "appVersion";
39
- fallbackComponent?: React.FC<HotUpdaterFallbackComponentProps>;
40
- onProgress?: (progress: number) => void;
41
- reloadOnForceUpdate?: boolean;
42
- onUpdateProcessCompleted?: (response: RunUpdateProcessResponse) => void;
43
- };
44
- export type HotUpdaterInitOptions = CommonHotUpdaterOptions;
45
- export type HotUpdaterOptions = AutoUpdateOptions;
46
- type InternalCommonOptions = {
47
- insights?: boolean;
48
- client: HotUpdaterHttpClient;
49
- requestHeaders?: Record<string, string>;
50
- requestTimeout?: number;
51
- onNotifyAppReady?: (result: NotifyAppReadyResult) => void;
52
- onError?: (error: HotUpdaterError | Error | unknown) => void;
53
- };
54
- type InternalAutoUpdateOptions = InternalCommonOptions & {
18
+ /**
19
+ * The update flow `hotUpdater.wrap` runs when the wrapped root mounts. The
20
+ * server, request settings, and plugins come from `HotUpdater.init`.
21
+ */
22
+ export interface HotUpdaterWrapOptions {
55
23
  updateStrategy: "fingerprint" | "appVersion";
56
24
  fallbackComponent?: React.FC<HotUpdaterFallbackComponentProps>;
57
25
  onProgress?: (progress: number) => void;
58
26
  reloadOnForceUpdate?: boolean;
59
27
  onUpdateProcessCompleted?: (response: RunUpdateProcessResponse) => void;
28
+ }
29
+ export type InternalWrapOptions = HotUpdaterWrapOptions & {
30
+ /** The instance's check, over the configuration of `HotUpdater.init`. */
31
+ checkForUpdate: (options: Pick<CheckForUpdateOptions, "updateStrategy">) => Promise<CheckForUpdateResult | null>;
32
+ /** Settles once `HotUpdater.init` has read this launch. */
33
+ appReady: () => Promise<unknown>;
34
+ onError: (error: unknown) => void;
60
35
  };
61
- export type InternalInitOptions = InternalCommonOptions;
62
- export type InternalWrapOptions = InternalAutoUpdateOptions;
63
- export {};
64
36
  //# sourceMappingURL=wrap.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrap.types.d.ts","sourceRoot":"","sources":["../../../src/wrap.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC7C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,YAAY,GACpB,kBAAkB,GAClB,UAAU,GACV,0BAA0B,CAAC;AAE/B,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,0BAA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A0B,CAAC;AAE/B,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,0BAA0B,CAAC,CAAC;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,aAAa,GAAG,YAAY,CAAC;IAC7C,iBAAiB,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACzE;AAED,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,GAAG;IACxD,yEAAyE;IACzE,cAAc,EAAE,CACd,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,KACnD,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAC1C,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { HotUpdaterError } from "./error";
2
+ import { type NotifyAppReadyResult } from "./native";
3
+ import type { PluginHost } from "./pluginHost";
4
+ export type NotifyAppReadyOptions = {
5
+ onNotifyAppReady?: (result: NotifyAppReadyResult) => void;
6
+ onError?: (error: HotUpdaterError | Error | unknown) => void;
7
+ };
8
+ /**
9
+ * The Release the running bundle was selected as: the active or stable
10
+ * selection that names it on the current channel.
11
+ */
12
+ export declare const getRunningReleaseId: (bundleId: string, channel: string) => string | null;
13
+ /** An instance's launch: read once, and reported to the instance's plugins. */
14
+ export interface LaunchReporter {
15
+ /**
16
+ * Reads this launch once native finalizes it and reports it to the
17
+ * plugins, once. It rejects only if `onError` throws.
18
+ */
19
+ read(options: NotifyAppReadyOptions): Promise<NotifyAppReadyResult | undefined>;
20
+ /** Settles once the launch was read, whether it was reported or failed. */
21
+ readonly appReady: Promise<unknown>;
22
+ /**
23
+ * Calls a plugin hook after the instance's `onAppReady`, so plugins see the
24
+ * launch before anything that followed it. The event is built now, from the
25
+ * state it describes, and only when a plugin listens.
26
+ */
27
+ emit: PluginHost["emitPluginHook"];
28
+ }
29
+ export declare const createLaunchReporter: (host: PluginHost) => LaunchReporter;
30
+ //# sourceMappingURL=appReady.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appReady.d.ts","sourceRoot":"","sources":["../../../src/appReady.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAKL,KAAK,oBAAoB,EAE1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,GAAG,OAAO,KAAK,IAAI,CAAC;CAC9D,CAAC;AAoBF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aACpB,MAAM,WACP,MAAM,KACd,MAAM,GAAG,IAQX,CAAC;AAyDF,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,IAAI,CACF,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;IAC7C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC;;;;OAIG;IACH,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,SAAU,UAAU,KAAG,cAoBvD,CAAC"}
@@ -1,11 +1,12 @@
1
- import { type ArtifactInfo } from "@hot-updater/core";
1
+ import { type LaunchReporter } from "./appReady";
2
+ import type { ReleaseTransitionKind, UpdateErrorResource, UpdateErrorStage } from "./clientPlugin";
2
3
  import type { HotUpdaterHttpClient } from "./httpClient";
4
+ export type { ReleaseTransitionKind };
3
5
  export interface CheckForUpdateOptions {
4
6
  /**
5
7
  * Update strategy
6
8
  * - "fingerprint": Use fingerprint hash to check for updates
7
9
  * - "appVersion": Use app version to check for updates
8
- * - Can override the strategy set in HotUpdater.wrap()
9
10
  */
10
11
  updateStrategy: "appVersion" | "fingerprint";
11
12
  /**
@@ -21,7 +22,7 @@ export interface CheckForUpdateOptions {
21
22
  */
22
23
  requestTimeout?: number;
23
24
  }
24
- export type CheckForUpdateResult = ArtifactInfo & {
25
+ export type CheckForUpdateResult = {
25
26
  readonly id: string;
26
27
  readonly message: string | null;
27
28
  readonly rolloutCohortCount: number;
@@ -32,14 +33,27 @@ export type CheckForUpdateResult = ArtifactInfo & {
32
33
  readonly transitionKind?: ReleaseTransitionKind;
33
34
  /**
34
35
  * Updates the bundle.
35
- * This method is equivalent to `HotUpdater.updateBundle()` but with all required arguments pre-filled.
36
+ * This method is equivalent to `hotUpdater.updateBundle()` but with all required arguments pre-filled.
36
37
  */
37
38
  updateBundle: () => Promise<boolean>;
38
39
  };
39
- export type ReleaseTransitionKind = "INSTALL" | "ADOPT_RELEASE" | "USE_EMBEDDED" | "USE_BUILTIN";
40
40
  export interface InternalCheckForUpdateOptions extends CheckForUpdateOptions {
41
- insights?: boolean;
42
41
  client: HotUpdaterHttpClient;
42
+ /** Calls the checking instance's plugin hooks. */
43
+ emit: LaunchReporter["emit"];
43
44
  }
45
+ /** The running bundle, the channel checked, and the update's target. */
46
+ type UpdateErrorScope = {
47
+ readonly channel: string;
48
+ readonly bundleId: string;
49
+ readonly updateStrategy: "fingerprint" | "appVersion";
50
+ readonly targetBundleId?: string;
51
+ readonly targetReleaseId?: string | null;
52
+ };
53
+ /**
54
+ * Tells plugins why an update failed, when it failed as an update. An error
55
+ * the SDK's JavaScript raised happened in `stage`, fetching `resource`.
56
+ */
57
+ export declare const reportUpdateError: (emit: LaunchReporter["emit"], error: unknown, stage: UpdateErrorStage, resource: UpdateErrorResource | undefined, scope: UpdateErrorScope) => void;
44
58
  export declare function checkForUpdate(options: InternalCheckForUpdateOptions): Promise<CheckForUpdateResult | null>;
45
59
  //# sourceMappingURL=checkForUpdate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkForUpdate.d.ts","sourceRoot":"","sources":["../../../src/checkForUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAGlB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAyBhF,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,cAAc,EAAE,YAAY,GAAG,aAAa,CAAC;IAE7C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG;IAChD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ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OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CA2EtC"}
@@ -0,0 +1,2 @@
1
+ export { defineClientPlugin, type AppReadyResult, type BundleDownloadedInfo, type ClientPluginApi, type ClientPluginApis, type HotUpdaterClientContext, type HotUpdaterClientHooks, type HotUpdaterClientPlugin, type HotUpdaterClientSetup, type HotUpdaterClientStorage, type ReleaseTransitionKind, type UpdateCheckResult, type UpdateError, type UpdateErrorReason, type UpdateErrorResource, type UpdateErrorStage, type UpdateErrorTransport, type UpdateHttpResponse, type UpdateStrategy, } from "@hot-updater/protocol";
2
+ //# sourceMappingURL=clientPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientPlugin.d.ts","sourceRoot":"","sources":["../../../src/clientPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB,MAAM,uBAAuB,CAAC"}
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Error Classification:
9
9
  * - Parameter Validation: Invalid or missing function parameters
10
- * - Bundle Storage: Errors during download, extraction, and storage
10
+ * - Bundle Storage: Errors during download, verification, and storage
11
11
  * - Signature Verification: Cryptographic verification failures (collapsed to a single public code)
12
12
  * - Internal: Platform-specific or unexpected errors
13
13
  *
@@ -23,8 +23,7 @@ export declare enum HotUpdaterErrorCode {
23
23
  */
24
24
  MISSING_BUNDLE_ID = "MISSING_BUNDLE_ID",
25
25
  /**
26
- * File URL is invalid or malformed.
27
- * Thrown when fileUrl parameter cannot be parsed as a valid URL.
26
+ * Manifest or asset URL is invalid or malformed.
28
27
  * @retryable false
29
28
  */
30
29
  INVALID_FILE_URL = "INVALID_FILE_URL",
@@ -48,23 +47,15 @@ export declare enum HotUpdaterErrorCode {
48
47
  * @retryable true - Download may succeed on retry
49
48
  */
50
49
  INCOMPLETE_DOWNLOAD = "INCOMPLETE_DOWNLOAD",
51
- /**
52
- * Bundle archive format is invalid or corrupted.
53
- * Thrown when ZIP file has wrong magic bytes, invalid structure, or unsupported format.
54
- * Also thrown for path traversal attempts during extraction.
55
- * @retryable false - Indicates corrupted or malicious bundle
56
- */
57
- EXTRACTION_FORMAT_ERROR = "EXTRACTION_FORMAT_ERROR",
58
50
  /**
59
51
  * Bundle missing required platform files.
60
- * Thrown when extracted bundle doesn't contain index.android.bundle (Android)
52
+ * Thrown when the staged bundle doesn't contain index.android.bundle (Android)
61
53
  * or main.jsbundle (iOS).
62
54
  * @retryable false - Indicates incorrectly built bundle
63
55
  */
64
56
  INVALID_BUNDLE = "INVALID_BUNDLE",
65
57
  /**
66
- * Insufficient disk space for bundle download and extraction.
67
- * Thrown when available disk space is less than required (file size * 2).
58
+ * Insufficient disk space for bundle staging.
68
59
  * Error message includes required and available bytes.
69
60
  * @retryable false - User must free up disk space
70
61
  */
@@ -87,7 +78,7 @@ export declare enum HotUpdaterErrorCode {
87
78
  /**
88
79
  * Bundle is in crashed history and cannot be applied.
89
80
  * Thrown when attempting to install a bundle that previously caused a crash.
90
- * Use HotUpdater.clearCrashHistory() to allow retrying this bundle.
81
+ * Use hotUpdater.clearCrashHistory() to allow retrying this bundle.
91
82
  * @retryable false - Bundle was marked as crashed for safety
92
83
  */
93
84
  BUNDLE_IN_CRASHED_HISTORY = "BUNDLE_IN_CRASHED_HISTORY",
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/error.ts"],"names":[],"mappings":"AAAA;;;;;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4B;IAEnD;;;;;OAKG;IACH,6BAA6B,kCAAkC;IAE/D;;;;;;OAMG;IACH,qBAAqB,0BAA0B;IAE/C;;;;;OAKG;IACH,yBAAyB,8BAA8B;IAOvD;;;;;;;OAOG;IACH,gBAAgB,qBAAqB;IAErC;;;;;OAKG;IACH,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAUzD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,qBAAa,wBAAyB,SAAQ,eAAe;IAC3D,cAGC;CACF"}
@@ -1,6 +1,6 @@
1
- export declare const fetchJSON: <T>({ url, requestHeaders, requestTimeout, }: {
2
- url: string;
3
- requestHeaders?: Record<string, string>;
4
- requestTimeout?: number;
5
- }) => Promise<T>;
1
+ import { type UpdateRequest } from "./fetchUpdateResponse";
2
+ import { UpdateHttpError } from "./updateError";
3
+ export declare class FetchJSONResponseError extends UpdateHttpError {
4
+ }
5
+ export declare const fetchJSON: <T>(input: Omit<UpdateRequest, "resource">) => Promise<T>;
6
6
  //# sourceMappingURL=fetchJSON.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchJSON.d.ts","sourceRoot":"","sources":["../../../src/fetchJSON.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,GAAU,CAAC,4CAI9B;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,KAAG,OAAO,CAAC,CAAC,CAwBZ,CAAC"}
1
+ {"version":3,"file":"fetchJSON.d.ts","sourceRoot":"","sources":["../../../src/fetchJSON.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,sBAAuB,SAAQ,eAAe;CAAG;AAE9D,eAAO,MAAM,SAAS,GAAU,CAAC,SACxB,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,KACrC,OAAO,CAAC,CAAC,CASX,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { UpdateHttpResponse } from "@hot-updater/protocol";
2
+ export interface UpdateRequest {
3
+ readonly url: string;
4
+ readonly resource: UpdateHttpResponse["resource"];
5
+ readonly requestHeaders?: Record<string, string>;
6
+ readonly requestTimeout?: number;
7
+ readonly onResponse?: (response: UpdateHttpResponse) => void;
8
+ }
9
+ /** Read once for parsing and diagnostics, under the same request timeout. */
10
+ export declare const fetchUpdateResponse: ({ url, resource, requestHeaders, requestTimeout, onResponse, }: UpdateRequest) => Promise<{
11
+ response: Response;
12
+ body: string | null;
13
+ }>;
14
+ //# sourceMappingURL=fetchUpdateResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchUpdateResponse.d.ts","sourceRoot":"","sources":["../../../src/fetchUpdateResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAClD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC9D;AAED,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,mEAM7B,aAAa,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CA0CrE,CAAC"}