@hot-updater/react-native 0.23.1 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/android/src/main/java/com/hotupdater/BundleFileStorageService.kt +393 -49
  2. package/android/src/main/java/com/hotupdater/BundleMetadata.kt +204 -0
  3. package/android/src/main/java/com/hotupdater/HotUpdater.kt +48 -36
  4. package/android/src/main/java/com/hotupdater/HotUpdaterException.kt +134 -0
  5. package/android/src/main/java/com/hotupdater/HotUpdaterImpl.kt +168 -95
  6. package/android/src/main/java/com/hotupdater/OkHttpDownloadService.kt +15 -3
  7. package/android/src/main/java/com/hotupdater/SignatureVerifier.kt +17 -12
  8. package/android/src/newarch/HotUpdaterModule.kt +88 -23
  9. package/android/src/oldarch/HotUpdaterModule.kt +89 -22
  10. package/android/src/oldarch/HotUpdaterSpec.kt +6 -0
  11. package/ios/HotUpdater/Internal/BundleFileStorageService.swift +401 -77
  12. package/ios/HotUpdater/Internal/BundleMetadata.swift +177 -0
  13. package/ios/HotUpdater/Internal/HotUpdater.mm +213 -47
  14. package/ios/HotUpdater/Internal/HotUpdaterImpl.swift +96 -25
  15. package/ios/HotUpdater/Internal/SignatureVerifier.swift +35 -29
  16. package/ios/HotUpdater/Internal/URLSessionDownloadService.swift +2 -2
  17. package/ios/HotUpdater/Public/HotUpdater.h +8 -2
  18. package/lib/commonjs/checkForUpdate.js +31 -28
  19. package/lib/commonjs/checkForUpdate.js.map +1 -1
  20. package/lib/commonjs/error.js +45 -1
  21. package/lib/commonjs/error.js.map +1 -1
  22. package/lib/commonjs/fetchUpdateInfo.js +7 -45
  23. package/lib/commonjs/fetchUpdateInfo.js.map +1 -1
  24. package/lib/commonjs/index.js +237 -208
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/native.js +103 -3
  27. package/lib/commonjs/native.js.map +1 -1
  28. package/lib/commonjs/specs/NativeHotUpdater.js.map +1 -1
  29. package/lib/commonjs/wrap.js +39 -1
  30. package/lib/commonjs/wrap.js.map +1 -1
  31. package/lib/module/checkForUpdate.js +32 -26
  32. package/lib/module/checkForUpdate.js.map +1 -1
  33. package/lib/module/error.js +45 -0
  34. package/lib/module/error.js.map +1 -1
  35. package/lib/module/fetchUpdateInfo.js +7 -45
  36. package/lib/module/fetchUpdateInfo.js.map +1 -1
  37. package/lib/module/index.js +238 -203
  38. package/lib/module/index.js.map +1 -1
  39. package/lib/module/native.js +87 -2
  40. package/lib/module/native.js.map +1 -1
  41. package/lib/module/specs/NativeHotUpdater.js.map +1 -1
  42. package/lib/module/wrap.js +40 -2
  43. package/lib/module/wrap.js.map +1 -1
  44. package/lib/typescript/commonjs/checkForUpdate.d.ts +11 -13
  45. package/lib/typescript/commonjs/checkForUpdate.d.ts.map +1 -1
  46. package/lib/typescript/commonjs/error.d.ts +120 -0
  47. package/lib/typescript/commonjs/error.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/fetchUpdateInfo.d.ts +3 -5
  49. package/lib/typescript/commonjs/fetchUpdateInfo.d.ts.map +1 -1
  50. package/lib/typescript/commonjs/index.d.ts +35 -41
  51. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/native.d.ts +58 -2
  53. package/lib/typescript/commonjs/native.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts +62 -0
  55. package/lib/typescript/commonjs/specs/NativeHotUpdater.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/wrap.d.ts +76 -5
  57. package/lib/typescript/commonjs/wrap.d.ts.map +1 -1
  58. package/lib/typescript/module/checkForUpdate.d.ts +11 -13
  59. package/lib/typescript/module/checkForUpdate.d.ts.map +1 -1
  60. package/lib/typescript/module/error.d.ts +120 -0
  61. package/lib/typescript/module/error.d.ts.map +1 -1
  62. package/lib/typescript/module/fetchUpdateInfo.d.ts +3 -5
  63. package/lib/typescript/module/fetchUpdateInfo.d.ts.map +1 -1
  64. package/lib/typescript/module/index.d.ts +35 -41
  65. package/lib/typescript/module/index.d.ts.map +1 -1
  66. package/lib/typescript/module/native.d.ts +58 -2
  67. package/lib/typescript/module/native.d.ts.map +1 -1
  68. package/lib/typescript/module/specs/NativeHotUpdater.d.ts +62 -0
  69. package/lib/typescript/module/specs/NativeHotUpdater.d.ts.map +1 -1
  70. package/lib/typescript/module/wrap.d.ts +76 -5
  71. package/lib/typescript/module/wrap.d.ts.map +1 -1
  72. package/package.json +7 -7
  73. package/plugin/build/withHotUpdater.js +3 -3
  74. package/src/checkForUpdate.ts +51 -40
  75. package/src/error.ts +153 -0
  76. package/src/fetchUpdateInfo.ts +10 -58
  77. package/src/index.ts +283 -206
  78. package/src/native.ts +88 -2
  79. package/src/specs/NativeHotUpdater.ts +63 -0
  80. package/src/wrap.tsx +131 -9
  81. package/android/src/main/java/com/hotupdater/HotUpdaterFactory.kt +0 -52
  82. package/ios/HotUpdater/Internal/HotUpdaterFactory.swift +0 -24
  83. package/lib/commonjs/runUpdateProcess.js +0 -69
  84. package/lib/commonjs/runUpdateProcess.js.map +0 -1
  85. package/lib/module/runUpdateProcess.js +0 -64
  86. package/lib/module/runUpdateProcess.js.map +0 -1
  87. package/lib/typescript/commonjs/runUpdateProcess.d.ts +0 -49
  88. package/lib/typescript/commonjs/runUpdateProcess.d.ts.map +0 -1
  89. package/lib/typescript/module/runUpdateProcess.d.ts +0 -49
  90. package/lib/typescript/module/runUpdateProcess.d.ts.map +0 -1
  91. package/src/runUpdateProcess.ts +0 -80
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { checkForUpdate } from "./checkForUpdate.js";
4
- import { addListener, getAppVersion, getBundleId, getChannel, getFingerprintHash, getMinBundleId, reload, updateBundle } from "./native.js";
5
- import { runUpdateProcess } from "./runUpdateProcess.js";
4
+ import { addListener, clearCrashHistory, getAppVersion, getBundleId, getChannel, getCrashHistory, getFingerprintHash, getMinBundleId, reload, updateBundle } from "./native.js";
6
5
  import { hotUpdaterStore } from "./store.js";
