@capgo/capacitor-updater 5.7.19 → 5.7.20
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 extends Plugin {
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "5.7.
|
|
58
|
+
private final String PLUGIN_VERSION = "5.7.20";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -366,7 +366,10 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
366
366
|
@PluginMethod
|
|
367
367
|
public void setUpdateUrl(final PluginCall call) {
|
|
368
368
|
if (!this.getConfig().getBoolean("allowModifyUrl", false)) {
|
|
369
|
-
Log.e(
|
|
369
|
+
Log.e(
|
|
370
|
+
CapacitorUpdater.TAG,
|
|
371
|
+
"setUpdateUrl not allowed set allowModifyUrl in your config to true to allow it"
|
|
372
|
+
);
|
|
370
373
|
call.reject("setUpdateUrl not allowed");
|
|
371
374
|
return;
|
|
372
375
|
}
|
|
@@ -383,7 +386,10 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
383
386
|
@PluginMethod
|
|
384
387
|
public void setStatsUrl(final PluginCall call) {
|
|
385
388
|
if (!this.getConfig().getBoolean("allowModifyUrl", false)) {
|
|
386
|
-
Log.e(
|
|
389
|
+
Log.e(
|
|
390
|
+
CapacitorUpdater.TAG,
|
|
391
|
+
"setStatsUrl not allowed set allowModifyUrl in your config to true to allow it"
|
|
392
|
+
);
|
|
387
393
|
call.reject("setStatsUrl not allowed");
|
|
388
394
|
return;
|
|
389
395
|
}
|
|
@@ -400,7 +406,10 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
400
406
|
@PluginMethod
|
|
401
407
|
public void setChannelUrl(final PluginCall call) {
|
|
402
408
|
if (!this.getConfig().getBoolean("allowModifyUrl", false)) {
|
|
403
|
-
Log.e(
|
|
409
|
+
Log.e(
|
|
410
|
+
CapacitorUpdater.TAG,
|
|
411
|
+
"setChannelUrl not allowed set allowModifyUrl in your config to true to allow it"
|
|
412
|
+
);
|
|
404
413
|
call.reject("setChannelUrl not allowed");
|
|
405
414
|
return;
|
|
406
415
|
}
|
|
@@ -15,7 +15,7 @@ import Version
|
|
|
15
15
|
@objc(CapacitorUpdaterPlugin)
|
|
16
16
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
17
17
|
public var implementation = CapacitorUpdater()
|
|
18
|
-
private let PLUGIN_VERSION: String = "5.7.
|
|
18
|
+
private let PLUGIN_VERSION: String = "5.7.20"
|
|
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"
|
|
@@ -143,9 +143,9 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
@objc func setUpdateUrl(_ call: CAPPluginCall) {
|
|
146
|
-
if !
|
|
146
|
+
if !getConfig().getBoolean("allowModifyUrl", false) {
|
|
147
147
|
print("\(self.implementation.TAG) setUpdateUrl called without allowModifyUrl")
|
|
148
|
-
call.reject("setUpdateUrl called without allowModifyUrl")
|
|
148
|
+
call.reject("setUpdateUrl called without allowModifyUrl set allowModifyUrl in your config to true to allow it")
|
|
149
149
|
return
|
|
150
150
|
}
|
|
151
151
|
guard let url = call.getString("url") else {
|
|
@@ -158,9 +158,9 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
@objc func setStatsUrl(_ call: CAPPluginCall) {
|
|
161
|
-
if !
|
|
161
|
+
if !getConfig().getBoolean("allowModifyUrl", false) {
|
|
162
162
|
print("\(self.implementation.TAG) setStatsUrl called without allowModifyUrl")
|
|
163
|
-
call.reject("setStatsUrl called without allowModifyUrl")
|
|
163
|
+
call.reject("setStatsUrl called without allowModifyUrl set allowModifyUrl in your config to true to allow it")
|
|
164
164
|
return
|
|
165
165
|
}
|
|
166
166
|
guard let url = call.getString("url") else {
|
|
@@ -173,9 +173,9 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
@objc func setChannelUrl(_ call: CAPPluginCall) {
|
|
176
|
-
if !
|
|
176
|
+
if !getConfig().getBoolean("allowModifyUrl", false) {
|
|
177
177
|
print("\(self.implementation.TAG) setChannelUrl called without allowModifyUrl")
|
|
178
|
-
call.reject("setChannelUrl called without allowModifyUrl")
|
|
178
|
+
call.reject("setChannelUrl called without allowModifyUrl set allowModifyUrl in your config to true to allow it")
|
|
179
179
|
return
|
|
180
180
|
}
|
|
181
181
|
guard let url = call.getString("url") else {
|