@capawesome/capacitor-live-update 5.0.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/CapawesomeCapacitorLiveUpdate.podspec +20 -0
- package/LICENSE +21 -0
- package/README.md +509 -0
- package/android/build.gradle +62 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +613 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateConfig.java +55 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +437 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePreferences.java +86 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +23 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DeleteBundleOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DownloadBundleOptions.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetBundleOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetChannelOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetCustomIdOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBundleResult.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetChannelResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetCustomIdResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetDeviceIdResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetVersionCodeResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetVersionNameResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/SyncResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/Callback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/EmptyCallback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/NonEmptyCallback.java +7 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/Result.java +7 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +785 -0
- package/dist/esm/definitions.d.ts +356 -0
- package/dist/esm/definitions.js +3 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +21 -0
- package/dist/esm/web.js +55 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +71 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +74 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Classes/CustomError.swift +38 -0
- package/ios/Plugin/Classes/Options/DeleteBundleOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/DownloadBundleOptions.swift +20 -0
- package/ios/Plugin/Classes/Options/SetBundleOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SetChannelOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SetCustomIdOptions.swift +14 -0
- package/ios/Plugin/Classes/Results/GetBundleResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetChannelResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetCustomIdResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetDeviceIdResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetVersionCodeResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetVersionNameResult.swift +16 -0
- package/ios/Plugin/Classes/Results/SyncResult.swift +16 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/LiveUpdate.swift +512 -0
- package/ios/Plugin/LiveUpdateConfig.swift +7 -0
- package/ios/Plugin/LiveUpdatePlugin.h +10 -0
- package/ios/Plugin/LiveUpdatePlugin.m +23 -0
- package/ios/Plugin/LiveUpdatePlugin.swift +247 -0
- package/ios/Plugin/LiveUpdatePreferences.swift +60 -0
- package/ios/Plugin/Protocols/Api/GetLatestBundleResponse.swift +4 -0
- package/ios/Plugin/Protocols/Result.swift +6 -0
- package/package.json +92 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
declare module '@capacitor/cli' {
|
|
2
|
+
interface PluginsConfig {
|
|
3
|
+
LiveUpdate?: {
|
|
4
|
+
/**
|
|
5
|
+
* The app ID is used to identify the app when using [Capawesome Cloud](https://capawesome.io/cloud).
|
|
6
|
+
*
|
|
7
|
+
* @since 5.0.0
|
|
8
|
+
* @example '4100e356-e851-47fe-9d3c-b411eb325a99'
|
|
9
|
+
*/
|
|
10
|
+
appId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not to automatically delete unused bundles.
|
|
13
|
+
*
|
|
14
|
+
* When enabled, the plugin will automatically delete unused bundles after calling `ready()`.
|
|
15
|
+
*
|
|
16
|
+
* @since 5.0.0
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
autoDeleteBundles?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether or not the plugin is enabled.
|
|
22
|
+
*
|
|
23
|
+
* @since 5.0.0
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The timeout in milliseconds to wait for the app to be ready before resetting to the default bundle.
|
|
29
|
+
*
|
|
30
|
+
* @since 5.0.0
|
|
31
|
+
* @default 10000
|
|
32
|
+
*/
|
|
33
|
+
readyTimeout?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether or not the app should be reset to the default bundle during an update.
|
|
36
|
+
*
|
|
37
|
+
* @since 5.0.0
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
resetOnUpdate?: boolean;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export interface LiveUpdatePlugin {
|
|
45
|
+
/**
|
|
46
|
+
* Delete a bundle from the app.
|
|
47
|
+
*
|
|
48
|
+
* Only available on Android and iOS.
|
|
49
|
+
*
|
|
50
|
+
* @since 5.0.0
|
|
51
|
+
*/
|
|
52
|
+
deleteBundle(options: DeleteBundleOptions): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Download a bundle.
|
|
55
|
+
*
|
|
56
|
+
* Only available on Android and iOS.
|
|
57
|
+
*
|
|
58
|
+
* @since 5.0.0
|
|
59
|
+
*/
|
|
60
|
+
downloadBundle(options: DownloadBundleOptions): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Get the active bundle identifier.
|
|
63
|
+
*
|
|
64
|
+
* Only available on Android and iOS.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.0.0
|
|
67
|
+
*/
|
|
68
|
+
getBundle(): Promise<GetBundleResult>;
|
|
69
|
+
/**
|
|
70
|
+
* Get all available bundle identifiers.
|
|
71
|
+
*
|
|
72
|
+
* Only available on Android and iOS.
|
|
73
|
+
*
|
|
74
|
+
* @since 5.0.0
|
|
75
|
+
*/
|
|
76
|
+
getBundles(): Promise<GetBundlesResult>;
|
|
77
|
+
/**
|
|
78
|
+
* Get the channel of the app.
|
|
79
|
+
*
|
|
80
|
+
* Only available on Android and iOS.
|
|
81
|
+
*
|
|
82
|
+
* @since 5.0.0
|
|
83
|
+
*/
|
|
84
|
+
getChannel(): Promise<GetChannelResult>;
|
|
85
|
+
/**
|
|
86
|
+
* Get the custom identifier of the app.
|
|
87
|
+
*
|
|
88
|
+
* Only available on Android and iOS.
|
|
89
|
+
*
|
|
90
|
+
* @since 5.0.0
|
|
91
|
+
*/
|
|
92
|
+
getCustomId(): Promise<GetCustomIdResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Get the device identifier of the app.
|
|
95
|
+
*
|
|
96
|
+
* Only available on Android and iOS.
|
|
97
|
+
*
|
|
98
|
+
* @since 5.0.0
|
|
99
|
+
*/
|
|
100
|
+
getDeviceId(): Promise<GetDeviceIdResult>;
|
|
101
|
+
/**
|
|
102
|
+
* Get the version code of the app.
|
|
103
|
+
*
|
|
104
|
+
* Only available on Android and iOS.
|
|
105
|
+
*
|
|
106
|
+
* @since 5.0.0
|
|
107
|
+
*/
|
|
108
|
+
getVersionCode(): Promise<GetVersionCodeResult>;
|
|
109
|
+
/**
|
|
110
|
+
* Get the version name of the app.
|
|
111
|
+
*
|
|
112
|
+
* Only available on Android and iOS.
|
|
113
|
+
*
|
|
114
|
+
* @since 5.0.0
|
|
115
|
+
*/
|
|
116
|
+
getVersionName(): Promise<GetVersionNameResult>;
|
|
117
|
+
/**
|
|
118
|
+
* Notify the plugin that the app is ready to use and no rollback is needed.
|
|
119
|
+
*
|
|
120
|
+
* Only available on Android and iOS.
|
|
121
|
+
*
|
|
122
|
+
* @since 5.0.0
|
|
123
|
+
*/
|
|
124
|
+
ready(): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Reload the app to apply the new bundle.
|
|
127
|
+
*
|
|
128
|
+
* Only available on Android and iOS.
|
|
129
|
+
*
|
|
130
|
+
* @since 5.0.0
|
|
131
|
+
*/
|
|
132
|
+
reload(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Reset the app to the default bundle.
|
|
135
|
+
*
|
|
136
|
+
* Call `reload()` or restart the app to apply the changes.
|
|
137
|
+
*
|
|
138
|
+
* Only available on Android and iOS.
|
|
139
|
+
*
|
|
140
|
+
* @since 5.0.0
|
|
141
|
+
*/
|
|
142
|
+
reset(): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Set the next bundle to use for the app.
|
|
145
|
+
*
|
|
146
|
+
* Call `reload()` or restart the app to apply the changes.
|
|
147
|
+
*
|
|
148
|
+
* Only available on Android and iOS.
|
|
149
|
+
*
|
|
150
|
+
* @since 5.0.0
|
|
151
|
+
*/
|
|
152
|
+
setBundle(options: SetBundleOptions): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Set the channel of the app.
|
|
155
|
+
*
|
|
156
|
+
* Only available on Android and iOS.
|
|
157
|
+
*
|
|
158
|
+
* @since 5.0.0
|
|
159
|
+
*/
|
|
160
|
+
setChannel(options: SetChannelOptions): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Set the custom identifier of the app.
|
|
163
|
+
*
|
|
164
|
+
* Only available on Android and iOS.
|
|
165
|
+
*
|
|
166
|
+
* @since 5.0.0
|
|
167
|
+
*/
|
|
168
|
+
setCustomId(options: SetCustomIdOptions): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Automatically download and set the latest bundle for the app using the [Capawesome Cloud](https://capawesome.io/cloud/).
|
|
171
|
+
*
|
|
172
|
+
* Call `reload()` or restart the app to apply the changes.
|
|
173
|
+
*
|
|
174
|
+
* Only available on Android and iOS.
|
|
175
|
+
*
|
|
176
|
+
* @since 5.0.0
|
|
177
|
+
*/
|
|
178
|
+
sync(): Promise<SyncResult>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @since 5.0.0
|
|
182
|
+
*/
|
|
183
|
+
export interface DeleteBundleOptions {
|
|
184
|
+
/**
|
|
185
|
+
* The unique identifier of the bundle to delete.
|
|
186
|
+
*
|
|
187
|
+
* @since 5.0.0
|
|
188
|
+
* @example '1.0.0'
|
|
189
|
+
*/
|
|
190
|
+
bundleId: string;
|
|
191
|
+
}
|
|
192
|
+
export interface DownloadBundleOptions {
|
|
193
|
+
/**
|
|
194
|
+
* The URL of the bundle to download.
|
|
195
|
+
*
|
|
196
|
+
* The bundle must be a ZIP file containing at least a `index.html` file.
|
|
197
|
+
*
|
|
198
|
+
* @since 5.0.0
|
|
199
|
+
* @example 'https://example.com/bundle.zip'
|
|
200
|
+
*/
|
|
201
|
+
url: string;
|
|
202
|
+
/**
|
|
203
|
+
* The unique identifier of the bundle.
|
|
204
|
+
*
|
|
205
|
+
* @since 5.0.0
|
|
206
|
+
* @example '1.0.0'
|
|
207
|
+
*/
|
|
208
|
+
bundleId: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @since 5.0.0
|
|
212
|
+
*/
|
|
213
|
+
export interface GetBundleResult {
|
|
214
|
+
/**
|
|
215
|
+
* The unique identifier of the active bundle.
|
|
216
|
+
*
|
|
217
|
+
* If `null`, the default bundle is being used.
|
|
218
|
+
*
|
|
219
|
+
* @since 5.0.0
|
|
220
|
+
* @example '1.0.0'
|
|
221
|
+
*/
|
|
222
|
+
bundleId: string | null;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @since 5.0.0
|
|
226
|
+
*/
|
|
227
|
+
export interface GetBundlesResult {
|
|
228
|
+
/**
|
|
229
|
+
* An array of unique identifiers of all available bundles.
|
|
230
|
+
*
|
|
231
|
+
* @since 5.0.0
|
|
232
|
+
*/
|
|
233
|
+
bundleIds: string[];
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @since 5.0.0
|
|
237
|
+
*/
|
|
238
|
+
export interface GetChannelResult {
|
|
239
|
+
/**
|
|
240
|
+
* The channel of the app.
|
|
241
|
+
*
|
|
242
|
+
* If `null`, the app is using the default channel.
|
|
243
|
+
*
|
|
244
|
+
* @since 5.0.0
|
|
245
|
+
* @example 'production'
|
|
246
|
+
*/
|
|
247
|
+
channel: string | null;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @since 5.0.0
|
|
251
|
+
*/
|
|
252
|
+
export interface GetDeviceIdResult {
|
|
253
|
+
/**
|
|
254
|
+
* The unique identifier of the device.
|
|
255
|
+
*
|
|
256
|
+
* @since 5.0.0
|
|
257
|
+
*
|
|
258
|
+
* @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'
|
|
259
|
+
*/
|
|
260
|
+
deviceId: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @since 5.0.0
|
|
264
|
+
*/
|
|
265
|
+
export interface GetVersionCodeResult {
|
|
266
|
+
/**
|
|
267
|
+
* The version code of the app.
|
|
268
|
+
*
|
|
269
|
+
* On **Android**, this is the `versionCode` from the `android/app/build.gradle` file.
|
|
270
|
+
* On **iOS**, this is the `CFBundleVersion` from the `Info.plist` file.
|
|
271
|
+
*
|
|
272
|
+
* @since 5.0.0
|
|
273
|
+
* @example "1"
|
|
274
|
+
*/
|
|
275
|
+
versionCode: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* @since 5.0.0
|
|
279
|
+
*/
|
|
280
|
+
export interface GetVersionNameResult {
|
|
281
|
+
/**
|
|
282
|
+
* The version name of the app.
|
|
283
|
+
*
|
|
284
|
+
* On **Android**, this is the `versionName` from the `android/app/build.gradle` file.
|
|
285
|
+
* On **iOS**, this is the `CFBundleShortVersionString` from the `Info.plist` file.
|
|
286
|
+
*
|
|
287
|
+
* @since 5.0.0
|
|
288
|
+
* @example "1.0.0"
|
|
289
|
+
*/
|
|
290
|
+
versionName: string;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @since 5.0.0
|
|
294
|
+
*/
|
|
295
|
+
export interface GetCustomIdResult {
|
|
296
|
+
/**
|
|
297
|
+
* The custom identifier of the app.
|
|
298
|
+
*
|
|
299
|
+
* If `null`, no custom identifier is set.
|
|
300
|
+
*
|
|
301
|
+
* @since 5.0.0
|
|
302
|
+
* @example '50d2a548-80b7-4dad-adc7-97c0e79d8a89'
|
|
303
|
+
*/
|
|
304
|
+
customId: string | null;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* @since 5.0.0
|
|
308
|
+
*/
|
|
309
|
+
export interface SetBundleOptions {
|
|
310
|
+
/**
|
|
311
|
+
* The unique identifier of the bundle to use.
|
|
312
|
+
*
|
|
313
|
+
* @since 5.0.0
|
|
314
|
+
* @example '1.0.0'
|
|
315
|
+
*/
|
|
316
|
+
bundleId: string;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @since 5.0.0
|
|
320
|
+
*/
|
|
321
|
+
export interface SetChannelOptions {
|
|
322
|
+
/**
|
|
323
|
+
* The channel of the app.
|
|
324
|
+
*
|
|
325
|
+
* Set `null` to remove the channel.
|
|
326
|
+
*
|
|
327
|
+
* @since 5.0.0
|
|
328
|
+
*/
|
|
329
|
+
channel: string | null;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @since 5.0.0
|
|
333
|
+
*/
|
|
334
|
+
export interface SetCustomIdOptions {
|
|
335
|
+
/**
|
|
336
|
+
* The custom identifier of the app.
|
|
337
|
+
*
|
|
338
|
+
* Set `null` to remove the custom identifier.
|
|
339
|
+
*
|
|
340
|
+
* @since 5.0.0
|
|
341
|
+
*/
|
|
342
|
+
customId: string | null;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* @since 5.0.0
|
|
346
|
+
*/
|
|
347
|
+
export interface SyncResult {
|
|
348
|
+
/**
|
|
349
|
+
* The identifier of the next bundle to use.
|
|
350
|
+
*
|
|
351
|
+
* If `null`, the app is up-to-date and no new bundle is available.
|
|
352
|
+
*
|
|
353
|
+
* @since 5.0.0
|
|
354
|
+
*/
|
|
355
|
+
nextBundleId: string | null;
|
|
356
|
+
}
|
|
@@ -0,0 +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 * @since 5.0.0\n * @example '4100e356-e851-47fe-9d3c-b411eb325a99'\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 * 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 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 available bundle identifiers.\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 * 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 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 * The unique identifier of the bundle.\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 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 * @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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { LiveUpdatePlugin } from './definitions';\n\nconst LiveUpdate = registerPlugin<LiveUpdatePlugin>('LiveUpdate', {\n web: () => import('./web').then((m) => new m.LiveUpdateWeb()),\n});\n\nexport * from './definitions';\nexport { LiveUpdate };\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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';
|
|
3
|
+
export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {
|
|
4
|
+
deleteBundle(_options: DeleteBundleOptions): Promise<void>;
|
|
5
|
+
downloadBundle(_options: DownloadBundleOptions): Promise<void>;
|
|
6
|
+
getBundle(): Promise<GetBundleResult>;
|
|
7
|
+
getBundles(): Promise<GetBundlesResult>;
|
|
8
|
+
getChannel(): Promise<GetChannelResult>;
|
|
9
|
+
getCustomId(): Promise<GetCustomIdResult>;
|
|
10
|
+
getDeviceId(): Promise<GetDeviceIdResult>;
|
|
11
|
+
getVersionCode(): Promise<GetVersionCodeResult>;
|
|
12
|
+
getVersionName(): Promise<GetVersionNameResult>;
|
|
13
|
+
ready(): Promise<void>;
|
|
14
|
+
reload(): Promise<void>;
|
|
15
|
+
reset(): Promise<void>;
|
|
16
|
+
setBundle(_options: SetBundleOptions): Promise<void>;
|
|
17
|
+
setChannel(_options: SetChannelOptions): Promise<void>;
|
|
18
|
+
setCustomId(_options: SetCustomIdOptions): Promise<void>;
|
|
19
|
+
sync(): Promise<SyncResult>;
|
|
20
|
+
private throwUnimplementedError;
|
|
21
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class LiveUpdateWeb extends WebPlugin {
|
|
3
|
+
async deleteBundle(_options) {
|
|
4
|
+
this.throwUnimplementedError();
|
|
5
|
+
}
|
|
6
|
+
async downloadBundle(_options) {
|
|
7
|
+
this.throwUnimplementedError();
|
|
8
|
+
}
|
|
9
|
+
async getBundle() {
|
|
10
|
+
this.throwUnimplementedError();
|
|
11
|
+
}
|
|
12
|
+
async getBundles() {
|
|
13
|
+
this.throwUnimplementedError();
|
|
14
|
+
}
|
|
15
|
+
async getChannel() {
|
|
16
|
+
this.throwUnimplementedError();
|
|
17
|
+
}
|
|
18
|
+
async getCustomId() {
|
|
19
|
+
this.throwUnimplementedError();
|
|
20
|
+
}
|
|
21
|
+
async getDeviceId() {
|
|
22
|
+
this.throwUnimplementedError();
|
|
23
|
+
}
|
|
24
|
+
async getVersionCode() {
|
|
25
|
+
this.throwUnimplementedError();
|
|
26
|
+
}
|
|
27
|
+
async getVersionName() {
|
|
28
|
+
this.throwUnimplementedError();
|
|
29
|
+
}
|
|
30
|
+
async ready() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
33
|
+
async reload() {
|
|
34
|
+
this.throwUnimplementedError();
|
|
35
|
+
}
|
|
36
|
+
async reset() {
|
|
37
|
+
this.throwUnimplementedError();
|
|
38
|
+
}
|
|
39
|
+
async setBundle(_options) {
|
|
40
|
+
this.throwUnimplementedError();
|
|
41
|
+
}
|
|
42
|
+
async setChannel(_options) {
|
|
43
|
+
this.throwUnimplementedError();
|
|
44
|
+
}
|
|
45
|
+
async setCustomId(_options) {
|
|
46
|
+
this.throwUnimplementedError();
|
|
47
|
+
}
|
|
48
|
+
async sync() {
|
|
49
|
+
this.throwUnimplementedError();
|
|
50
|
+
}
|
|
51
|
+
throwUnimplementedError() {
|
|
52
|
+
throw this.unimplemented('Not implemented on web.');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAmB5C,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,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,WAAW;QACtB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW;QACtB,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,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 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 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"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@capacitor/core');
|
|
6
|
+
|
|
7
|
+
const LiveUpdate = core.registerPlugin('LiveUpdate', {
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LiveUpdateWeb()),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
class LiveUpdateWeb extends core.WebPlugin {
|
|
12
|
+
async deleteBundle(_options) {
|
|
13
|
+
this.throwUnimplementedError();
|
|
14
|
+
}
|
|
15
|
+
async downloadBundle(_options) {
|
|
16
|
+
this.throwUnimplementedError();
|
|
17
|
+
}
|
|
18
|
+
async getBundle() {
|
|
19
|
+
this.throwUnimplementedError();
|
|
20
|
+
}
|
|
21
|
+
async getBundles() {
|
|
22
|
+
this.throwUnimplementedError();
|
|
23
|
+
}
|
|
24
|
+
async getChannel() {
|
|
25
|
+
this.throwUnimplementedError();
|
|
26
|
+
}
|
|
27
|
+
async getCustomId() {
|
|
28
|
+
this.throwUnimplementedError();
|
|
29
|
+
}
|
|
30
|
+
async getDeviceId() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
33
|
+
async getVersionCode() {
|
|
34
|
+
this.throwUnimplementedError();
|
|
35
|
+
}
|
|
36
|
+
async getVersionName() {
|
|
37
|
+
this.throwUnimplementedError();
|
|
38
|
+
}
|
|
39
|
+
async ready() {
|
|
40
|
+
this.throwUnimplementedError();
|
|
41
|
+
}
|
|
42
|
+
async reload() {
|
|
43
|
+
this.throwUnimplementedError();
|
|
44
|
+
}
|
|
45
|
+
async reset() {
|
|
46
|
+
this.throwUnimplementedError();
|
|
47
|
+
}
|
|
48
|
+
async setBundle(_options) {
|
|
49
|
+
this.throwUnimplementedError();
|
|
50
|
+
}
|
|
51
|
+
async setChannel(_options) {
|
|
52
|
+
this.throwUnimplementedError();
|
|
53
|
+
}
|
|
54
|
+
async setCustomId(_options) {
|
|
55
|
+
this.throwUnimplementedError();
|
|
56
|
+
}
|
|
57
|
+
async sync() {
|
|
58
|
+
this.throwUnimplementedError();
|
|
59
|
+
}
|
|
60
|
+
throwUnimplementedError() {
|
|
61
|
+
throw this.unimplemented('Not implemented on web.');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
66
|
+
__proto__: null,
|
|
67
|
+
LiveUpdateWeb: LiveUpdateWeb
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
exports.LiveUpdate = LiveUpdate;
|
|
71
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +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,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,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;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var capacitorLiveUpdate = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const LiveUpdate = core.registerPlugin('LiveUpdate', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LiveUpdateWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class LiveUpdateWeb extends core.WebPlugin {
|
|
9
|
+
async deleteBundle(_options) {
|
|
10
|
+
this.throwUnimplementedError();
|
|
11
|
+
}
|
|
12
|
+
async downloadBundle(_options) {
|
|
13
|
+
this.throwUnimplementedError();
|
|
14
|
+
}
|
|
15
|
+
async getBundle() {
|
|
16
|
+
this.throwUnimplementedError();
|
|
17
|
+
}
|
|
18
|
+
async getBundles() {
|
|
19
|
+
this.throwUnimplementedError();
|
|
20
|
+
}
|
|
21
|
+
async getChannel() {
|
|
22
|
+
this.throwUnimplementedError();
|
|
23
|
+
}
|
|
24
|
+
async getCustomId() {
|
|
25
|
+
this.throwUnimplementedError();
|
|
26
|
+
}
|
|
27
|
+
async getDeviceId() {
|
|
28
|
+
this.throwUnimplementedError();
|
|
29
|
+
}
|
|
30
|
+
async getVersionCode() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
33
|
+
async getVersionName() {
|
|
34
|
+
this.throwUnimplementedError();
|
|
35
|
+
}
|
|
36
|
+
async ready() {
|
|
37
|
+
this.throwUnimplementedError();
|
|
38
|
+
}
|
|
39
|
+
async reload() {
|
|
40
|
+
this.throwUnimplementedError();
|
|
41
|
+
}
|
|
42
|
+
async reset() {
|
|
43
|
+
this.throwUnimplementedError();
|
|
44
|
+
}
|
|
45
|
+
async setBundle(_options) {
|
|
46
|
+
this.throwUnimplementedError();
|
|
47
|
+
}
|
|
48
|
+
async setChannel(_options) {
|
|
49
|
+
this.throwUnimplementedError();
|
|
50
|
+
}
|
|
51
|
+
async setCustomId(_options) {
|
|
52
|
+
this.throwUnimplementedError();
|
|
53
|
+
}
|
|
54
|
+
async sync() {
|
|
55
|
+
this.throwUnimplementedError();
|
|
56
|
+
}
|
|
57
|
+
throwUnimplementedError() {
|
|
58
|
+
throw this.unimplemented('Not implemented on web.');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
63
|
+
__proto__: null,
|
|
64
|
+
LiveUpdateWeb: LiveUpdateWeb
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
exports.LiveUpdate = LiveUpdate;
|
|
68
|
+
|
|
69
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
70
|
+
|
|
71
|
+
return exports;
|
|
72
|
+
|
|
73
|
+
})({}, capacitorExports);
|
|
74
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +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,GAAG;IACvB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,KAAK,GAAG;IAClB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACvC,KAAK;IACL,IAAI,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,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;;;;;;;;;;;;;;;;;"}
|