@capgo/capacitor-updater 4.4.9 → 4.4.10

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
@@ -177,7 +177,7 @@ Notify Capacitor Updater that the current bundle is working (a rollback will occ
177
177
  download(options: { url: string; version: string; }) => Promise<BundleInfo>
178
178
  ```
179
179
 
180
- Download a new version from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
180
+ Download a new bundle from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
181
181
 
182
182
  | Param | Type |
183
183
  | ------------- | ---------------------------------------------- |
@@ -241,7 +241,7 @@ Delete bundle in storage
241
241
  list() => Promise<{ bundles: BundleInfo[]; }>
242
242
  ```
243
243
 
244
- Get all available versions
244
+ Get all available bundles
245
245
 
246
246
  **Returns:** <code>Promise&lt;{ bundles: BundleInfo[]; }&gt;</code>
247
247
 
@@ -254,7 +254,7 @@ Get all available versions
254
254
  reset(options?: { toLastSuccessful?: boolean | undefined; } | undefined) => Promise<void>
255
255
  ```
256
256
 
257
- Set the `builtin` version (the one sent to Apple store / Google play store ) as current version
257
+ Set the `builtin` bundle (the one sent to Apple store / Google play store ) as current bundle
258
258
 
259
259
  | Param | Type |
260
260
  | ------------- | -------------------------------------------- |
@@ -340,7 +340,7 @@ Cancel delay to updates as usual
340
340
  getLatest() => Promise<latestVersion>
341
341
  ```
342
342
 
343
- Get Latest version available from update Url
343
+ Get Latest bundle available from update Url
344
344
 
345
345
  **Returns:** <code>Promise&lt;<a href="#latestversion">latestVersion</a>&gt;</code>
346
346
 
@@ -644,9 +644,9 @@ removeAllListeners() => Promise<void>
644
644
 
645
645
  #### MajorAvailableEvent
646
646
 
647
- | Prop | Type | Description | Since |
648
- | ------------- | ------------------- | ------------------------------------------- | ----- |
649
- | **`version`** | <code>string</code> | Emit when a new major version is available. | 4.0.0 |
647
+ | Prop | Type | Description | Since |
648
+ | ------------- | ------------------- | ------------------------------------------ | ----- |
649
+ | **`version`** | <code>string</code> | Emit when a new major bundle is available. | 4.0.0 |
650
650
 
651
651
 
652
652
  #### UpdateFailedEvent
@@ -45,7 +45,7 @@ public class CapacitorUpdater {
45
45
  private static final String bundleDirectory = "versions";
46
46
 
47
47
  public static final String TAG = "Capacitor-updater";
48
- public static final String pluginVersion = "4.4.9";
48
+ public static final String pluginVersion = "4.4.10";
49
49
 
50
50
  public SharedPreferences.Editor editor;
51
51
  public SharedPreferences prefs;
package/dist/docs.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "tags": [
41
41
  {
42
42
  "name": "returns",
43
- "text": "The {@link BundleInfo} for the specified version."
43
+ "text": "The {@link BundleInfo} for the specified bundle."
44
44
  },
45
45
  {
46
46
  "name": "param",
@@ -55,7 +55,7 @@
55
55
  "text": "https://example.com/versions/{version}/dist.zip"
56
56
  }
57
57
  ],
58
- "docs": "Download a new version from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files",
58
+ "docs": "Download a new bundle from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files",
59
59
  "complexTypes": [
60
60
  "BundleInfo"
61
61
  ],
@@ -83,7 +83,7 @@
83
83
  },
84
84
  {
85
85
  "name": "throws",
86
- "text": "An error if there are is no index.html file inside the version folder."
86
+ "text": "An error if there are is no index.html file inside the bundle folder."
87
87
  }
88
88
  ],
89
89
  "docs": "Set the next bundle to be used when the app is reloaded.",
@@ -114,7 +114,7 @@
114
114
  },
115
115
  {
116
116
  "name": "throws",
117
- "text": "An error if there are is no index.html file inside the version folder."
117
+ "text": "An error if there are is no index.html file inside the bundle folder."
118
118
  }
119
119
  ],
120
120
  "docs": "Set the current bundle and immediately reloads the app.",
@@ -158,14 +158,14 @@
158
158
  "tags": [
159
159
  {
160
160
  "name": "returns",
161
- "text": "an Promise witht the version list"
161
+ "text": "an Promise witht the bundles list"
162
162
  },
163
163
  {
164
164
  "name": "throws",
165
165
  "text": "An error if the something went wrong"
166
166
  }
167
167
  ],
168
- "docs": "Get all available versions",
168
+ "docs": "Get all available bundles",
169
169
  "complexTypes": [
170
170
  "BundleInfo"
171
171
  ],
@@ -196,7 +196,7 @@
196
196
  "text": "An error if the something went wrong"
197
197
  }
198
198
  ],
199
- "docs": "Set the `builtin` version (the one sent to Apple store / Google play store ) as current version",
199
+ "docs": "Set the `builtin` bundle (the one sent to Apple store / Google play store ) as current bundle",
200
200
  "complexTypes": [],
201
201
  "slug": "reset"
202
202
  },
@@ -368,7 +368,7 @@
368
368
  "text": "4.0.0"
369
369
  }
370
370
  ],
