@capgo/capacitor-updater 4.11.4 → 4.11.11

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.
@@ -53,7 +53,7 @@ dependencies {
53
53
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
54
54
  implementation 'com.android.volley:volley:1.2.1'
55
55
  implementation 'io.github.g00fy2:versioncompare:1.5.0'
56
- implementation 'com.google.code.gson:gson:2.8.6'
56
+ implementation 'com.google.code.gson:gson:2.10'
57
57
  testImplementation "junit:junit:$junitVersion"
58
58
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
59
59
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
@@ -8,7 +8,7 @@ public enum BundleStatus {
8
8
  ERROR("error"),
9
9
  PENDING("pending"),
10
10
  DELETED("deleted"),
11
- DOWNLOADING("donwloading");
11
+ DOWNLOADING("downloading");
12
12
 
13
13
  public final String label;
14
14
 
@@ -52,7 +52,7 @@ public class CapacitorUpdater {
52
52
  private static final String bundleDirectory = "versions";
53
53
 
54
54
  public static final String TAG = "Capacitor-updater";
55
- public static final String pluginVersion = "4.11.4";
55
+ public static final String pluginVersion = "4.11.11";
56
56
 
57
57
  public SharedPreferences.Editor editor;
58
58
  public SharedPreferences prefs;
@@ -134,7 +134,7 @@ public class CapacitorUpdater {
134
134
  while ((entry = zis.getNextEntry()) != null) {
135
135
  final File file = new File(targetDirectory, entry.getName());
136
136
  final String canonicalPath = file.getCanonicalPath();
137
- final String canonicalDir = (new File(String.valueOf(targetDirectory))).getCanonicalPath();
137
+ final String canonicalDir = targetDirectory.getCanonicalPath();
138
138
  final File dir = entry.isDirectory() ? file : file.getParentFile();
139
139
 
140
140
  if (!canonicalPath.startsWith(canonicalDir)) {
@@ -305,7 +305,7 @@ public class CapacitorUpdater {
305
305
  }
306
306
  return true;
307
307
  }
308
- Log.e(TAG, "Directory not removed: " + bundle.getPath());
308
+ Log.e(TAG, "bundle removed: " + deleted.getVersionName());
309
309
  this.sendStats("delete", deleted.getVersionName());
310
310
  return false;
311
311
  }
@@ -30,7 +30,7 @@ enum BundleStatus: LocalizedString, Decodable, Encodable {
30
30
  case ERROR = "error"
31
31
  case PENDING = "pending"
32
32
  case DELETED = "deleted"
33
- case DOWNLOADING = "donwloading"
33
+ case DOWNLOADING = "downloading"
34
34
 
35
35
  var localizedString: String {
36
36
  return self.rawValue.v
@@ -208,7 +208,7 @@ extension CustomError: LocalizedError {
208
208
  public let TAG = "✨ Capacitor-updater:"
209
209
  public let CAP_SERVER_PATH = "serverBasePath"
210
210
  public var customId = ""
211
- public let pluginVersion = "4.11.4"
211
+ public let pluginVersion = "4.11.11"
212
212
  public var statsUrl = ""
213
213
  public var channelUrl = ""
214
214
  public var appId = ""
@@ -474,6 +474,7 @@ extension CustomError: LocalizedError {
474
474
  } else {
475
475
  self.saveBundleInfo(id: id, bundle: deleted.setStatus(status: BundleStatus.DELETED.localizedString))
476
476
  }
477
+ print("\(self.TAG) bundle delete \(deleted.getVersionName())")
477
478
  self.sendStats(action: "delete", versionName: deleted.getVersionName())
478
479
  return true
479
480
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "4.11.4",
3
+ "version": "4.11.11",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "OTA update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",