@capgo/capacitor-updater 4.12.2 → 4.12.8
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.
|
@@ -61,7 +61,7 @@ public class CapacitorUpdater {
|
|
|
61
61
|
private static final String bundleDirectory = "versions";
|
|
62
62
|
|
|
63
63
|
public static final String TAG = "Capacitor-updater";
|
|
64
|
-
public static final String pluginVersion = "4.12.
|
|
64
|
+
public static final String pluginVersion = "4.12.8";
|
|
65
65
|
|
|
66
66
|
public SharedPreferences.Editor editor;
|
|
67
67
|
public SharedPreferences prefs;
|
|
@@ -32,15 +32,9 @@ public class RSACipher {
|
|
|
32
32
|
public static PrivateKey stringToPrivateKey(String private_key)
|
|
33
33
|
throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
|
34
34
|
try {
|
|
35
|
-
//
|
|
36
|
-
String pkcs8Pem = private_key.toString();
|
|
37
|
-
pkcs8Pem = pkcs8Pem.replace("-----BEGIN PRIVATE KEY-----", "");
|
|
38
|
-
pkcs8Pem = pkcs8Pem.replace("-----END PRIVATE KEY-----", "");
|
|
39
|
-
pkcs8Pem = pkcs8Pem.replaceAll("\\s+", "");
|
|
35
|
+
// Base64 decode the private_key
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
byte[] pkcs8EncodedBytes = Base64.decode(pkcs8Pem, Base64.DEFAULT);
|
|
37
|
+
byte[] pkcs8EncodedBytes = Base64.decode(private_key, Base64.DEFAULT);
|
|
44
38
|
|
|
45
39
|
// extract the private key
|
|
46
40
|
|
|
@@ -189,16 +189,16 @@ export interface DelayCondition {
|
|
|
189
189
|
kind: DelayUntilNext;
|
|
190
190
|
value?: string;
|
|
191
191
|
}
|
|
192
|
-
export
|
|
193
|
-
export
|
|
194
|
-
export
|
|
195
|
-
export
|
|
196
|
-
export
|
|
197
|
-
export
|
|
198
|
-
export
|
|
199
|
-
export
|
|
200
|
-
export
|
|
201
|
-
export
|
|
192
|
+
export type BundleStatus = 'success' | 'error' | 'pending' | 'downloading';
|
|
193
|
+
export type DelayUntilNext = 'background' | 'kill' | 'nativeVersion' | 'date';
|
|
194
|
+
export type DownloadChangeListener = (state: DownloadEvent) => void;
|
|
195
|
+
export type NoNeedListener = (state: noNeedEvent) => void;
|
|
196
|
+
export type UpdateAvailabledListener = (state: updateAvailableEvent) => void;
|
|
197
|
+
export type DownloadFailedListener = (state: DownloadFailedEvent) => void;
|
|
198
|
+
export type DownloadCompleteListener = (state: DownloadCompleteEvent) => void;
|
|
199
|
+
export type MajorAvailableListener = (state: MajorAvailableEvent) => void;
|
|
200
|
+
export type UpdateFailedListener = (state: UpdateFailedEvent) => void;
|
|
201
|
+
export type AppReloadedListener = (state: void) => void;
|
|
202
202
|
export interface CapacitorUpdaterPlugin {
|
|
203
203
|
/**
|
|
204
204
|
* Notify Capacitor Updater that the current bundle is working (a rollback will occur of this method is not called on every app launch)
|
|
@@ -221,7 +221,7 @@ extension CustomError: LocalizedError {
|
|
|
221
221
|
public let TAG = "✨ Capacitor-updater:"
|
|
222
222
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
223
223
|
public var customId = ""
|
|
224
|
-
public let pluginVersion = "4.12.
|
|
224
|
+
public let pluginVersion = "4.12.8"
|
|
225
225
|
public var statsUrl = ""
|
|
226
226
|
public var channelUrl = ""
|
|
227
227
|
public var appId = ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-updater",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.8",
|
|
4
4
|
"license": "LGPL-3.0-only",
|
|
5
5
|
"description": "OTA update for capacitor apps",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|
|
@@ -51,24 +51,25 @@
|
|
|
51
51
|
"prepublishOnly": "npm run build"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@capacitor/android": "^4.
|
|
55
|
-
"@capacitor/cli": "^4.
|
|
56
|
-
"@capacitor/core": "^4.
|
|
54
|
+
"@capacitor/android": "^4.5.0",
|
|
55
|
+
"@capacitor/cli": "^4.5.0",
|
|
56
|
+
"@capacitor/core": "^4.5.0",
|
|
57
57
|
"@capacitor/docgen": "^0.2.0",
|
|
58
|
-
"@capacitor/ios": "^4.
|
|
58
|
+
"@capacitor/ios": "^4.5.0",
|
|
59
59
|
"@ionic/eslint-config": "^0.3.0",
|
|
60
60
|
"@ionic/prettier-config": "^2.0.0",
|
|
61
61
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
62
|
-
"@
|
|
63
|
-
"@typescript-eslint/
|
|
64
|
-
"eslint": "^
|
|
62
|
+
"@types/node": "^18.11.9",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
|
64
|
+
"@typescript-eslint/parser": "^5.44.0",
|
|
65
|
+
"eslint": "^8.28.0",
|
|
65
66
|
"eslint-plugin-import": "^2.26.0",
|
|
66
|
-
"prettier": "^2.
|
|
67
|
+
"prettier": "^2.8.0",
|
|
67
68
|
"prettier-plugin-java": "^1.6.2",
|
|
68
69
|
"rimraf": "^3.0.2",
|
|
69
|
-
"rollup": "^3.
|
|
70
|
+
"rollup": "^3.4.0",
|
|
70
71
|
"swiftlint": "^1.0.1",
|
|
71
|
-
"typescript": "^4.
|
|
72
|
+
"typescript": "^4.9.3"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"@capacitor/core": "^4.0.0"
|