@capawesome/capacitor-live-update 6.5.0 → 6.7.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 +184 -37
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +63 -5
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +98 -3
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +3 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DownloadBundleOptions.java +15 -1
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/FetchLatestBundleOptions.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetNextBundleOptions.java +20 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SyncOptions.java +20 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/FetchLatestBundleResult.java +41 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetCurrentBundleResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetNextBundleResult.java +22 -0
- package/dist/docs.json +318 -18
- package/dist/esm/definitions.d.ts +159 -14
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +5 -1
- package/dist/esm/web.js +12 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +12 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +12 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Classes/Options/DownloadBundleOptions.swift +11 -1
- package/ios/Plugin/Classes/Options/FetchLatestBundleOptions.swift +18 -0
- package/ios/Plugin/Classes/Options/SetNextBundleOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SyncOptions.swift +14 -0
- package/ios/Plugin/Classes/Results/FetchLatestBundle.swift +28 -0
- package/ios/Plugin/Classes/Results/GetCurrentBundleResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetNextBundleResult.swift +16 -0
- package/ios/Plugin/LiveUpdate.swift +55 -6
- package/ios/Plugin/LiveUpdatePlugin.m +5 -1
- package/ios/Plugin/LiveUpdatePlugin.swift +79 -20
- 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
|
-
* @
|
|
50
|
+
* @deprecated This option will be removed in the future.
|
|
51
51
|
*/
|
|
52
52
|
location?: 'us' | 'eu';
|
|
53
53
|
/**
|
|
@@ -93,12 +93,21 @@ export interface LiveUpdatePlugin {
|
|
|
93
93
|
* @since 5.0.0
|
|
94
94
|
*/
|
|
95
95
|
downloadBundle(options: DownloadBundleOptions): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Fetch the latest bundle using the [Capawesome Cloud](https://capawesome.io/cloud/).
|
|
98
|
+
*
|
|
99
|
+
* Only available on Android and iOS.
|
|
100
|
+
*
|
|
101
|
+
* @since 6.6.0
|
|
102
|
+
*/
|
|
103
|
+
fetchLatestBundle(options?: FetchLatestBundleOptions): Promise<FetchLatestBundleResult>;
|
|
96
104
|
/**
|
|
97
105
|
* Get the active bundle identifier.
|
|
98
106
|
*
|
|
99
107
|
* Only available on Android and iOS.
|
|
100
108
|
*
|
|
101
109
|
* @since 5.0.0
|
|
110
|
+
* @deprecated Use `getCurrentBundle()` instead.
|
|
102
111
|
*/
|
|
103
112
|
getBundle(): Promise<GetBundleResult>;
|
|
104
113
|
/**
|
|
@@ -110,7 +119,7 @@ export interface LiveUpdatePlugin {
|
|
|
110
119
|
*/
|
|
111
120
|
getBundles(): Promise<GetBundlesResult>;
|
|
112
121
|
/**
|
|
113
|
-
* Get the channel
|
|
122
|
+
* Get the channel that is used for the update.
|
|
114
123
|
*
|
|
115
124
|
* Only available on Android and iOS.
|
|
116
125
|
*
|
|
@@ -118,7 +127,16 @@ export interface LiveUpdatePlugin {
|
|
|
118
127
|
*/
|
|
119
128
|
getChannel(): Promise<GetChannelResult>;
|
|
120
129
|
/**
|
|
121
|
-
* Get the
|
|
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.
|
|
122
140
|
*
|
|
123
141
|
* Only available on Android and iOS.
|
|
124
142
|
*
|
|
@@ -126,13 +144,23 @@ export interface LiveUpdatePlugin {
|
|
|
126
144
|
*/
|
|
127
145
|
getCustomId(): Promise<GetCustomIdResult>;
|
|
128
146
|
/**
|
|
129
|
-
* Get the device identifier
|
|
147
|
+
* Get the unique device identifier.
|
|
130
148
|
*
|
|
131
149
|
* Only available on Android and iOS.
|
|
132
150
|
*
|
|
133
151
|
* @since 5.0.0
|
|
134
152
|
*/
|
|
135
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>;
|
|
136
164
|
/**
|
|
137
165
|
* Get the version code of the app.
|
|
138
166
|
*
|
|
@@ -186,10 +214,11 @@ export interface LiveUpdatePlugin {
|
|
|
186
214
|
* Only available on Android and iOS.
|
|
187
215
|
*
|
|
188
216
|
* @since 5.0.0
|
|
217
|
+
* @deprecated Use `setNextBundle()` instead.
|
|
189
218
|
*/
|
|
190
219
|
setBundle(options: SetBundleOptions): Promise<void>;
|
|
191
220
|
/**
|
|
192
|
-
* Set the channel
|
|
221
|
+
* Set the channel to use for the update.
|
|
193
222
|
*
|
|
194
223
|
* Only available on Android and iOS.
|
|
195
224
|
*
|
|
@@ -197,13 +226,23 @@ export interface LiveUpdatePlugin {
|
|
|
197
226
|
*/
|
|
198
227
|
setChannel(options: SetChannelOptions): Promise<void>;
|
|
199
228
|
/**
|
|
200
|
-
* Set the custom identifier of the
|
|
229
|
+
* Set the custom identifier of the device.
|
|
201
230
|
*
|
|
202
231
|
* Only available on Android and iOS.
|
|
203
232
|
*
|
|
204
233
|
* @since 5.0.0
|
|
205
234
|
*/
|
|
206
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>;
|
|
207
246
|
/**
|
|
208
247
|
* Automatically download and set the latest bundle for the app using the [Capawesome Cloud](https://capawesome.io/cloud/).
|
|
209
248
|
*
|
|
@@ -213,7 +252,7 @@ export interface LiveUpdatePlugin {
|
|
|
213
252
|
*
|
|
214
253
|
* @since 5.0.0
|
|
215
254
|
*/
|
|
216
|
-
sync(): Promise<SyncResult>;
|
|
255
|
+
sync(options?: SyncOptions): Promise<SyncResult>;
|
|
217
256
|
}
|
|
218
257
|
/**
|
|
219
258
|
* @since 5.0.0
|
|
@@ -228,6 +267,14 @@ export interface DeleteBundleOptions {
|
|
|
228
267
|
bundleId: string;
|
|
229
268
|
}
|
|
230
269
|
export interface DownloadBundleOptions {
|
|
270
|
+
/**
|
|
271
|
+
* The artifact type of the bundle.
|
|
272
|
+
*
|
|
273
|
+
* @since 6.6.0
|
|
274
|
+
* @default 'zip'
|
|
275
|
+
* @example 'manifest'
|
|
276
|
+
*/
|
|
277
|
+
artifactType?: 'manifest' | 'zip';
|
|
231
278
|
/**
|
|
232
279
|
* The unique identifier of the bundle.
|
|
233
280
|
*
|
|
@@ -238,22 +285,69 @@ export interface DownloadBundleOptions {
|
|
|
238
285
|
/**
|
|
239
286
|
* The checksum of the bundle to verify the integrity of the ZIP file.
|
|
240
287
|
*
|
|
241
|
-
* Must be a SHA-256 hash in
|
|
288
|
+
* Must be a SHA-256 hash in base64 format.
|
|
242
289
|
*
|
|
243
290
|
* @since 6.1.0
|
|
244
|
-
* @
|
|
291
|
+
* @deprecated The server should return a `X-Checksum` header instead.
|
|
245
292
|
*/
|
|
246
293
|
checksum?: string;
|
|
247
294
|
/**
|
|
248
295
|
* The URL of the bundle to download.
|
|
249
296
|
*
|
|
250
|
-
*
|
|
297
|
+
* For the `zip` artifact type, the URL must point to a ZIP file.
|
|
298
|
+
* For the `manifest` artifact type, the URL serves as the base URL
|
|
299
|
+
* to download the individual files. For example, if the URL is
|
|
300
|
+
* `https://example.com/download`, the plugin will download the file
|
|
301
|
+
* with the href `index.html` from `https://example.com/download?href=index.html`.
|
|
302
|
+
*
|
|
303
|
+
* To **verify the integrity** of the file, the server must return
|
|
304
|
+
* a `X-Checksum` header with the SHA-256 hash in base64 format.
|
|
305
|
+
*
|
|
306
|
+
* To **verify the signature** of the file, the server must return
|
|
307
|
+
* a `X-Signature` header with the signed SHA-256 hash in base64 format.
|
|
251
308
|
*
|
|
252
309
|
* @since 5.0.0
|
|
253
310
|
* @example 'https://example.com/bundle.zip'
|
|
254
311
|
*/
|
|
255
312
|
url: string;
|
|
256
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
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* @since 6.6.0
|
|
327
|
+
*/
|
|
328
|
+
export interface FetchLatestBundleResult {
|
|
329
|
+
/**
|
|
330
|
+
* The artifact type of the bundle.
|
|
331
|
+
*
|
|
332
|
+
* @since 6.7.0
|
|
333
|
+
*/
|
|
334
|
+
artifactType?: 'manifest' | 'zip';
|
|
335
|
+
/**
|
|
336
|
+
* The unique identifier of the latest bundle.
|
|
337
|
+
*
|
|
338
|
+
* If `null`, no bundle is available.
|
|
339
|
+
*
|
|
340
|
+
* @since 6.6.0
|
|
341
|
+
*/
|
|
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;
|
|
350
|
+
}
|
|
257
351
|
/**
|
|
258
352
|
* @since 5.0.0
|
|
259
353
|
*/
|
|
@@ -284,7 +378,7 @@ export interface GetBundlesResult {
|
|
|
284
378
|
*/
|
|
285
379
|
export interface GetChannelResult {
|
|
286
380
|
/**
|
|
287
|
-
* The channel
|
|
381
|
+
* The channel name.
|
|
288
382
|
*
|
|
289
383
|
* If `null`, the app is using the default channel.
|
|
290
384
|
*
|
|
@@ -293,6 +387,19 @@ export interface GetChannelResult {
|
|
|
293
387
|
*/
|
|
294
388
|
channel: string | null;
|
|
295
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
|
+
}
|
|
296
403
|
/**
|
|
297
404
|
* @since 5.0.0
|
|
298
405
|
*/
|
|
@@ -309,6 +416,19 @@ export interface GetDeviceIdResult {
|
|
|
309
416
|
*/
|
|
310
417
|
deviceId: string;
|
|
311
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
|
+
}
|
|
312
432
|
/**
|
|
313
433
|
* @since 5.0.0
|
|
314
434
|
*/
|
|
@@ -344,7 +464,7 @@ export interface GetVersionNameResult {
|
|
|
344
464
|
*/
|
|
345
465
|
export interface GetCustomIdResult {
|
|
346
466
|
/**
|
|
347
|
-
* The custom identifier of the
|
|
467
|
+
* The custom identifier of the device.
|
|
348
468
|
*
|
|
349
469
|
* If `null`, no custom identifier is set.
|
|
350
470
|
*
|
|
@@ -370,7 +490,7 @@ export interface SetBundleOptions {
|
|
|
370
490
|
*/
|
|
371
491
|
export interface SetChannelOptions {
|
|
372
492
|
/**
|
|
373
|
-
* The channel
|
|
493
|
+
* The channel name.
|
|
374
494
|
*
|
|
375
495
|
* Set `null` to remove the channel.
|
|
376
496
|
*
|
|
@@ -383,7 +503,7 @@ export interface SetChannelOptions {
|
|
|
383
503
|
*/
|
|
384
504
|
export interface SetCustomIdOptions {
|
|
385
505
|
/**
|
|
386
|
-
* The custom identifier of the
|
|
506
|
+
* The custom identifier of the device.
|
|
387
507
|
*
|
|
388
508
|
* Set `null` to remove the custom identifier.
|
|
389
509
|
*
|
|
@@ -391,6 +511,31 @@ export interface SetCustomIdOptions {
|
|
|
391
511
|
*/
|
|
392
512
|
customId: string | null;
|
|
393
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
|
+
}
|
|
394
539
|
/**
|
|
395
540
|
* @since 5.0.0
|
|
396
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 * 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 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 hexadecimal format.\n *\n * @since 6.1.0\n * @example 'aab8e0a312e807c8eaeb923e2bdccd7731c5508869c62ad8e6e43ee881414c84'\n */\n checksum?: string;\n /**\n * The URL of the bundle to download.\n *\n * The bundle must be a ZIP file containing at least a `index.html` file.\n *\n * @since 5.0.0\n * @example 'https://example.com/bundle.zip'\n */\n url: 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 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,13 +1,16 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type { DeleteBundleOptions, DownloadBundleOptions, 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>;
|
|
6
|
+
fetchLatestBundle(): Promise<FetchLatestBundleResult>;
|
|
6
7
|
getBundle(): Promise<GetBundleResult>;
|
|
7
8
|
getBundles(): Promise<GetBundlesResult>;
|
|
8
9
|
getChannel(): Promise<GetChannelResult>;
|
|
10
|
+
getCurrentBundle(): Promise<GetCurrentBundleResult>;
|
|
9
11
|
getCustomId(): Promise<GetCustomIdResult>;
|
|
10
12
|
getDeviceId(): Promise<GetDeviceIdResult>;
|
|
13
|
+
getNextBundle(): Promise<GetNextBundleResult>;
|
|
11
14
|
getVersionCode(): Promise<GetVersionCodeResult>;
|
|
12
15
|
getVersionName(): Promise<GetVersionNameResult>;
|
|
13
16
|
ready(): Promise<void>;
|
|
@@ -16,6 +19,7 @@ export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin
|
|
|
16
19
|
setBundle(_options: SetBundleOptions): Promise<void>;
|
|
17
20
|
setChannel(_options: SetChannelOptions): Promise<void>;
|
|
18
21
|
setCustomId(_options: SetCustomIdOptions): Promise<void>;
|
|
22
|
+
setNextBundle(_options: SetNextBundleOptions): Promise<void>;
|
|
19
23
|
sync(): Promise<SyncResult>;
|
|
20
24
|
private throwUnimplementedError;
|
|
21
25
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -6,6 +6,9 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
6
6
|
async downloadBundle(_options) {
|
|
7
7
|
this.throwUnimplementedError();
|
|
8
8
|
}
|
|
9
|
+
async fetchLatestBundle() {
|
|
10
|
+
this.throwUnimplementedError();
|
|
11
|
+
}
|
|
9
12
|
async getBundle() {
|
|
10
13
|
this.throwUnimplementedError();
|
|
11
14
|
}
|
|
@@ -15,12 +18,18 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
15
18
|
async getChannel() {
|
|
16
19
|
this.throwUnimplementedError();
|
|
17
20
|
}
|
|
21
|
+
async getCurrentBundle() {
|
|
22
|
+
this.throwUnimplementedError();
|
|
23
|
+
}
|
|
18
24
|
async getCustomId() {
|
|
19
25
|
this.throwUnimplementedError();
|
|
20
26
|
}
|
|
21
27
|
async getDeviceId() {
|
|
22
28
|
this.throwUnimplementedError();
|
|
23
29
|
}
|
|
30
|
+
async getNextBundle() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
24
33
|
async getVersionCode() {
|
|
25
34
|
this.throwUnimplementedError();
|
|
26
35
|
}
|
|
@@ -45,6 +54,9 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
45
54
|
async setCustomId(_options) {
|
|
46
55
|
this.throwUnimplementedError();
|
|
47
56
|
}
|
|
57
|
+
async setNextBundle(_options) {
|
|
58
|
+
this.throwUnimplementedError();
|
|
59
|
+
}
|
|
48
60
|
async sync() {
|
|
49
61
|
this.throwUnimplementedError();
|
|
50
62
|
}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
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,uBA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f,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"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -15,6 +15,9 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
15
15
|
async downloadBundle(_options) {
|
|
16
16
|
this.throwUnimplementedError();
|
|
17
17
|
}
|
|
18
|
+
async fetchLatestBundle() {
|
|
19
|
+
this.throwUnimplementedError();
|
|
20
|
+
}
|
|
18
21
|
async getBundle() {
|
|
19
22
|
this.throwUnimplementedError();
|
|
20
23
|
}
|
|
@@ -24,12 +27,18 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
24
27
|
async getChannel() {
|
|
25
28
|
this.throwUnimplementedError();
|
|
26
29
|
}
|
|
30
|
+
async getCurrentBundle() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
27
33
|
async getCustomId() {
|
|
28
34
|
this.throwUnimplementedError();
|
|
29
35
|
}
|
|
30
36
|
async getDeviceId() {
|
|
31
37
|
this.throwUnimplementedError();
|
|
32
38
|
}
|
|
39
|
+
async getNextBundle() {
|
|
40
|
+
this.throwUnimplementedError();
|
|
41
|
+
}
|
|
33
42
|
async getVersionCode() {
|
|
34
43
|
this.throwUnimplementedError();
|
|
35
44
|
}
|
|
@@ -54,6 +63,9 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
54
63
|
async setCustomId(_options) {
|
|
55
64
|
this.throwUnimplementedError();
|
|
56
65
|
}
|
|
66
|
+
async setNextBundle(_options) {
|
|
67
|
+
this.throwUnimplementedError();
|
|
68
|
+
}
|
|
57
69
|
async sync() {
|
|
58
70
|
this.throwUnimplementedError();
|
|
59
71
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -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 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,IAA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AE,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;AACvC,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,gBAAgB,GAAG;AAC7B,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,CA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(exports, core) {
|
|
|
12
12
|
async downloadBundle(_options) {
|
|
13
13
|
this.throwUnimplementedError();
|
|
14
14
|
}
|
|
15
|
+
async fetchLatestBundle() {
|
|
16
|
+
this.throwUnimplementedError();
|
|
17
|
+
}
|
|
15
18
|
async getBundle() {
|
|
16
19
|
this.throwUnimplementedError();
|
|
17
20
|
}
|
|
@@ -21,12 +24,18 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
21
24
|
async getChannel() {
|
|
22
25
|
this.throwUnimplementedError();
|
|
23
26
|
}
|
|
27
|
+
async getCurrentBundle() {
|
|
28
|
+
this.throwUnimplementedError();
|
|
29
|
+
}
|
|
24
30
|
async getCustomId() {
|
|
25
31
|
this.throwUnimplementedError();
|
|
26
32
|
}
|
|
27
33
|
async getDeviceId() {
|
|
28
34
|
this.throwUnimplementedError();
|
|
29
35
|
}
|
|
36
|
+
async getNextBundle() {
|
|
37
|
+
this.throwUnimplementedError();
|
|
38
|
+
}
|
|
30
39
|
async getVersionCode() {
|
|
31
40
|
this.throwUnimplementedError();
|
|
32
41
|
}
|
|
@@ -51,6 +60,9 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
51
60
|
async setCustomId(_options) {
|
|
52
61
|
this.throwUnimplementedError();
|
|
53
62
|
}
|
|
63
|
+
async setNextBundle(_options) {
|
|
64
|
+
this.throwUnimplementedError();
|
|
65
|
+
}
|
|
54
66
|
async sync() {
|
|
55
67
|
this.throwUnimplementedError();
|
|
56
68
|
}
|
package/dist/plugin.js.map
CHANGED
|
@@ -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 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,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,G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.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,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,CA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AI,MAAM,KAAK,GAAG;IAClB,QAAQ,IAAI,CAAC,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;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,16 +2,26 @@ import Foundation
|
|
|
2
2
|
import Capacitor
|
|
3
3
|
|
|
4
4
|
@objc public class DownloadBundleOptions: NSObject {
|
|
5
|
+
private var artifactType: ArtifactType
|
|
5
6
|
private var bundleId: String
|
|
6
7
|
private var checksum: String?
|
|
7
8
|
private var url: String
|
|
8
9
|
|
|
9
|
-
init(bundleId: String, checksum: String?, url: String) {
|
|
10
|
+
init(artifactType: String, bundleId: String, checksum: String?, url: String) {
|
|
11
|
+
if artifactType == "manifest" {
|
|
12
|
+
self.artifactType = .manifest
|
|
13
|
+
} else {
|
|
14
|
+
self.artifactType = .zip
|
|
15
|
+
}
|
|
10
16
|
self.bundleId = bundleId
|
|
11
17
|
self.checksum = checksum
|
|
12
18
|
self.url = url
|
|
13
19
|
}
|
|
14
20
|
|
|
21
|
+
func getArtifactType() -> ArtifactType {
|
|
22
|
+
return artifactType
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
func getBundleId() -> String {
|
|
16
26
|
return bundleId
|
|
17
27
|
}
|
|
@@ -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
|
+
}
|