@capgo/capacitor-updater 7.18.11 → 7.18.12

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.
@@ -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.11";
61
+ private final String PLUGIN_VERSION = "7.18.12";
62
62
  private static final String DELAY_CONDITION_PREFERENCES = "";
63
63
 
64
64
  private SharedPreferences.Editor editor;
@@ -61,8 +61,6 @@ public class CapgoUpdater {
61
61
  public SharedPreferences.Editor editor;
62
62
  public SharedPreferences prefs;
63
63
 
64
- private OkHttpClient client;
65
-
66
64
  public File documentsDir;
67
65
  public Boolean directUpdate = false;
68
66
  public Activity activity;
@@ -85,8 +83,6 @@ public class CapgoUpdater {
85
83
 
86
84
  public CapgoUpdater(Logger logger) {
87
85
  this.logger = logger;
88
- // Simple OkHttpClient - actual configuration happens in plugin
89
- this.client = new OkHttpClient.Builder().connectTimeout(30, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
90
86
  }
91
87
 
92
88
  private final FilenameFilter filter = (f, name) -> {
@@ -772,7 +768,7 @@ public class CapgoUpdater {
772
768
 
773
769
  Request request = new Request.Builder().url(url).post(body).build();
774
770
 
775
- client
771
+ DownloadService.sharedClient
776
772
  .newCall(request)
777
773
  .enqueue(
778
774
  new okhttp3.Callback() {
@@ -881,7 +877,7 @@ public class CapgoUpdater {
881
877
  .delete(RequestBody.create(json.toString(), MediaType.get("application/json")))
882
878
  .build();
883
879
 
884
- client
880
+ DownloadService.sharedClient
885
881
  .newCall(request)
886
882
  .enqueue(
887
883
  new okhttp3.Callback() {
@@ -992,7 +988,7 @@ public class CapgoUpdater {
992
988
  .put(RequestBody.create(json.toString(), MediaType.get("application/json")))
993
989
  .build();
994
990
 
995
- client
991
+ DownloadService.sharedClient
996
992
  .newCall(request)
997
993
  .enqueue(
998
994
  new okhttp3.Callback() {
@@ -1089,7 +1085,7 @@ public class CapgoUpdater {
1089
1085
 
1090
1086
  Request request = new Request.Builder().url(urlBuilder.build()).get().build();
1091
1087
 
1092
- client
1088
+ DownloadService.sharedClient
1093
1089
  .newCall(request)
1094
1090
  .enqueue(
1095
1091
  new okhttp3.Callback() {
@@ -1195,7 +1191,7 @@ public class CapgoUpdater {
1195
1191
  .post(RequestBody.create(json.toString(), MediaType.get("application/json")))
1196
1192
  .build();
1197
1193
 
1198
- client
1194
+ DownloadService.sharedClient
1199
1195
  .newCall(request)
1200
1196
  .enqueue(
1201
1197
  new okhttp3.Callback() {
@@ -67,7 +67,7 @@ public class DownloadService extends Worker {
67
67
  private static final String UPDATE_FILE = "update.dat";
68
68
 
69
69
  // Shared OkHttpClient to prevent resource leaks
70
- private static OkHttpClient sharedClient;
70
+ protected static OkHttpClient sharedClient;
71
71
  private static String currentAppId = "unknown";
72
72
  private static String currentPluginVersion = "unknown";
73
73
 
@@ -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.11"
53
+ private let PLUGIN_VERSION: String = "7.18.12"
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.11",
3
+ "version": "7.18.12",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",