@capgo/capacitor-updater 4.17.37 → 4.17.38
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 +13 -13
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1 -1
- package/dist/docs.json +18 -18
- package/dist/esm/definitions.d.ts +13 -13
- package/dist/esm/web.d.ts +4 -4
- package/dist/esm/web.js +6 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +6 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +6 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/BundleInfo.swift +10 -10
- package/ios/Plugin/BundleStatus.swift +1 -1
- package/ios/Plugin/CapacitorUpdater.swift +88 -90
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +87 -83
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -347,12 +347,12 @@ Cancel delay to updates as usual
|
|
|
347
347
|
### getLatest()
|
|
348
348
|
|
|
349
349
|
```typescript
|
|
350
|
-
getLatest() => Promise<
|
|
350
|
+
getLatest() => Promise<latestVersion>
|
|
351
351
|
```
|
|
352
352
|
|
|
353
353
|
Get Latest bundle available from update Url
|
|
354
354
|
|
|
355
|
-
**Returns:** <code>Promise<<a href="#latestversion">
|
|
355
|
+
**Returns:** <code>Promise<<a href="#latestversion">latestVersion</a>></code>
|
|
356
356
|
|
|
357
357
|
**Since:** 4.0.0
|
|
358
358
|
|
|
@@ -362,7 +362,7 @@ Get Latest bundle available from update Url
|
|
|
362
362
|
### setChannel(...)
|
|
363
363
|
|
|
364
364
|
```typescript
|
|
365
|
-
setChannel(options: SetChannelOptions) => Promise<
|
|
365
|
+
setChannel(options: SetChannelOptions) => Promise<channelRes>
|
|
366
366
|
```
|
|
367
367
|
|
|
368
368
|
Set Channel for this device
|
|
@@ -371,7 +371,7 @@ Set Channel for this device
|
|
|
371
371
|
| ------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
372
372
|
| **`options`** | <code><a href="#setchanneloptions">SetChannelOptions</a></code> | is the {@link <a href="#setchanneloptions">SetChannelOptions</a>} channel to set |
|
|
373
373
|
|
|
374
|
-
**Returns:** <code>Promise<<a href="#channelres">
|
|
374
|
+
**Returns:** <code>Promise<<a href="#channelres">channelRes</a>></code>
|
|
375
375
|
|
|
376
376
|
**Since:** 4.7.0
|
|
377
377
|
|
|
@@ -381,12 +381,12 @@ Set Channel for this device
|
|
|
381
381
|
### getChannel()
|
|
382
382
|
|
|
383
383
|
```typescript
|
|
384
|
-
getChannel() => Promise<
|
|
384
|
+
getChannel() => Promise<getChannelRes>
|
|
385
385
|
```
|
|
386
386
|
|
|
387
387
|
get Channel for this device
|
|
388
388
|
|
|
389
|
-
**Returns:** <code>Promise<<a href="#getchannelres">
|
|
389
|
+
**Returns:** <code>Promise<<a href="#getchannelres">getChannelRes</a>></code>
|
|
390
390
|
|
|
391
391
|
**Since:** 4.8.0
|
|
392
392
|
|
|
@@ -631,7 +631,7 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
631
631
|
| **`value`** | <code>string</code> | |
|
|
632
632
|
|
|
633
633
|
|
|
634
|
-
####
|
|
634
|
+
#### latestVersion
|
|
635
635
|
|
|
636
636
|
| Prop | Type | Description | Since |
|
|
637
637
|
| ------------- | -------------------- | ----------------------- | ----- |
|
|
@@ -643,7 +643,7 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
643
643
|
| **`url`** | <code>string</code> | | |
|
|
644
644
|
|
|
645
645
|
|
|
646
|
-
####
|
|
646
|
+
#### channelRes
|
|
647
647
|
|
|
648
648
|
| Prop | Type | Description | Since |
|
|
649
649
|
| ------------- | ------------------- | ----------------------------- | ----- |
|
|
@@ -659,7 +659,7 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
659
659
|
| **`channel`** | <code>string</code> |
|
|
660
660
|
|
|
661
661
|
|
|
662
|
-
####
|
|
662
|
+
#### getChannelRes
|
|
663
663
|
|
|
664
664
|
| Prop | Type | Description | Since |
|
|
665
665
|
| -------------- | -------------------- | ----------------------------- | ----- |
|
|
@@ -692,14 +692,14 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
692
692
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | | |
|
|
693
693
|
|
|
694
694
|
|
|
695
|
-
####
|
|
695
|
+
#### noNeedEvent
|
|
696
696
|
|
|
697
697
|
| Prop | Type | Description | Since |
|
|
698
698
|
| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |
|
|
699
699
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Current status of download, between 0 and 100. | 4.0.0 |
|
|
700
700
|
|
|
701
701
|
|
|
702
|
-
####
|
|
702
|
+
#### updateAvailableEvent
|
|
703
703
|
|
|
704
704
|
| Prop | Type | Description | Since |
|
|
705
705
|
| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |
|
|
@@ -754,12 +754,12 @@ Get the state of auto update config. This will return `false` in manual mode.
|
|
|
754
754
|
|
|
755
755
|
#### NoNeedListener
|
|
756
756
|
|
|
757
|
-
<code>(state: <a href="#noneedevent">
|
|
757
|
+
<code>(state: <a href="#noneedevent">noNeedEvent</a>): void</code>
|
|
758
758
|
|
|
759
759
|
|
|
760
760
|
#### UpdateAvailabledListener
|
|
761
761
|
|
|
762
|
-
<code>(state: <a href="#updateavailableevent">
|
|
762
|
+
<code>(state: <a href="#updateavailableevent">updateAvailableEvent</a>): void</code>
|
|
763
763
|
|
|
764
764
|
|
|
765
765
|
#### DownloadCompleteListener
|
|
@@ -49,7 +49,7 @@ public class CapacitorUpdaterPlugin
|
|
|
49
49
|
private static final String channelUrlDefault =
|
|
50
50
|
"https://api.capgo.app/channel_self";
|
|
51
51
|
|
|
52
|
-
private final String PLUGIN_VERSION = "4.17.
|
|
52
|
+
private final String PLUGIN_VERSION = "4.17.38";
|
|
53
53
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
54
54
|
|
|
55
55
|
private SharedPreferences.Editor editor;
|
package/dist/docs.json
CHANGED
|
@@ -351,9 +351,9 @@
|
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
"name": "getLatest",
|
|
354
|
-
"signature": "() => Promise<
|
|
354
|
+
"signature": "() => Promise<latestVersion>",
|
|
355
355
|
"parameters": [],
|
|
356
|
-
"returns": "Promise<
|
|
356
|
+
"returns": "Promise<latestVersion>",
|
|
357
357
|
"tags": [
|
|
358
358
|
{
|
|
359
359
|
"name": "returns",
|
|
@@ -370,13 +370,13 @@
|
|
|
370
370
|
],
|
|
371
371
|
"docs": "Get Latest bundle available from update Url",
|
|
372
372
|
"complexTypes": [
|
|
373
|
-
"
|
|
373
|
+
"latestVersion"
|
|
374
374
|
],
|
|
375
375
|
"slug": "getlatest"
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
"name": "setChannel",
|
|
379
|
-
"signature": "(options: SetChannelOptions) => Promise<
|
|
379
|
+
"signature": "(options: SetChannelOptions) => Promise<channelRes>",
|
|
380
380
|
"parameters": [
|
|
381
381
|
{
|
|
382
382
|
"name": "options",
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
"type": "SetChannelOptions"
|
|
385
385
|
}
|
|
386
386
|
],
|
|
387
|
-
"returns": "Promise<
|
|
387
|
+
"returns": "Promise<channelRes>",
|
|
388
388
|
"tags": [
|
|
389
389
|
{
|
|
390
390
|
"name": "returns",
|
|
@@ -405,16 +405,16 @@
|
|
|
405
405
|
],
|
|
406
406
|
"docs": "Set Channel for this device",
|
|
407
407
|
"complexTypes": [
|
|
408
|
-
"
|
|
408
|
+
"channelRes",
|
|
409
409
|
"SetChannelOptions"
|
|
410
410
|
],
|
|
411
411
|
"slug": "setchannel"
|
|
412
412
|
},
|
|
413
413
|
{
|
|
414
414
|
"name": "getChannel",
|
|
415
|
-
"signature": "() => Promise<
|
|
415
|
+
"signature": "() => Promise<getChannelRes>",
|
|
416
416
|
"parameters": [],
|
|
417
|
-
"returns": "Promise<
|
|
417
|
+
"returns": "Promise<getChannelRes>",
|
|
418
418
|
"tags": [
|
|
419
419
|
{
|
|
420
420
|
"name": "returns",
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
],
|
|
432
432
|
"docs": "get Channel for this device",
|
|
433
433
|
"complexTypes": [
|
|
434
|
-
"
|
|
434
|
+
"getChannelRes"
|
|
435
435
|
],
|
|
436
436
|
"slug": "getchannel"
|
|
437
437
|
},
|
|
@@ -844,7 +844,7 @@
|
|
|
844
844
|
]
|
|
845
845
|
},
|
|
846
846
|
{
|
|
847
|
-
"name": "
|
|
847
|
+
"name": "latestVersion",
|
|
848
848
|
"slug": "latestversion",
|
|
849
849
|
"docs": "",
|
|
850
850
|
"tags": [],
|
|
@@ -900,7 +900,7 @@
|
|
|
900
900
|
]
|
|
901
901
|
},
|
|
902
902
|
{
|
|
903
|
-
"name": "
|
|
903
|
+
"name": "channelRes",
|
|
904
904
|
"slug": "channelres",
|
|
905
905
|
"docs": "",
|
|
906
906
|
"tags": [],
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
]
|
|
952
952
|
},
|
|
953
953
|
{
|
|
954
|
-
"name": "
|
|
954
|
+
"name": "getChannelRes",
|
|
955
955
|
"slug": "getchannelres",
|
|
956
956
|
"docs": "",
|
|
957
957
|
"tags": [],
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
]
|
|
1063
1063
|
},
|
|
1064
1064
|
{
|
|
1065
|
-
"name": "
|
|
1065
|
+
"name": "noNeedEvent",
|
|
1066
1066
|
"slug": "noneedevent",
|
|
1067
1067
|
"docs": "",
|
|
1068
1068
|
"tags": [],
|
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
]
|
|
1086
1086
|
},
|
|
1087
1087
|
{
|
|
1088
|
-
"name": "
|
|
1088
|
+
"name": "updateAvailableEvent",
|
|
1089
1089
|
"slug": "updateavailableevent",
|
|
1090
1090
|
"docs": "",
|
|
1091
1091
|
"tags": [],
|
|
@@ -1263,9 +1263,9 @@
|
|
|
1263
1263
|
"docs": "",
|
|
1264
1264
|
"types": [
|
|
1265
1265
|
{
|
|
1266
|
-
"text": "(state:
|
|
1266
|
+
"text": "(state: noNeedEvent): void",
|
|
1267
1267
|
"complexTypes": [
|
|
1268
|
-
"
|
|
1268
|
+
"noNeedEvent"
|
|
1269
1269
|
]
|
|
1270
1270
|
}
|
|
1271
1271
|
]
|
|
@@ -1276,9 +1276,9 @@
|
|
|
1276
1276
|
"docs": "",
|
|
1277
1277
|
"types": [
|
|
1278
1278
|
{
|
|
1279
|
-
"text": "(state:
|
|
1279
|
+
"text": "(state: updateAvailableEvent): void",
|
|
1280
1280
|
"complexTypes": [
|
|
1281
|
-
"
|
|
1281
|
+
"updateAvailableEvent"
|
|
1282
1282
|
]
|
|
1283
1283
|
}
|
|
1284
1284
|
]
|
|
@@ -79,7 +79,7 @@ declare module "@capacitor/cli" {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
export interface
|
|
82
|
+
export interface noNeedEvent {
|
|
83
83
|
/**
|
|
84
84
|
* Current status of download, between 0 and 100.
|
|
85
85
|
*
|
|
@@ -87,7 +87,7 @@ export interface NoNeedEvent {
|
|
|
87
87
|
*/
|
|
88
88
|
bundle: BundleInfo;
|
|
89
89
|
}
|
|
90
|
-
export interface
|
|
90
|
+
export interface updateAvailableEvent {
|
|
91
91
|
/**
|
|
92
92
|
* Current status of download, between 0 and 100.
|
|
93
93
|
*
|
|
@@ -95,7 +95,7 @@ export interface UpdateAvailableEvent {
|
|
|
95
95
|
*/
|
|
96
96
|
bundle: BundleInfo;
|
|
97
97
|
}
|
|
98
|
-
export interface
|
|
98
|
+
export interface channelRes {
|
|
99
99
|
/**
|
|
100
100
|
* Current status of set channel
|
|
101
101
|
*
|
|
@@ -105,7 +105,7 @@ export interface ChannelRes {
|
|
|
105
105
|
error?: any;
|
|
106
106
|
message?: any;
|
|
107
107
|
}
|
|
108
|
-
export interface
|
|
108
|
+
export interface getChannelRes {
|
|
109
109
|
/**
|
|
110
110
|
* Current status of get channel
|
|
111
111
|
*
|
|
@@ -158,7 +158,7 @@ export interface UpdateFailedEvent {
|
|
|
158
158
|
*/
|
|
159
159
|
bundle: BundleInfo;
|
|
160
160
|
}
|
|
161
|
-
export interface
|
|
161
|
+
export interface latestVersion {
|
|
162
162
|
/**
|
|
163
163
|
* Res of getLatest method
|
|
164
164
|
*
|
|
@@ -195,8 +195,8 @@ export interface DelayCondition {
|
|
|
195
195
|
export type BundleStatus = "success" | "error" | "pending" | "downloading";
|
|
196
196
|
export type DelayUntilNext = "background" | "kill" | "nativeVersion" | "date";
|
|
197
197
|
export type DownloadChangeListener = (state: DownloadEvent) => void;
|
|
198
|
-
export type NoNeedListener = (state:
|
|
199
|
-
export type UpdateAvailabledListener = (state:
|
|
198
|
+
export type NoNeedListener = (state: noNeedEvent) => void;
|
|
199
|
+
export type UpdateAvailabledListener = (state: updateAvailableEvent) => void;
|
|
200
200
|
export type DownloadFailedListener = (state: DownloadFailedEvent) => void;
|
|
201
201
|
export type DownloadCompleteListener = (state: DownloadCompleteEvent) => void;
|
|
202
202
|
export type MajorAvailableListener = (state: MajorAvailableEvent) => void;
|
|
@@ -335,28 +335,28 @@ export interface CapacitorUpdaterPlugin {
|
|
|
335
335
|
/**
|
|
336
336
|
* Get Latest bundle available from update Url
|
|
337
337
|
*
|
|
338
|
-
* @returns {Promise<
|
|
338
|
+
* @returns {Promise<latestVersion>} an Promise resolved when url is loaded
|
|
339
339
|
* @throws An error if the something went wrong
|
|
340
340
|
* @since 4.0.0
|
|
341
341
|
*/
|
|
342
|
-
getLatest(): Promise<
|
|
342
|
+
getLatest(): Promise<latestVersion>;
|
|
343
343
|
/**
|
|
344
344
|
* Set Channel for this device
|
|
345
345
|
*
|
|
346
|
-
* @returns {Promise<
|
|
346
|
+
* @returns {Promise<channelRes>} an Promise resolved when channel is set
|
|
347
347
|
* @param options is the {@link SetChannelOptions} channel to set
|
|
348
348
|
* @throws An error if the something went wrong
|
|
349
349
|
* @since 4.7.0
|
|
350
350
|
*/
|
|
351
|
-
setChannel(options: SetChannelOptions): Promise<
|
|
351
|
+
setChannel(options: SetChannelOptions): Promise<channelRes>;
|
|
352
352
|
/**
|
|
353
353
|
* get Channel for this device
|
|
354
354
|
*
|
|
355
|
-
* @returns {Promise<
|
|
355
|
+
* @returns {Promise<channelRes>} an Promise resolved with channel info
|
|
356
356
|
* @throws An error if the something went wrong
|
|
357
357
|
* @since 4.8.0
|
|
358
358
|
*/
|
|
359
|
-
getChannel(): Promise<
|
|
359
|
+
getChannel(): Promise<getChannelRes>;
|
|
360
360
|
/**
|
|
361
361
|
* Set Channel for this device
|
|
362
362
|
*
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WebPlugin } from "@capacitor/core";
|
|
2
|
-
import type { CapacitorUpdaterPlugin, BundleInfo,
|
|
2
|
+
import type { CapacitorUpdaterPlugin, BundleInfo, latestVersion, DelayCondition, channelRes, SetChannelOptions, getChannelRes, SetCustomIdOptions } from "./definitions";
|
|
3
3
|
export declare class CapacitorUpdaterWeb extends WebPlugin implements CapacitorUpdaterPlugin {
|
|
4
4
|
download(options: {
|
|
5
5
|
url: string;
|
|
@@ -34,10 +34,10 @@ export declare class CapacitorUpdaterWeb extends WebPlugin implements CapacitorU
|
|
|
34
34
|
native: string;
|
|
35
35
|
}>;
|
|
36
36
|
reload(): Promise<void>;
|
|
37
|
-
getLatest(): Promise<
|
|
38
|
-
setChannel(options: SetChannelOptions): Promise<
|
|
37
|
+
getLatest(): Promise<latestVersion>;
|
|
38
|
+
setChannel(options: SetChannelOptions): Promise<channelRes>;
|
|
39
39
|
setCustomId(options: SetCustomIdOptions): Promise<void>;
|
|
40
|
-
getChannel(): Promise<
|
|
40
|
+
getChannel(): Promise<getChannelRes>;
|
|
41
41
|
notifyAppReady(): Promise<BundleInfo>;
|
|
42
42
|
setMultiDelay(options: {
|
|
43
43
|
delayConditions: DelayCondition[];
|
package/dist/esm/web.js
CHANGED
|
@@ -21,6 +21,7 @@ export class CapacitorUpdaterWeb extends WebPlugin {
|
|
|
21
21
|
}
|
|
22
22
|
async set(options) {
|
|
23
23
|
console.warn("Cannot set active bundle in web", options);
|
|
24
|
+
return;
|
|
24
25
|
}
|
|
25
26
|
async getDeviceId() {
|
|
26
27
|
console.warn("Cannot get ID in web");
|
|
@@ -46,6 +47,7 @@ export class CapacitorUpdaterWeb extends WebPlugin {
|
|
|
46
47
|
}
|
|
47
48
|
async reload() {
|
|
48
49
|
console.warn("Cannot reload current bundle in web");
|
|
50
|
+
return;
|
|
49
51
|
}
|
|
50
52
|
async getLatest() {
|
|
51
53
|
console.warn("Cannot getLatest current bundle in web");
|
|
@@ -63,6 +65,7 @@ export class CapacitorUpdaterWeb extends WebPlugin {
|
|
|
63
65
|
}
|
|
64
66
|
async setCustomId(options) {
|
|
65
67
|
console.warn("Cannot setCustomId in web", options);
|
|
68
|
+
return;
|
|
66
69
|
}
|
|
67
70
|
async getChannel() {
|
|
68
71
|
console.warn("Cannot getChannel in web");
|
|
@@ -77,12 +80,15 @@ export class CapacitorUpdaterWeb extends WebPlugin {
|
|
|
77
80
|
}
|
|
78
81
|
async setMultiDelay(options) {
|
|
79
82
|
console.warn("Cannot setMultiDelay in web", options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
83
|
+
return;
|
|
80
84
|
}
|
|
81
85
|
async setDelay(option) {
|
|
82
86
|
console.warn("Cannot setDelay in web", option);
|
|
87
|
+
return;
|
|
83
88
|
}
|
|
84
89
|
async cancelDelay() {
|
|
85
90
|
console.warn("Cannot cancelDelay in web");
|
|
91
|
+
return;
|
|
86
92
|
}
|
|
87
93
|
}
|
|
88
94
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.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28
28
|
}
|
|
29
29
|
async set(options) {
|
|
30
30
|
console.warn("Cannot set active bundle in web", options);
|
|
31
|
+
return;
|
|
31
32
|
}
|
|
32
33
|
async getDeviceId() {
|
|
33
34
|
console.warn("Cannot get ID in web");
|
|
@@ -53,6 +54,7 @@ class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
|
53
54
|
}
|
|
54
55
|
async reload() {
|
|
55
56
|
console.warn("Cannot reload current bundle in web");
|
|
57
|
+
return;
|
|
56
58
|
}
|
|
57
59
|
async getLatest() {
|
|
58
60
|
console.warn("Cannot getLatest current bundle in web");
|
|
@@ -70,6 +72,7 @@ class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
|
70
72
|
}
|
|
71
73
|
async setCustomId(options) {
|
|
72
74
|
console.warn("Cannot setCustomId in web", options);
|
|
75
|
+
return;
|
|
73
76
|
}
|
|
74
77
|
async getChannel() {
|
|
75
78
|
console.warn("Cannot getChannel in web");
|
|
@@ -84,12 +87,15 @@ class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
|
84
87
|
}
|
|
85
88
|
async setMultiDelay(options) {
|
|
86
89
|
console.warn("Cannot setMultiDelay in web", options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
90
|
+
return;
|
|
87
91
|
}
|
|
88
92
|
async setDelay(option) {
|
|
89
93
|
console.warn("Cannot setDelay in web", option);
|
|
94
|
+
return;
|
|
90
95
|
}
|
|
91
96
|
async cancelDelay() {
|
|
92
97
|
console.warn("Cannot cancelDelay in web");
|
|
98
|
+
return;
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
|
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 CapacitorUpdater = registerPlugin(\"CapacitorUpdater\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorUpdaterWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorUpdater };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nconst BUNDLE_BUILTIN = {\n status: \"success\",\n version: \"\",\n downloaded: \"1970-01-01T00:00:00.000Z\",\n id: \"builtin\",\n checksum: \"\",\n};\nexport class CapacitorUpdaterWeb extends WebPlugin {\n async download(options) {\n console.warn(\"Cannot download version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async next(options) {\n console.warn(\"Cannot set next version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async isAutoUpdateEnabled() {\n console.warn(\"Cannot get isAutoUpdateEnabled in web\");\n return { enabled: false };\n }\n async set(options) {\n console.warn(\"Cannot set active bundle in web\", options);\n }\n async getDeviceId() {\n console.warn(\"Cannot get ID in web\");\n return { deviceId: \"default\" };\n }\n async getPluginVersion() {\n console.warn(\"Cannot get plugin version in web\");\n return { version: \"default\" };\n }\n async delete(options) {\n console.warn(\"Cannot delete bundle in web\", options);\n }\n async list() {\n console.warn(\"Cannot list bundles in web\");\n return { bundles: [] };\n }\n async reset(options) {\n console.warn(\"Cannot reset version in web\", options);\n }\n async current() {\n console.warn(\"Cannot get current bundle in web\");\n return { bundle: BUNDLE_BUILTIN, native: \"0.0.0\" };\n }\n async reload() {\n console.warn(\"Cannot reload current bundle in web\");\n }\n async getLatest() {\n console.warn(\"Cannot getLatest current bundle in web\");\n return {\n version: \"0.0.0\",\n message: \"Cannot getLatest current bundle in web\",\n };\n }\n async setChannel(options) {\n console.warn(\"Cannot setChannel in web\", options);\n return {\n status: \"error\",\n error: \"Cannot setChannel in web\",\n };\n }\n async setCustomId(options) {\n console.warn(\"Cannot setCustomId in web\", options);\n }\n async getChannel() {\n console.warn(\"Cannot getChannel in web\");\n return {\n status: \"error\",\n error: \"Cannot getChannel in web\",\n };\n }\n async notifyAppReady() {\n console.warn(\"Cannot notify App Ready in web\");\n return BUNDLE_BUILTIN;\n }\n async setMultiDelay(options) {\n console.warn(\"Cannot setMultiDelay in web\", options === null || options === void 0 ? void 0 : options.delayConditions);\n }\n async setDelay(option) {\n console.warn(\"Cannot setDelay in web\", option);\n }\n async cancelDelay() {\n console.warn(\"Cannot cancelDelay in web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACvE,CAAC;;ACFD,MAAM,cAAc,GAAG;AACvB,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,UAAU,EAAE,0BAA0B;AAC1C,IAAI,EAAE,EAAE,SAAS;AACjB,IAAI,QAAQ,EAAE,EAAE;AAChB,CAAC,CAAC;AACK,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AAChE,QAAQ,OAAO,cAAc,CAAC;AAC9B,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AAChE,QAAQ,OAAO,cAAc,CAAC;AAC9B,KAAK;AACL,IAAI,MAAM,mBAAmB,GAAG;AAChC,QAAQ,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;AAC9D,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAClC,KAAK;AACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;AACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;AACjE,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ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AC,0BAA0B,EAAE,OAAO,CAAC,CAAC;AAC1D,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,OAAO;AAC3B,YAAY,KAAK,EAAE,0BAA0B;AAC7C,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;AAC3D,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AACjD,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,OAAO;AAC3B,YAAY,KAAK,EAAE,0BAA0B;AAC7C,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;AACvD,QAAQ,OAAO,cAAc,CAAC;AAC9B,KAAK;AACL,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;AACjC,QAAQ,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC/H,KAAK;AACL,IAAI,MAAM,QAAQ,CAAC,MAAM,EAAE;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;AACvD,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AAClD,KAAK;AACL;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst CapacitorUpdater = registerPlugin(\"CapacitorUpdater\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorUpdaterWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorUpdater };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nconst BUNDLE_BUILTIN = {\n status: \"success\",\n version: \"\",\n downloaded: \"1970-01-01T00:00:00.000Z\",\n id: \"builtin\",\n checksum: \"\",\n};\nexport class CapacitorUpdaterWeb extends WebPlugin {\n async download(options) {\n console.warn(\"Cannot download version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async next(options) {\n console.warn(\"Cannot set next version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async isAutoUpdateEnabled() {\n console.warn(\"Cannot get isAutoUpdateEnabled in web\");\n return { enabled: false };\n }\n async set(options) {\n console.warn(\"Cannot set active bundle in web\", options);\n return;\n }\n async getDeviceId() {\n console.warn(\"Cannot get ID in web\");\n return { deviceId: \"default\" };\n }\n async getPluginVersion() {\n console.warn(\"Cannot get plugin version in web\");\n return { version: \"default\" };\n }\n async delete(options) {\n console.warn(\"Cannot delete bundle in web\", options);\n }\n async list() {\n console.warn(\"Cannot list bundles in web\");\n return { bundles: [] };\n }\n async reset(options) {\n console.warn(\"Cannot reset version in web\", options);\n }\n async current() {\n console.warn(\"Cannot get current bundle in web\");\n return { bundle: BUNDLE_BUILTIN, native: \"0.0.0\" };\n }\n async reload() {\n console.warn(\"Cannot reload current bundle in web\");\n return;\n }\n async getLatest() {\n console.warn(\"Cannot getLatest current bundle in web\");\n return {\n version: \"0.0.0\",\n message: \"Cannot getLatest current bundle in web\",\n };\n }\n async setChannel(options) {\n console.warn(\"Cannot setChannel in web\", options);\n return {\n status: \"error\",\n error: \"Cannot setChannel in web\",\n };\n }\n async setCustomId(options) {\n console.warn(\"Cannot setCustomId in web\", options);\n return;\n }\n async getChannel() {\n console.warn(\"Cannot getChannel in web\");\n return {\n status: \"error\",\n error: \"Cannot getChannel in web\",\n };\n }\n async notifyAppReady() {\n console.warn(\"Cannot notify App Ready in web\");\n return BUNDLE_BUILTIN;\n }\n async setMultiDelay(options) {\n console.warn(\"Cannot setMultiDelay in web\", options === null || options === void 0 ? void 0 : options.delayConditions);\n return;\n }\n async setDelay(option) {\n console.warn(\"Cannot setDelay in web\", option);\n return;\n }\n async cancelDelay() {\n console.warn(\"Cannot cancelDelay in web\");\n return;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACvE,CAAC;;ACFD,MAAM,cAAc,GAAG;AACvB,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,UAAU,EAAE,0BAA0B;AAC1C,IAAI,EAAE,EAAE,SAAS;AACjB,IAAI,QAAQ,EAAE,EAAE;AAChB,CAAC,CAAC;AACK,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AAChE,QAAQ,OAAO,cAAc,CAAC;AAC9B,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AAChE,QAAQ,OAAO,cAAc,CAAC;AAC9B,KAAK;AACL,IAAI,MAAM,mBAAmB,GAAG;AAChC,QAAQ,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;AAC9D,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAClC,KAAK;AACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;AACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;AACj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GED
|
@@ -27,6 +27,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
27
27
|
}
|
|
28
28
|
async set(options) {
|
|
29
29
|
console.warn("Cannot set active bundle in web", options);
|
|
30
|
+
return;
|
|
30
31
|
}
|
|
31
32
|
async getDeviceId() {
|
|
32
33
|
console.warn("Cannot get ID in web");
|
|
@@ -52,6 +53,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
52
53
|
}
|
|
53
54
|
async reload() {
|
|
54
55
|
console.warn("Cannot reload current bundle in web");
|
|
56
|
+
return;
|
|
55
57
|
}
|
|
56
58
|
async getLatest() {
|
|
57
59
|
console.warn("Cannot getLatest current bundle in web");
|
|
@@ -69,6 +71,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
69
71
|
}
|
|
70
72
|
async setCustomId(options) {
|
|
71
73
|
console.warn("Cannot setCustomId in web", options);
|
|
74
|
+
return;
|
|
72
75
|
}
|
|
73
76
|
async getChannel() {
|
|
74
77
|
console.warn("Cannot getChannel in web");
|
|
@@ -83,12 +86,15 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
83
86
|
}
|
|
84
87
|
async setMultiDelay(options) {
|
|
85
88
|
console.warn("Cannot setMultiDelay in web", options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
89
|
+
return;
|
|
86
90
|
}
|
|
87
91
|
async setDelay(option) {
|
|
88
92
|
console.warn("Cannot setDelay in web", option);
|
|
93
|
+
return;
|
|
89
94
|
}
|
|
90
95
|
async cancelDelay() {
|
|
91
96
|
console.warn("Cannot cancelDelay in web");
|
|
97
|
+
return;
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
100
|
|
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 CapacitorUpdater = registerPlugin(\"CapacitorUpdater\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorUpdaterWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorUpdater };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nconst BUNDLE_BUILTIN = {\n status: \"success\",\n version: \"\",\n downloaded: \"1970-01-01T00:00:00.000Z\",\n id: \"builtin\",\n checksum: \"\",\n};\nexport class CapacitorUpdaterWeb extends WebPlugin {\n async download(options) {\n console.warn(\"Cannot download version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async next(options) {\n console.warn(\"Cannot set next version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async isAutoUpdateEnabled() {\n console.warn(\"Cannot get isAutoUpdateEnabled in web\");\n return { enabled: false };\n }\n async set(options) {\n console.warn(\"Cannot set active bundle in web\", options);\n }\n async getDeviceId() {\n console.warn(\"Cannot get ID in web\");\n return { deviceId: \"default\" };\n }\n async getPluginVersion() {\n console.warn(\"Cannot get plugin version in web\");\n return { version: \"default\" };\n }\n async delete(options) {\n console.warn(\"Cannot delete bundle in web\", options);\n }\n async list() {\n console.warn(\"Cannot list bundles in web\");\n return { bundles: [] };\n }\n async reset(options) {\n console.warn(\"Cannot reset version in web\", options);\n }\n async current() {\n console.warn(\"Cannot get current bundle in web\");\n return { bundle: BUNDLE_BUILTIN, native: \"0.0.0\" };\n }\n async reload() {\n console.warn(\"Cannot reload current bundle in web\");\n }\n async getLatest() {\n console.warn(\"Cannot getLatest current bundle in web\");\n return {\n version: \"0.0.0\",\n message: \"Cannot getLatest current bundle in web\",\n };\n }\n async setChannel(options) {\n console.warn(\"Cannot setChannel in web\", options);\n return {\n status: \"error\",\n error: \"Cannot setChannel in web\",\n };\n }\n async setCustomId(options) {\n console.warn(\"Cannot setCustomId in web\", options);\n }\n async getChannel() {\n console.warn(\"Cannot getChannel in web\");\n return {\n status: \"error\",\n error: \"Cannot getChannel in web\",\n };\n }\n async notifyAppReady() {\n console.warn(\"Cannot notify App Ready in web\");\n return BUNDLE_BUILTIN;\n }\n async setMultiDelay(options) {\n console.warn(\"Cannot setMultiDelay in web\", options === null || options === void 0 ? void 0 : options.delayConditions);\n }\n async setDelay(option) {\n console.warn(\"Cannot setDelay in web\", option);\n }\n async cancelDelay() {\n console.warn(\"Cannot cancelDelay in web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACvE,CAAC;;ICFD,MAAM,cAAc,GAAG;IACvB,IAAI,MAAM,EAAE,SAAS;IACrB,IAAI,OAAO,EAAE,EAAE;IACf,IAAI,UAAU,EAAE,0BAA0B;IAC1C,IAAI,EAAE,EAAE,SAAS;IACjB,IAAI,QAAQ,EAAE,EAAE;IAChB,CAAC,CAAC;IACK,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAChE,QAAQ,OAAO,cAAc,CAAC;IAC9B,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAChE,QAAQ,OAAO,cAAc,CAAC;IAC9B,KAAK;IACL,IAAI,MAAM,mBAAmB,GAAG;IAChC,QAAQ,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IAC9D,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClC,KAAK;IACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;IACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IACjE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,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC1D,QAAQ,OAAO;IACf,YAAY,MAAM,EAAE,OAAO;IAC3B,YAAY,KAAK,EAAE,0BAA0B;IAC7C,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAC3D,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACjD,QAAQ,OAAO;IACf,YAAY,MAAM,EAAE,OAAO;IAC3B,YAAY,KAAK,EAAE,0BAA0B;IAC7C,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IACvD,QAAQ,OAAO,cAAc,CAAC;IAC9B,KAAK;IACL,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;IACjC,QAAQ,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/H,KAAK;IACL,IAAI,MAAM,QAAQ,CAAC,MAAM,EAAE;IAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IACvD,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAClD,KAAK;IACL;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst CapacitorUpdater = registerPlugin(\"CapacitorUpdater\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorUpdaterWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorUpdater };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nconst BUNDLE_BUILTIN = {\n status: \"success\",\n version: \"\",\n downloaded: \"1970-01-01T00:00:00.000Z\",\n id: \"builtin\",\n checksum: \"\",\n};\nexport class CapacitorUpdaterWeb extends WebPlugin {\n async download(options) {\n console.warn(\"Cannot download version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async next(options) {\n console.warn(\"Cannot set next version in web\", options);\n return BUNDLE_BUILTIN;\n }\n async isAutoUpdateEnabled() {\n console.warn(\"Cannot get isAutoUpdateEnabled in web\");\n return { enabled: false };\n }\n async set(options) {\n console.warn(\"Cannot set active bundle in web\", options);\n return;\n }\n async getDeviceId() {\n console.warn(\"Cannot get ID in web\");\n return { deviceId: \"default\" };\n }\n async getPluginVersion() {\n console.warn(\"Cannot get plugin version in web\");\n return { version: \"default\" };\n }\n async delete(options) {\n console.warn(\"Cannot delete bundle in web\", options);\n }\n async list() {\n console.warn(\"Cannot list bundles in web\");\n return { bundles: [] };\n }\n async reset(options) {\n console.warn(\"Cannot reset version in web\", options);\n }\n async current() {\n console.warn(\"Cannot get current bundle in web\");\n return { bundle: BUNDLE_BUILTIN, native: \"0.0.0\" };\n }\n async reload() {\n console.warn(\"Cannot reload current bundle in web\");\n return;\n }\n async getLatest() {\n console.warn(\"Cannot getLatest current bundle in web\");\n return {\n version: \"0.0.0\",\n message: \"Cannot getLatest current bundle in web\",\n };\n }\n async setChannel(options) {\n console.warn(\"Cannot setChannel in web\", options);\n return {\n status: \"error\",\n error: \"Cannot setChannel in web\",\n };\n }\n async setCustomId(options) {\n console.warn(\"Cannot setCustomId in web\", options);\n return;\n }\n async getChannel() {\n console.warn(\"Cannot getChannel in web\");\n return {\n status: \"error\",\n error: \"Cannot getChannel in web\",\n };\n }\n async notifyAppReady() {\n console.warn(\"Cannot notify App Ready in web\");\n return BUNDLE_BUILTIN;\n }\n async setMultiDelay(options) {\n console.warn(\"Cannot setMultiDelay in web\", options === null || options === void 0 ? void 0 : options.delayConditions);\n return;\n }\n async setDelay(option) {\n console.warn(\"Cannot setDelay in web\", option);\n return;\n }\n async cancelDelay() {\n console.warn(\"Cannot cancelDelay in web\");\n return;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACvE,CAAC;;ICFD,MAAM,cAAc,GAAG;IACvB,IAAI,MAAM,EAAE,SAAS;IACrB,IAAI,OAAO,EAAE,EAAE;IACf,IAAI,UAAU,EAAE,0BAA0B;IAC1C,IAAI,EAAE,EAAE,SAAS;IACjB,IAAI,QAAQ,EAAE,EAAE;IAChB,CAAC,CAAC;IACK,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAChE,QAAQ,OAAO,cAAc,CAAC;IAC9B,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAChE,QAAQ,OAAO,cAAc,CAAC;IAC9B,KAAK;IACL,IAAI,MAAM,mBAAmB,GAAG;IAChC,QAAQ,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IAC9D,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClC,KAAK;IACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;IACvB,QAAQ,OAAO,CAAC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;IACf,KAAK;IACL;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
|
|
3
3
|
@objc public class BundleInfo: NSObject, Decodable, Encodable {
|
|
4
|
-
public static let
|
|
5
|
-
public static let
|
|
6
|
-
public static let
|
|
4
|
+
public static let ID_BUILTIN: String = "builtin"
|
|
5
|
+
public static let VERSION_UNKNOWN: String = "unknown"
|
|
6
|
+
public static let DOWNLOADED_BUILTIN: String = "1970-01-01T00:00:00.000Z"
|
|
7
7
|
|
|
8
8
|
private let downloaded: String
|
|
9
9
|
private let id: String
|
|
@@ -15,7 +15,7 @@ import Foundation
|
|
|
15
15
|
self.init(id: id, version: version, status: status, downloaded: downloaded.iso8601withFractionalSeconds, checksum: checksum)
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
init(id: String, version: String, status: BundleStatus, downloaded: String = BundleInfo.
|
|
18
|
+
init(id: String, version: String, status: BundleStatus, downloaded: String = BundleInfo.DOWNLOADED_BUILTIN, checksum: String) {
|
|
19
19
|
self.downloaded = downloaded.trim()
|
|
20
20
|
self.id = id
|
|
21
21
|
self.version = version
|
|
@@ -28,11 +28,11 @@ import Foundation
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
public func isBuiltin() -> Bool {
|
|
31
|
-
return BundleInfo.
|
|
31
|
+
return BundleInfo.ID_BUILTIN == self.id
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
public func isUnknown() -> Bool {
|
|
35
|
-
return BundleInfo.
|
|
35
|
+
return BundleInfo.VERSION_UNKNOWN == self.id
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
public func isErrorStatus() -> Bool {
|
|
@@ -44,11 +44,11 @@ import Foundation
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
public func isDownloaded() -> Bool {
|
|
47
|
-
return !self.isBuiltin() && self.downloaded != "" && self.downloaded != BundleInfo.
|
|
47
|
+
return !self.isBuiltin() && self.downloaded != "" && self.downloaded != BundleInfo.DOWNLOADED_BUILTIN && !self.isDeleted()
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
public func getDownloaded() -> String {
|
|
51
|
-
return self.isBuiltin() ? BundleInfo.
|
|
51
|
+
return self.isBuiltin() ? BundleInfo.DOWNLOADED_BUILTIN : self.downloaded
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
public func getChecksum() -> String {
|
|
@@ -64,7 +64,7 @@ import Foundation
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
public func getId() -> String {
|
|
67
|
-
return self.isBuiltin() ? BundleInfo.
|
|
67
|
+
return self.isBuiltin() ? BundleInfo.ID_BUILTIN : self.id
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
public func setId(id: String) -> BundleInfo {
|
|
@@ -72,7 +72,7 @@ import Foundation
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
public func getVersionName() -> String {
|
|
75
|
-
return (self.version ?? "").isEmpty ? BundleInfo.
|
|
75
|
+
return (self.version ?? "").isEmpty ? BundleInfo.ID_BUILTIN : self.version
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
public func setVersionName(version: String) -> BundleInfo {
|