@hot-updater/react-native 1.0.0-rc.16 → 1.0.0-rc.17

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 (316) hide show
  1. package/android/src/main/java/com/hotupdater/BundleFileStorageService.kt +491 -388
  2. package/android/src/main/java/com/hotupdater/BundleMetadata.kt +5 -11
  3. package/android/src/main/java/com/hotupdater/FileManagerService.kt +45 -0
  4. package/android/src/main/java/com/hotupdater/HotUpdaterException.kt +290 -12
  5. package/android/src/main/java/com/hotupdater/HotUpdaterImpl.kt +35 -19
  6. package/android/src/main/java/com/hotupdater/InstallIdentityService.kt +37 -0
  7. package/android/src/main/java/com/hotupdater/KeyValueStorageService.kt +86 -0
  8. package/android/src/main/java/com/hotupdater/NetworkState.kt +31 -0
  9. package/android/src/main/java/com/hotupdater/NoBackupStorage.kt +17 -0
  10. package/android/src/main/java/com/hotupdater/OkHttpDownloadService.kt +110 -52
  11. package/android/src/main/java/com/hotupdater/PreviousProcessExit.kt +89 -0
  12. package/android/src/main/java/com/hotupdater/ReactNativeValueConverters.kt +34 -0
  13. package/android/src/newarch/HotUpdaterModule.kt +74 -69
  14. package/android/src/oldarch/HotUpdaterModule.kt +63 -59
  15. package/android/src/oldarch/HotUpdaterSpec.kt +4 -6
  16. package/android/src/test/java/com/hotupdater/BsdiffPatchTest.kt +1 -1
  17. package/android/src/test/java/com/hotupdater/BundleFileStorageServiceTest.kt +446 -61
  18. package/android/src/test/java/com/hotupdater/HotUpdaterExceptionTest.kt +220 -0
  19. package/android/src/test/java/com/hotupdater/HotUpdaterImplTest.kt +19 -27
  20. package/android/src/test/java/com/hotupdater/InstallIdentityServiceTest.kt +71 -0
  21. package/android/src/test/java/com/hotupdater/KeyValueStorageServiceTest.kt +106 -0
  22. package/android/src/test/java/com/hotupdater/NoBackupContext.kt +11 -0
  23. package/android/src/test/java/com/hotupdater/OkHttpDownloadServiceTest.kt +309 -23
  24. package/android/src/test/java/com/hotupdater/PreviousProcessExitTest.kt +57 -0
  25. package/ios/HotUpdater/Internal/BundleFileStorageService.swift +238 -157
  26. package/ios/HotUpdater/Internal/BundleMetadata.swift +3 -53
  27. package/ios/HotUpdater/Internal/FileManagerService.swift +48 -0
  28. package/ios/HotUpdater/Internal/HotUpdater.mm +8 -18
  29. package/ios/HotUpdater/Internal/HotUpdaterImpl.swift +48 -29
  30. package/ios/HotUpdater/Internal/KeyValueStorageService.swift +71 -0
  31. package/ios/HotUpdater/Internal/URLSessionDownloadService.swift +108 -1
  32. package/ios/HotUpdater/Internal/UpdateFailure.swift +390 -0
  33. package/lib/commonjs/appReady.js +111 -0
  34. package/lib/commonjs/appReady.js.map +1 -0
  35. package/lib/commonjs/appReady.spec.js +360 -0
  36. package/lib/commonjs/appReady.spec.js.map +1 -0
  37. package/lib/commonjs/{notifyAppReadyInsights.test-utils.js → appReady.test-utils.js} +4 -3
  38. package/lib/commonjs/appReady.test-utils.js.map +1 -0
  39. package/lib/commonjs/baseURL.js +16 -0
  40. package/lib/commonjs/baseURL.js.map +1 -0
  41. package/lib/commonjs/checkForUpdate.js +104 -56
  42. package/lib/commonjs/checkForUpdate.js.map +1 -1
  43. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js +337 -74
  44. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js.map +1 -1
  45. package/lib/commonjs/clientPlugin.js +49 -0
  46. package/lib/commonjs/clientPlugin.js.map +1 -0
  47. package/lib/commonjs/entryImportGraph.spec.js +50 -0
  48. package/lib/commonjs/entryImportGraph.spec.js.map +1 -0
  49. package/lib/commonjs/fetchJSON.js +2 -6
  50. package/lib/commonjs/fetchJSON.js.map +1 -1
  51. package/lib/commonjs/httpClient.js +18 -165
  52. package/lib/commonjs/httpClient.js.map +1 -1
  53. package/lib/commonjs/httpClient.spec.js +26 -199
  54. package/lib/commonjs/httpClient.spec.js.map +1 -1
  55. package/lib/commonjs/index.js +49 -36
  56. package/lib/commonjs/index.js.map +1 -1
  57. package/lib/commonjs/index.spec.js +108 -123
  58. package/lib/commonjs/index.spec.js.map +1 -1
  59. package/lib/commonjs/native.js +67 -48
  60. package/lib/commonjs/native.js.map +1 -1
  61. package/lib/commonjs/native.spec.js +80 -58
  62. package/lib/commonjs/native.spec.js.map +1 -1
  63. package/lib/commonjs/pluginHost.js +208 -0
  64. package/lib/commonjs/pluginHost.js.map +1 -0
  65. package/lib/commonjs/pluginHost.spec.js +292 -0
  66. package/lib/commonjs/pluginHost.spec.js.map +1 -0
  67. package/lib/commonjs/plugins/insights/eventId.js +129 -0
  68. package/lib/commonjs/plugins/insights/eventId.js.map +1 -0
  69. package/lib/commonjs/plugins/insights/eventId.spec.js +47 -0
  70. package/lib/commonjs/plugins/insights/eventId.spec.js.map +1 -0
  71. package/lib/commonjs/plugins/insights/index.js +272 -0
  72. package/lib/commonjs/plugins/insights/index.js.map +1 -0
  73. package/lib/commonjs/plugins/insights/insights.spec.js +640 -0
  74. package/lib/commonjs/plugins/insights/insights.spec.js.map +1 -0
  75. package/lib/commonjs/plugins/insights/sender.js +128 -0
  76. package/lib/commonjs/plugins/insights/sender.js.map +1 -0
  77. package/lib/commonjs/plugins/insights/sender.spec.js +265 -0
  78. package/lib/commonjs/plugins/insights/sender.spec.js.map +1 -0
  79. package/lib/commonjs/plugins/insights/state.js +145 -0
  80. package/lib/commonjs/plugins/insights/state.js.map +1 -0
  81. package/lib/commonjs/releaseCatalogCache.js +13 -2
  82. package/lib/commonjs/releaseCatalogCache.js.map +1 -1
  83. package/lib/commonjs/releaseCatalogCache.spec.js +18 -0
  84. package/lib/commonjs/releaseCatalogCache.spec.js.map +1 -1
  85. package/lib/commonjs/sdkVersion.js +1 -1
  86. package/lib/commonjs/specs/NativeHotUpdater.js.map +1 -1
  87. package/lib/commonjs/updateError.js +132 -0
  88. package/lib/commonjs/updateError.js.map +1 -0
  89. package/lib/commonjs/updateError.spec.js +149 -0
  90. package/lib/commonjs/updateError.spec.js.map +1 -0
  91. package/lib/commonjs/wrap.js +43 -25
  92. package/lib/commonjs/wrap.js.map +1 -1
  93. package/lib/commonjs/wrap.progress.spec.js +195 -0
  94. package/lib/commonjs/wrap.progress.spec.js.map +1 -0
  95. package/lib/commonjs/wrap.spec.js +94 -230
  96. package/lib/commonjs/wrap.spec.js.map +1 -1
  97. package/lib/module/appReady.js +103 -0
  98. package/lib/module/appReady.js.map +1 -0
  99. package/lib/module/appReady.spec.js +359 -0
  100. package/lib/module/appReady.spec.js.map +1 -0
  101. package/lib/module/{notifyAppReadyInsights.test-utils.js → appReady.test-utils.js} +4 -3
  102. package/lib/module/appReady.test-utils.js.map +1 -0
  103. package/lib/module/baseURL.js +11 -0
  104. package/lib/module/baseURL.js.map +1 -0
  105. package/lib/module/checkForUpdate.js +103 -57
  106. package/lib/module/checkForUpdate.js.map +1 -1
  107. package/lib/module/checkForUpdate.releaseCatalog.spec.js +337 -74
  108. package/lib/module/checkForUpdate.releaseCatalog.spec.js.map +1 -1
  109. package/lib/module/clientPlugin.js +44 -0
  110. package/lib/module/clientPlugin.js.map +1 -0
  111. package/lib/module/entryImportGraph.spec.js +50 -0
  112. package/lib/module/entryImportGraph.spec.js.map +1 -0
  113. package/lib/module/fetchJSON.js +2 -6
  114. package/lib/module/fetchJSON.js.map +1 -1
  115. package/lib/module/httpClient.js +18 -165
  116. package/lib/module/httpClient.js.map +1 -1
  117. package/lib/module/httpClient.spec.js +27 -200
  118. package/lib/module/httpClient.spec.js.map +1 -1
  119. package/lib/module/index.js +44 -38
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/index.spec.js +108 -123
  122. package/lib/module/index.spec.js.map +1 -1
  123. package/lib/module/native.js +63 -44
  124. package/lib/module/native.js.map +1 -1
  125. package/lib/module/native.spec.js +80 -58
  126. package/lib/module/native.spec.js.map +1 -1
  127. package/lib/module/pluginHost.js +200 -0
  128. package/lib/module/pluginHost.js.map +1 -0
  129. package/lib/module/pluginHost.spec.js +291 -0
  130. package/lib/module/pluginHost.spec.js.map +1 -0
  131. package/lib/module/plugins/insights/eventId.js +122 -0
  132. package/lib/module/plugins/insights/eventId.js.map +1 -0
  133. package/lib/module/plugins/insights/eventId.spec.js +47 -0
  134. package/lib/module/plugins/insights/eventId.spec.js.map +1 -0
  135. package/lib/module/plugins/insights/index.js +268 -0
  136. package/lib/module/plugins/insights/index.js.map +1 -0
  137. package/lib/module/plugins/insights/insights.spec.js +639 -0
  138. package/lib/module/plugins/insights/insights.spec.js.map +1 -0
  139. package/lib/module/plugins/insights/sender.js +123 -0
  140. package/lib/module/plugins/insights/sender.js.map +1 -0
  141. package/lib/module/plugins/insights/sender.spec.js +265 -0
  142. package/lib/module/plugins/insights/sender.spec.js.map +1 -0
  143. package/lib/module/plugins/insights/state.js +139 -0
  144. package/lib/module/plugins/insights/state.js.map +1 -0
  145. package/lib/module/releaseCatalogCache.js +13 -2
  146. package/lib/module/releaseCatalogCache.js.map +1 -1
  147. package/lib/module/releaseCatalogCache.spec.js +18 -0
  148. package/lib/module/releaseCatalogCache.spec.js.map +1 -1
  149. package/lib/module/sdkVersion.js +1 -1
  150. package/lib/module/specs/NativeHotUpdater.js.map +1 -1
  151. package/lib/module/updateError.js +126 -0
  152. package/lib/module/updateError.js.map +1 -0
  153. package/lib/module/updateError.spec.js +149 -0
  154. package/lib/module/updateError.spec.js.map +1 -0
  155. package/lib/module/wrap.js +43 -25
  156. package/lib/module/wrap.js.map +1 -1
  157. package/lib/module/wrap.progress.spec.js +196 -0
  158. package/lib/module/wrap.progress.spec.js.map +1 -0
  159. package/lib/module/wrap.spec.js +93 -229
  160. package/lib/module/wrap.spec.js.map +1 -1
  161. package/lib/typescript/commonjs/appReady.d.ts +23 -0
  162. package/lib/typescript/commonjs/appReady.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/appReady.test-utils.d.ts +9 -0
  164. package/lib/typescript/commonjs/appReady.test-utils.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/baseURL.d.ts +4 -0
  166. package/lib/typescript/commonjs/baseURL.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/checkForUpdate.d.ts +15 -2
  168. package/lib/typescript/commonjs/checkForUpdate.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/clientPlugin.d.ts +185 -0
  170. package/lib/typescript/commonjs/clientPlugin.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/fetchJSON.d.ts +2 -3
  172. package/lib/typescript/commonjs/fetchJSON.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/httpClient.d.ts +2 -36
  174. package/lib/typescript/commonjs/httpClient.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/index.d.ts +3 -6
  176. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/native.d.ts +29 -15
  178. package/lib/typescript/commonjs/native.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/pluginHost.d.ts +29 -0
  180. package/lib/typescript/commonjs/pluginHost.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/plugins/insights/eventId.d.ts +18 -0
  182. package/lib/typescript/commonjs/plugins/insights/eventId.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/plugins/insights/index.d.ts +40 -0
  184. package/lib/typescript/commonjs/plugins/insights/index.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/plugins/insights/sender.d.ts +74 -0
  186. package/lib/typescript/commonjs/plugins/insights/sender.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/plugins/insights/state.d.ts +46 -0
  188. package/lib/typescript/commonjs/plugins/insights/state.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/releaseCatalogCache.d.ts +5 -1
  190. package/lib/typescript/commonjs/releaseCatalogCache.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/sdkVersion.d.ts +1 -1
  192. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts +34 -12
  193. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/updateError.d.ts +26 -0
  195. package/lib/typescript/commonjs/updateError.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/wrap.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/wrap.types.d.ts +6 -10
  198. package/lib/typescript/commonjs/wrap.types.d.ts.map +1 -1
  199. package/lib/typescript/module/appReady.d.ts +23 -0
  200. package/lib/typescript/module/appReady.d.ts.map +1 -0
  201. package/lib/typescript/module/appReady.test-utils.d.ts +9 -0
  202. package/lib/typescript/module/appReady.test-utils.d.ts.map +1 -0
  203. package/lib/typescript/module/baseURL.d.ts +4 -0
  204. package/lib/typescript/module/baseURL.d.ts.map +1 -0
  205. package/lib/typescript/module/checkForUpdate.d.ts +15 -2
  206. package/lib/typescript/module/checkForUpdate.d.ts.map +1 -1
  207. package/lib/typescript/module/clientPlugin.d.ts +185 -0
  208. package/lib/typescript/module/clientPlugin.d.ts.map +1 -0
  209. package/lib/typescript/module/fetchJSON.d.ts +2 -3
  210. package/lib/typescript/module/fetchJSON.d.ts.map +1 -1
  211. package/lib/typescript/module/httpClient.d.ts +2 -36
  212. package/lib/typescript/module/httpClient.d.ts.map +1 -1
  213. package/lib/typescript/module/index.d.ts +3 -6
  214. package/lib/typescript/module/index.d.ts.map +1 -1
  215. package/lib/typescript/module/native.d.ts +29 -15
  216. package/lib/typescript/module/native.d.ts.map +1 -1
  217. package/lib/typescript/module/pluginHost.d.ts +29 -0
  218. package/lib/typescript/module/pluginHost.d.ts.map +1 -0
  219. package/lib/typescript/module/plugins/insights/eventId.d.ts +18 -0
  220. package/lib/typescript/module/plugins/insights/eventId.d.ts.map +1 -0
  221. package/lib/typescript/module/plugins/insights/index.d.ts +40 -0
  222. package/lib/typescript/module/plugins/insights/index.d.ts.map +1 -0
  223. package/lib/typescript/module/plugins/insights/sender.d.ts +74 -0
  224. package/lib/typescript/module/plugins/insights/sender.d.ts.map +1 -0
  225. package/lib/typescript/module/plugins/insights/state.d.ts +46 -0
  226. package/lib/typescript/module/plugins/insights/state.d.ts.map +1 -0
  227. package/lib/typescript/module/releaseCatalogCache.d.ts +5 -1
  228. package/lib/typescript/module/releaseCatalogCache.d.ts.map +1 -1
  229. package/lib/typescript/module/sdkVersion.d.ts +1 -1
  230. package/lib/typescript/module/specs/NativeHotUpdater.d.ts +34 -12
  231. package/lib/typescript/module/specs/NativeHotUpdater.d.ts.map +1 -1
  232. package/lib/typescript/module/updateError.d.ts +26 -0
  233. package/lib/typescript/module/updateError.d.ts.map +1 -0
  234. package/lib/typescript/module/wrap.d.ts.map +1 -1
  235. package/lib/typescript/module/wrap.types.d.ts +6 -10
  236. package/lib/typescript/module/wrap.types.d.ts.map +1 -1
  237. package/package.json +14 -2
  238. package/plugins/insights/package.json +8 -0
  239. package/src/appReady.spec.ts +393 -0
  240. package/src/{notifyAppReadyInsights.test-utils.ts → appReady.test-utils.ts} +7 -7
  241. package/src/appReady.ts +149 -0
  242. package/src/baseURL.ts +15 -0
  243. package/src/checkForUpdate.releaseCatalog.spec.ts +370 -76
  244. package/src/checkForUpdate.ts +135 -80
  245. package/src/clientPlugin.ts +231 -0
  246. package/src/entryImportGraph.spec.ts +65 -0
  247. package/src/fetchJSON.ts +3 -10
  248. package/src/httpClient.spec.ts +30 -227
  249. package/src/httpClient.ts +20 -256
  250. package/src/index.spec.ts +117 -93
  251. package/src/index.ts +67 -52
  252. package/src/native.spec.ts +98 -72
  253. package/src/native.ts +93 -77
  254. package/src/pluginHost.spec.ts +297 -0
  255. package/src/pluginHost.ts +262 -0
  256. package/src/plugins/insights/eventId.spec.ts +60 -0
  257. package/src/plugins/insights/eventId.ts +171 -0
  258. package/src/plugins/insights/index.ts +367 -0
  259. package/src/plugins/insights/insights.spec.ts +732 -0
  260. package/src/plugins/insights/sender.spec.ts +287 -0
  261. package/src/plugins/insights/sender.ts +221 -0
  262. package/src/plugins/insights/state.ts +184 -0
  263. package/src/releaseCatalogCache.spec.ts +22 -0
  264. package/src/releaseCatalogCache.ts +19 -4
  265. package/src/sdkVersion.ts +1 -1
  266. package/src/specs/NativeHotUpdater.ts +34 -13
  267. package/src/updateError.spec.ts +144 -0
  268. package/src/updateError.ts +153 -0
  269. package/src/wrap.progress.spec.ts +232 -0
  270. package/src/wrap.spec.ts +100 -283
  271. package/src/wrap.tsx +57 -26
  272. package/src/wrap.types.ts +6 -12
  273. package/lib/commonjs/notifyAppReadyInsights.boundary.spec.js +0 -225
  274. package/lib/commonjs/notifyAppReadyInsights.boundary.spec.js.map +0 -1
  275. package/lib/commonjs/notifyAppReadyInsights.js +0 -188
  276. package/lib/commonjs/notifyAppReadyInsights.js.map +0 -1
  277. package/lib/commonjs/notifyAppReadyInsights.spec.js +0 -378
  278. package/lib/commonjs/notifyAppReadyInsights.spec.js.map +0 -1
  279. package/lib/commonjs/notifyAppReadyInsights.test-utils.js.map +0 -1
  280. package/lib/commonjs/notifyAppReadyInsights.transport.spec.js +0 -171
  281. package/lib/commonjs/notifyAppReadyInsights.transport.spec.js.map +0 -1
  282. package/lib/commonjs/uuidv7.js +0 -41
  283. package/lib/commonjs/uuidv7.js.map +0 -1
  284. package/lib/commonjs/uuidv7.spec.js +0 -30
  285. package/lib/commonjs/uuidv7.spec.js.map +0 -1
  286. package/lib/module/notifyAppReadyInsights.boundary.spec.js +0 -224
  287. package/lib/module/notifyAppReadyInsights.boundary.spec.js.map +0 -1
  288. package/lib/module/notifyAppReadyInsights.js +0 -181
  289. package/lib/module/notifyAppReadyInsights.js.map +0 -1
  290. package/lib/module/notifyAppReadyInsights.spec.js +0 -377
  291. package/lib/module/notifyAppReadyInsights.spec.js.map +0 -1
  292. package/lib/module/notifyAppReadyInsights.test-utils.js.map +0 -1
  293. package/lib/module/notifyAppReadyInsights.transport.spec.js +0 -170
  294. package/lib/module/notifyAppReadyInsights.transport.spec.js.map +0 -1
  295. package/lib/module/uuidv7.js +0 -36
  296. package/lib/module/uuidv7.js.map +0 -1
  297. package/lib/module/uuidv7.spec.js +0 -30
  298. package/lib/module/uuidv7.spec.js.map +0 -1
  299. package/lib/typescript/commonjs/notifyAppReadyInsights.d.ts +0 -25
  300. package/lib/typescript/commonjs/notifyAppReadyInsights.d.ts.map +0 -1
  301. package/lib/typescript/commonjs/notifyAppReadyInsights.test-utils.d.ts +0 -8
  302. package/lib/typescript/commonjs/notifyAppReadyInsights.test-utils.d.ts.map +0 -1
  303. package/lib/typescript/commonjs/uuidv7.d.ts +0 -10
  304. package/lib/typescript/commonjs/uuidv7.d.ts.map +0 -1
  305. package/lib/typescript/module/notifyAppReadyInsights.d.ts +0 -25
  306. package/lib/typescript/module/notifyAppReadyInsights.d.ts.map +0 -1
  307. package/lib/typescript/module/notifyAppReadyInsights.test-utils.d.ts +0 -8
  308. package/lib/typescript/module/notifyAppReadyInsights.test-utils.d.ts.map +0 -1
  309. package/lib/typescript/module/uuidv7.d.ts +0 -10
  310. package/lib/typescript/module/uuidv7.d.ts.map +0 -1
  311. package/src/notifyAppReadyInsights.boundary.spec.ts +0 -242
  312. package/src/notifyAppReadyInsights.spec.ts +0 -362
  313. package/src/notifyAppReadyInsights.transport.spec.ts +0 -196
  314. package/src/notifyAppReadyInsights.ts +0 -293
  315. package/src/uuidv7.spec.ts +0 -25
  316. package/src/uuidv7.ts +0 -38
