@capgo/capacitor-updater 7.18.13 → 7.18.15

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.
@@ -49,7 +49,7 @@ repositories {
49
49
 
50
50
 
51
51
  dependencies {
52
- def work_version = "2.10.4"
52
+ def work_version = "2.10.5"
53
53
  implementation "androidx.work:work-runtime:$work_version"
54
54
  implementation "com.google.android.gms:play-services-tasks:18.2.1"
55
55
  implementation "com.google.guava:guava:33.4.8-android"
@@ -58,7 +58,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
58
58
  private static final String channelUrlDefault = "https://plugin.capgo.app/channel_self";
59
59
  private static final String CUSTOM_ID_PREF_KEY = "CapacitorUpdater.customId";
60
60
 
61
- private final String PLUGIN_VERSION = "7.18.13";
61
+ private final String PLUGIN_VERSION = "7.18.15";
62
62
  private static final String DELAY_CONDITION_PREFERENCES = "";
63
63
 
64
64
  private SharedPreferences.Editor editor;
@@ -665,7 +665,7 @@ public class DownloadService extends Worker {
665
665
 
666
666
  // Verify checksum if provided
667
667
  if (expectedChecksum != null && !expectedChecksum.isEmpty()) {
668
- String actualChecksum = calculateFileChecksum(tempFile);
668
+ String actualChecksum = CryptoCipher.calcChecksum(tempFile);
669
669
  if (!expectedChecksum.equalsIgnoreCase(actualChecksum)) {
670
670
  tempFile.delete();
671
671
  throw new IOException("Checksum verification failed");
@@ -683,28 +683,6 @@ public class DownloadService extends Worker {
683
683
  }
684
684
  }
685
685
 
686
- /**
687
- * Calculate MD5 checksum of a file
688
- */
689
- private String calculateFileChecksum(File file) throws IOException {
690
- try (FileInputStream fis = new FileInputStream(file)) {
691
- MessageDigest md = MessageDigest.getInstance("MD5");
692
- byte[] buffer = new byte[8192];
693
- int bytesRead;
694
- while ((bytesRead = fis.read(buffer)) != -1) {
695
- md.update(buffer, 0, bytesRead);
696
- }
697
- byte[] digest = md.digest();
698
- StringBuilder sb = new StringBuilder();
699
- for (byte b : digest) {
700
- sb.append(String.format("%02x", b));
701
- }
702
- return sb.toString();
703
- } catch (Exception e) {
704
- throw new IOException("Failed to calculate checksum: " + e.getMessage(), e);
705
- }
706
- }
707
-
708
686
  /**
709
687
  * Clean up old temporary files
710
688
  */
@@ -50,7 +50,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
50
50
  CAPPluginMethod(name: "isShakeMenuEnabled", returnType: CAPPluginReturnPromise)
51
51
  ]
52
52
  public var implementation = CapgoUpdater()
53
- private let PLUGIN_VERSION: String = "7.18.13"
53
+ private let PLUGIN_VERSION: String = "7.18.15"
54
54
  static let updateUrlDefault = "https://plugin.capgo.app/updates"
55
55
  static let statsUrlDefault = "https://plugin.capgo.app/stats"
56
56
  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": "7.18.13",
3
+ "version": "7.18.15",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",