@hot-updater/react-native 0.6.7 → 0.7.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.
@@ -59,6 +59,11 @@ class HotUpdater : ReactPackage {
59
59
  putString("HotUpdaterBundleURL", bundleURL)
60
60
  apply()
61
61
  }
62
+
63
+ if (bundleURL == null) {
64
+ return
65
+ }
66
+
62
67
  val reactIntegrationManager = ReactIntegrationManager(context)
63
68
 
64
69
  val activity: Activity? = getCurrentActivity(context)
@@ -133,11 +138,11 @@ class HotUpdater : ReactPackage {
133
138
  fun updateBundle(
134
139
  context: Context,
135
140
  bundleId: String,
136
- zipUrl: String,
141
+ zipUrl: String?,
137
142
  progressCallback: ((Double) -> Unit),
138
143
  ): Boolean {
139
144
  Log.d("HotUpdater", "updateBundle bundleId $bundleId zipUrl $zipUrl")
140
- if (zipUrl.isEmpty()) {
145
+ if (zipUrl.isNullOrEmpty()) {
141
146
  setBundleURL(context, null)
142
147
  return true
143
148
  }
@@ -26,7 +26,7 @@ class HotUpdaterModule internal constructor(
26
26
  @ReactMethod
27
27
  override fun updateBundle(
28
28
  bundleId: String,
29
- zipUrl: String,
29
+ zipUrl: String?,
30
30
  promise: Promise,
31
31
  ) {
32
32
  val isSuccess =
@@ -26,7 +26,7 @@ class HotUpdaterModule internal constructor(
26
26
  @ReactMethod
27
27
  override fun updateBundle(
28
28
  bundleId: String,
29
- zipUrl: String,
29
+ zipUrl: String?,
30
30
  promise: Promise,
31
31
  ) {
32
32
  val isSuccess =
@@ -9,7 +9,7 @@ abstract class HotUpdaterSpec internal constructor(
9
9
  ) : ReactContextBaseJavaModule(context) {
10
10
  abstract fun updateBundle(
11
11
  bundleId: String,
12
- zipUrl: String,
12
+ zipUrl: String?,
13
13
  promise: Promise,
14
14
  )
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/react-native",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
4
4
  "description": "React Native OTA solution for self-hosted",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -78,8 +78,8 @@
78
78
  "react-native-builder-bob": "^0.33.1"
79
79
  },
80
80
  "dependencies": {
81
- "@hot-updater/js": "0.6.7",
82
- "@hot-updater/core": "0.6.7"
81
+ "@hot-updater/js": "0.7.0",
82
+ "@hot-updater/core": "0.7.0"
83
83
  },
84
84
  "scripts": {
85
85
  "build": "rslib build",