@@ -0,0 +1,74 @@
1
+ import type { HotUpdaterClientContext } from "../../clientPlugin";
2
+ export type InsightsEventType = "UNCHANGED" | "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "RECOVERED" | "UPDATE_FAILED";
3
+ /** A `POST /events` body. */
4
+ export interface InsightsEventBody {
5
+ readonly eventId: string;
6
+ readonly type: InsightsEventType;
7
+ readonly installId: string;
8
+ readonly userId?: string;
9
+ readonly platform: "ios" | "android";
10
+ readonly appVersion: string;
11
+ readonly channel: string;
12
+ readonly cohort: string;
13
+ readonly fingerprintHash: string | null;
14
+ readonly sdkVersion: string;
15
+ readonly fromBundleId: string | null;
16
+ readonly fromReleaseId: string | null;
17
+ readonly toBundleId: string;
18
+ readonly toReleaseId: string | null;
19
+ readonly updateStrategy: "fingerprint" | "appVersion" | null;
20
+ readonly metadata?: InsightsEventMetadata;
21
+ }
22
+ /** Details beside an event's fields, by event type. */
23
+ export interface InsightsEventMetadata {
24
+ /** UPDATE_FAILED: where and why the update failed. */
25
+ readonly failure?: {
26
+ readonly stage: "check" | "download" | "install";
27
+ readonly reason: string;
28
+ readonly resource?: string;
29
+ readonly httpStatus?: number;
30
+ readonly transport?: string;
31
+ readonly originCode?: string;
32
+ readonly previousProcessExit?: string;
33
+ };
34
+ /** UPDATE_DOWNLOADED: how the bundle arrived. */
35
+ readonly delivery?: "patch" | "manifest" | "archive";
36
+ /** UPDATE_DOWNLOADED: a patch was tried, but a file or the archive came instead. */
37
+ readonly patchFallback?: true;
38
+ /** RECOVERED: why the previous main process exited, on Android 11+. */
39
+ readonly previousProcessExit?: string;
40
+ }
41
+ /** How the server answered one event. */
42
+ export type InsightsDelivery =
43
+ /** The server stored the event, or already had it under its id. */
44
+ "delivered"
45
+ /** The server runs without Insights: a 404, since it mounts no `/events`. */
46
+ | "disabled"
47
+ /** A 400 for an `UPDATE_FAILED` event, from a server that does not know it. */
48
+ | "refused"
49
+ /** No attempt got an answer the SDK accepts. */
50
+ | "failed";
51
+ export interface InsightsEventGate {
52
+ /**
53
+ * Whether to send the event now. It is asked before every attempt, so an
54
+ * event superseded while it waits out a backoff is dropped.
55
+ */
56
+ admit(event: InsightsEventBody): boolean;
57
+ /** Records how an admitted event ended, once per event. */
58
+ settle(event: InsightsEventBody, delivery: InsightsDelivery): void;
59
+ }
60
+ export type InsightsEventSender = (event: InsightsEventBody) => Promise<void>;
61
+ /**
62
+ * Sends Insights events one at a time and retries each in the background.
63
+ *
64
+ * The server keeps an installation's latest report by arrival, so a later
65
+ * event waits behind an earlier one's retries; otherwise a retried
66
+ * UPDATE_APPLIED could land after the UPDATE_DOWNLOADED that followed it.
67
+ * Callers wait only for first attempts, so a report never waits out a
68
+ * backoff: once an event backs off, every waiting caller is released, and a
69
+ * failure after that only warns. The gate sees each event before each
70
+ * attempt, after every earlier event settled, so it decides with what the
71
+ * server already answered.
72
+ */
73
+ export declare const createInsightsEventSender: (fetch: HotUpdaterClientContext["fetch"], gate: InsightsEventGate) => InsightsEventSender;
74
+ //# sourceMappingURL=sender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/insights/sender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,mBAAmB,GACnB,gBAAgB,GAChB,WAAW,GACX,eAAe,CAAC;AAEpB,6BAA6B;AAC7B,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAC3C;AAED,uDAAuD;AAC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ACtB,mBAyDF,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { HotUpdaterClientStorage } from "../../clientPlugin";
2
+ /** The UTC day of a time, as `YYYY-MM-DD`. */
3
+ export declare const utcDay: (time: number) => string;
4
+ /** The start of a time's UTC day, in milliseconds. */
5
+ export declare const utcDayStart: (time: number) => number;
6
+ /** What a report says runs: the fields the server compares to skip a same-day launch. */
7
+ export interface RunningReport {
8
+ readonly day: string;
9
+ readonly channel: string;
10
+ readonly appVersion: string;
11
+ readonly bundleId: string;
12
+ readonly releaseId: string | null;
13
+ readonly userId: string | null;
14
+ }
15
+ /**
16
+ * The Insights plugin's memory across launches, in its plugin storage. Every
17
+ * read tolerates a missing or unreadable value, and a storage failure only
18
+ * costs a report that would otherwise have been skipped.
19
+ */
20
+ export declare const createInsightsState: (storage: HotUpdaterClientStorage) => {
21
+ /**
22
+ * Whether reporting pauses: the server answered that Insights is off
23
+ * during this runtime or in the 24 hours before `now`. A pause that
24
+ * starts after `now`, from a clock that went back, has ended.
25
+ */
26
+ isPaused(now: number): boolean;
27
+ pause(now: number): void;
28
+ /** The server stored a report, so Insights is on. */
29
+ resume(): void;
30
+ /** Whether a launch report repeats what the installation reported that day. */
31
+ repeatsReport(report: RunningReport): boolean;
32
+ /** Records a delivered report that says what runs. */
33
+ recordReport(report: RunningReport): void;
34
+ /**
35
+ * Forgets the last report after a delivered download or failure, so the
36
+ * next launch reports again, as the server records it after one.
37
+ */
38
+ forgetReport(): void;
39
+ /** Whether a failure was already reported, or refused, that day. */
40
+ hasFailure(day: string, key: string): boolean;
41
+ recordFailure(day: string, key: string): void;
42
+ readUserId(): string | null;
43
+ writeUserId(userId: string | null): void;
44
+ };
45
+ export type InsightsState = ReturnType<typeof createInsightsState>;
46
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/insights/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAMlE,8CAA8C;AAC9C,eAAO,MAAM,MAAM,SAAU,MAAM,KAAG,MACK,CAAC;AAE5C,sDAAsD;AACtD,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MACP,CAAC;AAErC,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAgED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,YAAa,uBAAuB;IAoBhE;;;;OAIG;IACH,QAAQ,MAAM,MAAM,GAAG,OAAO;IAU9B,KAAK,MAAM,MAAM;IAIjB,qDAAqD;IACrD,MAAM;IAIN,+EAA+E;IAC/E,aAAa,SAAS,aAAa,GAAG,OAAO;IAI7C,sDAAsD;IACtD,YAAY,SAAS,aAAa;IAGlC;;;OAGG;IACH,YAAY;IAIZ,oEAAoE;IACpE,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,OAAO;IAI7C,aAAa,MAAM,MAAM,OAAO,MAAM;IAUtC,UAAU,IAAI,MAAM,GAAG,IAAI;IAU3B,WAAW,SAAS,MAAM,GAAG,IAAI;CAIpC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -20,6 +20,10 @@ type FetchReleaseCatalogInput = {
20
20
  };
