@capgo/capacitor-updater 7.36.0 → 7.36.1
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.
|
@@ -72,7 +72,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
72
72
|
private static final String[] BREAKING_EVENT_NAMES = { "breakingAvailable", "majorAvailable" };
|
|
73
73
|
private static final String LAST_FAILED_BUNDLE_PREF_KEY = "CapacitorUpdater.lastFailedBundle";
|
|
74
74
|
|
|
75
|
-
private final String pluginVersion = "7.36.
|
|
75
|
+
private final String pluginVersion = "7.36.1";
|
|
76
76
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
77
77
|
|
|
78
78
|
private SharedPreferences.Editor editor;
|
|
@@ -54,7 +54,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
54
54
|
CAPPluginMethod(name: "isShakeMenuEnabled", returnType: CAPPluginReturnPromise)
|
|
55
55
|
]
|
|
56
56
|
public var implementation = CapgoUpdater()
|
|
57
|
-
private let pluginVersion: String = "7.36.
|
|
57
|
+
private let pluginVersion: String = "7.36.1"
|
|
58
58
|
static let updateUrlDefault = "https://plugin.capgo.app/updates"
|
|
59
59
|
static let statsUrlDefault = "https://plugin.capgo.app/stats"
|
|
60
60
|
static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
|
|
@@ -469,16 +469,26 @@ import UIKit
|
|
|
469
469
|
dispatchGroup.enter()
|
|
470
470
|
|
|
471
471
|
if FileManager.default.fileExists(atPath: builtinFilePath.path) && verifyChecksum(file: builtinFilePath, expectedHash: fileHash) {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
472
|
+
do {
|
|
473
|
+
try FileManager.default.copyItem(at: builtinFilePath, to: destFilePath)
|
|
474
|
+
logger.info("downloadManifest \(fileName) using builtin file \(id)")
|
|
475
|
+
completedFiles += 1
|
|
476
|
+
self.notifyDownload(id: id, percent: self.calcTotalPercent(percent: Int((Double(completedFiles) / Double(totalFiles)) * 100), min: 10, max: 70))
|
|
477
|
+
} catch {
|
|
478
|
+
downloadError = error
|
|
479
|
+
logger.error("Failed to copy builtin file \(fileName): \(error.localizedDescription)")
|
|
480
|
+
}
|
|
476
481
|
dispatchGroup.leave()
|
|
477
482
|
} else if FileManager.default.fileExists(atPath: cacheFilePath.path) && verifyChecksum(file: cacheFilePath, expectedHash: fileHash) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
483
|
+
do {
|
|
484
|
+
try FileManager.default.copyItem(at: cacheFilePath, to: destFilePath)
|
|
485
|
+
logger.info("downloadManifest \(fileName) copy from cache \(id)")
|
|
486
|
+
completedFiles += 1
|
|
487
|
+
self.notifyDownload(id: id, percent: self.calcTotalPercent(percent: Int((Double(completedFiles) / Double(totalFiles)) * 100), min: 10, max: 70))
|
|
488
|
+
} catch {
|
|
489
|
+
downloadError = error
|
|
490
|
+
logger.error("Failed to copy cached file \(fileName): \(error.localizedDescription)")
|
|
491
|
+
}
|
|
482
492
|
dispatchGroup.leave()
|
|
483
493
|
} else {
|
|
484
494
|
// File not in cache, download, decompress, and save to both cache and destination
|