@capgo/capacitor-updater 4.29.0 → 4.33.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.
- package/README.md +14 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java +8 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1 -1
- package/dist/docs.json +15 -0
- package/dist/esm/definitions.d.ts +6 -0
- package/ios/Plugin/CapacitorUpdater.swift +1 -0
- package/ios/Plugin/CapacitorUpdaterPlugin.m +1 -0
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ Capacitor Updator works by unzipping a compiled app bundle to the native device
|
|
|
147
147
|
* [`getDeviceId()`](#getdeviceid)
|
|
148
148
|
* [`getPluginVersion()`](#getpluginversion)
|
|
149
149
|
* [`isAutoUpdateEnabled()`](#isautoupdateenabled)
|
|
150
|
+
* [`removeAllListeners()`](#removealllisteners)
|
|
150
151
|
* [Interfaces](#interfaces)
|
|
151
152
|
* [Type Aliases](#type-aliases)
|
|
152
153
|
|
|
@@ -596,6 +597,19 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
596
597
|
--------------------
|
|
597
598
|
|
|
598
599
|
|
|
600
|
+
### removeAllListeners()
|
|
601
|
+
|
|
602
|
+
```typescript
|
|
603
|
+
removeAllListeners() => Promise<void>
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
Remove all listeners for this plugin.
|
|
607
|
+
|
|
608
|
+
**Since:** 1.0.0
|
|
609
|
+
|
|
610
|
+
--------------------
|
|
611
|
+
|
|
612
|
+
|
|
599
613
|
### Interfaces
|
|
600
614
|
|
|
601
615
|
|
|
@@ -172,6 +172,13 @@ public class CapacitorUpdater {
|
|
|
172
172
|
|
|
173
173
|
ZipEntry entry;
|
|
174
174
|
while ((entry = zis.getNextEntry()) != null) {
|
|
175
|
+
if (entry.getName().contains("\\")) {
|
|
176
|
+
Log.e(
|
|
177
|
+
TAG,
|
|
178
|
+
"unzip: Windows path is not supported, please use unix path as require by zip RFC: " +
|
|
179
|
+
entry.getName()
|
|
180
|
+
);
|
|
181
|
+
}
|
|
175
182
|
final File file = new File(targetDirectory, entry.getName());
|
|
176
183
|
final String canonicalPath = file.getCanonicalPath();
|
|
177
184
|
final String canonicalDir = targetDirectory.getCanonicalPath();
|
|
@@ -647,6 +654,7 @@ public class CapacitorUpdater {
|
|
|
647
654
|
this.sendStats("set", newBundle.getVersionName());
|
|
648
655
|
return true;
|
|
649
656
|
}
|
|
657
|
+
this.setBundleStatus(id, BundleStatus.ERROR);
|
|
650
658
|
this.sendStats("set_fail", newBundle.getVersionName());
|
|
651
659
|
return false;
|
|
652
660
|
}
|
|
@@ -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 = "4.
|
|
58
|
+
private final String PLUGIN_VERSION = "4.33.0";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
package/dist/docs.json
CHANGED
|
@@ -758,6 +758,21 @@
|
|
|
758
758
|
"docs": "Get the state of auto update config. This will return `false` in manual mode.",
|
|
759
759
|
"complexTypes": [],
|
|
760
760
|
"slug": "isautoupdateenabled"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "removeAllListeners",
|
|
764
|
+
"signature": "() => Promise<void>",
|
|
765
|
+
"parameters": [],
|
|
766
|
+
"returns": "Promise<void>",
|
|
767
|
+
"tags": [
|
|
768
|
+
{
|
|
769
|
+
"name": "since",
|
|
770
|
+
"text": "1.0.0"
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"docs": "Remove all listeners for this plugin.",
|
|
774
|
+
"complexTypes": [],
|
|
775
|
+
"slug": "removealllisteners"
|
|
761
776
|
}
|
|
762
777
|
],
|
|
763
778
|
"properties": []
|
|
@@ -583,6 +583,7 @@ extension CustomError: LocalizedError {
|
|
|
583
583
|
self.sendStats(action: "set", versionName: newBundle.getVersionName())
|
|
584
584
|
return true
|
|
585
585
|
}
|
|
586
|
+
self.setBundleStatus(id: id, status: BundleStatus.ERROR)
|
|
586
587
|
self.sendStats(action: "set_fail", versionName: newBundle.getVersionName())
|
|
587
588
|
return false
|
|
588
589
|
}
|
|
@@ -23,4 +23,5 @@ CAP_PLUGIN(CapacitorUpdaterPlugin, "CapacitorUpdater",
|
|
|
23
23
|
CAP_PLUGIN_METHOD(getPluginVersion, CAPPluginReturnPromise);
|
|
24
24
|
CAP_PLUGIN_METHOD(next, CAPPluginReturnPromise);
|
|
25
25
|
CAP_PLUGIN_METHOD(isAutoUpdateEnabled, CAPPluginReturnPromise);
|
|
26
|
+
CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnPromise);
|
|
26
27
|
)
|
|
@@ -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 = "4.
|
|
18
|
+
private let PLUGIN_VERSION: String = "4.33.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"
|