@onekeyfe/react-native-bundle-update 3.0.22 → 3.0.24

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.
@@ -943,14 +943,23 @@ object BundleUpdateStoreAndroid {
943
943
  return entryFile.absolutePath
944
944
  }
945
945
 
946
+ // @JvmStatic exposes these entry-point getters as true JVM-static methods
947
+ // so SplitBundleLoaderModule (and any future external module) can call them
948
+ // via Class.getMethod(...).invoke(null, ctx) reflection. Without it, Kotlin
949
+ // `object` members are INSTANCE methods on the singleton, the null-receiver
950
+ // invoke throws NPE, and the OTA segment lookup silently falls back to APK
951
+ // builtin assets — see #SBL-OTA-FALLBACK regression report.
952
+ @JvmStatic
946
953
  fun getCurrentBundleMainJSBundle(context: Context): String? {
947
954
  return getCurrentBundleEntryPath(context, MAIN_JS_BUNDLE_FILE_NAME)
948
955
  }
949
956
 
957
+ @JvmStatic
950
958
  fun getCurrentBundleBackgroundJSBundle(context: Context): String? {
951
959
  return getCurrentBundleEntryPath(context, BACKGROUND_BUNDLE_FILE_NAME)
952
960
  }
953
961
 
962
+ @JvmStatic
954
963
  fun getCurrentBundleCommonJSBundle(context: Context): String? {
955
964
  return getCurrentBundleEntryPath(context, COMMON_BUNDLE_FILE_NAME)
956
965
  }
@@ -990,11 +999,12 @@ object BundleUpdateStoreAndroid {
990
999
  }
991
1000
 
992
1001
  /**
993
- * Walks bundleDir/web-embed/** and verifies every file's sha256 against
994
- * the metadata entry (key is the bundle-relative path). Also rejects
995
- * files on disk that aren't listed in metadata, and metadata entries
996
- * whose backing file is missing. Returns true when web-embed is absent
997
- * from both disk and metadata (bundles without web-embed).
1002
+ * Walks every file under bundleDir/web-embed/ recursively and verifies
1003
+ * each file's sha256 against the metadata entry (key is the bundle-relative
1004
+ * path). Also rejects files on disk that aren't listed in metadata, and
1005
+ * metadata entries whose backing file is missing. Returns true when
1006
+ * web-embed is absent from both disk and metadata (bundles without
1007
+ * web-embed).
998
1008
  */
999
1009
  fun validateWebEmbedSha256(bundleDir: String, metadata: Map<String, String>): Boolean {
1000
1010
  val webEmbedRoot = File(bundleDir, "web-embed")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-bundle-update",
3
- "version": "3.0.22",
3
+ "version": "3.0.24",
4
4
  "description": "react-native-bundle-update",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",