@capgo/capacitor-updater 5.51.15 → 5.51.21
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/CapgoCapacitorUpdater.podspec +0 -2
- package/Package.swift +2 -4
- package/README.md +50 -41
- package/android/build.gradle +6 -6
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +45 -36
- package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +302 -318
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayUpdateUtils.java +11 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +227 -64
- package/android/src/main/java/ee/forgr/capacitor_updater/Logger.java +12 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/ShakeMenu.java +12 -16
- package/dist/docs.json +4 -4
- package/dist/esm/definitions.d.ts +12 -9
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/history.js +7 -7
- package/dist/esm/history.js.map +1 -1
- package/dist/plugin.cjs.js +7 -7
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +7 -7
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +177 -55
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoRawRsa.swift +36 -0
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +27 -13
- package/ios/Sources/CapacitorUpdaterPlugin/CryptoCipher.swift +30 -30
- package/ios/Sources/CapacitorUpdaterPlugin/DelayUpdateUtils.swift +16 -41
- package/ios/Sources/CapacitorUpdaterPlugin/Logger.swift +5 -5
- package/ios/Sources/CapacitorUpdaterPlugin/RSA.swift +73 -251
- package/ios/Sources/CapacitorUpdaterPlugin/ShakeMenu.swift +2 -2
- package/package.json +8 -9
- package/ios/Sources/CapacitorUpdaterPlugin/BigInt.swift +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-updater",
|
|
3
|
-
"version": "5.51.
|
|
3
|
+
"version": "5.51.21",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Live update for capacitor apps",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"test:maestro:ios:smoke": "./scripts/test-maestro-ios.sh",
|
|
64
64
|
"lint": "bun run eslint && bun run prettier -- --check && bun run swiftlint -- lint",
|
|
65
65
|
"fmt": "bun run eslint -- --fix && bun run prettier -- --write && bun run swiftlint -- --fix --format",
|
|
66
|
-
"eslint": "eslint .
|
|
66
|
+
"eslint": "eslint .",
|
|
67
67
|
"prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
68
68
|
"swiftlint": "node-swiftlint",
|
|
69
69
|
"docgen": "node scripts/generate-docs.js",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"watch": "tsc --watch",
|
|
73
73
|
"prepublishOnly": "bun run build",
|
|
74
74
|
"check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
|
|
75
|
+
"check:cap9-deprecated": "bun scripts/check-cap9-deprecated.mjs",
|
|
75
76
|
"changelog:ai": "node scripts/generate-ai-changelog.mjs",
|
|
76
77
|
"example:install": "cd example-app && bun install --frozen-lockfile",
|
|
77
78
|
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
|
|
@@ -86,12 +87,13 @@
|
|
|
86
87
|
"@capacitor/core": "^5.0.0",
|
|
87
88
|
"@capacitor/docgen": "^0.3.0",
|
|
88
89
|
"@capacitor/ios": "^5.0.0",
|
|
89
|
-
"@ionic/eslint-config": "^0.
|
|
90
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
91
|
+
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
92
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
90
93
|
"@ionic/prettier-config": "^4.0.0",
|
|
91
94
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
92
|
-
"@types/node": "^
|
|
93
|
-
"eslint": "^
|
|
94
|
-
"eslint-plugin-import": "^2.32.0",
|
|
95
|
+
"@types/node": "^26.0.0",
|
|
96
|
+
"eslint": "^10.0.0",
|
|
95
97
|
"husky": "^9.1.7",
|
|
96
98
|
"prettier": "^3.6.2",
|
|
97
99
|
"prettier-plugin-java": "^2.7.4",
|
|
@@ -106,9 +108,6 @@
|
|
|
106
108
|
},
|
|
107
109
|
"prettier": "@ionic/prettier-config",
|
|
108
110
|
"swiftlint": "@ionic/swiftlint-config",
|
|
109
|
-
"eslintConfig": {
|
|
110
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
111
|
-
},
|
|
112
111
|
"capacitor": {
|
|
113
112
|
"ios": {
|
|
114
113
|
"src": "ios"
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import BigInt
|
|
2
|
-
|
|
3
|
-
// Add this custom power function to ensure safer handling of power operations
|
|
4
|
-
|
|
5
|
-
// Manual exponentiation using the square-and-multiply algorithm
|
|
6
|
-
// which is more efficient and avoids using the built-in functions that might handle BigInt differently
|
|
7
|
-
extension BigInt {
|
|
8
|
-
func manualPower(_ exponent: BigInt, modulus: BigInt) -> BigInt {
|
|
9
|
-
// Quick checks
|
|
10
|
-
if modulus == 0 {
|
|
11
|
-
return 0
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if exponent == 0 {
|
|
15
|
-
return 1
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
guard let base = self.magnitude as? BigUInt,
|
|
19
|
-
let exp = exponent.magnitude as? BigUInt,
|
|
20
|
-
let mod = modulus.magnitude as? BigUInt else {
|
|
21
|
-
return 0
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Square and multiply algorithm for modular exponentiation
|
|
25
|
-
var result = BigUInt(1)
|
|
26
|
-
var currentBase = base % mod
|
|
27
|
-
var currentExp = exp
|
|
28
|
-
|
|
29
|
-
while currentExp > 0 {
|
|
30
|
-
if currentExp & 1 == 1 {
|
|
31
|
-
result = (result * currentBase) % mod
|
|
32
|
-
}
|
|
33
|
-
currentBase = (currentBase * currentBase) % mod
|
|
34
|
-
currentExp >>= 1
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return BigInt(result)
|
|
38
|
-
}
|
|
39
|
-
}
|