@capgo/capacitor-updater 4.24.0 → 4.28.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.
package/README.md CHANGED
@@ -620,14 +620,15 @@ Get the state of auto update config. This will return `false` in manual mode.
620
620
 
621
621
  #### latestVersion
622
622
 
623
- | Prop | Type | Description | Since |
624
- | ------------- | -------------------- | ----------------------- | ----- |
625
- | **`version`** | <code>string</code> | Res of getLatest method | 4.0.0 |
626
- | **`major`** | <code>boolean</code> | | |
627
- | **`message`** | <code>string</code> | | |
628
- | **`error`** | <code>string</code> | | |
629
- | **`old`** | <code>string</code> | | |
630
- | **`url`** | <code>string</code> | | |
623
+ | Prop | Type | Description | Since |
624
+ | ---------------- | -------------------- | ----------------------- | ----- |
625
+ | **`version`** | <code>string</code> | Res of getLatest method | 4.0.0 |
626
+ | **`major`** | <code>boolean</code> | | |
627
+ | **`message`** | <code>string</code> | | |
628
+ | **`sessionKey`** | <code>string</code> | | |
629
+ | **`error`** | <code>string</code> | | |
630
+ | **`old`** | <code>string</code> | | |
631
+ | **`url`** | <code>string</code> | | |
631
632
 
632
633
 
633
634
  #### channelRes
@@ -763,7 +763,11 @@ public class CapacitorUpdater {
763
763
  String key = keys.next();
764
764
  if (res.has(key)) {
765
765
  try {
766
- ret.put(key, res.get(key));
766
+ if ("session_key".equals(key)) {
767
+ ret.put("sessionKey", res.get(key));
768
+ } else {
769
+ ret.put(key, res.get(key));
770
+ }
767
771
  } catch (JSONException e) {
768
772
  e.printStackTrace();
769
773
  final JSObject retError = new JSObject();
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
55
55
  private static final String channelUrlDefault =
56
56
  "https://api.capgo.app/channel_self";
57
57
 
58
- private final String PLUGIN_VERSION = "4.24.0";
58
+ private final String PLUGIN_VERSION = "4.28.0";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -965,8 +965,8 @@ public class CapacitorUpdaterPlugin
965
965
  );
966
966
 
967
967
  final String url = res.getString("url");
968
- final String session_key = res.has("session_key")
969
- ? res.getString("session_key")
968
+ final String sessionKey = res.has("sessionKey")
969
+ ? res.getString("sessionKey")
970
970
  : "";
971
971
  final String checksum = res.has("checksum")
972
972
  ? res.getString("checksum")
@@ -974,7 +974,7 @@ public class CapacitorUpdaterPlugin
974
974
  CapacitorUpdaterPlugin.this.implementation.downloadBackground(
975
975
  url,
976
976
  latestVersionName,
977
- session_key,
977
+ sessionKey,
978
978
  checksum
979
979
  );
980
980
  } catch (final Exception e) {
@@ -61,12 +61,12 @@ public class CryptoCipher {
61
61
  return null;
62
62
  }
63
63
 
64
- public static SecretKey byteToSessionKey(byte[] session_key) {
64
+ public static SecretKey byteToSessionKey(byte[] sessionKey) {
65
65
  // rebuild key using SecretKeySpec
66
66
  SecretKey originalKey = new SecretKeySpec(
67
- session_key,
67
+ sessionKey,
68
68
  0,
69
- session_key.length,
69
+ sessionKey.length,
70
70
  "AES"
71
71
  );
72
72
  return originalKey;
package/dist/docs.json CHANGED
@@ -876,6 +876,13 @@
876
876
  "complexTypes": [],
877
877
  "type": "string | undefined"
878
878
  },
879
+ {
880
+ "name": "sessionKey",
881
+ "tags": [],
882
+ "docs": "",
883
+ "complexTypes": [],
884
+ "type": "string | undefined"
885
+ },
879
886
  {
880
887
  "name": "error",
881
888
  "tags": [],
@@ -177,6 +177,7 @@ export interface latestVersion {
177
177
  version: string;
178
178
  major?: boolean;
179
179
  message?: string;
180
+ sessionKey?: string;
180
181
  error?: string;
181
182
  old?: string;
182
183
  url?: string;
@@ -15,7 +15,7 @@ import Version
15
15
  @objc(CapacitorUpdaterPlugin)
16
16
  public class CapacitorUpdaterPlugin: CAPPlugin {
17
17
  private var implementation = CapacitorUpdater()
18
- private let PLUGIN_VERSION: String = "4.24.0"
18
+ private let PLUGIN_VERSION: String = "4.28.0"
19
19
  static let updateUrlDefault = "https://api.capgo.app/updates"
20
20
  static let statsUrlDefault = "https://api.capgo.app/stats"
21
21
  static let channelUrlDefault = "https://api.capgo.app/channel_self"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "4.24.0",
4
- "packageManager": "pnpm@7.30.3",
3
+ "version": "4.28.0",
4
+ "packageManager": "pnpm@8.1.0",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",
7
7
  "main": "dist/plugin.cjs.js",