@hot-updater/react-native 0.20.8 → 0.20.10
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/react-native",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.10",
|
|
4
4
|
"description": "React Native OTA solution for self-hosted",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"react-native": "0.79.1",
|
|
120
120
|
"react-native-builder-bob": "^0.40.10",
|
|
121
121
|
"typescript": "^5.8.3",
|
|
122
|
-
"hot-updater": "0.20.
|
|
122
|
+
"hot-updater": "0.20.10"
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"use-sync-external-store": "1.5.0",
|
|
126
|
-
"@hot-updater/core": "0.20.
|
|
127
|
-
"@hot-updater/
|
|
128
|
-
"@hot-updater/
|
|
126
|
+
"@hot-updater/core": "0.20.10",
|
|
127
|
+
"@hot-updater/plugin-core": "0.20.10",
|
|
128
|
+
"@hot-updater/js": "0.20.10"
|
|
129
129
|
},
|
|
130
130
|
"scripts": {
|
|
131
131
|
"build": "bob build && tsc -p plugin/tsconfig.json",
|
|
@@ -132,6 +132,7 @@ var withHotUpdaterNativeCode = function (config) {
|
|
|
132
132
|
// Regex to find an existing getJSBundleFile override (non-greedy)
|
|
133
133
|
var kotlinExistingMethodRegex = /^\s*override fun getJSBundleFile\(\): String\?\s*\{[\s\S]*?^\s*\}/gm;
|
|
134
134
|
var kotlinHermesAnchor = "override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED";
|
|
135
|
+
var kotlinNewArchAnchor = "override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED";
|
|
135
136
|
var kotlinNewMethod = "\n override fun getJSBundleFile(): String? {\n return HotUpdater.getJSBundleFile(applicationContext)\n }";
|
|
136
137
|
var javaImport = "import com.hotupdater.HotUpdater;";
|
|
137
138
|
var javaImportAnchor = "import com.facebook.react.ReactApplication;";
|
|
@@ -156,6 +157,9 @@ var withHotUpdaterNativeCode = function (config) {
|
|
|
156
157
|
if (contents.includes(kotlinHermesAnchor)) {
|
|
157
158
|
contents = contents.replace(kotlinHermesAnchor, "".concat(kotlinHermesAnchor, "\n").concat(kotlinNewMethod));
|
|
158
159
|
}
|
|
160
|
+
else if (contents.includes(kotlinNewArchAnchor)) {
|
|
161
|
+
contents = contents.replace(kotlinNewArchAnchor, "".concat(kotlinNewArchAnchor, "\n").concat(kotlinNewMethod));
|
|
162
|
+
}
|
|
159
163
|
else {
|
|
160
164
|
// Fallback: Add before the closing brace of the object if anchor not found
|
|
161
165
|
var rnHostEndRegex = /(\s*object\s*:\s*DefaultReactNativeHost\s*\([\s\S]*?\n)(\s*\})\s*$/m;
|