@capgo/capacitor-updater 6.6.4 → 6.6.5

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.
@@ -57,7 +57,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
57
57
  private static final String channelUrlDefault =
58
58
  "https://plugin.capgo.app/channel_self";
59
59
 
60
- private final String PLUGIN_VERSION = "6.6.4";
60
+ private final String PLUGIN_VERSION = "6.6.5";
61
61
  private static final String DELAY_CONDITION_PREFERENCES = "";
62
62
 
63
63
  private SharedPreferences.Editor editor;
@@ -979,7 +979,7 @@ extension CustomError: LocalizedError {
979
979
  let finalPath = tempDataPath.deletingLastPathComponent().appendingPathComponent("\(id)")
980
980
  do {
981
981
  var checksumDecrypted = checksum
982
- if !self.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty {
982
+ if !self.hasOldPrivateKeyPropertyInConfig {
983
983
  try self.decryptFileV2(filePath: tempDataPath, sessionKey: sessionKey, version: version)
984
984
  } else {
985
985
  try self.decryptFile(filePath: tempDataPath, sessionKey: sessionKey, version: version)
@@ -43,7 +43,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
43
43
  CAPPluginMethod(name: "getBuiltinVersion", returnType: CAPPluginReturnPromise)
44
44
  ]
45
45
  public var implementation = CapacitorUpdater()
46
- private let PLUGIN_VERSION: String = "6.6.4"
46
+ private let PLUGIN_VERSION: String = "6.6.5"
47
47
  static let updateUrlDefault = "https://plugin.capgo.app/updates"
48
48
  static let statsUrlDefault = "https://plugin.capgo.app/stats"
49
49
  static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
@@ -291,7 +291,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
291
291
  DispatchQueue.global(qos: .background).async {
292
292
  do {
293
293
  let next = try self.implementation.download(url: url!, version: version, sessionKey: sessionKey)
294
- if !self.implementation.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty {
294
+ if !self.implementation.hasOldPrivateKeyPropertyInConfig {
295
295
  checksum = try self.implementation.decryptChecksum(checksum: checksum, version: version)
296
296
  }
297
297
  if (checksum != "" || self.implementation.publicKey != "") && next.getChecksum() != checksum {
@@ -775,7 +775,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
775
775
  self.endBackGroundTaskWithNotif(msg: "Latest version is in error state. Aborting update.", latestVersionName: latestVersionName, current: current)
776
776
  return
777
777
  }
778
- if !self.implementation.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty {
778
+ if !self.implementation.hasOldPrivateKeyPropertyInConfig {
779
779
  res.checksum = try self.implementation.decryptChecksum(checksum: res.checksum, version: latestVersionName)
780
780
  }
781
781
  if res.checksum != "" && next.getChecksum() != res.checksum && res.manifest == nil {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "6.6.4",
3
+ "version": "6.6.5",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",