21
21
  export declare const hasExpectedReleaseCatalogScope: (catalog: ReleaseCatalog, expected: ExpectedReleaseCatalogScope) => boolean;
22
22
  export declare const createReleaseCatalogCachePartition: (input: Pick<FetchReleaseCatalogInput, "baseURL" | "requestHeaders" | "url">) => string;
23
- export declare const fetchReleaseCatalogWithCache: (input: FetchReleaseCatalogInput) => Promise<ReleaseCatalog>;
23
+ /**
24
+ * Fetches a scope's catalog, or null when the server answers that the scope
25
+ * has none (a 404 with `x-hot-updater-catalog: none`).
26
+ */
27
+ export declare const fetchReleaseCatalogWithCache: (input: FetchReleaseCatalogInput) => Promise<ReleaseCatalog | null>;
24
28
  export {};
25
29
  //# 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,CAAC;CAClC,CACJ,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;AAiDF,eAAO,MAAM,8BAA8B,YAChC,cA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C,wBAAwB,EAAE,SAAS,GAAG,gBAAgB,GAAG,KAAK,CAAC,KAC1E,MAMC,CAAC;AA8FL;;;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.16";
1
+ export declare const HOT_UPDATER_SDK_VERSION = "1.0.0-rc.17";
2
2
  //# sourceMappingURL=sdkVersion.d.ts.map
