@capgo/capacitor-updater 6.14.36 → 6.25.0

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.
@@ -71,7 +71,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
71
71
  private static final String[] BREAKING_EVENT_NAMES = { "breakingAvailable", "majorAvailable" };
72
72
  private static final String LAST_FAILED_BUNDLE_PREF_KEY = "CapacitorUpdater.lastFailedBundle";
73
73
 
74
- private final String PLUGIN_VERSION = "6.14.31";
74
+ private final String pluginVersion = "6.25.0";
75
75
  private static final String DELAY_CONDITION_PREFERENCES = "";
76
76
 
77
77
  private SharedPreferences.Editor editor;
@@ -220,7 +220,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
220
220
  this.implementation.activity = this.getActivity();
221
221
  this.implementation.versionBuild = this.getConfig().getString("version", pInfo.versionName);
222
222
  this.implementation.CAP_SERVER_PATH = WebView.CAP_SERVER_PATH;
223
- this.implementation.PLUGIN_VERSION = this.PLUGIN_VERSION;
223
+ this.implementation.pluginVersion = this.pluginVersion;
224
224
  this.implementation.versionCode = Integer.toString(pInfo.versionCode);
225
225
  // Removed unused OkHttpClient creation - using shared client in DownloadService instead
226
226
  // Handle directUpdate configuration - support string values and backward compatibility
@@ -334,7 +334,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
334
334
  this.implementation.deviceID = DeviceIdHelper.getOrCreateDeviceId(this.getContext(), this.prefs);
335
335
 
336
336
  // Update User-Agent for shared OkHttpClient with OS version
337
- DownloadService.updateUserAgent(this.implementation.appId, this.PLUGIN_VERSION, this.implementation.versionOs);
337
+ DownloadService.updateUserAgent(this.implementation.appId, this.pluginVersion, this.implementation.versionOs);
338
338
 
339
339
  if (Boolean.TRUE.equals(this.persistCustomId)) {
340
340
  final String storedCustomId = this.prefs.getString(CUSTOM_ID_PREF_KEY, "");
@@ -841,7 +841,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
841
841
  public void getPluginVersion(final PluginCall call) {
842
842
  try {
843
843
  final JSObject ret = new JSObject();
844
- ret.put("version", this.PLUGIN_VERSION);
844
+ ret.put("version", this.pluginVersion);
845
845
  call.resolve(ret);
846
846
  } catch (final Exception e) {
847
847
  logger.error("Could not get plugin version " + e.getMessage());
@@ -66,7 +66,7 @@ public class CapgoUpdater {
66
66
  public File documentsDir;
67
67
  public Boolean directUpdate = false;
68
68
  public Activity activity;
69
- public String PLUGIN_VERSION = "";
69
+ public String pluginVersion = "";
70
70
  public String versionBuild = "";
71
71
  public String versionCode = "";
72
72
  public String versionOs = "";
@@ -355,7 +355,7 @@ public class CapgoUpdater {
355
355
  manifest != null,
356
356
  this.isEmulator(),
357
357
  this.appId,
358
- this.PLUGIN_VERSION
358
+ this.pluginVersion
359
359
  );
360
360
 
361
361
  if (manifest != null) {
@@ -782,7 +782,7 @@ public class CapgoUpdater {
782
782
  json.put("version_code", this.versionCode);
783
783
  json.put("version_os", this.versionOs);
784
784
  json.put("version_name", this.getCurrentBundle().getVersionName());
785
- json.put("plugin_version", this.PLUGIN_VERSION);
785
+ json.put("plugin_version", this.pluginVersion);
786
786
  json.put("is_emulator", this.isEmulator());
787
787
  json.put("is_prod", this.isProd());
788
788
  json.put("defaultChannel", this.defaultChannel);
@@ -63,7 +63,7 @@ public class DownloadService extends Worker {
63
63
  public static final String PUBLIC_KEY = "publickey";
64
64
  public static final String IS_MANIFEST = "is_manifest";
65
65
  public static final String APP_ID = "app_id";
66
- public static final String PLUGIN_VERSION = "plugin_version";
66
+ public static final String pluginVersion = "plugin_version";
67
67
  private static final String UPDATE_FILE = "update.dat";
68
68
 
69
69
  // Shared OkHttpClient to prevent resource leaks
@@ -80,7 +80,7 @@ public class DownloadWorkerManager {
80
80
  .putBoolean(DownloadService.IS_MANIFEST, isManifest)
81
81
  .putString(DownloadService.PUBLIC_KEY, publicKey)
82
82
  .putString(DownloadService.APP_ID, appId)
83
- .putString(DownloadService.PLUGIN_VERSION, pluginVersion)
83
+ .putString(DownloadService.pluginVersion, pluginVersion)
84
84
  .build();
85
85
 
86
86
  // Create network constraints - be more lenient on emulators
@@ -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 PLUGIN_VERSION: String = "6.14.31"
57
+ private let pluginVersion: String = "6.25.0"
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"
@@ -193,7 +193,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
193
193
  implementation.hasOldPrivateKeyPropertyInConfig = true
194
194
  }
195
195
  implementation.notifyDownloadRaw = notifyDownload
196
- implementation.PLUGIN_VERSION = self.PLUGIN_VERSION
196
+ implementation.pluginVersion = self.pluginVersion
197
197
 
198
198
  // Set logger for shared classes
199
199
  implementation.setLogger(logger)
@@ -448,7 +448,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
448
448
  }
449
449
 
450
450
  @objc func getPluginVersion(_ call: CAPPluginCall) {
451
- call.resolve(["version": self.PLUGIN_VERSION])
451
+ call.resolve(["version": self.pluginVersion])
452
452
  }
453
453
 
454
454
  @objc func download(_ call: CAPPluginCall) {
@@ -33,7 +33,7 @@ import UIKit
33
33
  public let CAP_SERVER_PATH: String = "serverBasePath"
34
34
  public var versionBuild: String = ""
35
35
  public var customId: String = ""
36
- public var PLUGIN_VERSION: String = ""
36
+ public var pluginVersion: String = ""
37
37
  public var timeout: Double = 20
38
38
  public var statsUrl: String = ""
39
39
  public var channelUrl: String = ""
@@ -51,7 +51,7 @@ import UIKit
51
51
  private static var rateLimitStatisticSent = false
52
52
 
53
53
  private var userAgent: String {
54
- let safePluginVersion = PLUGIN_VERSION.isEmpty ? "unknown" : PLUGIN_VERSION
54
+ let safePluginVersion = pluginVersion.isEmpty ? "unknown" : pluginVersion
55
55
  let safeAppId = appId.isEmpty ? "unknown" : appId
56
56
  return "CapacitorUpdater/\(safePluginVersion) (\(safeAppId)) ios/\(versionOs)"
57
57
  }
@@ -315,7 +315,7 @@ import UIKit
315
315
  version_code: self.versionCode,
316
316
  version_os: self.versionOs,
317
317
  version_name: self.getCurrentBundle().getVersionName(),
318
- plugin_version: self.PLUGIN_VERSION,
318
+ plugin_version: self.pluginVersion,
319
319
  is_emulator: self.isEmulator(),
320
320
  is_prod: self.isProd(),
321
321
  action: nil,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "6.14.36",
3
+ "version": "6.25.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",