@capawesome/capacitor-live-update 6.6.0 → 6.7.1

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.
Files changed (30) hide show
  1. package/README.md +147 -40
  2. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +53 -7
  3. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +76 -3
  4. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +3 -0
  5. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/FetchLatestBundleOptions.java +24 -0
  6. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetNextBundleOptions.java +20 -0
  7. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SyncOptions.java +20 -0
  8. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/FetchLatestBundleResult.java +21 -2
  9. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetCurrentBundleResult.java +22 -0
  10. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetNextBundleResult.java +22 -0
  11. package/dist/docs.json +254 -17
  12. package/dist/esm/definitions.d.ts +118 -12
  13. package/dist/esm/definitions.js.map +1 -1
  14. package/dist/esm/web.d.ts +4 -1
  15. package/dist/esm/web.js +9 -0
  16. package/dist/esm/web.js.map +1 -1
  17. package/dist/plugin.cjs.js +9 -0
  18. package/dist/plugin.cjs.js.map +1 -1
  19. package/dist/plugin.js +9 -0
  20. package/dist/plugin.js.map +1 -1
  21. package/ios/Plugin/Classes/Options/FetchLatestBundleOptions.swift +18 -0
  22. package/ios/Plugin/Classes/Options/SetNextBundleOptions.swift +14 -0
  23. package/ios/Plugin/Classes/Options/SyncOptions.swift +14 -0
  24. package/ios/Plugin/Classes/Results/FetchLatestBundle.swift +14 -2
  25. package/ios/Plugin/Classes/Results/GetCurrentBundleResult.swift +16 -0
  26. package/ios/Plugin/Classes/Results/GetNextBundleResult.swift +16 -0
  27. package/ios/Plugin/LiveUpdate.swift +46 -7
  28. package/ios/Plugin/LiveUpdatePlugin.m +4 -1
  29. package/ios/Plugin/LiveUpdatePlugin.swift +66 -21
  30. package/package.json +2 -2
@@ -47,7 +47,7 @@ declare module '@capacitor/cli' {
47
47
  * @since 6.2.0
48
48
  * @default 'us'
49
49
  * @example 'eu'
50
- * @see https://capawesome.io/cloud/live-updates/advanced/privacy/
50
+ * @deprecated This option will be removed in the future.
51
51
  */
52
52
  location?: 'us' | 'eu';
53
53
  /**
@@ -100,13 +100,14 @@ export interface LiveUpdatePlugin {
100
100
  *
101
101
  * @since 6.6.0
102
102
  */
103
- fetchLatestBundle(): Promise<FetchLatestBundleResult>;
103
+ fetchLatestBundle(options?: FetchLatestBundleOptions): Promise<FetchLatestBundleResult>;
104
104
  /**
105
105
  * Get the active bundle identifier.
106
106
  *
107
107
  * Only available on Android and iOS.
108
108
  *
109
109
  * @since 5.0.0
110
+ * @deprecated Use `getCurrentBundle()` instead.
110
111
  */
111
112
  getBundle(): Promise<GetBundleResult>;
112
113
  /**
@@ -118,7 +119,7 @@ export interface LiveUpdatePlugin {
118
119
  */
119
120
  getBundles(): Promise<GetBundlesResult>;
120
121
  /**
121
- * Get the channel of the app.
122
+ * Get the channel that is used for the update.
122
123
  *
123
124
  * Only available on Android and iOS.
124
125
  *
@@ -126,7 +127,16 @@ export interface LiveUpdatePlugin {
126
127
  */
127
128
  getChannel(): Promise<GetChannelResult>;
128
129
  /**
129
- * Get the custom identifier of the app.
130
+ * Get the bundle identifier of the current bundle.
131
+ * The current bundle is the bundle that is currently used by the app.
132
+ *
133
+ * Only available on Android and iOS.
134
+ *
135
+ * @since 6.7.0
136
+ */
137
+ getCurrentBundle(): Promise<GetCurrentBundleResult>;
138
+ /**
139
+ * Get the custom identifier of the device.
130
140
  *
131
141
  * Only available on Android and iOS.
132
142
  *
@@ -134,13 +144,23 @@ export interface LiveUpdatePlugin {
134
144
  */
135
145
  getCustomId(): Promise<GetCustomIdResult>;
136
146
  /**
137
- * Get the device identifier of the app.
147
+ * Get the unique device identifier.
138
148
  *
139
149
  * Only available on Android and iOS.
140
150
  *
141
151
  * @since 5.0.0
142
152
  */
143
153
  getDeviceId(): Promise<GetDeviceIdResult>;
154
+ /**
155
+ * Get the bundle identifier of the next bundle.
156
+ * The next bundle is the bundle that will be used after calling `reload()`
157
+ * or restarting the app.
158
+ *
159
+ * Only available on Android and iOS.
160
+ *
161
+ * @since 6.7.0
162
+ */
163
+ getNextBundle(): Promise<GetNextBundleResult>;
144
164
  /**
145
165
  * Get the version code of the app.
146
166
  *
@@ -194,10 +214,11 @@ export interface LiveUpdatePlugin {
194
214
  * Only available on Android and iOS.
195
215
  *
196
216
  * @since 5.0.0
217
+ * @deprecated Use `setNextBundle()` instead.
197
218
  */
198
219
  setBundle(options: SetBundleOptions): Promise<void>;
199
220
  /**
200
- * Set the channel of the app.
221
+ * Set the channel to use for the update.
201
222
  *
202
223
  * Only available on Android and iOS.
203
224
  *
@@ -205,13 +226,23 @@ export interface LiveUpdatePlugin {
205
226
  */
206
227
  setChannel(options: SetChannelOptions): Promise<void>;
207
228
  /**
208
- * Set the custom identifier of the app.
229
+ * Set the custom identifier of the device.
209
230
  *
210
231
  * Only available on Android and iOS.
211
232
  *
212
233
  * @since 5.0.0
213
234
  */
214
235
  setCustomId(options: SetCustomIdOptions): Promise<void>;
236
+ /**
237
+ * Set the next bundle to use for the app.
238
+ *
239
+ * Call `reload()` or restart the app to apply the changes.
240
+ *
241
+ * Only available on Android and iOS.
242
+ *
243
+ * @since 6.7.0
244
+ */
245
+ setNextBundle(options: SetNextBundleOptions): Promise<void>;
215
246
  /**
216
247
  * Automatically download and set the latest bundle for the app using the [Capawesome Cloud](https://capawesome.io/cloud/).
217
248
  *
@@ -221,7 +252,7 @@ export interface LiveUpdatePlugin {
221
252
  *
222
253
  * @since 5.0.0
223
254
  */
224
- sync(): Promise<SyncResult>;
255
+ sync(options?: SyncOptions): Promise<SyncResult>;
225
256
  }