@@ -30,7 +30,11 @@ export interface Spec extends TurboModule {
30
30
  * Downloads and applies a bundle update.
31
31
  *
32
32
  * @param params - Update bundle parameters
33
- * @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.
34
38
  * @throws {HotUpdaterErrorCode} Rejects with one of the following error codes:
35
39
  *
36
40
  * Parameter validation:
@@ -55,8 +59,20 @@ export interface Spec extends TurboModule {
55
59
  *
56
60
  * Note: iOS normalizes rare signature/storage errors to SIGNATURE_VERIFICATION_FAILED
57
61
  * or UNKNOWN_ERROR to keep the JS error surface small.
58
- */
59
- 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>;
60
76
  /** Accepts and durably advances the catalog high-water for a scope. */
61
77
  acceptReleaseCatalog(params: UnsafeObject): boolean;
62
78
  /** Reads active/stable selection receipts and catalog high-water state. */
@@ -86,6 +102,13 @@ export interface Spec extends TurboModule {
86
102
  toBundleId?: string;
87
103
  updateStrategy?: "fingerprint" | "appVersion";
88
104
  crashedBundleId?: string;
105
+ /**
106
+ * Android 11+: why the app's previous main process exited, the
107
+ * `ApplicationExitInfo` reason without its `REASON_` prefix (for
108
+ * example "CRASH", "ANR", "LOW_MEMORY", "USER_REQUESTED"), read once
109
+ * when the process starts. Absent on iOS and older Android.
110
+ */
111
+ previousProcessExit?: string;
89
112
  };
90
113
  /**
91
114
  * Gets the list of bundle IDs that have been marked as crashed.
@@ -143,21 +166,20 @@ export interface Spec extends TurboModule {
143
166
  */
144
167
  getCohort: () => string;
145
168
  /**
146
- * Gets the persisted install id for this app installation.
169
+ * Gets the install id: a random id native creates once per app
170
+ * installation and keeps out of device backups.
147
171
  */
148
172
  getInstallId: () => string;
149
173
  /**
150
- * Gets the persisted nullable user id associated with this installation.
151
- */
152
- getUserId: () => string | null;
153
- /**
154
- * Gets the persisted nullable username associated with this installation.
174
+ * Reads a value from the SDK's persistent key-value store, which native
175
+ * keeps out of device backups. Returns null when the key has no value.
155
176
  */
156
- getUsername: () => string | null;
177
+ getStorageItem: (key: string) => string | null;
157
178
  /**
158
- * Persists nullable user identity fields associated with this installation.
179
+ * Writes a value to the SDK's persistent key-value store; null removes the
180
+ * key.
159
181
  */
160
- setUser: (userId: string | null, username: string | null) => void;
182
+ setStorageItem: (key: string, value: string | null) => void;
161
183
  addListener(eventName: string): void;
162
184
  removeListeners(count: number): void;
163
185
  readonly getConstants: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeHotUpdater.d.ts","sourceRoot":"","sources":["../../../../src/specs/Native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,WAAW,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,WAAW,EAAE,MAAM,YAAY,CAAC;IAEhC;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC;;;;OAIG;IACH,SAAS,EAAE,MAAM,MAAM,CAAC;IAExB;;;OAGG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAE/C;;;OAGG;IACH,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAG5D,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM;QAC3B,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,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"}
@@ -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;AAiCD,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,IAoCnB,CAAC"}
@@ -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;AAOnD,OAAO,KAAK,EAEV,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,CAqJ1B"}
@@ -1,4 +1,5 @@
1
1
  import type React from "react";
2
+ import type { HotUpdaterClientPlugin } from "./clientPlugin";
2
3
  import type { HotUpdaterError } from "./error";
3
4
  import type { HotUpdaterHttpClient } from "./httpClient";
4
5
  import type { NotifyAppReadyResult } from "./native";
@@ -20,15 +21,12 @@ export type HotUpdaterFallbackComponentProps = {
20
21
  };
21
22
  interface CommonHotUpdaterOptions {
22
23
  /**
23
- * Sends app-ready transitions and same-Bundle Release adoptions to the
24
- * configured server. Defaults to `true`; set to `false` to disable client
25
- * reporting. Debug builds (`__DEV__`) send nothing unless you pass
26
- * `{ debug: true }`, so development sessions stay out of production data.
24
+ * Client plugins, such as `insights()` from
25
+ * `@hot-updater/react-native/plugins/insights`. Each plugin's `setup` runs
26
+ * once, and its hooks observe launches, update checks, downloads, and
27
+ * update failures. Plugin ids must be unique.
27
28
  */
28
- insights?: boolean | {
29
- /** Also report from debug builds. Defaults to `false`. */
30
- debug?: boolean;
31
- };
29
+ plugins?: readonly HotUpdaterClientPlugin[];
32
30
  /** Base URL of a server exposing the Hot Updater v1 client HTTP protocol. */
33
31
  baseURL: HotUpdaterBaseURL;
34
32
  requestHeaders?: Record<string, string>;
@@ -46,8 +44,6 @@ export type AutoUpdateOptions = CommonHotUpdaterOptions & {
46
44
  export type HotUpdaterInitOptions = CommonHotUpdaterOptions;
47
45
  export type HotUpdaterOptions = AutoUpdateOptions;
48
46
  type InternalCommonOptions = {
49
- /** Whether this runtime reports, with the debug-build default applied. */
50
- insights?: boolean;
51
47
  client: HotUpdaterHttpClient;
52
48
  requestHeaders?: Record<string, string>;
53
49
  requestTimeout?: number;
@@ -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,Y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} from "./native";
3
+ import { emitPluginHook } from "./pluginHost";
4
+ export type NotifyAppReadyOptions = {
5
+ onNotifyAppReady?: (result: NotifyAppReadyResult) => void;
6
+ onError?: (error: HotUpdaterError | Error | unknown) => void;
7
+ };
8
+ /** Android 11+: why the app's previous main process exited, once the launch was read. */
9
+ export declare const getPreviousProcessExit: () => string | null;
10
+ /**
11
+ * The Release the running bundle was selected as: the active or stable
12
+ * selection that names it on the current channel.
13
+ */
14
+ export declare const getRunningReleaseId: (bundleId: string, channel: string) => string | null;
15
+ /** Reads this runtime's launch once native finalizes it and reports it to plugins. */
16
+ export declare const handleNotifyAppReady: (options: NotifyAppReadyOptions) => Promise<NotifyAppReadyResult | undefined>;
17
+ /**
18
+ * Calls a plugin hook after this runtime's `onAppReady`, so plugins see the
19
+ * launch before anything that followed it. The event is built now, from the
20
+ * state it describes, and only when a plugin listens.
21
+ */
22
+ export declare const emitAfterAppReady: typeof emitPluginHook;
23
+ //# 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,EAGL,cAAc,EACf,MAAM,cAAc,CAAC;AAEtB,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;AAUF,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,QAAO,MAAM,GAAG,IAA2B,CAAC;AAkB/E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aACpB,MAAM,WACP,MAAM,KACd,MAAM,GAAG,IAQX,CAAC;AA4DF,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,YACtB,qBAAqB,KAC7B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAI1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,cAWtC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { LaunchTransition, NotifyAppReadyResult } from "./native";
2
+ export declare const createNotifyReadResult: (result?: NotifyAppReadyResult, transition?: LaunchTransition | null, pending?: boolean, previousProcessExit?: string | null) => {
3
+ transition: LaunchTransition | null;
4
+ previousProcessExit: string | null;
5
+ pending: boolean;
6
+ result: NotifyAppReadyResult;
7
+ };
8
+ export declare const stubNotifyFrame: () => void;
9
+ //# sourceMappingURL=appReady.test-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appReady.test-utils.d.ts","sourceRoot":"","sources":["../../../src/appReady.test-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEvE,eAAO,MAAM,sBAAsB,YACzB,oBAAoB,eAChB,gBAAgB,GAAG,IAAI,2CAEd,MAAM,GAAG,IAAI,KACjC;IACD,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,oBAAoB,CAAC;CAM7B,CAAC;AAEH,eAAO,MAAM,eAAe,YAS3B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { HotUpdaterBaseURL } from "./types";
2
+ /** Resolves a functional baseURL and drops trailing slashes. */
3
+ export declare const resolveBaseURL: (baseURL: HotUpdaterBaseURL) => Promise<string>;
4
+ //# sourceMappingURL=baseURL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseURL.d.ts","sourceRoot":"","sources":["../../../src/baseURL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,gEAAgE;AAChE,eAAO,MAAM,cAAc,YAChB,iBAAiB,KACzB,OAAO,CAAC,MAAM,CAShB,CAAC"}
@@ -1,4 +1,6 @@
1
+ import type { ReleaseTransitionKind, UpdateErrorResource, UpdateErrorStage } from "./clientPlugin";
1
2
  import type { HotUpdaterHttpClient } from "./httpClient";
3
+ export type { ReleaseTransitionKind };
2
4
  export interface CheckForUpdateOptions {
3
5
  /**
4
6
  * Update strategy
@@ -35,10 +37,21 @@ export type CheckForUpdateResult = {
35
37
  */
36
38
  updateBundle: () => Promise<boolean>;
37
39
  };
38
- export type ReleaseTransitionKind = "INSTALL" | "ADOPT_RELEASE" | "USE_EMBEDDED" | "USE_BUILTIN";
39
40
  export interface InternalCheckForUpdateOptions extends CheckForUpdateOptions {
40
- insights?: boolean;
41
41
  client: HotUpdaterHttpClient;
42
42
  }
43
+ /** The running bundle, the channel checked, and the update's target. */
44
+ type UpdateErrorScope = {
45
+ readonly channel: string;
46
+ readonly bundleId: string;
47
+ readonly updateStrategy: "fingerprint" | "appVersion";
48
+ readonly targetBundleId?: string;
49
+ readonly targetReleaseId?: string | null;
50
+ };
51
+ /**
52
+ * Tells plugins why an update failed, when it failed as an update. An error
53
+ * the SDK's JavaScript raised happened in `stage`, fetching `resource`.
54
+ */
55
+ export declare const reportUpdateError: (error: unknown, stage: UpdateErrorStage, resource: UpdateErrorResource | undefined, scope: UpdateErrorScope) => void;
43
56
  export declare function checkForUpdate(options: InternalCheckForUpdateOptions): Promise<CheckForUpdateResult | null>;
44
57
  //# sourceMappingURL=checkForUpdate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkForUpdate.d.ts","sourceRoot":"","sources":["../../../src/checkForUpdate.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AA0BhF,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH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AG,YAAY,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,UACrB,OAAO,SACP,gBAAgB,YACb,mBAAmB,GAAG,SAAS,SAClC,gBAAgB,KACtB,IAqBF,CAAC;AAuRF,wBAAsB,cAAc,CAClC,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CA2EtC"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * The client plugin contract. Built-in plugins, such as
3
+ * `@hot-updater/react-native/plugins/insights`, and third-party plugins use
4
+ * the same one, as server plugins do.
5
+ */
6
+ export type UpdateStrategy = "fingerprint" | "appVersion";
7
+ /** How an update moves the app's selection. */
8
+ export type ReleaseTransitionKind = "INSTALL" | "ADOPT_RELEASE" | "USE_EMBEDDED" | "USE_BUILTIN";
9
+ /** The launch outcome native reports once per JavaScript runtime. */
10
+ export type AppReadyResult = ({
11
+ /** No update was applied or recovered at this launch. */
12
+ readonly status: "UNCHANGED";
13
+ readonly channel: string;
14
+ /** The running bundle. */
15
+ readonly bundleId: string;
16
+ /** The Release the running bundle was selected as, when known. */
17
+ readonly releaseId: string | null;
18
+ } | {
19
+ /**
20
+ * `UPDATE_APPLIED`: a staged update became active at this launch.
21
+ * `RECOVERED`: a failed update was rolled back to `toBundleId`.
22
+ */
23
+ readonly status: "UPDATE_APPLIED" | "RECOVERED";
24
+ readonly channel: string;
25
+ readonly fromBundleId: string;
26
+ readonly fromReleaseId: string | null;
27
+ readonly toBundleId: string;
28
+ readonly toReleaseId: string | null;
29
+ readonly updateStrategy: UpdateStrategy;
30
+ }) & {
31
+ /**
32
+ * Android 11+: why the app's previous main process exited, the
33
+ * `ApplicationExitInfo` reason without its `REASON_` prefix, such as
34
+ * `CRASH`, `ANR`, `LOW_MEMORY`, or `USER_REQUESTED`. Null on iOS and on
35
+ * older Android. It tells a crash from the system or the user closing the
36
+ * app.
37
+ */
38
+ readonly previousProcessExit: string | null;
39
+ };
40
+ /** What an update check found. */
41
+ export type UpdateCheckResult = {
42
+ /**
43
+ * The app keeps running its bundle: the check found nothing to
44
+ * install, or the app adopted a newer Release of the running bundle.
45
+ */
46
+ readonly status: "UNCHANGED";
47
+ readonly channel: string;
48
+ readonly bundleId: string;
49
+ /** The Release the running bundle is selected as after the check. */
50
+ readonly releaseId: string | null;
51
+ /** The Release before the check; it differs after an adoption. */
52
+ readonly previousReleaseId: string | null;
53
+ } | {
54
+ /** The check found a Release to install, adopt, or roll back to. */
55
+ readonly status: "UPDATE_AVAILABLE";
56
+ readonly channel: string;
57
+ readonly fromBundleId: string;
58
+ readonly fromReleaseId: string | null;
59
+ readonly toBundleId: string;
60
+ readonly toReleaseId: string | null;
61
+ readonly transitionKind: ReleaseTransitionKind;
62
+ readonly updateStatus: "UPDATE" | "ROLLBACK";
63
+ readonly shouldForceUpdate: boolean;
64
+ readonly updateStrategy: UpdateStrategy;
65
+ };
66
+ /** A bundle the SDK downloaded, verified, and staged for the next launch. */
67
+ export interface BundleDownloadedInfo {
68
+ readonly channel: string;
69
+ readonly fromBundleId: string;
70
+ readonly fromReleaseId: string | null;
71
+ readonly toBundleId: string;
72
+ readonly toReleaseId: string | null;
73
+ readonly updateStrategy: UpdateStrategy;
74
+ /**
75
+ * How the bundle arrived: `patch` when a bsdiff patch produced a file,
76
+ * `manifest` when only the changed files were downloaded, `archive` for
77
+ * the full archive.
78
+ */
79
+ readonly delivery: "patch" | "manifest" | "archive";
80
+ /** A patch was tried, but the file or the archive was downloaded instead. */
81
+ readonly patchFallback: boolean;
82
+ }
83
+ /**
84
+ * Where an update failed: `check` covers the Release catalog request,
85
+ * `download` the transfer and verification of the update's files, and
86
+ * `install` patching, extracting, and moving them into place.
87
+ */
88
+ export type UpdateErrorStage = "check" | "download" | "install";
89
+ /** What the SDK was fetching or applying when an update failed. */
90
+ export type UpdateErrorResource = "catalog" | "artifact" | "manifest" | "file" | "patch" | "archive";
91
+ /** Why no response arrived, for a `network` failure. */
92
+ export type UpdateErrorTransport = "timeout" | "dns" | "tls" | "connection" | "offline" | "cancelled";
93
+ export type UpdateErrorReason = "network" | "http" | "invalid_response" | "hash_mismatch" | "signature" | "patch" | "extract" | "storage" | "unknown";
94
+ /** An update check, download, or install that failed. */
95
+ export interface UpdateError {
96
+ readonly stage: UpdateErrorStage;
97
+ readonly reason: UpdateErrorReason;
98
+ /** What was being fetched or applied, when the SDK knows. */
99
+ readonly resource?: UpdateErrorResource;
100
+ /** The response status when `reason` is `"http"`. */
101
+ readonly httpStatus?: number;
102
+ /**
103
+ * The storage origin's XML error `<Code>`, such as `AccessDenied`,
104
+ * `NoSuchKey`, or `ExpiredToken`, when an `http` failure's body names one.
105
+ * It tells an expired signed URL from a missing file.
106
+ */
107
+ readonly originCode?: string;
108
+ /** Why no response arrived, for a `network` failure, when the SDK knows. */
109
+ readonly transport?: UpdateErrorTransport;
110
+ /** Android 11+: why the previous main process exited (see `AppReadyResult`). */
111
+ readonly previousProcessExit?: string;
112
+ /** The bundle the update targeted; absent for the check stage. */
113
+ readonly targetBundleId?: string;
114
+ /** The Release the update targeted, when it names one. */
115
+ readonly targetReleaseId?: string;
116
+ readonly channel: string;
117
+ /** The running bundle and the Release it was selected as. */
118
+ readonly bundleId: string;
119
+ readonly releaseId: string | null;
120
+ readonly updateStrategy: UpdateStrategy;
121
+ /** The error the SDK caught. */
122
+ readonly cause: unknown;
123
+ }
124
+ /**
125
+ * Lifecycle hooks a plugin returns from `setup`. Hooks observe: the SDK
126
+ * never waits for one and ignores what it returns, and a hook that throws or
127
+ * rejects is reported through `onError`, or a console warning without one,
128
+ * so a plugin can never delay or change an update.
129
+ */
130
+ export interface HotUpdaterClientHooks {
131
+ /** Called once per JavaScript runtime, after native reports the launch. */
132
+ onAppReady?(result: AppReadyResult): void | Promise<void>;
133
+ /** Called after each update check, and after a Release adoption commits. */
134
+ onUpdateCheck?(result: UpdateCheckResult): void | Promise<void>;
135
+ /** Called after the SDK stages a downloaded bundle. */
136
+ onBundleDownloaded?(info: BundleDownloadedInfo): void | Promise<void>;
137
+ /** Called when an update check, download, or install fails. */
138
+ onUpdateError?(error: UpdateError): void | Promise<void>;
139
+ }
140
+ /**
141
+ * A plugin's persistent key-value store. Native keeps it on the device,
142
+ * outside device backups, and the SDK scopes its keys to the plugin's id.
143
+ * It is meant for small values, up to 64 KB each.
144
+ */
145
+ export interface HotUpdaterClientStorage {
146
+ get(key: string): string | null;
147
+ /** Writes the value; `null` removes the key. */
148
+ set(key: string, value: string | null): void;
149
+ }
150
+ export interface HotUpdaterClientContext {
151
+ /**
152
+ * Requests a path relative to the configured `baseURL`, with the SDK's
153
+ * `requestHeaders` and `requestTimeout` applied. Rejects with
154
+ * `Request timed out` when the timeout passes before a response arrives.
155
+ */
156
+ fetch(path: string, init?: RequestInit): Promise<Response>;
157
+ /** A random id native creates once per installation. */
158
+ readonly installId: string;
159
+ readonly platform: "ios" | "android";
160
+ /** The native app version, or null when the native build has none. */
161
+ readonly appVersion: string | null;
162
+ readonly sdkVersion: string;
163
+ /** Whether this is a debug build (`__DEV__`). */
164
+ readonly isDebugBuild: boolean;
165
+ /** The bundle native reports as current. */
166
+ getBundleId(): string;
167
+ getChannel(): string;
168
+ getCohort(): string;
169
+ getFingerprintHash(): string | null;
170
+ readonly storage: HotUpdaterClientStorage;
171
+ /** The current time in milliseconds since the epoch. */
172
+ now(): number;
173
+ }
174
+ export interface HotUpdaterClientPlugin {
175
+ /** Unique among an app's plugins; two plugins with one id throw at init. */
176
+ readonly id: string;
177
+ /**
178
+ * Called once, when `HotUpdater.init` or `HotUpdater.wrap` first
179
+ * configures the runtime with this plugin.
180
+ */
181
+ setup(context: HotUpdaterClientContext): HotUpdaterClientHooks | void;
182
+ }
183
+ /** Declares a client plugin; built-in and third-party plugins use the same contract. */
184
+ export declare const defineClientPlugin: <const P extends HotUpdaterClientPlugin>(plugin: P) => P;
185
+ //# sourceMappingURL=clientPlugin.d.ts.map