@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,390 @@
1
+ import Foundation
2
+
3
+ /// Where an update failed: `download` covers transferring the update's files
4
+ /// and verifying the downloaded bytes, and `install` covers producing the
5
+ /// bundle on disk (patching, extracting, and moving files into place).
6
+ enum UpdateFailureStage: String {
7
+ case download
8
+ case install
9
+ }
10
+
11
+ /// Why an update failed.
12
+ enum UpdateFailureReason: String {
13
+ case network
14
+ case http
15
+ case invalidResponse = "invalid_response"
16
+ case hashMismatch = "hash_mismatch"
17
+ case signature
18
+ case patch
19
+ case extract
20
+ case storage
21
+ case unknown
22
+ }
23
+
24
+ /// What was being fetched or applied when an update failed.
25
+ enum UpdateFailureResource: String {
26
+ case manifest
27
+ case file
28
+ case patch
29
+ case archive
30
+ }
31
+
32
+ /// How a transfer failed when no HTTP response arrived.
33
+ enum UpdateFailureTransport: String {
34
+ case timeout
35
+ case dns
36
+ case tls
37
+ case connection
38
+ case offline
39
+ case cancelled
40
+
41
+ /// Returns nil for codes that do not name a transport failure.
42
+ init?(_ code: URLError.Code) {
43
+ switch code {
44
+ case .timedOut:
45
+ self = .timeout
46
+ case .cannotFindHost, .dnsLookupFailed:
47
+ self = .dns
48
+ case .secureConnectionFailed,
49
+ .serverCertificateHasBadDate,
50
+ .serverCertificateUntrusted,
51
+ .serverCertificateHasUnknownRoot,
52
+ .serverCertificateNotYetValid,
53
+ .clientCertificateRejected,
54
+ .clientCertificateRequired:
55
+ self = .tls
56
+ case .cannotConnectToHost, .networkConnectionLost:
57
+ self = .connection
58
+ case .notConnectedToInternet, .dataNotAllowed, .internationalRoamingOff:
59
+ self = .offline
60
+ case .cancelled:
61
+ self = .cancelled
62
+ default:
63
+ return nil
64
+ }
65
+ }
66
+ }
67
+
68
+ /// The classification an `updateBundle` rejection carries in its userInfo.
69
+ struct UpdateFailure: Equatable {
70
+ static let stageKey = "stage"
71
+ static let reasonKey = "reason"
72
+ static let resourceKey = "resource"
73
+ static let httpStatusKey = "httpStatus"
74
+ static let transportKey = "transport"
75
+ static let originCodeKey = "originCode"
76
+
77
+ static let network = UpdateFailure(stage: .download, reason: .network)
78
+ static let invalidResponse = UpdateFailure(stage: .download, reason: .invalidResponse)
79
+ static let hashMismatch = UpdateFailure(stage: .download, reason: .hashMismatch)
80
+ static let signature = UpdateFailure(stage: .download, reason: .signature)
81
+ static let patch = UpdateFailure(stage: .install, reason: .patch)
82
+ static let extract = UpdateFailure(stage: .install, reason: .extract)
83
+ static let storage = UpdateFailure(stage: .install, reason: .storage)
84
+
85
+ static func network(transport: UpdateFailureTransport?) -> UpdateFailure {
86
+ UpdateFailure(stage: .download, reason: .network, transport: transport)
87
+ }
88
+
89
+ static func http(status: Int, originCode: String? = nil) -> UpdateFailure {
90
+ UpdateFailure(
91
+ stage: .download,
92
+ reason: .http,
93
+ httpStatus: status,
94
+ originCode: originCode
95
+ )
96
+ }
97
+
98
+ static func unknown(_ stage: UpdateFailureStage) -> UpdateFailure {
99
+ UpdateFailure(stage: stage, reason: .unknown)
100
+ }
101
+
102
+ let stage: UpdateFailureStage
103
+ let reason: UpdateFailureReason
104
+ /// What was being fetched or applied, when the failure concerns one.
105
+ private(set) var resource: UpdateFailureResource?
106
+ /// The response status; only set when `reason` is `.http`.
107
+ let httpStatus: Int?
108
+ /// Only set when `reason` is `.network` and no response arrived.
109
+ let transport: UpdateFailureTransport?
110
+ /// The storage origin's XML error code; only set when `reason` is `.http`.
111
+ let originCode: String?
112
+
113
+ private init(
114
+ stage: UpdateFailureStage,
115
+ reason: UpdateFailureReason,
116
+ httpStatus: Int? = nil,
117
+ transport: UpdateFailureTransport? = nil,
118
+ originCode: String? = nil
119
+ ) {
120
+ self.stage = stage
121
+ self.reason = reason
122
+ self.httpStatus = httpStatus
123
+ self.transport = transport
124
+ self.originCode = originCode
125
+ }
126
+
127
+ /// This failure, attributed to `resource` unless it already names one.
128
+ func with(resource: UpdateFailureResource?) -> UpdateFailure {
129
+ guard self.resource == nil, let resource else {
130
+ return self
131
+ }
132
+ var failure = self
133
+ failure.resource = resource
134
+ return failure
135
+ }
136
+
137
+ /// JSON-safe entries React Native copies into the JS error's `userInfo`.
138
+ var userInfo: [String: Any] {
139
+ var userInfo: [String: Any] = [
140
+ Self.stageKey: stage.rawValue,
141
+ Self.reasonKey: reason.rawValue,
142
+ ]
143
+ if let resource {
144
+ userInfo[Self.resourceKey] = resource.rawValue
145
+ }
146
+ if let httpStatus {
147
+ userInfo[Self.httpStatusKey] = NSNumber(value: httpStatus)
148
+ }
149
+ if let transport {
150
+ userInfo[Self.transportKey] = transport.rawValue
151
+ }
152
+ if let originCode {
153
+ userInfo[Self.originCodeKey] = originCode
154
+ }
155
+ return userInfo
156
+ }
157
+
158
+ /// An error carrying this classification, for rejections raised before
159
+ /// the update pipeline starts, such as invalid `updateBundle` parameters.
160
+ func error(description: String) -> NSError {
161
+ var userInfo = self.userInfo
162
+ userInfo[NSLocalizedDescriptionKey] = description
163
+ return NSError(domain: "HotUpdater", code: 0, userInfo: userInfo)
164
+ }
165
+ }
166
+
167
+ /// The update step an error came from. It classifies the errors whose type
168
+ /// does not: a hash mismatch is a download failure after a transfer but a
169
+ /// patch failure after patching, and an unexpected error keeps the stage.
170
+ enum UpdatePhase {
171
+ /// Transferring manifest, archive, asset, or patch bytes.
172
+ case transfer
173
+ /// Checking downloaded bytes against the manifest.
174
+ case verification
175
+ /// Parsing and validating the manifest against the update parameters.
176
+ case manifest
177
+ /// Applying a bsdiff patch and checking its output.
178
+ case patch
179
+ /// Decoding brotli or tar data and checking the extracted files.
180
+ case extraction
181
+ /// Creating directories and copying, moving, or writing files.
182
+ case storage
183
+ }
184
+
185
+ /// An update pipeline error and its classification. `underlying` still
186
+ /// decides the rejection code, so classifying an error never changes it.
187
+ struct UpdateFailureError: Error {
188
+ let underlying: Error
189
+ let failure: UpdateFailure
190
+
191
+ /// Classifies `error` as raised during `phase` while fetching or applying
192
+ /// `resource`. An error that is already classified keeps its
193
+ /// classification and only gains a missing resource. Returns `error`
194
+ /// unchanged when it is not an update failure.
195
+ static func classifying(
196
+ _ error: Error,
197
+ during phase: UpdatePhase,
198
+ resource: UpdateFailureResource? = nil
199
+ ) -> Error {
200
+ if let classified = error as? UpdateFailureError {
201
+ return UpdateFailureError(
202
+ underlying: classified.underlying,
203
+ failure: classified.failure.with(resource: resource)
204
+ )
205
+ }
206
+ guard let failure = UpdateFailureClassifier.classify(error, during: phase) else {
207
+ return error
208
+ }
209
+ return UpdateFailureError(underlying: error, failure: failure.with(resource: resource))
210
+ }
211
+
212
+ /// Runs `body`, classifying what it throws as raised during `phase`.
213
+ static func during<T>(
214
+ _ phase: UpdatePhase,
215
+ resource: UpdateFailureResource? = nil,
216
+ _ body: () throws -> T
217
+ ) throws -> T {
218
+ do {
219
+ return try body()
220
+ } catch {
221
+ throw classifying(error, during: phase, resource: resource)
222
+ }
223
+ }
224
+
225
+ /// The error that decides the rejection code.
226
+ static func unwrap(_ error: Error) -> Error {
227
+ (error as? UpdateFailureError)?.underlying ?? error
228
+ }
229
+
230
+ /// The error `updateBundle` rejects with: the underlying error's domain,
231
+ /// code, and userInfo, plus the classification entries.
232
+ static func rejectionError(for error: Error) -> NSError {
233
+ guard let classified = error as? UpdateFailureError else {
234
+ return error as NSError
235
+ }
236
+ let underlying = classified.underlying as NSError
237
+ var userInfo = underlying.userInfo
238
+ userInfo[NSLocalizedDescriptionKey] = underlying.localizedDescription
239
+ userInfo.merge(classified.failure.userInfo) { _, classification in classification }
240
+ return NSError(domain: underlying.domain, code: underlying.code, userInfo: userInfo)
241
+ }
242
+ }
243
+
244
+ extension UpdateFailureError: LocalizedError {
245
+ var errorDescription: String? {
246
+ underlying.localizedDescription
247
+ }
248
+ }
249
+
250
+ /// The Release selection an install was staged for changed before the bundle
251
+ /// was activated. The rejection is not an update failure.
252
+ struct StaleReleaseSelectionError: Error, CustomNSError {
253
+ static var errorDomain: String {
254
+ "HotUpdater"
255
+ }
256
+
257
+ var errorCode: Int {
258
+ 0
259
+ }
260
+
261
+ var errorUserInfo: [String: Any] {
262
+ [NSLocalizedDescriptionKey: "Release catalog selection is stale"]
263
+ }
264
+ }
265
+
266
+ enum UpdateFailureClassifier {
267
+ /// Classifies an error raised during `phase`, or returns nil when the
268
+ /// error is not an update failure.
269
+ static func classify(_ error: Error, during phase: UpdatePhase) -> UpdateFailure? {
270
+ switch error {
271
+ case let error as UpdateFailureError:
272
+ return error.failure
273
+ case is StaleReleaseSelectionError:
274
+ return nil
275
+ case let error as BundleStorageError:
276
+ return classifyStorageError(error, during: phase)
277
+ case let error as SignatureVerificationError:
278
+ return classifySignatureError(error, during: phase)
279
+ case let error as DownloadError:
280
+ return classifyDownloadError(error)
281
+ case let error as URLError:
282
+ return classifyURLError(error)
283
+ default:
284
+ return isFileSystemError(error) ? .storage : fallback(during: phase)
285
+ }
286
+ }
287
+
288
+ private static func classifyStorageError(
289
+ _ error: BundleStorageError,
290
+ during phase: UpdatePhase
291
+ ) -> UpdateFailure? {
292
+ switch error {
293
+ case .directoryCreationFailed, .moveOperationFailed:
294
+ return .storage
295
+ case .downloadFailed(let underlying):
296
+ return classify(underlying, during: .transfer)
297
+ case .incompleteDownload:
298
+ return .network
299
+ case .invalidBundle:
300
+ return .invalidResponse
301
+ case .signatureVerificationFailed(let underlying):
302
+ return classifySignatureError(underlying, during: phase)
303
+ case .bundleInCrashedHistory:
304
+ return nil
305
+ case .unknown(.some(let underlying)):
306
+ return classify(underlying, during: phase)
307
+ case .unknown(.none):
308
+ return fallback(during: phase)
309
+ }
310
+ }
311
+
312
+ private static func classifySignatureError(
313
+ _ error: SignatureVerificationError,
314
+ during phase: UpdatePhase
315
+ ) -> UpdateFailure {
316
+ switch error {
317
+ case .fileHashMismatch:
318
+ switch phase {
319
+ case .patch:
320
+ return .patch
321
+ case .extraction:
322
+ return .extract
323
+ case .transfer, .verification, .manifest, .storage:
324
+ return .hashMismatch
325
+ }
326
+ case .fileReadFailed:
327
+ return .storage
328
+ case .missingFileHash:
329
+ return .invalidResponse
330
+ case .publicKeyNotConfigured,
331
+ .invalidPublicKeyFormat,
332
+ .invalidSignatureFormat,
333
+ .signatureVerificationFailed,
334
+ .unsignedNotAllowed,
335
+ .securityFrameworkError:
336
+ return .signature
337
+ }
338
+ }
339
+
340
+ private static func classifyDownloadError(_ error: DownloadError) -> UpdateFailure {
341
+ switch error {
342
+ case .httpStatus(let status, let originCode):
343
+ return .http(status: status, originCode: originCode)
344
+ case .incompleteDownload, .invalidContentLength:
345
+ // A response arrived, so the failure names no transport.
346
+ return .network
347
+ }
348
+ }
349
+
350
+ private static func classifyURLError(_ error: URLError) -> UpdateFailure {
351
+ switch error.code {
352
+ case .badURL, .unsupportedURL:
353
+ return .invalidResponse
354
+ case .cannotCreateFile,
355
+ .cannotOpenFile,
356
+ .cannotCloseFile,
357
+ .cannotWriteToFile,
358
+ .cannotRemoveFile,
359
+ .cannotMoveFile:
360
+ return .storage
361
+ default:
362
+ return .network(transport: UpdateFailureTransport(error.code))
363
+ }
364
+ }
365
+
366
+ private static func isFileSystemError(_ error: Error) -> Bool {
367
+ if error is FileSystemError {
368
+ return true
369
+ }
370
+ if let cocoaError = error as? CocoaError {
371
+ return cocoaError.isFileError
372
+ }
373
+ return (error as NSError).domain == NSPOSIXErrorDomain
374
+ }
375
+
376
+ private static func fallback(during phase: UpdatePhase) -> UpdateFailure {
377
+ switch phase {
378
+ case .transfer, .verification:
379
+ return .unknown(.download)
380
+ case .manifest:
381
+ return .invalidResponse
382
+ case .patch:
383
+ return .patch
384
+ case .extraction:
385
+ return .extract
386
+ case .storage:
387
+ return .unknown(.install)
388
+ }
389
+ }
390
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.handleNotifyAppReady = exports.getRunningReleaseId = exports.getPreviousProcessExit = exports.emitAfterAppReady = void 0;
7
+ var _native = require("./native.js");
8
+ var _pluginHost = require("./pluginHost.js");
9
+ let didEmitAppReady = false;
10
+ /** Settles once this runtime's launch was read, whether it was reported or failed. */
11
+ let appReadyRead = null;
12
+ /** Why the previous main process exited, read with this runtime's launch. */
13
+ let previousProcessExit = null;
14
+
15
+ /** Android 11+: why the app's previous main process exited, once the launch was read. */
16
+ const getPreviousProcessExit = () => previousProcessExit;
17
+ exports.getPreviousProcessExit = getPreviousProcessExit;
18
+ const waitForNextFrame = () => new Promise(resolve => {
19
+ const requestAnimationFrame = globalThis?.requestAnimationFrame;
20
+ if (requestAnimationFrame) {
21
+ requestAnimationFrame(() => resolve());
22
+ return;
23
+ }
24
+ void Promise.resolve().then(resolve);
25
+ });
26
+
27
+ /**
28
+ * The Release the running bundle was selected as: the active or stable
29
+ * selection that names it on the current channel.
30
+ */
31
+ const getRunningReleaseId = (bundleId, channel) => {
32
+ const state = (0, _native.getActiveUpdateState)();
33
+ return [state.activeSelection, state.stableSelection].find(selection => selection?.bundleId === bundleId && selection.channel === channel)?.releaseId ?? null;
34
+ };
35
+ exports.getRunningReleaseId = getRunningReleaseId;
36
+ const toAppReadyResult = (result, transition) => {
37
+ const channel = (0, _native.getChannel)();
38
+ if (result.status === "UNCHANGED") {
39
+ const bundleId = (0, _native.getBundleId)();
40
+ return {
41
+ status: "UNCHANGED",
42
+ channel,
43
+ bundleId,
44
+ releaseId: getRunningReleaseId(bundleId, channel),
45
+ previousProcessExit
46
+ };
47
+ }
48
+ // Native persists the transition with every applied or recovered launch;
49
+ // a report without it cannot say what moved.
50
+ if (transition === null) return null;
51
+ return {
52
+ status: transition.type,
53
+ channel,
54
+ fromBundleId: transition.fromBundleId,
55
+ fromReleaseId: transition.fromReleaseId,
56
+ toBundleId: transition.toBundleId,
57
+ toReleaseId: transition.toReleaseId,
58
+ updateStrategy: transition.updateStrategy,
59
+ previousProcessExit
60
+ };
61
+ };
62
+ const notifyAppReady = async options => {
63
+ try {
64
+ let nativeReadResult;
65
+ do {
66
+ await waitForNextFrame();
67
+ nativeReadResult = (0, _native.readNotifyAppReady)();
68
+ } while (nativeReadResult.pending);
69
+ const {
70
+ result,
71
+ transition
72
+ } = nativeReadResult;
73
+ previousProcessExit = nativeReadResult.previousProcessExit;
74
+ if (!didEmitAppReady) {
75
+ didEmitAppReady = true;
76
+ (0, _pluginHost.emitPluginHook)("onAppReady", () => toAppReadyResult(result, transition));
77
+ }
78
+ options.onNotifyAppReady?.(result);
79
+ return result;
80
+ } catch (error) {
81
+ const normalizedError = error instanceof Error ? error : new Error(String(error));
82
+ options.onError?.(error);
83
+ console.warn("[HotUpdater] Failed to notify app ready:", normalizedError);
84
+ return undefined;
85
+ }
86
+ };
87
+
88
+ /** Reads this runtime's launch once native finalizes it and reports it to plugins. */
89
+ const handleNotifyAppReady = options => {
90
+ const readiness = notifyAppReady(options);
91
+ appReadyRead ??= readiness;
92
+ return readiness;
93
+ };
94
+
95
+ /**
96
+ * Calls a plugin hook after this runtime's `onAppReady`, so plugins see the
97
+ * launch before anything that followed it. The event is built now, from the
98
+ * state it describes, and only when a plugin listens.
99
+ */
100
+ exports.handleNotifyAppReady = handleNotifyAppReady;
101
+ const emitAfterAppReady = (name, createPayload) => {
102
+ const payload = (0, _pluginHost.buildPluginEvent)(name, createPayload);
103
+ if (payload === null) return;
104
+ if (appReadyRead === null) {
105
+ (0, _pluginHost.dispatchPluginHook)(name, payload);
106
+ return;
107
+ }
108
+ void appReadyRead.then(() => (0, _pluginHost.dispatchPluginHook)(name, payload));
109
+ };
110
+ exports.emitAfterAppReady = emitAfterAppReady;
111
+ //# sourceMappingURL=appReady.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_native","require","_pluginHost","didEmitAppReady","appReadyRead","previousProcessExit","getPreviousProcessExit","exports","waitForNextFrame","Promise","resolve","requestAnimationFrame","globalThis","then","getRunningReleaseId","bundleId","channel","state","getActiveUpdateState","activeSelection","stableSelection","find","selection","releaseId","toAppReadyResult","result","transition","getChannel","status","getBundleId","type","fromBundleId","fromReleaseId","toBundleId","toReleaseId","updateStrategy","notifyAppReady","options","nativeReadResult","readNotifyAppReady","pending","emitPluginHook","onNotifyAppReady","error","normalizedError","Error","String","onError","console","warn","undefined","handleNotifyAppReady","readiness","emitAfterAppReady","name","createPayload","payload","buildPluginEvent","dispatchPluginHook"],"sourceRoot":"../../src","sources":["appReady.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAIE,eAAe,GAAG,KAAK;AAC3B;AACA,IAAIC,YAAqC,GAAG,IAAI;AAChD;AACA,IAAIC,mBAAkC,GAAG,IAAI;;AAE7C;AACO,MAAMC,sBAAsB,GAAGA,CAAA,KAAqBD,mBAAmB;AAACE,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AAE/E,MAAME,gBAAgB,GAAGA,CAAA,KACvB,IAAIC,OAAO,CAAQC,OAAO,IAAK;EAC7B,MAAMC,qBAAqB,GACzBC,UAAU,EAGT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