226
257
  /**
227
258
  * @since 5.0.0
@@ -280,10 +311,27 @@ export interface DownloadBundleOptions {
280
311
  */
281
312
  url: string;
282
313
  }
314
+ /**
315
+ * @since 6.7.0
316
+ */
317
+ export interface FetchLatestBundleOptions {
318
+ /**
319
+ * The name of the channel where the latest bundle is fetched from.
320
+ *
321
+ * @since 6.7.0
322
+ */
323
+ channel?: string;
324
+ }
283
325
  /**
284
326
  * @since 6.6.0
285
327
  */
286
328
  export interface FetchLatestBundleResult {
329
+ /**
330
+ * The artifact type of the bundle.
331
+ *
332
+ * @since 6.7.0
333
+ */
334
+ artifactType?: 'manifest' | 'zip';
287
335
  /**
288
336
  * The unique identifier of the latest bundle.
289
337
  *
@@ -292,6 +340,13 @@ export interface FetchLatestBundleResult {
292
340
  * @since 6.6.0
293
341
  */
294
342
  bundleId: string | null;
343
+ /**
344
+ * The URL of the latest bundle to download.
345
+ * Pass this URL to the `downloadBundle(...)` method to download the bundle.
346
+ *
347
+ * @since 6.7.0
348
+ */
349
+ downloadUrl?: string;
295
350
  }
296
351
  /**
297
352
  * @since 5.0.0
@@ -323,7 +378,7 @@ export interface GetBundlesResult {
323
378
  */
324
379
  export interface GetChannelResult {
325
380
  /**
326
- * The channel of the app.
381
+ * The channel name.
327
382
  *
328
383
  * If `null`, the app is using the default channel.
329
384
  *
@@ -332,6 +387,19 @@ export interface GetChannelResult {
332
387
  */
333
388
  channel: string | null;
334
389
  }
390
+ /**
391
+ * @since 6.7.0
392
+ */
393
+ export interface GetCurrentBundleResult {
394
+ /**
395
+ * The unique identifier of the current bundle.
396
+ *
397
+ * If `null`, the default bundle is being used.
398
+ *
399
+ * @since 6.7.0
400
+ */
401
+ bundleId: string | null;
402
+ }
335
403
  /**
336
404
  * @since 5.0.0
337
405
  */
@@ -348,6 +416,19 @@ export interface GetDeviceIdResult {
348
416
  */
349
417
  deviceId: string;
350
418
  }
419
+ /**
420
+ * @since 6.7.0
421
+ */
422
+ export interface GetNextBundleResult {
423
+ /**
424
+ * The unique identifier of the next bundle.
425
+ *
426
+ * If `null`, the default bundle is being used.
427
+ *
428
+ * @since 6.7.0
429
+ */
430
+ bundleId: string | null;
431
+ }
351
432
  /**
352
433
  * @since 5.0.0
353
434
  */
