@capgo/capacitor-updater 6.11.1 → 6.11.2
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/Package.swift
CHANGED
|
@@ -21,15 +21,15 @@ let package = Package(
|
|
|
21
21
|
dependencies: [
|
|
22
22
|
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
23
23
|
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
24
|
-
.product(name: "
|
|
24
|
+
.product(name: "ZipArchive", package: "ZipArchive"),
|
|
25
25
|
.product(name: "Alamofire", package: "Alamofire"),
|
|
26
26
|
.product(name: "Version", package: "Version")
|
|
27
27
|
],
|
|
28
|
-
path: "ios/
|
|
28
|
+
path: "ios/Plugin"),
|
|
29
29
|
.testTarget(
|
|
30
30
|
name: "CapacitorUpdaterPluginTests",
|
|
31
31
|
dependencies: ["CapacitorUpdaterPlugin"],
|
|
32
|
-
path: "ios/
|
|
32
|
+
path: "ios/PluginTests")
|
|
33
33
|
],
|
|
34
34
|
swiftLanguageVersions: [.v5]
|
|
35
35
|
)
|
|
@@ -60,7 +60,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
60
60
|
private static final String channelUrlDefault =
|
|
61
61
|
"https://plugin.capgo.app/channel_self";
|
|
62
62
|
|
|
63
|
-
private final String PLUGIN_VERSION = "6.11.
|
|
63
|
+
private final String PLUGIN_VERSION = "6.11.2";
|
|
64
64
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
65
65
|
|
|
66
66
|
private SharedPreferences.Editor editor;
|
|
@@ -5,12 +5,22 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import Foundation
|
|
8
|
+
#if canImport(ZipArchive)
|
|
9
|
+
import ZipArchive
|
|
10
|
+
#else
|
|
8
11
|
import SSZipArchive
|
|
12
|
+
#endif
|
|
9
13
|
import Alamofire
|
|
10
14
|
import zlib
|
|
11
15
|
import CryptoKit
|
|
12
16
|
import Compression
|
|
13
17
|
|
|
18
|
+
#if canImport(ZipArchive)
|
|
19
|
+
typealias ZipArchiveHelper = ZipArchive
|
|
20
|
+
#else
|
|
21
|
+
typealias ZipArchiveHelper = SSZipArchive
|
|
22
|
+
#endif
|
|
23
|
+
|
|
14
24
|
extension Collection {
|
|
15
25
|
subscript(safe index: Index) -> Element? {
|
|
16
26
|
return indices.contains(index) ? self[index] : nil
|
|
@@ -527,7 +537,7 @@ extension CustomError: LocalizedError {
|
|
|
527
537
|
let semaphore = DispatchSemaphore(value: 0)
|
|
528
538
|
var unzipError: NSError?
|
|
529
539
|
|
|
530
|
-
let success =
|
|
540
|
+
let success = ZipArchiveHelper.unzipFile(atPath: sourceZip.path,
|
|
531
541
|
toDestination: destUnZip.path,
|
|
532
542
|
preserveAttributes: true,
|
|
533
543
|
overwrite: true,
|
|
@@ -45,7 +45,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
45
45
|
CAPPluginMethod(name: "getNextBundle", returnType: CAPPluginReturnPromise)
|
|
46
46
|
]
|
|
47
47
|
public var implementation = CapacitorUpdater()
|
|
48
|
-
private let PLUGIN_VERSION: String = "6.11.
|
|
48
|
+
private let PLUGIN_VERSION: String = "6.11.2"
|
|
49
49
|
static let updateUrlDefault = "https://plugin.capgo.app/updates"
|
|
50
50
|
static let statsUrlDefault = "https://plugin.capgo.app/stats"
|
|
51
51
|
static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-updater",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.2",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Live update for capacitor apps",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"scripts": {
|
|
43
43
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
44
44
|
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
|
|
45
|
+
"verify:iosSPM": "xcodebuild -workspace ios/Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS",
|
|
45
46
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
46
47
|
"verify:web": "npm run build",
|
|
47
48
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|