@hot-updater/react-native 0.15.0 → 0.15.1
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.
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/native.d.ts +1 -1
- package/ios/HotUpdater/HotUpdater.mm +4 -1
- package/package.json +3 -3
- package/src/checkForUpdate.ts +1 -1
- package/src/index.ts +2 -1
- package/src/native.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,8 +47,9 @@ export declare const HotUpdater: {
|
|
|
47
47
|
* Fetches the current release channel of the app.
|
|
48
48
|
*
|
|
49
49
|
* By default, if no channel is specified, the app is assigned to the 'production' channel.
|
|
50
|
+
* If the app is running in development mode, the channel will be `null`.
|
|
50
51
|
*
|
|
51
|
-
* @returns {string} The current release channel of the app
|
|
52
|
+
* @returns {string | null} The current release channel of the app
|
|
52
53
|
*
|
|
53
54
|
* @example
|
|
54
55
|
* ```ts
|
|
@@ -56,7 +57,7 @@ export declare const HotUpdater: {
|
|
|
56
57
|
* console.log(`Current channel: ${channel}`);
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
getChannel: () => string;
|
|
60
|
+
getChannel: () => string | null;
|
|
60
61
|
/**
|
|
61
62
|
* Adds a listener to HotUpdater events.
|
|
62
63
|
*
|
package/dist/index.js
CHANGED
|
@@ -149,7 +149,7 @@ var __webpack_exports__ = {};
|
|
|
149
149
|
bundleId: currentBundleId,
|
|
150
150
|
platform,
|
|
151
151
|
minBundleId,
|
|
152
|
-
channel
|
|
152
|
+
channel: channel ?? void 0
|
|
153
153
|
}, options.requestHeaders, options.onError);
|
|
154
154
|
}
|
|
155
155
|
const runUpdateProcess = async ({ reloadOnForceUpdate = true, ...checkForUpdateOptions })=>{
|
package/dist/index.mjs
CHANGED
|
@@ -124,7 +124,7 @@ async function checkForUpdate(options) {
|
|
|
124
124
|
bundleId: currentBundleId,
|
|
125
125
|
platform,
|
|
126
126
|
minBundleId,
|
|
127
|
-
channel
|
|
127
|
+
channel: channel ?? void 0
|
|
128
128
|
}, options.requestHeaders, options.onError);
|
|
129
129
|
}
|
|
130
130
|
const runUpdateProcess = async ({ reloadOnForceUpdate = true, ...checkForUpdateOptions })=>{
|
package/dist/native.d.ts
CHANGED
|
@@ -34,4 +34,4 @@ export declare const getMinBundleId: () => string;
|
|
|
34
34
|
* @returns {Promise<string>} Resolves with the current version id or null if not available.
|
|
35
35
|
*/
|
|
36
36
|
export declare const getBundleId: () => string;
|
|
37
|
-
export declare const getChannel: () => string;
|
|
37
|
+
export declare const getChannel: () => string | null;
|
|
@@ -412,7 +412,10 @@ RCT_EXPORT_MODULE();
|
|
|
412
412
|
RCT_EXPORT_METHOD(reload) {
|
|
413
413
|
NSLog(@"HotUpdater requested a reload");
|
|
414
414
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
415
|
-
|
|
415
|
+
NSURL *bundleURL = [HotUpdater bundleURL];
|
|
416
|
+
if (bundleURL) {
|
|
417
|
+
[super.bridge setValue:bundleURL forKey:@"bundleURL"];
|
|
418
|
+
}
|
|
416
419
|
RCTTriggerReloadCommandListeners(@"HotUpdater requested a reload");
|
|
417
420
|
});
|
|
418
421
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/react-native",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "React Native OTA solution for self-hosted",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"use-sync-external-store": "1.4.0",
|
|
84
|
-
"@hot-updater/js": "0.15.
|
|
85
|
-
"@hot-updater/core": "0.15.
|
|
84
|
+
"@hot-updater/js": "0.15.1",
|
|
85
|
+
"@hot-updater/core": "0.15.1"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "rslib build",
|
package/src/checkForUpdate.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -67,8 +67,9 @@ export const HotUpdater = {
|
|
|
67
67
|
* Fetches the current release channel of the app.
|
|
68
68
|
*
|
|
69
69
|
* By default, if no channel is specified, the app is assigned to the 'production' channel.
|
|
70
|
+
* If the app is running in development mode, the channel will be `null`.
|
|
70
71
|
*
|
|
71
|
-
* @returns {string} The current release channel of the app
|
|
72
|
+
* @returns {string | null} The current release channel of the app
|
|
72
73
|
*
|
|
73
74
|
* @example
|
|
74
75
|
* ```ts
|
package/src/native.ts
CHANGED