@capgo/capacitor-updater 7.0.0 → 9.0.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.
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
55
55
  private static final String channelUrlDefault =
56
56
  "https://api.capgo.app/channel_self";
57
57
 
58
- private final String PLUGIN_VERSION = "7.0.0";
58
+ private final String PLUGIN_VERSION = "9.0.0";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -537,6 +537,9 @@ public class CapacitorUpdaterPlugin
537
537
  if (res.has("error")) {
538
538
  call.reject(res.getString("error"));
539
539
  return;
540
+ } else if (res.has("message")) {
541
+ call.reject(res.getString("message"));
542
+ return;
540
543
  } else {
541
544
  call.resolve(res);
542
545
  }
@@ -15,7 +15,7 @@ import Version
15
15
  @objc(CapacitorUpdaterPlugin)
16
16
  public class CapacitorUpdaterPlugin: CAPPlugin {
17
17
  private var implementation = CapacitorUpdater()
18
- private let PLUGIN_VERSION: String = "7.0.0"
18
+ private let PLUGIN_VERSION: String = "9.0.0"
19
19
  static let updateUrlDefault = "https://api.capgo.app/updates"
20
20
  static let statsUrlDefault = "https://api.capgo.app/stats"
21
21
  static let channelUrlDefault = "https://api.capgo.app/channel_self"
@@ -235,6 +235,8 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
235
235
  let res = self.implementation.getLatest(url: URL(string: self.updateUrl)!)
236
236
  if res.error != nil {
237
237
  call.reject( res.error!)
238
+ } else if res.message != nil {
239
+ call.reject( res.message!)
238
240
  } else {
239
241
  call.resolve(res.toDict())
240
242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "7.0.0",
3
+ "version": "9.0.0",
4
4
  "packageManager": "pnpm@8.5.1",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",