@hot-updater/react-native 0.35.6 → 0.35.8
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/android/proguard-rules.pro +8 -1
- package/ios/HotUpdater/Internal/HotUpdater.mm +36 -3
- package/lib/commonjs/sdkVersion.js +1 -1
- package/lib/module/sdkVersion.js +1 -1
- package/lib/typescript/commonjs/sdkVersion.d.ts +1 -1
- package/lib/typescript/module/sdkVersion.d.ts +1 -1
- package/package.json +6 -6
- package/src/sdkVersion.ts +1 -1
|
@@ -14,4 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
-keepclassmembers class * implements com.facebook.react.runtime.ReactHostDelegate {
|
|
16
16
|
** jsBundleLoader;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# Preserve the Brotli decoder and its embedded static dictionary
|
|
20
|
+
# (DictionaryData). R8 otherwise strips the dictionary's static init, causing OTA
|
|
21
|
+
# .tar.br extraction to fail at runtime with:
|
|
22
|
+
# java.io.IOException: Brotli stream decoding failed
|
|
23
|
+
# Caused by: brotli dictionary is not set
|
|
24
|
+
-keep class com.hotupdater.vendor.brotli.** { *; }
|
|
@@ -30,6 +30,39 @@ volatile sig_atomic_t gHotUpdaterShouldRollback = 0;
|
|
|
30
30
|
struct sigaction gHotUpdaterPreviousActions[NSIG];
|
|
31
31
|
__weak RCTBridge *gHotUpdaterBridge = nil;
|
|
32
32
|
|
|
33
|
+
void HotUpdaterTriggerReloadCommand(RCTBridge *bridge, NSString *reason)
|
|
34
|
+
{
|
|
35
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
36
|
+
RCTTriggerReloadCommandListeners(reason);
|
|
37
|
+
#else
|
|
38
|
+
// RCTBridge starts the next old-architecture bridge before its asynchronous
|
|
39
|
+
// module invalidation finishes. Wait for this exact child bridge first.
|
|
40
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
41
|
+
if (!bridge || !bridge.valid) {
|
|
42
|
+
RCTTriggerReloadCommandListeners(reason);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
__block id observer = nil;
|
|
47
|
+
observer = [[NSNotificationCenter defaultCenter]
|
|
48
|
+
addObserverForName:RCTBridgeDidInvalidateModulesNotification
|
|
49
|
+
object:nil
|
|
50
|
+
queue:[NSOperationQueue mainQueue]
|
|
51
|
+
usingBlock:^(NSNotification *notification) {
|
|
52
|
+
RCTBridge *invalidatedBridge = notification.userInfo[@"bridge"];
|
|
53
|
+
if (notification.object != bridge && invalidatedBridge != bridge) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
[[NSNotificationCenter defaultCenter] removeObserver:observer];
|
|
57
|
+
observer = nil;
|
|
58
|
+
RCTTriggerReloadCommandListeners(reason);
|
|
59
|
+
}];
|
|
60
|
+
|
|
61
|
+
[bridge invalidate];
|
|
62
|
+
});
|
|
63
|
+
#endif
|
|
64
|
+
}
|
|
65
|
+
|
|
33
66
|
size_t HotUpdaterSafeStringLength(const char *value, size_t maxLength)
|
|
34
67
|
{
|
|
35
68
|
size_t length = 0;
|
|
@@ -159,7 +192,7 @@ extern "C" BOOL HotUpdaterPerformRecoveryReload(void)
|
|
|
159
192
|
if (bridge) {
|
|
160
193
|
[bridge setValue:bundleURL forKey:@"bundleURL"];
|
|
161
194
|
}
|
|
162
|
-
|
|
195
|
+
HotUpdaterTriggerReloadCommand(bridge, @"HotUpdater recovery reload");
|
|
163
196
|
didTriggerReload = YES;
|
|
164
197
|
};
|
|
165
198
|
|
|
@@ -534,7 +567,7 @@ RCT_EXPORT_MODULE();
|
|
|
534
567
|
} else if (!super.bridge) {
|
|
535
568
|
RCTLogWarn(@"[HotUpdater.mm] Bridge is nil, cannot set bundleURL for reload.");
|
|
536
569
|
}
|
|
537
|
-
|
|
570
|
+
HotUpdaterTriggerReloadCommand(super.bridge, @"HotUpdater requested a reload");
|
|
538
571
|
resolve(nil);
|
|
539
572
|
} @catch (NSError *error) {
|
|
540
573
|
RCTLogError(@"[HotUpdater.mm] Failed to reload: %@", error);
|
|
@@ -670,7 +703,7 @@ RCT_EXPORT_METHOD(reload:(RCTPromiseResolveBlock)resolve
|
|
|
670
703
|
} else if (!super.bridge) {
|
|
671
704
|
RCTLogWarn(@"[HotUpdater.mm] Bridge is nil, cannot set bundleURL for reload.");
|
|
672
705
|
}
|
|
673
|
-
|
|
706
|
+
HotUpdaterTriggerReloadCommand(super.bridge, @"HotUpdater requested a reload");
|
|
674
707
|
resolve(nil);
|
|
675
708
|
} @catch (NSError *error) {
|
|
676
709
|
RCTLogError(@"[HotUpdater.mm] Failed to reload: %@", error);
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HOT_UPDATER_SDK_VERSION = void 0;
|
|
7
|
-
const HOT_UPDATER_SDK_VERSION = exports.HOT_UPDATER_SDK_VERSION = "0.35.
|
|
7
|
+
const HOT_UPDATER_SDK_VERSION = exports.HOT_UPDATER_SDK_VERSION = "0.35.8";
|
|
8
8
|
//# sourceMappingURL=sdkVersion.js.map
|
package/lib/module/sdkVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const HOT_UPDATER_SDK_VERSION = "0.35.
|
|
1
|
+
export declare const HOT_UPDATER_SDK_VERSION = "0.35.8";
|
|
2
2
|
//# sourceMappingURL=sdkVersion.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const HOT_UPDATER_SDK_VERSION = "0.35.
|
|
1
|
+
export declare const HOT_UPDATER_SDK_VERSION = "0.35.8";
|
|
2
2
|
//# sourceMappingURL=sdkVersion.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/react-native",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.8",
|
|
4
4
|
"description": "React Native OTA solution for self-hosted",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -130,14 +130,14 @@
|
|
|
130
130
|
"react-native": "0.79.1",
|
|
131
131
|
"react-native-builder-bob": "0.41.0",
|
|
132
132
|
"typescript": "^6.0.2",
|
|
133
|
-
"hot-updater": "0.35.
|
|
133
|
+
"hot-updater": "0.35.8"
|
|
134
134
|
},
|
|
135
135
|
"dependencies": {
|
|
136
136
|
"use-sync-external-store": "1.5.0",
|
|
137
|
-
"@hot-updater/core": "0.35.
|
|
138
|
-
"@hot-updater/
|
|
139
|
-
"@hot-updater/
|
|
140
|
-
"@hot-updater/plugin-core": "0.35.
|
|
137
|
+
"@hot-updater/core": "0.35.8",
|
|
138
|
+
"@hot-updater/js": "0.35.8",
|
|
139
|
+
"@hot-updater/cli-tools": "0.35.8",
|
|
140
|
+
"@hot-updater/plugin-core": "0.35.8"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"build": "node ./scripts/sync-sdk-version.mjs run -- bob build && tsc -p plugin/tsconfig.build.json",
|
package/src/sdkVersion.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const HOT_UPDATER_SDK_VERSION = "0.35.
|
|
1
|
+
export const HOT_UPDATER_SDK_VERSION = "0.35.8";
|