@@ -383,7 +464,7 @@ export interface GetVersionNameResult {
383
464
  */
384
465
  export interface GetCustomIdResult {
385
466
  /**
386
- * The custom identifier of the app.
467
+ * The custom identifier of the device.
387
468
  *
388
469
  * If `null`, no custom identifier is set.
389
470
  *
@@ -409,7 +490,7 @@ export interface SetBundleOptions {
409
490
  */
410
491
  export interface SetChannelOptions {
411
492
  /**
412
- * The channel of the app.
493
+ * The channel name.
413
494
  *
414
495
  * Set `null` to remove the channel.
415
496
  *
@@ -422,7 +503,7 @@ export interface SetChannelOptions {
422
503
  */
423
504
  export interface SetCustomIdOptions {
424
505
  /**
425
- * The custom identifier of the app.
506
+ * The custom identifier of the device.
426
507
  *
427
508
  * Set `null` to remove the custom identifier.
428
509
  *
@@ -430,6 +511,31 @@ export interface SetCustomIdOptions {
430
511
  */
431
512
  customId: string | null;
432
513
  }
514
+ /**
515
+ * @since 6.7.0
516
+ */
517
+ export interface SetNextBundleOptions {
518
+ /**
519
+ * The unique identifier of the bundle to use.
520
+ *
521
+ * Set `null` to use the default bundle (same as calling `reset()`).
522
+ *
523
+ * @since 6.7.0
524
+ * @example '1.0.0'
525
+ */
526
+ bundleId: string | null;
527
+ }
528
+ /**
529
+ * @since 6.7.0
530
+ */
531
+ export interface SyncOptions {
532
+ /**
533
+ * The name of the channel where the latest bundle is fetched from.
534
+ *
535
+ * @since 6.7.0
536
+ */
537
+ channel?: string;
538
+ }
433
539
  /**
434
540
  * @since 5.0.0
435
541
  */
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n LiveUpdate?: {\n /**\n * The app ID is used to identify the app when using [Capawesome Cloud](https://capawesome.io/cloud).\n *\n * This is **NOT** the same as the app identifier (e.g. `com.example.app`).\n * This is a unique identifier generated by Capawesome Cloud (e.g. `6e351b4f-69a7-415e-a057-4567df7ffe94`).\n *\n * @since 5.0.0\n * @example '6e351b4f-69a7-415e-a057-4567df7ffe94'\n */\n appId?: string;\n /**\n * Whether or not to automatically delete unused bundles.\n *\n * When enabled, the plugin will automatically delete unused bundles after calling `ready()`.\n *\n * @since 5.0.0\n * @default false\n */\n autoDeleteBundles?: boolean;\n /**\n * The default channel of the app.\n *\n * @since 6.3.0\n * @example 'production'\n */\n defaultChannel?: string;\n /**\n * Whether or not the plugin is enabled.\n *\n * @since 5.0.0\n * @default true\n */\n enabled?: boolean;\n /**\n * The timeout in milliseconds for HTTP requests.\n *\n * @since 6.4.0\n * @default 60000\n */\n httpTimeout?: number;\n /**\n * The location of the server to use when using [Capawesome Cloud](https://capawesome.io/cloud).\n *\n * @since 6.2.0\n * @default 'us'\n * @example 'eu'\n * @see https://capawesome.io/cloud/live-updates/advanced/privacy/\n */\n location?: 'us' | 'eu';\n /**\n * The public key to verify the integrity of the bundle.\n *\n * The public key must be a PEM-encoded RSA public key.\n *\n * @since 6.1.0\n * @example '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDodf1SD0OOn6hIlDuKBza0Ed0OqtwyVJwiyjmE9BJaZ7y8ZUfcF+SKmd0l2cDPM45XIg2tAFux5n29uoKyHwSt+6tCi5CJA5Z1/1eZruRRqABLonV77KS3HUtvOgqRLDnKSV89dYZkM++NwmzOPgIF422mvc+VukcVOBfc8/AHQIDAQAB-----END PUBLIC KEY-----'\n */\n publicKey?: string;\n /**\n * The timeout in milliseconds to wait for the app to be ready before resetting to the default bundle.\n *\n * @since 5.0.0\n * @default 10000\n */\n readyTimeout?: number;\n /**\n * Whether or not the app should be reset to the default bundle during an update.\n *\n * @since 5.0.0\n * @default true\n */\n resetOnUpdate?: boolean;\n };\n }\n}\n\nexport interface LiveUpdatePlugin {\n /**\n * Delete a bundle from the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n deleteBundle(options: DeleteBundleOptions): Promise<void>;\n /**\n * Download a bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n downloadBundle(options: DownloadBundleOptions): Promise<void>;\n /**\n * Fetch the latest bundle using the [Capawesome Cloud](https://capawesome.io/cloud/).\n *\n * Only available on Android and iOS.\n *\n * @since 6.6.0\n */\n fetchLatestBundle(): Promise<FetchLatestBundleResult>;\n /**\n * Get the active bundle identifier.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getBundle(): Promise<GetBundleResult>;\n /**\n * Get all identifiers of bundles that have been downloaded.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getBundles(): Promise<GetBundlesResult>;\n /**\n * Get the channel of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getChannel(): Promise<GetChannelResult>;\n /**\n * Get the custom identifier of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getCustomId(): Promise<GetCustomIdResult>;\n /**\n * Get the device identifier of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getDeviceId(): Promise<GetDeviceIdResult>;\n /**\n * Get the version code of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getVersionCode(): Promise<GetVersionCodeResult>;\n /**\n * Get the version name of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getVersionName(): Promise<GetVersionNameResult>;\n /**\n * Notify the plugin that the app is ready to use and no rollback is needed.\n *\n * **Attention**: This method should be called as soon as the app is ready to use\n * to prevent the app from being reset to the default bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n ready(): Promise<void>;\n /**\n * Reload the app to apply the new bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n reload(): Promise<void>;\n /**\n * Reset the app to the default bundle.\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n reset(): Promise<void>;\n /**\n * Set the next bundle to use for the app.\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n setBundle(options: SetBundleOptions): Promise<void>;\n /**\n * Set the channel of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n setChannel(options: SetChannelOptions): Promise<void>;\n /**\n * Set the custom identifier of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n setCustomId(options: SetCustomIdOptions): Promise<void>;\n /**\n * Automatically download and set the latest bundle for the app using the [Capawesome Cloud](https://capawesome.io/cloud/).\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n sync(): Promise<SyncResult>;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface DeleteBundleOptions {\n /**\n * The unique identifier of the bundle to delete.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n}\n\nexport interface DownloadBundleOptions {\n /**\n * The artifact type of the bundle.\n *\n * @since 6.6.0\n * @default 'zip'\n * @example 'manifest'\n */\n artifactType?: 'manifest' | 'zip';\n /**\n * The unique identifier of the bundle.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n /**\n * The checksum of the bundle to verify the integrity of the ZIP file.\n *\n * Must be a SHA-256 hash in base64 format.\n *\n * @since 6.1.0\n * @deprecated The server should return a `X-Checksum` header instead.\n */\n checksum?: string;\n /**\n * The URL of the bundle to download.\n *\n * For the `zip` artifact type, the URL must point to a ZIP file.\n * For the `manifest` artifact type, the URL serves as the base URL\n * to download the individual files. For example, if the URL is\n * `https://example.com/download`, the plugin will download the file\n * with the href `index.html` from `https://example.com/download?href=index.html`.\n *\n * To **verify the integrity** of the file, the server must return\n * a `X-Checksum` header with the SHA-256 hash in base64 format.\n *\n * To **verify the signature** of the file, the server must return\n * a `X-Signature` header with the signed SHA-256 hash in base64 format.\n *\n * @since 5.0.0\n * @example 'https://example.com/bundle.zip'\n */\n url: string;\n}\n\n/**\n * @since 6.6.0\n */\nexport interface FetchLatestBundleResult {\n /**\n * The unique identifier of the latest bundle.\n *\n * If `null`, no bundle is available.\n *\n * @since 6.6.0\n */\n bundleId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetBundleResult {\n /**\n * The unique identifier of the active bundle.\n *\n * If `null`, the default bundle is being used.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetBundlesResult {\n /**\n * An array of unique identifiers of all available bundles.\n *\n * @since 5.0.0\n */\n bundleIds: string[];\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetChannelResult {\n /**\n * The channel of the app.\n *\n * If `null`, the app is using the default channel.\n *\n * @since 5.0.0\n * @example 'production'\n */\n channel: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetDeviceIdResult {\n /**\n * The unique identifier of the device.\n *\n * On iOS, [`identifierForVendor`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) is used.\n * The value of this property is the same for apps that come from the same vendor running on the same device.\n *\n * @since 5.0.0\n *\n * @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'\n */\n deviceId: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetVersionCodeResult {\n /**\n * The version code of the app.\n *\n * On **Android**, this is the `versionCode` from the `android/app/build.gradle` file.\n * On **iOS**, this is the `CFBundleVersion` from the `Info.plist` file.\n *\n * @since 5.0.0\n * @example \"1\"\n */\n versionCode: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetVersionNameResult {\n /**\n * The version name of the app.\n *\n * On **Android**, this is the `versionName` from the `android/app/build.gradle` file.\n * On **iOS**, this is the `CFBundleShortVersionString` from the `Info.plist` file.\n *\n * @since 5.0.0\n * @example \"1.0.0\"\n */\n versionName: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetCustomIdResult {\n /**\n * The custom identifier of the app.\n *\n * If `null`, no custom identifier is set.\n *\n * @since 5.0.0\n * @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'\n */\n customId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetBundleOptions {\n /**\n * The unique identifier of the bundle to use.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetChannelOptions {\n /**\n * The channel of the app.\n *\n * Set `null` to remove the channel.\n *\n * @since 5.0.0\n */\n channel: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetCustomIdOptions {\n /**\n * The custom identifier of the app.\n *\n * Set `null` to remove the custom identifier.\n *\n * @since 5.0.0\n */\n customId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SyncResult {\n /**\n * The identifier of the next bundle to use.\n *\n * If `null`, the app is up-to-date and no new bundle is available.\n *\n * @since 5.0.0\n */\n nextBundleId: string | null;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n LiveUpdate?: {\n /**\n * The app ID is used to identify the app when using [Capawesome Cloud](https://capawesome.io/cloud).\n *\n * This is **NOT** the same as the app identifier (e.g. `com.example.app`).\n * This is a unique identifier generated by Capawesome Cloud (e.g. `6e351b4f-69a7-415e-a057-4567df7ffe94`).\n *\n * @since 5.0.0\n * @example '6e351b4f-69a7-415e-a057-4567df7ffe94'\n */\n appId?: string;\n /**\n * Whether or not to automatically delete unused bundles.\n *\n * When enabled, the plugin will automatically delete unused bundles after calling `ready()`.\n *\n * @since 5.0.0\n * @default false\n */\n autoDeleteBundles?: boolean;\n /**\n * The default channel of the app.\n *\n * @since 6.3.0\n * @example 'production'\n */\n defaultChannel?: string;\n /**\n * Whether or not the plugin is enabled.\n *\n * @since 5.0.0\n * @default true\n */\n enabled?: boolean;\n /**\n * The timeout in milliseconds for HTTP requests.\n *\n * @since 6.4.0\n * @default 60000\n */\n httpTimeout?: number;\n /**\n * The location of the server to use when using [Capawesome Cloud](https://capawesome.io/cloud).\n *\n * @since 6.2.0\n * @default 'us'\n * @example 'eu'\n * @deprecated This option will be removed in the future.\n */\n location?: 'us' | 'eu';\n /**\n * The public key to verify the integrity of the bundle.\n *\n * The public key must be a PEM-encoded RSA public key.\n *\n * @since 6.1.0\n * @example '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDodf1SD0OOn6hIlDuKBza0Ed0OqtwyVJwiyjmE9BJaZ7y8ZUfcF+SKmd0l2cDPM45XIg2tAFux5n29uoKyHwSt+6tCi5CJA5Z1/1eZruRRqABLonV77KS3HUtvOgqRLDnKSV89dYZkM++NwmzOPgIF422mvc+VukcVOBfc8/AHQIDAQAB-----END PUBLIC KEY-----'\n */\n publicKey?: string;\n /**\n * The timeout in milliseconds to wait for the app to be ready before resetting to the default bundle.\n *\n * @since 5.0.0\n * @default 10000\n */\n readyTimeout?: number;\n /**\n * Whether or not the app should be reset to the default bundle during an update.\n *\n * @since 5.0.0\n * @default true\n */\n resetOnUpdate?: boolean;\n };\n }\n}\n\nexport interface LiveUpdatePlugin {\n /**\n * Delete a bundle from the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n deleteBundle(options: DeleteBundleOptions): Promise<void>;\n /**\n * Download a bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n downloadBundle(options: DownloadBundleOptions): Promise<void>;\n /**\n * Fetch the latest bundle using the [Capawesome Cloud](https://capawesome.io/cloud/).\n *\n * Only available on Android and iOS.\n *\n * @since 6.6.0\n */\n fetchLatestBundle(options?: FetchLatestBundleOptions): Promise<FetchLatestBundleResult>;\n /**\n * Get the active bundle identifier.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n * @deprecated Use `getCurrentBundle()` instead.\n */\n getBundle(): Promise<GetBundleResult>;\n /**\n * Get all identifiers of bundles that have been downloaded.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getBundles(): Promise<GetBundlesResult>;\n /**\n * Get the channel that is used for the update.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getChannel(): Promise<GetChannelResult>;\n /**\n * Get the bundle identifier of the current bundle.\n * The current bundle is the bundle that is currently used by the app.\n *\n * Only available on Android and iOS.\n *\n * @since 6.7.0\n */\n getCurrentBundle(): Promise<GetCurrentBundleResult>;\n /**\n * Get the custom identifier of the device.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getCustomId(): Promise<GetCustomIdResult>;\n /**\n * Get the unique device identifier.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getDeviceId(): Promise<GetDeviceIdResult>;\n /**\n * Get the bundle identifier of the next bundle.\n * The next bundle is the bundle that will be used after calling `reload()`\n * or restarting the app.\n *\n * Only available on Android and iOS.\n *\n * @since 6.7.0\n */\n getNextBundle(): Promise<GetNextBundleResult>;\n /**\n * Get the version code of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getVersionCode(): Promise<GetVersionCodeResult>;\n /**\n * Get the version name of the app.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n getVersionName(): Promise<GetVersionNameResult>;\n /**\n * Notify the plugin that the app is ready to use and no rollback is needed.\n *\n * **Attention**: This method should be called as soon as the app is ready to use\n * to prevent the app from being reset to the default bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n ready(): Promise<void>;\n /**\n * Reload the app to apply the new bundle.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n reload(): Promise<void>;\n /**\n * Reset the app to the default bundle.\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n reset(): Promise<void>;\n /**\n * Set the next bundle to use for the app.\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n * @deprecated Use `setNextBundle()` instead.\n */\n setBundle(options: SetBundleOptions): Promise<void>;\n /**\n * Set the channel to use for the update.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n setChannel(options: SetChannelOptions): Promise<void>;\n /**\n * Set the custom identifier of the device.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n setCustomId(options: SetCustomIdOptions): Promise<void>;\n /**\n * Set the next bundle to use for the app.\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 6.7.0\n */\n setNextBundle(options: SetNextBundleOptions): Promise<void>;\n /**\n * Automatically download and set the latest bundle for the app using the [Capawesome Cloud](https://capawesome.io/cloud/).\n *\n * Call `reload()` or restart the app to apply the changes.\n *\n * Only available on Android and iOS.\n *\n * @since 5.0.0\n */\n sync(options?: SyncOptions): Promise<SyncResult>;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface DeleteBundleOptions {\n /**\n * The unique identifier of the bundle to delete.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n}\n\nexport interface DownloadBundleOptions {\n /**\n * The artifact type of the bundle.\n *\n * @since 6.6.0\n * @default 'zip'\n * @example 'manifest'\n */\n artifactType?: 'manifest' | 'zip';\n /**\n * The unique identifier of the bundle.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n /**\n * The checksum of the bundle to verify the integrity of the ZIP file.\n *\n * Must be a SHA-256 hash in base64 format.\n *\n * @since 6.1.0\n * @deprecated The server should return a `X-Checksum` header instead.\n */\n checksum?: string;\n /**\n * The URL of the bundle to download.\n *\n * For the `zip` artifact type, the URL must point to a ZIP file.\n * For the `manifest` artifact type, the URL serves as the base URL\n * to download the individual files. For example, if the URL is\n * `https://example.com/download`, the plugin will download the file\n * with the href `index.html` from `https://example.com/download?href=index.html`.\n *\n * To **verify the integrity** of the file, the server must return\n * a `X-Checksum` header with the SHA-256 hash in base64 format.\n *\n * To **verify the signature** of the file, the server must return\n * a `X-Signature` header with the signed SHA-256 hash in base64 format.\n *\n * @since 5.0.0\n * @example 'https://example.com/bundle.zip'\n */\n url: string;\n}\n\n/**\n * @since 6.7.0\n */\nexport interface FetchLatestBundleOptions {\n /**\n * The name of the channel where the latest bundle is fetched from.\n *\n * @since 6.7.0\n */\n channel?: string;\n}\n\n/**\n * @since 6.6.0\n */\nexport interface FetchLatestBundleResult {\n /**\n * The artifact type of the bundle.\n *\n * @since 6.7.0\n */\n artifactType?: 'manifest' | 'zip';\n /**\n * The unique identifier of the latest bundle.\n *\n * If `null`, no bundle is available.\n *\n * @since 6.6.0\n */\n bundleId: string | null;\n /**\n * The URL of the latest bundle to download.\n * Pass this URL to the `downloadBundle(...)` method to download the bundle.\n *\n * @since 6.7.0\n */\n downloadUrl?: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetBundleResult {\n /**\n * The unique identifier of the active bundle.\n *\n * If `null`, the default bundle is being used.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetBundlesResult {\n /**\n * An array of unique identifiers of all available bundles.\n *\n * @since 5.0.0\n */\n bundleIds: string[];\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetChannelResult {\n /**\n * The channel name.\n *\n * If `null`, the app is using the default channel.\n *\n * @since 5.0.0\n * @example 'production'\n */\n channel: string | null;\n}\n\n/**\n * @since 6.7.0\n */\nexport interface GetCurrentBundleResult {\n /**\n * The unique identifier of the current bundle.\n *\n * If `null`, the default bundle is being used.\n *\n * @since 6.7.0\n */\n bundleId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetDeviceIdResult {\n /**\n * The unique identifier of the device.\n *\n * On iOS, [`identifierForVendor`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) is used.\n * The value of this property is the same for apps that come from the same vendor running on the same device.\n *\n * @since 5.0.0\n *\n * @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'\n */\n deviceId: string;\n}\n\n/**\n * @since 6.7.0\n */\nexport interface GetNextBundleResult {\n /**\n * The unique identifier of the next bundle.\n *\n * If `null`, the default bundle is being used.\n *\n * @since 6.7.0\n */\n bundleId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetVersionCodeResult {\n /**\n * The version code of the app.\n *\n * On **Android**, this is the `versionCode` from the `android/app/build.gradle` file.\n * On **iOS**, this is the `CFBundleVersion` from the `Info.plist` file.\n *\n * @since 5.0.0\n * @example \"1\"\n */\n versionCode: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetVersionNameResult {\n /**\n * The version name of the app.\n *\n * On **Android**, this is the `versionName` from the `android/app/build.gradle` file.\n * On **iOS**, this is the `CFBundleShortVersionString` from the `Info.plist` file.\n *\n * @since 5.0.0\n * @example \"1.0.0\"\n */\n versionName: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface GetCustomIdResult {\n /**\n * The custom identifier of the device.\n *\n * If `null`, no custom identifier is set.\n *\n * @since 5.0.0\n * @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'\n */\n customId: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetBundleOptions {\n /**\n * The unique identifier of the bundle to use.\n *\n * @since 5.0.0\n * @example '1.0.0'\n */\n bundleId: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetChannelOptions {\n /**\n * The channel name.\n *\n * Set `null` to remove the channel.\n *\n * @since 5.0.0\n */\n channel: string | null;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SetCustomIdOptions {\n /**\n * The custom identifier of the device.\n *\n * Set `null` to remove the custom identifier.\n *\n * @since 5.0.0\n */\n customId: string | null;\n}\n\n/**\n * @since 6.7.0\n */\nexport interface SetNextBundleOptions {\n /**\n * The unique identifier of the bundle to use.\n *\n * Set `null` to use the default bundle (same as calling `reset()`).\n *\n * @since 6.7.0\n * @example '1.0.0'\n */\n bundleId: string | null;\n}\n\n/**\n * @since 6.7.0\n */\nexport interface SyncOptions {\n /**\n * The name of the channel where the latest bundle is fetched from.\n *\n * @since 6.7.0\n */\n channel?: string;\n}\n\n/**\n * @since 5.0.0\n */\nexport interface SyncResult {\n /**\n * The identifier of the next bundle to use.\n *\n * If `null`, the app is up-to-date and no new bundle is available.\n *\n * @since 5.0.0\n */\n nextBundleId: string | null;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { DeleteBundleOptions, DownloadBundleOptions, FetchLatestBundleResult, GetBundleResult, GetBundlesResult, GetChannelResult, GetCustomIdResult, GetDeviceIdResult, GetVersionCodeResult, GetVersionNameResult, LiveUpdatePlugin, SetBundleOptions, SetChannelOptions, SetCustomIdOptions, SyncResult } from './definitions';
2
+ import type { DeleteBundleOptions, DownloadBundleOptions, FetchLatestBundleResult, GetBundleResult, GetBundlesResult, GetChannelResult, GetCurrentBundleResult, GetCustomIdResult, GetDeviceIdResult, GetNextBundleResult, GetVersionCodeResult, GetVersionNameResult, LiveUpdatePlugin, SetBundleOptions, SetChannelOptions, SetCustomIdOptions, SetNextBundleOptions, SyncResult } from './definitions';
3
3
  export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {
4
4
  deleteBundle(_options: DeleteBundleOptions): Promise<void>;
5
5
  downloadBundle(_options: DownloadBundleOptions): Promise<void>;
@@ -7,8 +7,10 @@ export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin
7
7
  getBundle(): Promise<GetBundleResult>;
8
8
  getBundles(): Promise<GetBundlesResult>;
9
9
  getChannel(): Promise<GetChannelResult>;
10
+ getCurrentBundle(): Promise<GetCurrentBundleResult>;
10
11
  getCustomId(): Promise<GetCustomIdResult>;
11
12
  getDeviceId(): Promise<GetDeviceIdResult>;
13
+ getNextBundle(): Promise<GetNextBundleResult>;
12
14
  getVersionCode(): Promise<GetVersionCodeResult>;
13
15
  getVersionName(): Promise<GetVersionNameResult>;
14
16
  ready(): Promise<void>;
@@ -17,6 +19,7 @@ export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin
17
19
  setBundle(_options: SetBundleOptions): Promise<void>;
18
20
  setChannel(_options: SetChannelOptions): Promise<void>;
19
21
  setCustomId(_options: SetCustomIdOptions): Promise<void>;
22
+ setNextBundle(_options: SetNextBundleOptions): Promise<void>;
20
23
  sync(): Promise<SyncResult>;
21
24
  private throwUnimplementedError;
22
25
  }
package/dist/esm/web.js CHANGED
@@ -18,12 +18,18 @@ export class LiveUpdateWeb extends WebPlugin {
18
18
  async getChannel() {
19
19
  this.throwUnimplementedError();
20
20
  }
21
+ async getCurrentBundle() {
22
+ this.throwUnimplementedError();
23
+ }
21
24
  async getCustomId() {
22
25
  this.throwUnimplementedError();
23
26
  }
24
27
  async getDeviceId() {
25
28
  this.throwUnimplementedError();
26
29
  }
30
+ async getNextBundle() {
31
+ this.throwUnimplementedError();
32
+ }
27
33
  async getVersionCode() {
28
34
  this.throwUnimplementedError();
29
35
  }
@@ -48,6 +54,9 @@ export class LiveUpdateWeb extends WebPlugin {
48
54
  async setCustomId(_options) {
49
55
  this.throwUnimplementedError();
50
56
  }
57
+ async setNextBundle(_options) {
58
+ this.throwUnimplementedError();
59
+ }
51
60
  async sync() {
52
61
  this.throwUnimplementedError();
53
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,MAA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C,QAA4B;QACnD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEO,uBAAuB;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n DeleteBundleOptions,\n DownloadBundleOptions,\n FetchLatestBundleResult,\n GetBundleResult,\n GetBundlesResult,\n GetChannelResult,\n GetCustomIdResult,\n GetDeviceIdResult,\n GetVersionCodeResult,\n GetVersionNameResult,\n LiveUpdatePlugin,\n SetBundleOptions,\n SetChannelOptions,\n SetCustomIdOptions,\n SyncResult,\n} from './definitions';\n\nexport class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {\n public async deleteBundle(_options: DeleteBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async downloadBundle(_options: DownloadBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async fetchLatestBundle(): Promise<FetchLatestBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundle(): Promise<GetBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundles(): Promise<GetBundlesResult> {\n this.throwUnimplementedError();\n }\n\n public async getChannel(): Promise<GetChannelResult> {\n this.throwUnimplementedError();\n }\n\n public async getCustomId(): Promise<GetCustomIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getDeviceId(): Promise<GetDeviceIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionCode(): Promise<GetVersionCodeResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionName(): Promise<GetVersionNameResult> {\n this.throwUnimplementedError();\n }\n\n public async ready(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async reload(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async reset(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setBundle(_options: SetBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setChannel(_options: SetChannelOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setCustomId(_options: SetCustomIdOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async sync(): Promise<SyncResult> {\n this.throwUnimplementedError();\n }\n\n private throwUnimplementedError(): never {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAuB5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IACnC,KAAK,CAAC,YAAY,CAAC,QAA6B;QACrD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,QAA+B;QACzD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,iBAAiB;QAC5B,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,SAAS;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC3B,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW;QACtB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW;QACtB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,aAAa;QACxB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,QAA0B;QAC/C,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,QAA2B;QACjD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,QAA4B;QACnD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,QAA8B;QACvD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEO,uBAAuB;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n DeleteBundleOptions,\n DownloadBundleOptions,\n FetchLatestBundleResult,\n GetBundleResult,\n GetBundlesResult,\n GetChannelResult,\n GetCurrentBundleResult,\n GetCustomIdResult,\n GetDeviceIdResult,\n GetNextBundleResult,\n GetVersionCodeResult,\n GetVersionNameResult,\n LiveUpdatePlugin,\n SetBundleOptions,\n SetChannelOptions,\n SetCustomIdOptions,\n SetNextBundleOptions,\n SyncResult,\n} from './definitions';\n\nexport class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {\n public async deleteBundle(_options: DeleteBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async downloadBundle(_options: DownloadBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async fetchLatestBundle(): Promise<FetchLatestBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundle(): Promise<GetBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundles(): Promise<GetBundlesResult> {\n this.throwUnimplementedError();\n }\n\n public async getChannel(): Promise<GetChannelResult> {\n this.throwUnimplementedError();\n }\n\n public async getCurrentBundle(): Promise<GetCurrentBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getCustomId(): Promise<GetCustomIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getDeviceId(): Promise<GetDeviceIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getNextBundle(): Promise<GetNextBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionCode(): Promise<GetVersionCodeResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionName(): Promise<GetVersionNameResult> {\n this.throwUnimplementedError();\n }\n\n public async ready(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async reload(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async reset(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setBundle(_options: SetBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setChannel(_options: SetChannelOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setCustomId(_options: SetCustomIdOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setNextBundle(_options: SetNextBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async sync(): Promise<SyncResult> {\n this.throwUnimplementedError();\n }\n\n private throwUnimplementedError(): never {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
@@ -27,12 +27,18 @@ class LiveUpdateWeb extends core.WebPlugin {
27
27
  async getChannel() {
28
28
  this.throwUnimplementedError();
29
29
  }
30
+ async getCurrentBundle() {
31
+ this.throwUnimplementedError();
32
+ }
30
33
  async getCustomId() {
31
34
  this.throwUnimplementedError();
32
35
  }
33
36
  async getDeviceId() {
34
37
  this.throwUnimplementedError();
35
38
  }
39
+ async getNextBundle() {
40
+ this.throwUnimplementedError();
41
+ }
36
42
  async getVersionCode() {
37
43
  this.throwUnimplementedError();
38
44
  }
@@ -57,6 +63,9 @@ class LiveUpdateWeb extends core.WebPlugin {
57
63
  async setCustomId(_options) {
58
64
  this.throwUnimplementedError();
59
65
  }
66
+ async setNextBundle(_options) {
67
+ this.throwUnimplementedError();
68
+ }
60
69
  async sync() {
61
70
  this.throwUnimplementedError();
62
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then((m) => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,SAAS,GAAG;AACtB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,SAAS,CAAC,QAAQ,EAAE;AAC9B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;AAC/B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,QAAQ,EAAE;AAChC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,uBAAuB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then((m) => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getCurrentBundle() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getNextBundle() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async setNextBundle(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,SAAS,GAAG;AACtB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACv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QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,uBAAuB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -24,12 +24,18 @@ var capacitorLiveUpdate = (function (exports, core) {
24
24
  async getChannel() {
25
25
  this.throwUnimplementedError();
26
26
  }
27
+ async getCurrentBundle() {
28
+ this.throwUnimplementedError();
29
+ }
27
30
  async getCustomId() {
28
31
  this.throwUnimplementedError();
29
32
  }
30
33
  async getDeviceId() {
31
34
  this.throwUnimplementedError();
32
35
  }
36
+ async getNextBundle() {
37
+ this.throwUnimplementedError();
38
+ }
33
39
  async getVersionCode() {
34
40
  this.throwUnimplementedError();
35
41
  }
@@ -54,6 +60,9 @@ var capacitorLiveUpdate = (function (exports, core) {
54
60
  async setCustomId(_options) {
55
61
  this.throwUnimplementedError();
56
62
  }
63
+ async setNextBundle(_options) {
64
+ this.throwUnimplementedError();
65
+ }
57
66
  async sync() {
58
67
  this.throwUnimplementedError();
59
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then((m) => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;IACnC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,IAAI,CAAC,uBAA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or/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then((m) => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getCurrentBundle() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getNextBundle() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async setNextBundle(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,IAAI,CAAC,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AAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,SAAS,CAAC,QAAQ,EAAE;IAC9B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,QAAQ,EAAE;IAChC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;IAClC,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,uBAAuB,GAAG;IAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC5D,KAAK;IACL;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ @objc public class FetchLatestBundleOptions: NSObject {
5
+ private var channel: String?
6
+
7
+ init(_ call: CAPPluginCall) {
8
+ self.channel = call.getString("channel")
9
+ }
10
+
11
+ init(channel: String?) {
12
+ self.channel = channel
13
+ }
14
+
15
+ func getChannel() -> String? {
16
+ return channel
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ @objc public class SetNextBundleOptions: NSObject {
5
+ private var bundleId: String?
6
+
7
+ init(_ call: CAPPluginCall) {
8
+ self.bundleId = call.getString("bundleId")
9
+ }
10
+
11
+ func getBundleId() -> String? {
12
+ return bundleId
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ @objc public class SyncOptions: NSObject {
5
+ private var channel: String?
6
+
7
+ init(_ call: CAPPluginCall) {
8
+ self.channel = call.getString("channel")
9
+ }
10
+
11
+ func getChannel() -> String? {
12
+ return channel
13
+ }
14
+ }
@@ -2,15 +2,27 @@ import Foundation
2
2
  import Capacitor
3
3
 
4
4
  @objc public class FetchLatestBundleResult: NSObject, Result {
5
- let bundleId: String?
5
+ private let artifactType: ArtifactType?
6
+ private let bundleId: String?
7
+ private let downloadUrl: String?
6
8
 
7
- init(bundleId: String?) {
9
+ init(artifactType: ArtifactType?, bundleId: String?, downloadUrl: String?) {
10
+ self.artifactType = artifactType
8
11
  self.bundleId = bundleId
12
+ self.downloadUrl = downloadUrl
9
13
  }
10
14
 
11
15
  public func toJSObject() -> AnyObject {
12
16
  var result = JSObject()
17
+ if artifactType == .manifest {
18
+ result["artifactType"] = "manifest"
19
+ } else if artifactType == .zip {
20
+ result["artifactType"] = "zip"
21
+ }
13
22
  result["bundleId"] = bundleId == nil ? NSNull() : bundleId
23
+ if let downloadUrl = downloadUrl {
24
+ result["downloadUrl"] = downloadUrl
25
+ }
14
26
  return result as AnyObject
15
27
  }
16
28
  }
@@ -0,0 +1,16 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ @objc public class GetCurrentBundleResult: NSObject, Result {
5
+ let bundleId: String?
6
+
7
+ init(bundleId: String?) {
8
+ self.bundleId = bundleId
9
+ }
10
+
11
+ public func toJSObject() -> AnyObject {
12
+ var result = JSObject()
13
+ result["bundleId"] = bundleId == nil ? NSNull() : bundleId
14
+ return result as AnyObject
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ @objc public class GetNextBundleResult: NSObject, Result {
5
+ let bundleId: String?
6
+
7
+ init(bundleId: String?) {
8
+ self.bundleId = bundleId
9
+ }
10
+
11
+ public func toJSObject() -> AnyObject {
12
+ var result = JSObject()
13
+ result["bundleId"] = bundleId == nil ? NSNull() : bundleId
14
+ return result as AnyObject
15
+ }
16
+ }