@capgo/capacitor-updater 4.25.0 → 4.29.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/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java +5 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +4 -4
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipher.java +3 -3
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +1 -1
- package/package.json +3 -3
|
@@ -763,7 +763,11 @@ public class CapacitorUpdater {
|
|
|
763
763
|
String key = keys.next();
|
|
764
764
|
if (res.has(key)) {
|
|
765
765
|
try {
|
|
766
|
-
|
|
766
|
+
if ("session_key".equals(key)) {
|
|
767
|
+
ret.put("sessionKey", res.get(key));
|
|
768
|
+
} else {
|
|
769
|
+
ret.put(key, res.get(key));
|
|
770
|
+
}
|
|
767
771
|
} catch (JSONException e) {
|
|
768
772
|
e.printStackTrace();
|
|
769
773
|
final JSObject retError = new JSObject();
|
|
@@ -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.29.0";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -965,8 +965,8 @@ public class CapacitorUpdaterPlugin
|
|
|
965
965
|
);
|
|
966
966
|
|
|
967
967
|
final String url = res.getString("url");
|
|
968
|
-
final String
|
|
969
|
-
? res.getString("
|
|
968
|
+
final String sessionKey = res.has("sessionKey")
|
|
969
|
+
? res.getString("sessionKey")
|
|
970
970
|
: "";
|
|
971
971
|
final String checksum = res.has("checksum")
|
|
972
972
|
? res.getString("checksum")
|
|
@@ -974,7 +974,7 @@ public class CapacitorUpdaterPlugin
|
|
|
974
974
|
CapacitorUpdaterPlugin.this.implementation.downloadBackground(
|
|
975
975
|
url,
|
|
976
976
|
latestVersionName,
|
|
977
|
-
|
|
977
|
+
sessionKey,
|
|
978
978
|
checksum
|
|
979
979
|
);
|
|
980
980
|
} catch (final Exception e) {
|
|
@@ -61,12 +61,12 @@ public class CryptoCipher {
|
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
public static SecretKey byteToSessionKey(byte[]
|
|
64
|
+
public static SecretKey byteToSessionKey(byte[] sessionKey) {
|
|
65
65
|
// rebuild key using SecretKeySpec
|
|
66
66
|
SecretKey originalKey = new SecretKeySpec(
|
|
67
|
-
|
|
67
|
+
sessionKey,
|
|
68
68
|
0,
|
|
69
|
-
|
|
69
|
+
sessionKey.length,
|
|
70
70
|
"AES"
|
|
71
71
|
);
|
|
72
72
|
return originalKey;
|
|
@@ -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.29.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"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-updater",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"packageManager": "pnpm@
|
|
3
|
+
"version": "4.29.0",
|
|
4
|
+
"packageManager": "pnpm@8.1.0",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"description": "Live update for capacitor apps",
|
|
7
7
|
"main": "dist/plugin.cjs.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^4.9.5"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@capacitor/core": "^4.0.0"
|
|
77
|
+
"@capacitor/core": "^4.0.0 || ^5.0.0"
|
|
78
78
|
},
|
|
79
79
|
"prettier": "@ionic/prettier-config",
|
|
80
80
|
"swiftlint": "@ionic/swiftlint-config",
|