371
- "docs": "Get Latest version available from update Url",
371
+ "docs": "Get Latest bundle available from update Url",
372
372
  "complexTypes": [
373
373
  "latestVersion"
374
374
  ],
@@ -1163,7 +1163,7 @@
1163
1163
  "name": "since"
1164
1164
  }
1165
1165
  ],
1166
- "docs": "Emit when a new major version is available.",
1166
+ "docs": "Emit when a new major bundle is available.",
1167
1167
  "complexTypes": [],
1168
1168
  "type": "string"
1169
1169
  }
@@ -1518,7 +1518,7 @@
1518
1518
  "name": "example"
1519
1519
  }
1520
1520
  ],
1521
- "docs": "Automatically delete previous downloaded bundles when a newer native app version is installed to the device.\n\nOnly available for Android and iOS.",
1521
+ "docs": "Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device.\n\nOnly available for Android and iOS.",
1522
1522
  "complexTypes": [],
1523
1523
  "type": "boolean | undefined"
1524
1524
  },
@@ -42,7 +42,7 @@ declare module '@capacitor/cli' {
42
42
  */
43
43
  autoUpdate?: boolean;
44
44
  /**
45
- * Automatically delete previous downloaded bundles when a newer native app version is installed to the device.
45
+ * Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device.
46
46
  *
47
47
  * Only available for Android and iOS.
48
48
  *
@@ -98,7 +98,7 @@ export interface DownloadEvent {
98
98
  }
99
99
  export interface MajorAvailableEvent {
100
100
  /**
101
- * Emit when a new major version is available.
101
+ * Emit when a new major bundle is available.
102
102
  *
103
103
  * @since 4.0.0
104
104
  */
@@ -174,9 +174,9 @@ export interface CapacitorUpdaterPlugin {
174
174
  */
175
175
  notifyAppReady(): Promise<BundleInfo>;
176
176
  /**
177
- * Download a new version from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
177
+ * Download a new bundle from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
178
178
  *
179
- * @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified version.
179
+ * @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified bundle.
180
180
  * @param url The URL of the bundle zip file (e.g: dist.zip) to be downloaded. (This can be any URL. E.g: Amazon S3, a github tag, any other place you've hosted your bundle.)
181
181
  * @param version set the version code/name of this bundle/version
182
182
  * @example https://example.com/versions/{version}/dist.zip
@@ -190,7 +190,7 @@ export interface CapacitorUpdaterPlugin {
190
190
  *
191
191
  * @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified bundle id.
192
192
  * @param id The bundle id to set as current, next time the app is reloaded. See {@link BundleInfo.id}
193
- * @throws An error if there are is no index.html file inside the version folder.
193
+ * @throws An error if there are is no index.html file inside the bundle folder.
194
194
  */
195
195
  next(options: {
196
196
  id: string;
@@ -200,7 +200,7 @@ export interface CapacitorUpdaterPlugin {
200
200
  *
201
201
  * @param id The bundle id to set as current. See {@link BundleInfo.id}
202
202
  * @returns {Promise<Void>} An empty promise.
203
- * @throws An error if there are is no index.html file inside the version folder.
203
+ * @throws An error if there are is no index.html file inside the bundle folder.
204
204
  */
205
205
  set(options: {
206
206
  id: string;
@@ -216,16 +216,16 @@ export interface CapacitorUpdaterPlugin {
216
216
  id: string;
217
217
  }): Promise<void>;
218
218
  /**
219
- * Get all available versions
219
+ * Get all available bundles
220
220
  *
221
- * @returns {Promise<{version: BundleInfo[]}>} an Promise witht the version list
221
+ * @returns {Promise<{bundles: BundleInfo[]}>} an Promise witht the bundles list
222
222
  * @throws An error if the something went wrong
223
223
  */
224
224
  list(): Promise<{
225
225
  bundles: BundleInfo[];
226
226
  }>;
227
227
  /**
228
- * Set the `builtin` version (the one sent to Apple store / Google play store ) as current version
228
+ * Set the `builtin` bundle (the one sent to Apple store / Google play store ) as current bundle
229
229
  *
230
230
  * @returns {Promise<void>} an empty Promise
231
231
  * @param toLastSuccessful [false] if yes it reset to to the last successfully loaded bundle instead of `builtin`
@@ -294,7 +294,7 @@ export interface CapacitorUpdaterPlugin {
294
294
  */
295
295
  cancelDelay(): Promise<void>;
296
296
  /**
297
- * Get Latest version available from update Url
297
+ * Get Latest bundle available from update Url
298
298
  *
299
299
  * @returns {Promise<latestVersion>} an Promise resolved when url is loaded
300
300
  * @throws An error if the something went wrong
@@ -148,7 +148,7 @@ extension CustomError: LocalizedError {
148
148
 
149
149
  public let TAG = "✨ Capacitor-updater:"
150
150
  public let CAP_SERVER_PATH = "serverBasePath"
151
- public let pluginVersion = "4.4.9"
151
+ public let pluginVersion = "4.4.10"
152
152
  public var statsUrl = ""
153
153
  public var appId = ""
154
154
  public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
@@ -192,7 +192,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
192
192
  resArr.append(v.toJSON())
193
193
  }
194
194
  call.resolve([
195
- "versions": resArr
195
+ "bundles": resArr
196
196
  ])
197
197
  }
198
198
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "4.4.9",
3
+ "version": "4.4.10",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "OTA update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",