7
6
  import { wrap } from "./wrap.js";
8
7
  export * from "./store.js";
@@ -14,205 +13,241 @@ addListener("onProgress", ({
14
13
  progress
15
14
  });
16
15
  });
17
- export const HotUpdater = {
18
- /**
19
- * `HotUpdater.wrap` checks for updates at the entry point, and if there is a bundle to update, it downloads the bundle and applies the update strategy.
20
- *
21
- * @param {object} options - Configuration options
22
- * @param {string} options.source - Update server URL
23
- * @param {object} [options.requestHeaders] - Request headers
24
- * @param {React.ComponentType} [options.fallbackComponent] - Component to display during updates
25
- * @param {boolean} [options.reloadOnForceUpdate=true] - Whether to automatically reload the app on force updates
26
- * @param {Function} [options.onUpdateProcessCompleted] - Callback after update process completes
27
- * @param {Function} [options.onProgress] - Callback to track bundle download progress
28
- * @returns {Function} Higher-order component that wraps the app component
29
- *
30
- * @example
31
- * ```tsx
32
- * export default HotUpdater.wrap({
33
- * source: "<your-update-server-url>",
34
- * requestHeaders: {
35
- * "Authorization": "Bearer <your-access-token>",
36
- * },
37
- * })(App);
38
- * ```
39
- */
40
- wrap,
41
- /**
42
- * Reloads the app.
43
- */
44
- reload,
45
- /**
46
- * Returns whether an update has finished downloading in this app session.
47
- *
48
- * When it returns true, calling `HotUpdater.reload()` (or restarting the app)
49
- * will apply the downloaded update bundle.
50
- *
51
- * - Derived from `progress` reaching 1.0
52
- * - Resets to false when a new download starts (progress < 1)
53
- *
54
- * @returns {boolean} True if a downloaded update is ready to apply
55
- * @example
56
- * ```ts
57
- * if (HotUpdater.isUpdateDownloaded()) {
58
- * await HotUpdater.reload();
59
- * }
60
- * ```
61
- */
62
- isUpdateDownloaded: () => hotUpdaterStore.getSnapshot().isUpdateDownloaded,
63
- /**
64
- * Fetches the current app version.
65
- */
66
- getAppVersion,
67
- /**
68
- * Fetches the current bundle ID of the app.
69
- */
70
- getBundleId,
71
- /**
72
- * Retrieves the initial bundle ID based on the build time of the native app.
73
- */
74
- getMinBundleId,
75
- /**
76
- * Fetches the current channel of the app.
77
- *
78
- * If no channel is specified, the app is assigned to the 'production' channel.
79
- *
80
- * @returns {string} The current release channel of the app
81
- * @default "production"
82
- * @example
83
- * ```ts
84
- * const channel = HotUpdater.getChannel();
85
- * console.log(`Current channel: ${channel}`);
86
- * ```
87
- */
88
- getChannel,
89
- /**
90
- * Adds a listener to HotUpdater events.
91
- *
92
- * @param {keyof HotUpdaterEvent} eventName - The name of the event to listen for
93
- * @param {(event: HotUpdaterEvent[T]) => void} listener - The callback function to handle the event
94
- * @returns {() => void} A cleanup function that removes the event listener
95
- *
96
- * @example
97
- * ```ts
98
- * const unsubscribe = HotUpdater.addListener("onProgress", ({ progress }) => {
99
- * console.log(`Update progress: ${progress * 100}%`);
100
- * });
101
- *
102
- * // Unsubscribe when no longer needed
103
- * unsubscribe();
104
- * ```
105
- */
106
- addListener,
107
- /**
108
- * Manually checks for updates.
109
- *
110
- * @param {Object} config - Update check configuration
111
- * @param {string} config.source - Update server URL
112
- * @param {Record<string, string>} [config.requestHeaders] - Request headers
113
- *
114
- * @returns {Promise<UpdateInfo | null>} Update information or null if up to date
115
- *
116
- * @example
117
- * ```ts
118
- * const updateInfo = await HotUpdater.checkForUpdate({
119
- * source: "<your-update-server-url>",
120
- * requestHeaders: {
121
- * Authorization: "Bearer <your-access-token>",
122
- * },
123
- * });
124
- *
125
- * if (!updateInfo) {
126
- * console.log("App is up to date");
127
- * return;
128
- * }
129
- *
130
- * await HotUpdater.updateBundle(updateInfo.id, updateInfo.fileUrl);
131
- * if (updateInfo.shouldForceUpdate) {
132
- * await HotUpdater.reload();
133
- * }
134
- * ```
135
- */
136
- checkForUpdate,
137
- /**
138
- * Manually checks and applies updates for the application.
139
- *
140
- * @param {RunUpdateProcessConfig} config - Update process configuration
141
- * @param {string} config.source - Update server URL
142
- * @param {Record<string, string>} [config.requestHeaders] - Request headers
143
- * @param {boolean} [config.reloadOnForceUpdate=false] - Whether to automatically reload on force update
144
- *
145
- * @example
146
- * ```ts
147
- * // Auto reload on force update
148
- * const result = await HotUpdater.runUpdateProcess({
149
- * source: "<your-update-server-url>",
150
- * requestHeaders: {
151
- * // Add necessary headers
152
- * },
153
- * reloadOnForceUpdate: true
154
- * });
155
- *
156
- * // Manually handle reload on force update
157
- * const result = await HotUpdater.runUpdateProcess({
158
- * source: "<your-update-server-url>",
159
- * reloadOnForceUpdate: false
160
- * });
161
- *
162
- * if(result.status !== "UP_TO_DATE" && result.shouldForceUpdate) {
163
- * await HotUpdater.reload();
164
- * }
165
- * ```
166
- *
167
- * @returns {Promise<RunUpdateProcessResponse>} The result of the update process
168
- */
169
- runUpdateProcess,
170
- /**
171
- * Updates the bundle of the app.
172
- *
173
- * @param {UpdateBundleParams} params - Parameters object required for bundle update
174
- * @param {string} params.bundleId - The bundle ID of the app
175
- * @param {string|null} params.fileUrl - The URL of the zip file
176
- *
177
- * @returns {Promise<boolean>} Whether the update was successful
178
- *
179
- * @example
180
- * ```ts
181
- * const updateInfo = await HotUpdater.checkForUpdate({
182
- * source: "<your-update-server-url>",
183
- * requestHeaders: {
184
- * Authorization: "Bearer <your-access-token>",
185
- * },
186
- * });
187
- *
188
- * if (!updateInfo) {
189
- * return {
190
- * status: "UP_TO_DATE",
191
- * };
192
- * }
193
- *
194
- * await HotUpdater.updateBundle({
195
- * bundleId: updateInfo.id,
196
- * fileUrl: updateInfo.fileUrl
197
- * });
198
- * if (updateInfo.shouldForceUpdate) {
199
- * await HotUpdater.reload();
200
- * }
201
- * ```
202
- */
203
- updateBundle,
204
- /**
205
- * Fetches the fingerprint of the app.
206
- *
207
- * @returns {string} The fingerprint of the app
208
- *
209
- * @example
210
- * ```ts
211
- * const fingerprint = HotUpdater.getFingerprintHash();
212
- * console.log(`Fingerprint: ${fingerprint}`);
213
- * ```
214
- */
215
- getFingerprintHash
216
- };
217
- export { getUpdateSource } from "./checkForUpdate.js";
16
+
17
+ /**
18
+ * Creates a HotUpdater client instance with all update management methods.
19
+ * This function is called once on module initialization to create a singleton instance.
20
+ */
21
+ function createHotUpdaterClient() {
22
+ // Global configuration stored from wrap
23
+ const globalConfig = {
24
+ baseURL: null
25
+ };
26
+ function ensureGlobalBaseURL(methodName) {
27
+ if (globalConfig.baseURL === null) {
28
+ throw new Error(`[HotUpdater] ${methodName} requires HotUpdater.wrap() to be used.\n\n` + `To fix this issue, wrap your root component with HotUpdater.wrap():\n\n` + `Option 1: With automatic updates\n` + ` export default HotUpdater.wrap({\n` + ` baseURL: "<your-update-server-url>",\n` + ` updateStrategy: "appVersion",\n` + ` updateMode: "auto"\n` + ` })(App);\n\n` + `Option 2: Manual updates only (custom flow)\n` + ` export default HotUpdater.wrap({\n` + ` baseURL: "<your-update-server-url>",\n` + ` updateMode: "manual"\n` + ` })(App);\n\n` + `For more information, visit: https://hot-updater.dev/docs/react-native-api/wrap`);
29
+ }
30
+ return globalConfig.baseURL;
31
+ }
32
+ return {
33
+ /**
34
+ * `HotUpdater.wrap` checks for updates at the entry point, and if there is a bundle to update, it downloads the bundle and applies the update strategy.
35
+ *
36
+ * @param {object} options - Configuration options
37
+ * @param {string} options.source - Update server URL
38
+ * @param {object} [options.requestHeaders] - Request headers
39
+ * @param {React.ComponentType} [options.fallbackComponent] - Component to display during updates
40
+ * @param {boolean} [options.reloadOnForceUpdate=true] - Whether to automatically reload the app on force updates
41
+ * @param {Function} [options.onUpdateProcessCompleted] - Callback after update process completes
42
+ * @param {Function} [options.onProgress] - Callback to track bundle download progress
43
+ * @returns {Function} Higher-order component that wraps the app component
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * export default HotUpdater.wrap({
48
+ * baseURL: "<your-update-server-url>",
49
+ * updateStrategy: "appVersion",
50
+ * updateMode: "auto",
51
+ * requestHeaders: {
52
+ * "Authorization": "Bearer <your-access-token>",
53
+ * },
54
+ * })(App);
55
+ * ```
56
+ */
57
+ wrap: options => {
58
+ globalConfig.baseURL = options.baseURL;
59
+ globalConfig.requestHeaders = options.requestHeaders;
60
+ globalConfig.requestTimeout = options.requestTimeout;
61
+ return wrap(options);
62
+ },
63
+ /**
64
+ * Reloads the app.
65
+ */
66
+ reload,
67
+ /**
68
+ * Returns whether an update has finished downloading in this app session.
69
+ *
70
+ * When it returns true, calling `HotUpdater.reload()` (or restarting the app)
71
+ * will apply the downloaded update bundle.
72
+ *
73
+ * - Derived from `progress` reaching 1.0
74
+ * - Resets to false when a new download starts (progress < 1)
75
+ *
76
+ * @returns {boolean} True if a downloaded update is ready to apply
77
+ * @example
78
+ * ```ts
79
+ * if (HotUpdater.isUpdateDownloaded()) {
80
+ * await HotUpdater.reload();
81
+ * }
82
+ * ```
83
+ */
84
+ isUpdateDownloaded: () => hotUpdaterStore.getSnapshot().isUpdateDownloaded,
85
+ /**
86
+ * Fetches the current app version.
87
+ */
88
+ getAppVersion,
89
+ /**
90
+ * Fetches the current bundle ID of the app.
91
+ */
92
+ getBundleId,
93
+ /**
94
+ * Retrieves the initial bundle ID based on the build time of the native app.
95
+ */
96
+ getMinBundleId,
97
+ /**
98
+ * Fetches the current channel of the app.
99
+ *
100
+ * If no channel is specified, the app is assigned to the 'production' channel.
101
+ *
102
+ * @returns {string} The current release channel of the app
103
+ * @default "production"
104
+ * @example
105
+ * ```ts
106
+ * const channel = HotUpdater.getChannel();
107
+ * console.log(`Current channel: ${channel}`);
108
+ * ```
109
+ */
110
+ getChannel,
111
+ /**
112
+ * Adds a listener to HotUpdater events.
113
+ *
114
+ * @param {keyof HotUpdaterEvent} eventName - The name of the event to listen for
115
+ * @param {(event: HotUpdaterEvent[T]) => void} listener - The callback function to handle the event
116
+ * @returns {() => void} A cleanup function that removes the event listener
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const unsubscribe = HotUpdater.addListener("onProgress", ({ progress }) => {
121
+ * console.log(`Update progress: ${progress * 100}%`);
122
+ * });
123
+ *
124
+ * // Unsubscribe when no longer needed
125
+ * unsubscribe();
126
+ * ```
127
+ */
128
+ addListener,
129
+ /**
130
+ * Manually checks for updates.
131
+ *
132
+ * @param {Object} config - Update check configuration
133
+ * @param {string} config.source - Update server URL
134
+ * @param {Record<string, string>} [config.requestHeaders] - Request headers
135
+ *
136
+ * @returns {Promise<UpdateInfo | null>} Update information or null if up to date
137
+ *
138
+ * @example
139
+ * ```ts
140
+ * const updateInfo = await HotUpdater.checkForUpdate({
141
+ * source: "<your-update-server-url>",
142
+ * requestHeaders: {
143
+ * Authorization: "Bearer <your-access-token>",
144
+ * },
145
+ * });
146
+ *
147
+ * if (!updateInfo) {
148
+ * console.log("App is up to date");
149
+ * return;
150
+ * }
151
+ *
152
+ * await HotUpdater.updateBundle(updateInfo.id, updateInfo.fileUrl);
153
+ * if (updateInfo.shouldForceUpdate) {
154
+ * await HotUpdater.reload();
155
+ * }
156
+ * ```
157
+ */
158
+ checkForUpdate: config => {
159
+ const baseURL = ensureGlobalBaseURL("checkForUpdate");
160
+
161
+ // Merge globalConfig with provided config
162
+ // baseURL is always from wrap (globalConfig)
163
+ // requestHeaders/requestTimeout from wrap are used as defaults, but can be overridden
164
+ const mergedConfig = {
165
+ ...config,
166
+ baseURL,
167
+ requestHeaders: {
168
+ ...globalConfig.requestHeaders,
169
+ ...config.requestHeaders
170
+ },
171
+ requestTimeout: config.requestTimeout ?? globalConfig.requestTimeout
172
+ };
173
+ return checkForUpdate(mergedConfig);
174
+ },
175
+ /**
176
+ * Updates the bundle of the app.
177
+ *
178
+ * @param {UpdateBundleParams} params - Parameters object required for bundle update
179
+ * @param {string} params.bundleId - The bundle ID of the app
180
+ * @param {string|null} params.fileUrl - The URL of the zip file
181
+ *
182
+ * @returns {Promise<boolean>} Whether the update was successful
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * const updateInfo = await HotUpdater.checkForUpdate({
187
+ * source: "<your-update-server-url>",
188
+ * requestHeaders: {
189
+ * Authorization: "Bearer <your-access-token>",
190
+ * },
191
+ * });
192
+ *
193
+ * if (!updateInfo) {
194
+ * return {
195
+ * status: "UP_TO_DATE",
196
+ * };
197
+ * }
198
+ *
199
+ * await HotUpdater.updateBundle({
200
+ * bundleId: updateInfo.id,
201
+ * fileUrl: updateInfo.fileUrl
202
+ * });
203
+ * if (updateInfo.shouldForceUpdate) {
204
+ * await HotUpdater.reload();
205
+ * }
206
+ * ```
207
+ */
208
+ updateBundle: params => {
209
+ ensureGlobalBaseURL("updateBundle");
210
+ return updateBundle(params);
211
+ },
212
+ /**
213
+ * Fetches the fingerprint of the app.
214
+ *
215
+ * @returns {string} The fingerprint of the app
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * const fingerprint = HotUpdater.getFingerprintHash();
220
+ * console.log(`Fingerprint: ${fingerprint}`);
221
+ * ```
222
+ */
223
+ getFingerprintHash,
224
+ /**
225
+ * Gets the list of bundle IDs that have been marked as crashed.
226
+ * These bundles will be rejected if attempted to install again.
227
+ *
228
+ * @returns {string[]} Array of crashed bundle IDs
229
+ *
230
+ * @example
231
+ * ```ts
232
+ * const crashedBundles = HotUpdater.getCrashHistory();
233
+ * console.log("Crashed bundles:", crashedBundles);
234
+ * ```
235
+ */
236
+ getCrashHistory,
237
+ /**
238
+ * Clears the crashed bundle history, allowing previously crashed bundles
239
+ * to be installed again.
240
+ *
241
+ * @returns {boolean} true if clearing was successful
242
+ *
243
+ * @example
244
+ * ```ts
245
+ * // Clear crash history to allow retrying a previously failed bundle
246
+ * HotUpdater.clearCrashHistory();
247
+ * ```
248
+ */
249
+ clearCrashHistory
250
+ };
251
+ }
252
+ export const HotUpdater = createHotUpdaterClient();
218
253
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["checkForUpdate","addListener","getAppVersion","getBundleId","getChannel","getFingerprintHash","getMinBundleId","reload","updateBundle","runUpdateProcess","hotUpdaterStore","wrap","extractSignatureFailure","isSignatureVerificationError","progress","setState","HotUpdater","isUpdateDownloaded","getSnapshot","getUpdateSource"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SACEC,WAAW,EACXC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,kBAAkB,EAClBC,cAAc,EACdC,MAAM,EACNC,YAAY,QACP,aAAU;AACjB,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,eAAe,QAAQ,YAAS;AACzC,SAASC,IAAI,QAAQ,WAAQ;AAG7B,cAAc,YAAS;AACvB,SACEC,uBAAuB,EACvBC,4BAA4B,QAEvB,YAAS;AAGhBZ,WAAW,CAAC,YAAY,EAAE,CAAC;EAAEa;AAAS,CAAC,KAAK;EAC1CJ,eAAe,CAACK,QAAQ,CAAC;IACvBD;EACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,MAAME,UAAU,GAAG;EACxB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEL,IAAI;EACJ;AACF;AACA;EACEJ,MAAM;EACN;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEU,kBAAkB,EAAEA,CAAA,KAAMP,eAAe,CAACQ,WAAW,CAAC,CAAC,CAACD,kBAAkB;EAC1E;AACF;AACA;EACEf,aAAa;EACb;AACF;AACA;EACEC,WAAW;EACX;AACF;AACA;EACEG,cAAc;EACd;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEF,UAAU;EACV;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEH,WAAW;EACX;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACED,cAAc;EACd;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACES,gBAAgB;EAChB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACED,YAAY;EACZ;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEH;AACF,CAAC;AAED,SAASc,eAAe,QAAQ,qBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["checkForUpdate","addListener","clearCrashHistory","getAppVersion","getBundleId","getChannel","getCrashHistory","getFingerprintHash","getMinBundleId","reload","updateBundle","hotUpdaterStore","wrap","extractSignatureFailure","isSignatureVerificationError","progress","setState","createHotUpdaterClient","globalConfig","baseURL","ensureGlobalBaseURL","methodName","Error","options","requestHeaders","requestTimeout","isUpdateDownloaded","getSnapshot","config","mergedConfig","params","HotUpdater"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAEEA,cAAc,QAET,qBAAkB;AACzB,SACEC,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,kBAAkB,EAClBC,cAAc,EACdC,MAAM,EAENC,YAAY,QACP,aAAU;AACjB,SAASC,eAAe,QAAQ,YAAS;AACzC,SAAiCC,IAAI,QAAQ,WAAQ;AAGrD,cAAc,YAAS;AACvB,SACEC,uBAAuB,EACvBC,4BAA4B,QAEvB,YAAS;AAGhBb,WAAW,CAAC,YAAY,EAAE,CAAC;EAAEc;AAAS,CAAC,KAAK;EAC1CJ,eAAe,CAACK,QAAQ,CAAC;IACvBD;EACF,CAAC,CAAC;AACJ,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,SAASE,sBAAsBA,CAAA,EAAG;EAChC;EACA,MAAMC,YAIL,GAAG;IACFC,OAAO,EAAE;EACX,CAAC;EAED,SAASC,mBAAmBA,CAACC,UAAkB,EAAE;IAC/C,IAAIH,YAAY,CAACC,OAAO,KAAK,IAAI,EAAE;MACjC,MAAM,IAAIG,KAAK,CACb,gBAAgBD,UAAU,6CAA6C,GACrE,yEAAyE,GACzE,oCAAoC,GACpC,sCAAsC,GACtC,4CAA4C,GAC5C,qCAAqC,GACrC,0BAA0B,GAC1B,gBAAgB,GAChB,+CAA+C,GAC/C,sCAAsC,GACtC,4CAA4C,GAC5C,4BAA4B,GAC5B,gBAAgB,GAChB,iFACJ,CAAC;IACH;IAEA,OAAOH,YAAY,CAACC,OAAO;EAC7B;EAEA,OAAO;IACL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIP,IAAI,EAAIW,OAA0B,IAAK;MACrCL,YAAY,CAACC,OAAO,GAAGI,OAAO,CAACJ,OAAO;MACtCD,YAAY,CAACM,cAAc,GAAGD,OAAO,CAACC,cAAc;MACpDN,YAAY,CAACO,cAAc,GAAGF,OAAO,CAACE,cAAc;MACpD,OAAOb,IAAI,CAACW,OAAO,CAAC;IACtB,CAAiB;IAEjB;AACJ;AACA;IACId,MAAM;IAEN;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIiB,kBAAkB,EAAEA,CAAA,KAAMf,eAAe,CAACgB,WAAW,CAAC,CAAC,CAACD,kBAAkB;IAE1E;AACJ;AACA;IACIvB,aAAa;IAEb;AACJ;AACA;IACIC,WAAW;IAEX;AACJ;AACA;IACII,cAAc;IAEd;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIH,UAAU;IAEV;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIJ,WAAW;IAEX;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACID,cAAc,EAAG4B,MAA6B,IAAK;MACjD,MAAMT,OAAO,GAAGC,mBAAmB,CAAC,gBAAgB,CAAC;;MAErD;MACA;MACA;MACA,MAAMS,YAA2C,GAAG;QAClD,GAAGD,MAAM;QACTT,OAAO;QACPK,cAAc,EAAE;UACd,GAAGN,YAAY,CAACM,cAAc;UAC9B,GAAGI,MAAM,CAACJ;QACZ,CAAC;QACDC,cAAc,EAAEG,MAAM,CAACH,cAAc,IAAIP,YAAY,CAACO;MACxD,CAAC;MAED,OAAOzB,cAAc,CAAC6B,YAAY,CAAC;IACrC,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACInB,YAAY,EAAGoB,MAAoB,IAAK;MACtCV,mBAAmB,CAAC,cAAc,CAAC;MAEnC,OAAOV,YAAY,CAACoB,MAAM,CAAC;IAC7B,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIvB,kBAAkB;IAElB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACID,eAAe;IAEf;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACIJ;EACF,CAAC;AACH;AAEA,OAAO,MAAM6B,UAAU,GAAGd,sBAAsB,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  import { NativeEventEmitter } from "react-native";
4
+ import { HotUpdaterErrorCode, isHotUpdaterError } from "./error.js";
4
5
  import HotUpdaterNative from "./specs/NativeHotUpdater.js";
6
+ export { HotUpdaterErrorCode, isHotUpdaterError };
5
7
  const NIL_UUID = "00000000-0000-0000-0000-000000000000";
6
8
  export const HotUpdaterConstants = {
7
9
  HOT_UPDATER_BUNDLE_ID: __HOT_UPDATER_BUNDLE_ID || NIL_UUID
@@ -22,7 +24,8 @@ let lastInstalledBundleId = null;
22
24
  * Downloads files and applies them to the app.
23
25
  *
24
26
  * @param {UpdateParams} params - Parameters object required for bundle update
25
- * @returns {Promise<boolean>} Resolves with true if download was successful, otherwise rejects with an error.
27
+ * @returns {Promise<boolean>} Resolves with true if download was successful
28
+ * @throws {Error} Rejects with error.code from HotUpdaterErrorCode enum and error.message
26
29
  */
27
30
 
28
31
  /**
@@ -98,7 +101,7 @@ export const getMinBundleId = () => {
98
101
  * Fetches the current bundle version id.
99
102
  *
100
103
  * @async
101
- * @returns {Promise<string>} Resolves with the current version id or null if not available.
104
+ * @returns {string} Resolves with the current version id or null if not available.
102
105
  */
103
106
  export const getBundleId = () => {
104
107
  return HotUpdaterConstants.HOT_UPDATER_BUNDLE_ID === NIL_UUID ? getMinBundleId() : HotUpdaterConstants.HOT_UPDATER_BUNDLE_ID;
@@ -123,4 +126,86 @@ export const getFingerprintHash = () => {
123
126
  const constants = HotUpdaterNative.getConstants();
124
127
  return constants.FINGERPRINT_HASH;
125
128
  };
129
+
130
+ /**
131
+ * Result returned by notifyAppReady()
132
+ */
133
+
134
+ /**
135
+ * Notifies the native side that the app has successfully started with the current bundle.
136
+ * If the bundle matches the staging bundle, it promotes to stable.
137
+ *
138
+ * This function is called automatically when the module loads.
139
+ *
140
+ * @returns {NotifyAppReadyResult} Bundle state information
141
+ * - `status: "PROMOTED"` - Staging bundle was promoted to stable (ACTIVE event)
142
+ * - `status: "RECOVERED"` - App recovered from crash, rollback occurred (ROLLBACK event)
143
+ * - `status: "STABLE"` - No changes, already stable
144
+ * - `crashedBundleId` - Present only when status is "RECOVERED"
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * const result = HotUpdater.notifyAppReady();
149
+ *
150
+ * switch (result.status) {
151
+ * case "PROMOTED":
152
+ * // Send ACTIVE analytics event
153
+ * analytics.track('bundle_active', { bundleId: HotUpdater.getBundleId() });
154
+ * break;
155
+ * case "RECOVERED":
156
+ * // Send ROLLBACK analytics event
157
+ * analytics.track('bundle_rollback', { crashedBundleId: result.crashedBundleId });
158
+ * break;
159
+ * case "STABLE":
160
+ * // No special action needed
161
+ * break;
162
+ * }
163
+ * ```
164
+ */
165
+ export const notifyAppReady = () => {
166
+ const bundleId = getBundleId();
167
+ const result = HotUpdaterNative.notifyAppReady({
168
+ bundleId
169
+ });
170
+ // Oldarch returns JSON string, newarch returns array
171
+ if (typeof result === "string") {
172
+ try {
173
+ return JSON.parse(result);
174
+ } catch {
175
+ return {
176
+ status: "STABLE"
177
+ };
178
+ }
179
+ }
180
+ return result;
181
+ };
182
+
183
+ /**
184
+ * Gets the list of bundle IDs that have been marked as crashed.
185
+ * These bundles will be rejected if attempted to install again.
186
+ *
187
+ * @returns {string[]} Array of crashed bundle IDs
188
+ */
189
+ export const getCrashHistory = () => {
190
+ const result = HotUpdaterNative.getCrashHistory();
191
+ // Oldarch returns JSON string, newarch returns array
192
+ if (typeof result === "string") {
193
+ try {
194
+ return JSON.parse(result);
195
+ } catch {
196
+ return [];
197
+ }
198
+ }
199
+ return result;
200
+ };
201
+
202
+ /**
203
+ * Clears the crashed bundle history, allowing previously crashed bundles
204
+ * to be installed again.
205
+ *
206
+ * @returns {boolean} true if clearing was successful
207
+ */
208
+ export const clearCrashHistory = () => {
209
+ return HotUpdaterNative.clearCrashHistory();
210
+ };
126
211
  //# sourceMappingURL=native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","HotUpdaterNative","NIL_UUID","HotUpdaterConstants","HOT_UPDATER_BUNDLE_ID","__HOT_UPDATER_BUNDLE_ID","addListener","eventName","listener","eventEmitter","subscription","remove","inflightUpdates","Map","lastInstalledBundleId","updateBundle","paramsOrBundleId","fileUrl","updateBundleId","bundleId","status","currentBundleId","getBundleId","localeCompare","Error","existing","get","targetFileUrl","targetFileHash","undefined","fileHash","promise","ok","delete","set","getAppVersion","constants","getConstants","APP_VERSION","reload","getMinBundleId","MIN_BUNDLE_ID","getChannel","CHANNEL","getFingerprintHash","FINGERPRINT_HASH"],"sourceRoot":"../../src","sources":["native.ts"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,OAAOC,gBAAgB,MAEhB,6BAA0B;AAEjC,MAAMC,QAAQ,GAAG,sCAAsC;AAIvD,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,qBAAqB,EAAEC,uBAAuB,IAAIH;AACpD,CAAC;AAQD,OAAO,MAAMI,WAAW,GAAGA,CACzBC,SAAY,EACZC,QAA6C,KAC1C;EACH,MAAMC,YAAY,GAAG,IAAIT,kBAAkB,CAACC,gBAAgB,CAAC;EAC7D,MAAMS,YAAY,GAAGD,YAAY,CAACH,WAAW,CAACC,SAAS,EAAEC,QAAQ,CAAC;EAElE,OAAO,MAAM;IACXE,YAAY,CAACC,MAAM,CAAC,CAAC;EACvB,CAAC;AACH,CAAC;AAMD;AACA,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAA2B,CAAC;AAC3D;AACA,IAAIC,qBAAoC,GAAG,IAAI;;AAE/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAKA,OAAO,eAAeC,YAAYA,CAChCC,gBAAuC,EACvCC,OAAuB,EACL;EAClB,MAAMC,cAAc,GAClB,OAAOF,gBAAgB,KAAK,QAAQ,GAChCA,gBAAgB,GAChBA,gBAAgB,CAACG,QAAQ;EAE/B,MAAMC,MAAM,GACV,OAAOJ,gBAAgB,KAAK,QAAQ,GAAG,QAAQ,GAAGA,gBAAgB,CAACI,MAAM;;EAE3E;EACA,IAAIA,MAAM,KAAK,QAAQ,IAAIN,qBAAqB,KAAKI,cAAc,EAAE;IACnE,OAAO,IAAI;EACb;EAEA,MAAMG,eAAe,GAAGC,WAAW,CAAC,CAAC;;EAErC;EACA,IACEF,MAAM,KAAK,QAAQ,IACnBF,cAAc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,cAAc,GAAGA,CAAA,KAAc;EAC1C,MAAMJ,SAAS,GAAGnC,gBAAgB,CAACoC,YAAY,CAAC,CAAC;EACjD,OAAOD,SAAS,CAACK,aAAa;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMnB,WAAW,GAAGA,CAAA,KAAc;EACvC,OAAOnB,mBAAmB,CAACC,qBAAqB,KAAKF,QAAQ,GACzDsC,cAAc,CAAC,CAAC,GAChBrC,mBAAmB,CAACC,qBAAqB;AAC/C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMsC,UAAU,GAAGA,CAAA,KAAc;EACtC,MAAMN,SAAS,GAAGnC,gBAAgB,CAACoC,YAAY,CAAC,CAAC;EACjD,OAAOD,SAAS,CAACO,OAAO;AAC1B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAqB;EACrD,MAAMR,SAAS,GAAGnC,gBAAgB,CAACoC,YAAY,CAAC,CAAC;EACjD,OAAOD,SAAS,CAACS,gBAAgB;AACnC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["NativeEventEmitter","HotUpdaterErrorCode","isHotUpdaterError","HotUpdaterNative","NIL_UUID","HotUpdaterConstants","HOT_UPDATER_BUNDLE_ID","__HOT_UPDATER_BUNDLE_ID","addListener","eventName","listener","eventEmitter","subscription","remove","inflightUpdates","Map","lastInstalledBundleId","updateBundle","paramsOrBundleId","fileUrl","updateBundleId","bundleId","status","currentBundleId","getBundleId","localeCompare","Error","existing","get","targetFileUrl","targetFileHash","undefined","fileHash","promise","ok","delete","set","getAppVersion","constants","getConstants","APP_VERSION","reload","getMinBundleId","MIN_BUNDLE_ID","getChannel","CHANNEL","getFingerprintHash","FINGERPRINT_HASH","notifyAppReady","result","JSON","parse","getCrashHistory","clearCrashHistory"],"sourceRoot":"../../src","sources":["native.ts"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,SAAS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GAAG9C,gBAAgB,CAACiD,eAAe,CAAC,CAAC;EACjD;EACA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;IAC9B,IAAI;MACF,OAAOC,IAAI,CAACC,KAAK,CAACF,MAAM,CAAC;IAC3B,CAAC,CAAC,MAAM;MACN,OAAO,EAAE;IACX;EACF;EACA,OAAOA,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,iBAAiB,GAAGA,CAAA,KAAe;EAC9C,OAAOlD,gBAAgB,CAACkD,iBAAiB,CAAC,CAAC;AAC7C,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeHotUpdater.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAiClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeHotUpdater.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAgGlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC","ignoreList":[]}