@capgo/capacitor-updater 4.2.7 → 4.3.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 +57 -5
- package/android/build.gradle +3 -3
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java +10 -9
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +159 -58
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayCondition.java +48 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayUntilNext.java +8 -0
- package/dist/docs.json +175 -10
- package/dist/esm/definitions.d.ts +44 -8
- package/dist/esm/web.d.ts +4 -4
- package/dist/esm/web.js +6 -2
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +6 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +6 -2
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CapacitorUpdater.swift +1 -1
- package/ios/Plugin/CapacitorUpdaterPlugin.m +1 -0
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +154 -47
- package/ios/Plugin/DelayCondition.swift +68 -0
- package/ios/Plugin/DelayUntilNext.swift +24 -0
- package/package.json +1 -1
package/dist/docs.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "throws",
|
|
20
|
-
"text": "An error if
|
|
20
|
+
"text": "An error if something went wrong"
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"docs": "Notify Capacitor Updater that the current bundle is working (a rollback will occur of this method is not called on every app launch)",
|
|
@@ -241,13 +241,13 @@
|
|
|
241
241
|
"slug": "reload"
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
"name": "
|
|
245
|
-
"signature": "(options: {
|
|
244
|
+
"name": "setMultiDelay",
|
|
245
|
+
"signature": "(options: { delayConditions: DelayCondition[]; }) => Promise<void>",
|
|
246
246
|
"parameters": [
|
|
247
247
|
{
|
|
248
248
|
"name": "options",
|
|
249
|
-
"docs": "",
|
|
250
|
-
"type": "{
|
|
249
|
+
"docs": "are the {@link DelayCondition} list to set",
|
|
250
|
+
"type": "{ delayConditions: DelayCondition[]; }"
|
|
251
251
|
}
|
|
252
252
|
],
|
|
253
253
|
"returns": "Promise<void>",
|
|
@@ -258,11 +258,58 @@
|
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"name": "param",
|
|
261
|
-
"text": "
|
|
261
|
+
"text": "options are the {@link DelayCondition} list to set"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "example",
|
|
265
|
+
"text": "setMultiDelay({ delayConditions: [{ kind: 'kill' }, { kind: 'background', value: '300000' }] })\n// installs the update after the user kills the app or after a background of 300000 ms (5 minutes)"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "example",
|
|
269
|
+
"text": "setMultiDelay({ delayConditions: [{ kind: 'date', value: '2022-09-14T06:14:11.920Z' }] })\n// installs the update after the specific iso8601 date is expired"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "example",
|
|
273
|
+
"text": "setMultiDelay({ delayConditions: [{ kind: 'background' }] })\n// installs the update after the the first background (default behaviour without setting delay)"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "throws",
|
|
277
|
+
"text": "An error if the something went wrong"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "since",
|
|
281
|
+
"text": "4.3.0"
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"docs": "Set DelayCondition, skip updates until one of the conditions is met",
|
|
285
|
+
"complexTypes": [
|
|
286
|
+
"DelayCondition"
|
|
287
|
+
],
|
|
288
|
+
"slug": "setmultidelay"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "setDelay",
|
|
292
|
+
"signature": "(options: DelayCondition) => Promise<void>",
|
|
293
|
+
"parameters": [
|
|
294
|
+
{
|
|
295
|
+
"name": "options",
|
|
296
|
+
"docs": "is the {@link DelayCondition} to set",
|
|
297
|
+
"type": "DelayCondition"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"returns": "Promise<void>",
|
|
301
|
+
"tags": [
|
|
302
|
+
{
|
|
303
|
+
"name": "deprecated",
|
|
304
|
+
"text": "use setMultiDelay instead passing a single value in array"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "returns",
|
|
308
|
+
"text": "an Promise resolved directly"
|
|
262
309
|
},
|
|
263
310
|
{
|
|
264
311
|
"name": "param",
|
|
265
|
-
"text": "
|
|
312
|
+
"text": "options is the {@link DelayCondition} to set"
|
|
266
313
|
},
|
|
267
314
|
{
|
|
268
315
|
"name": "throws",
|
|
@@ -273,9 +320,9 @@
|
|
|
273
320
|
"text": "4.0.0"
|
|
274
321
|
}
|
|
275
322
|
],
|
|
276
|
-
"docs": "Set
|
|
323
|
+
"docs": "Set DelayCondition, skip updates until the condition is met",
|
|
277
324
|
"complexTypes": [
|
|
278
|
-
"
|
|
325
|
+
"DelayCondition"
|
|
279
326
|
],
|
|
280
327
|
"slug": "setdelay"
|
|
281
328
|
},
|
|
@@ -536,6 +583,35 @@
|
|
|
536
583
|
],
|
|
537
584
|
"slug": "addlistenerdownloadfailed"
|
|
538
585
|
},
|
|
586
|
+
{
|
|
587
|
+
"name": "addListener",
|
|
588
|
+
"signature": "(eventName: 'appReloaded', listenerFunc: AppReloadedListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
589
|
+
"parameters": [
|
|
590
|
+
{
|
|
591
|
+
"name": "eventName",
|
|
592
|
+
"docs": "",
|
|
593
|
+
"type": "'appReloaded'"
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"name": "listenerFunc",
|
|
597
|
+
"docs": "",
|
|
598
|
+
"type": "AppReloadedListener"
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
602
|
+
"tags": [
|
|
603
|
+
{
|
|
604
|
+
"name": "since",
|
|
605
|
+
"text": "4.3.0"
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"docs": "Listen for download fail event in the App, let you know when download has fail finished",
|
|
609
|
+
"complexTypes": [
|
|
610
|
+
"PluginListenerHandle",
|
|
611
|
+
"AppReloadedListener"
|
|
612
|
+
],
|
|
613
|
+
"slug": "addlistenerappreloaded"
|
|
614
|
+
},
|
|
539
615
|
{
|
|
540
616
|
"name": "getDeviceId",
|
|
541
617
|
"signature": "() => Promise<{ id: string; }>",
|
|
@@ -640,6 +716,7 @@
|
|
|
640
716
|
"UpdateFailedEvent",
|
|
641
717
|
"latestVersion",
|
|
642
718
|
"BundleInfo",
|
|
719
|
+
"DelayCondition",
|
|
643
720
|
"BundleStatus",
|
|
644
721
|
"DelayUntilNext",
|
|
645
722
|
"DownloadChangeListener",
|
|
@@ -648,7 +725,8 @@
|
|
|
648
725
|
"DownloadFailedListener",
|
|
649
726
|
"DownloadCompleteListener",
|
|
650
727
|
"MajorAvailableListener",
|
|
651
|
-
"UpdateFailedListener"
|
|
728
|
+
"UpdateFailedListener",
|
|
729
|
+
"AppReloadedListener"
|
|
652
730
|
]
|
|
653
731
|
},
|
|
654
732
|
"interfaces": [
|
|
@@ -708,6 +786,7 @@
|
|
|
708
786
|
"DownloadCompleteEvent",
|
|
709
787
|
"UpdateFailedEvent",
|
|
710
788
|
"latestVersion",
|
|
789
|
+
"DelayCondition",
|
|
711
790
|
"BundleStatus",
|
|
712
791
|
"DelayUntilNext",
|
|
713
792
|
"DownloadChangeListener",
|
|
@@ -717,6 +796,65 @@
|
|
|
717
796
|
"DownloadCompleteListener",
|
|
718
797
|
"MajorAvailableListener",
|
|
719
798
|
"UpdateFailedListener",
|
|
799
|
+
"AppReloadedListener",
|
|
800
|
+
"CapacitorUpdaterPlugin"
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "DelayCondition",
|
|
805
|
+
"slug": "delaycondition",
|
|
806
|
+
"docs": "",
|
|
807
|
+
"tags": [],
|
|
808
|
+
"methods": [],
|
|
809
|
+
"properties": [
|
|
810
|
+
{
|
|
811
|
+
"name": "kind",
|
|
812
|
+
"tags": [
|
|
813
|
+
{
|
|
814
|
+
"text": "value is useless for",
|
|
815
|
+
"name": "param"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"text": "kind \"kill\", optional for \"background\" (default value: \"0\") and required for \"nativeVersion\" and \"date\"",
|
|
819
|
+
"name": "param"
|
|
820
|
+
}
|
|
821
|
+
],
|
|
822
|
+
"docs": "Set up delay conditions in setMultiDelay",
|
|
823
|
+
"complexTypes": [
|
|
824
|
+
"DelayUntilNext"
|
|
825
|
+
],
|
|
826
|
+
"type": "DelayUntilNext"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"name": "value",
|
|
830
|
+
"tags": [],
|
|
831
|
+
"docs": "",
|
|
832
|
+
"complexTypes": [],
|
|
833
|
+
"type": "string | undefined"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"importObject": [
|
|
837
|
+
"PluginListenerHandle",
|
|
838
|
+
"\"@capacitor/cli\"",
|
|
839
|
+
"noNeedEvent",
|
|
840
|
+
"updateAvailableEvent",
|
|
841
|
+
"DownloadEvent",
|
|
842
|
+
"MajorAvailableEvent",
|
|
843
|
+
"DownloadFailedEvent",
|
|
844
|
+
"DownloadCompleteEvent",
|
|
845
|
+
"UpdateFailedEvent",
|
|
846
|
+
"latestVersion",
|
|
847
|
+
"BundleInfo",
|
|
848
|
+
"BundleStatus",
|
|
849
|
+
"DelayUntilNext",
|
|
850
|
+
"DownloadChangeListener",
|
|
851
|
+
"NoNeedListener",
|
|
852
|
+
"UpdateAvailabledListener",
|
|
853
|
+
"DownloadFailedListener",
|
|
854
|
+
"DownloadCompleteListener",
|
|
855
|
+
"MajorAvailableListener",
|
|
856
|
+
"UpdateFailedListener",
|
|
857
|
+
"AppReloadedListener",
|
|
720
858
|
"CapacitorUpdaterPlugin"
|
|
721
859
|
]
|
|
722
860
|
},
|
|
@@ -779,6 +917,7 @@
|
|
|
779
917
|
"DownloadCompleteEvent",
|
|
780
918
|
"UpdateFailedEvent",
|
|
781
919
|
"BundleInfo",
|
|
920
|
+
"DelayCondition",
|
|
782
921
|
"BundleStatus",
|
|
783
922
|
"DelayUntilNext",
|
|
784
923
|
"DownloadChangeListener",
|
|
@@ -788,6 +927,7 @@
|
|
|
788
927
|
"DownloadCompleteListener",
|
|
789
928
|
"MajorAvailableListener",
|
|
790
929
|
"UpdateFailedListener",
|
|
930
|
+
"AppReloadedListener",
|
|
791
931
|
"CapacitorUpdaterPlugin"
|
|
792
932
|
]
|
|
793
933
|
},
|
|
@@ -859,6 +999,7 @@
|
|
|
859
999
|
"UpdateFailedEvent",
|
|
860
1000
|
"latestVersion",
|
|
861
1001
|
"BundleInfo",
|
|
1002
|
+
"DelayCondition",
|
|
862
1003
|
"BundleStatus",
|
|
863
1004
|
"DelayUntilNext",
|
|
864
1005
|
"DownloadChangeListener",
|
|
@@ -868,6 +1009,7 @@
|
|
|
868
1009
|
"DownloadCompleteListener",
|
|
869
1010
|
"MajorAvailableListener",
|
|
870
1011
|
"UpdateFailedListener",
|
|
1012
|
+
"AppReloadedListener",
|
|
871
1013
|
"CapacitorUpdaterPlugin"
|
|
872
1014
|
]
|
|
873
1015
|
},
|
|
@@ -904,6 +1046,7 @@
|
|
|
904
1046
|
"UpdateFailedEvent",
|
|
905
1047
|
"latestVersion",
|
|
906
1048
|
"BundleInfo",
|
|
1049
|
+
"DelayCondition",
|
|
907
1050
|
"BundleStatus",
|
|
908
1051
|
"DelayUntilNext",
|
|
909
1052
|
"DownloadChangeListener",
|
|
@@ -913,6 +1056,7 @@
|
|
|
913
1056
|
"DownloadCompleteListener",
|
|
914
1057
|
"MajorAvailableListener",
|
|
915
1058
|
"UpdateFailedListener",
|
|
1059
|
+
"AppReloadedListener",
|
|
916
1060
|
"CapacitorUpdaterPlugin"
|
|
917
1061
|
]
|
|
918
1062
|
},
|
|
@@ -949,6 +1093,7 @@
|
|
|
949
1093
|
"UpdateFailedEvent",
|
|
950
1094
|
"latestVersion",
|
|
951
1095
|
"BundleInfo",
|
|
1096
|
+
"DelayCondition",
|
|
952
1097
|
"BundleStatus",
|
|
953
1098
|
"DelayUntilNext",
|
|
954
1099
|
"DownloadChangeListener",
|
|
@@ -958,6 +1103,7 @@
|
|
|
958
1103
|
"DownloadCompleteListener",
|
|
959
1104
|
"MajorAvailableListener",
|
|
960
1105
|
"UpdateFailedListener",
|
|
1106
|
+
"AppReloadedListener",
|
|
961
1107
|
"CapacitorUpdaterPlugin"
|
|
962
1108
|
]
|
|
963
1109
|
},
|
|
@@ -994,6 +1140,7 @@
|
|
|
994
1140
|
"UpdateFailedEvent",
|
|
995
1141
|
"latestVersion",
|
|
996
1142
|
"BundleInfo",
|
|
1143
|
+
"DelayCondition",
|
|
997
1144
|
"BundleStatus",
|
|
998
1145
|
"DelayUntilNext",
|
|
999
1146
|
"DownloadChangeListener",
|
|
@@ -1003,6 +1150,7 @@
|
|
|
1003
1150
|
"DownloadCompleteListener",
|
|
1004
1151
|
"MajorAvailableListener",
|
|
1005
1152
|
"UpdateFailedListener",
|
|
1153
|
+
"AppReloadedListener",
|
|
1006
1154
|
"CapacitorUpdaterPlugin"
|
|
1007
1155
|
]
|
|
1008
1156
|
},
|
|
@@ -1037,6 +1185,7 @@
|
|
|
1037
1185
|
"UpdateFailedEvent",
|
|
1038
1186
|
"latestVersion",
|
|
1039
1187
|
"BundleInfo",
|
|
1188
|
+
"DelayCondition",
|
|
1040
1189
|
"BundleStatus",
|
|
1041
1190
|
"DelayUntilNext",
|
|
1042
1191
|
"DownloadChangeListener",
|
|
@@ -1046,6 +1195,7 @@
|
|
|
1046
1195
|
"DownloadCompleteListener",
|
|
1047
1196
|
"MajorAvailableListener",
|
|
1048
1197
|
"UpdateFailedListener",
|
|
1198
|
+
"AppReloadedListener",
|
|
1049
1199
|
"CapacitorUpdaterPlugin"
|
|
1050
1200
|
]
|
|
1051
1201
|
},
|
|
@@ -1082,6 +1232,7 @@
|
|
|
1082
1232
|
"DownloadCompleteEvent",
|
|
1083
1233
|
"latestVersion",
|
|
1084
1234
|
"BundleInfo",
|
|
1235
|
+
"DelayCondition",
|
|
1085
1236
|
"BundleStatus",
|
|
1086
1237
|
"DelayUntilNext",
|
|
1087
1238
|
"DownloadChangeListener",
|
|
@@ -1091,6 +1242,7 @@
|
|
|
1091
1242
|
"DownloadCompleteListener",
|
|
1092
1243
|
"MajorAvailableListener",
|
|
1093
1244
|
"UpdateFailedListener",
|
|
1245
|
+
"AppReloadedListener",
|
|
1094
1246
|
"CapacitorUpdaterPlugin"
|
|
1095
1247
|
]
|
|
1096
1248
|
},
|
|
@@ -1125,6 +1277,7 @@
|
|
|
1125
1277
|
"UpdateFailedEvent",
|
|
1126
1278
|
"latestVersion",
|
|
1127
1279
|
"BundleInfo",
|
|
1280
|
+
"DelayCondition",
|
|
1128
1281
|
"BundleStatus",
|
|
1129
1282
|
"DelayUntilNext",
|
|
1130
1283
|
"DownloadChangeListener",
|
|
@@ -1134,6 +1287,7 @@
|
|
|
1134
1287
|
"DownloadCompleteListener",
|
|
1135
1288
|
"MajorAvailableListener",
|
|
1136
1289
|
"UpdateFailedListener",
|
|
1290
|
+
"AppReloadedListener",
|
|
1137
1291
|
"CapacitorUpdaterPlugin"
|
|
1138
1292
|
]
|
|
1139
1293
|
}
|
|
@@ -1276,6 +1430,17 @@
|
|
|
1276
1430
|
]
|
|
1277
1431
|
}
|
|
1278
1432
|
]
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"name": "AppReloadedListener",
|
|
1436
|
+
"slug": "appreloadedlistener",
|
|
1437
|
+
"docs": "",
|
|
1438
|
+
"types": [
|
|
1439
|
+
{
|
|
1440
|
+
"text": "(state: void): void",
|
|
1441
|
+
"complexTypes": []
|
|
1442
|
+
}
|
|
1443
|
+
]
|
|
1279
1444
|
}
|
|
1280
1445
|
],
|
|
1281
1446
|
"pluginConfigs": [
|
|
@@ -147,6 +147,14 @@ export interface BundleInfo {
|
|
|
147
147
|
checksum: string;
|
|
148
148
|
status: BundleStatus;
|
|
149
149
|
}
|
|
150
|
+
export interface DelayCondition {
|
|
151
|
+
/**
|
|
152
|
+
* Set up delay conditions in setMultiDelay
|
|
153
|
+
* @param value is useless for @param kind "kill", optional for "background" (default value: "0") and required for "nativeVersion" and "date"
|
|
154
|
+
*/
|
|
155
|
+
kind: DelayUntilNext;
|
|
156
|
+
value?: string;
|
|
157
|
+
}
|
|
150
158
|
export declare type BundleStatus = 'success' | 'error' | 'pending' | 'downloading';
|
|
151
159
|
export declare type DelayUntilNext = 'background' | 'kill' | 'nativeVersion' | 'date';
|
|
152
160
|
export declare type DownloadChangeListener = (state: DownloadEvent) => void;
|
|
@@ -156,12 +164,13 @@ export declare type DownloadFailedListener = (state: DownloadFailedEvent) => voi
|
|
|
156
164
|
export declare type DownloadCompleteListener = (state: DownloadCompleteEvent) => void;
|
|
157
165
|
export declare type MajorAvailableListener = (state: MajorAvailableEvent) => void;
|
|
158
166
|
export declare type UpdateFailedListener = (state: UpdateFailedEvent) => void;
|
|
167
|
+
export declare type AppReloadedListener = (state: void) => void;
|
|
159
168
|
export interface CapacitorUpdaterPlugin {
|
|
160
169
|
/**
|
|
161
170
|
* Notify Capacitor Updater that the current bundle is working (a rollback will occur of this method is not called on every app launch)
|
|
162
171
|
*
|
|
163
172
|
* @returns {Promise<BundleInfo>} an Promise resolved directly
|
|
164
|
-
* @throws An error if
|
|
173
|
+
* @throws An error if something went wrong
|
|
165
174
|
*/
|
|
166
175
|
notifyAppReady(): Promise<BundleInfo>;
|
|
167
176
|
/**
|
|
@@ -243,18 +252,39 @@ export interface CapacitorUpdaterPlugin {
|
|
|
243
252
|
*/
|
|
244
253
|
reload(): Promise<void>;
|
|
245
254
|
/**
|
|
246
|
-
* Set
|
|
255
|
+
* Set DelayCondition, skip updates until one of the conditions is met
|
|
247
256
|
*
|
|
248
257
|
* @returns {Promise<void>} an Promise resolved directly
|
|
249
|
-
* @param
|
|
250
|
-
*
|
|
258
|
+
* @param options are the {@link DelayCondition} list to set
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* setMultiDelay({ delayConditions: [{ kind: 'kill' }, { kind: 'background', value: '300000' }] })
|
|
262
|
+
* // installs the update after the user kills the app or after a background of 300000 ms (5 minutes)
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* setMultiDelay({ delayConditions: [{ kind: 'date', value: '2022-09-14T06:14:11.920Z' }] })
|
|
266
|
+
* // installs the update after the specific iso8601 date is expired
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* setMultiDelay({ delayConditions: [{ kind: 'background' }] })
|
|
270
|
+
* // installs the update after the the first background (default behaviour without setting delay)
|
|
271
|
+
*
|
|
251
272
|
* @throws An error if the something went wrong
|
|
252
|
-
* @since 4.
|
|
273
|
+
* @since 4.3.0
|
|
253
274
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
value?: string;
|
|
275
|
+
setMultiDelay(options: {
|
|
276
|
+
delayConditions: DelayCondition[];
|
|
257
277
|
}): Promise<void>;
|
|
278
|
+
/**
|
|
279
|
+
* Set DelayCondition, skip updates until the condition is met
|
|
280
|
+
*
|
|
281
|
+
* @deprecated use setMultiDelay instead passing a single value in array
|
|
282
|
+
* @returns {Promise<void>} an Promise resolved directly
|
|
283
|
+
* @param options is the {@link DelayCondition} to set
|
|
284
|
+
* @throws An error if the something went wrong
|
|
285
|
+
* @since 4.0.0
|
|
286
|
+
*/
|
|
287
|
+
setDelay(options: DelayCondition): Promise<void>;
|
|
258
288
|
/**
|
|
259
289
|
* Cancel delay to updates as usual
|
|
260
290
|
*
|
|
@@ -315,6 +345,12 @@ export interface CapacitorUpdaterPlugin {
|
|
|
315
345
|
* @since 4.0.0
|
|
316
346
|
*/
|
|
317
347
|
addListener(eventName: 'downloadFailed', listenerFunc: DownloadFailedListener): Promise<PluginListenerHandle> & PluginListenerHandle;
|
|
348
|
+
/**
|
|
349
|
+
* Listen for download fail event in the App, let you know when download has fail finished
|
|
350
|
+
*
|
|
351
|
+
* @since 4.3.0
|
|
352
|
+
*/
|
|
353
|
+
addListener(eventName: 'appReloaded', listenerFunc: AppReloadedListener): Promise<PluginListenerHandle> & PluginListenerHandle;
|
|
318
354
|
/**
|
|
319
355
|
* Get unique ID used to identify device (sent to auto update server)
|
|
320
356
|
*
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type { CapacitorUpdaterPlugin, BundleInfo, latestVersion,
|
|
2
|
+
import type { CapacitorUpdaterPlugin, BundleInfo, latestVersion, DelayCondition } from './definitions';
|
|
3
3
|
export declare class CapacitorUpdaterWeb extends WebPlugin implements CapacitorUpdaterPlugin {
|
|
4
4
|
download(options: {
|
|
5
5
|
url: string;
|
|
@@ -36,9 +36,9 @@ export declare class CapacitorUpdaterWeb extends WebPlugin implements CapacitorU
|
|
|
36
36
|
reload(): Promise<void>;
|
|
37
37
|
getLatest(): Promise<latestVersion>;
|
|
38
38
|
notifyAppReady(): Promise<BundleInfo>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: string;
|
|
39
|
+
setMultiDelay(options: {
|
|
40
|
+
delayConditions: DelayCondition[];
|
|
42
41
|
}): Promise<void>;
|
|
42
|
+
setDelay(option: DelayCondition): Promise<void>;
|
|
43
43
|
cancelDelay(): Promise<void>;
|
|
44
44
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -60,8 +60,12 @@ export class CapacitorUpdaterWeb extends WebPlugin {
|
|
|
60
60
|
console.warn('Cannot notify App Ready in web');
|
|
61
61
|
return BUNDLE_BUILTIN;
|
|
62
62
|
}
|
|
63
|
-
async
|
|
64
|
-
console.warn('Cannot
|
|
63
|
+
async setMultiDelay(options) {
|
|
64
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
async setDelay(option) {
|
|
68
|
+
console.warn('Cannot setDelay in web', option);
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
67
71
|
async cancelDelay() {
|
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;AAI5C,MAAM,cAAc,GAAe;IACjC,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,0BAA0B;IACtC,EAAE,EAAE,SAAS;IACb,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,KAAK,CAAC,QAAQ,CAAC,OAA0C;QACvD,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QACxD,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAAuB;QAChC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QACxD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACtD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,OAAuB;QAC/B,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO;IACT,CAAC;IACD,KAAK,CAAC,WAAW;QACf,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACrC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC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AO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IACD,KAAK,CAAC,OAAO;QACX,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IACrD,CAAC;IACD,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO;IACT,CAAC;IACD,KAAK,CAAC,SAAS;QACb,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO;YACL,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,wCAAwC;SAClD,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,cAAc;QAClB,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAC/C,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,KAAK,CAAC,aAAa,CAAC,OAA8C;QAChE,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,CAAC,CAAC;QACtE,OAAO;IACT,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,MAAsB;QACnC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO;IACT,CAAC;IACD,KAAK,CAAC,WAAW;QACf,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC1C,OAAO;IACT,CAAC;CACF"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -69,8 +69,12 @@ class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
|
69
69
|
console.warn('Cannot notify App Ready in web');
|
|
70
70
|
return BUNDLE_BUILTIN;
|
|
71
71
|
}
|
|
72
|
-
async
|
|
73
|
-
console.warn('Cannot
|
|
72
|
+
async setMultiDelay(options) {
|
|
73
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
async setDelay(option) {
|
|
77
|
+
console.warn('Cannot setDelay in web', option);
|
|
74
78
|
return;
|
|
75
79
|
}
|
|
76
80
|
async cancelDelay() {
|
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 return;\n }\n async getDeviceId() {\n console.warn('Cannot get ID in web');\n return { id: '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 notifyAppReady() {\n console.warn('Cannot notify App Ready in web');\n return BUNDLE_BUILTIN;\n }\n async
|
|
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 { id: '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 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;AACjE,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,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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,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,QAAQ,CAAC,MAAM,EAAE;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;AACvD,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AAClD,QAAQ,OAAO;AACf,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -66,8 +66,12 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
66
66
|
console.warn('Cannot notify App Ready in web');
|
|
67
67
|
return BUNDLE_BUILTIN;
|
|
68
68
|
}
|
|
69
|
-
async
|
|
70
|
-
console.warn('Cannot
|
|
69
|
+
async setMultiDelay(options) {
|
|
70
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
async setDelay(option) {
|
|
74
|
+
console.warn('Cannot setDelay in web', option);
|
|
71
75
|
return;
|
|
72
76
|
}
|
|
73
77
|
async cancelDelay() {
|
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 return;\n }\n async getDeviceId() {\n console.warn('Cannot get ID in web');\n return { id: '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 notifyAppReady() {\n console.warn('Cannot notify App Ready in web');\n return BUNDLE_BUILTIN;\n }\n async
|
|
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 { id: '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 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,c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AO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IACvD,QAAQ,OAAO;IACf,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAClD,QAAQ,OAAO;IACf,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
|
@@ -146,7 +146,7 @@ extension CustomError: LocalizedError {
|
|
|
146
146
|
|
|
147
147
|
public let TAG = "✨ Capacitor-updater:"
|
|
148
148
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
149
|
-
public let pluginVersion = "4.
|
|
149
|
+
public let pluginVersion = "4.3.0"
|
|
150
150
|
public var statsUrl = ""
|
|
151
151
|
public var appId = ""
|
|
152
152
|
public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
|
@@ -13,6 +13,7 @@ CAP_PLUGIN(CapacitorUpdaterPlugin, "CapacitorUpdater",
|
|
|
13
13
|
CAP_PLUGIN_METHOD(reload, CAPPluginReturnPromise);
|
|
14
14
|
CAP_PLUGIN_METHOD(notifyAppReady, CAPPluginReturnPromise);
|
|
15
15
|
CAP_PLUGIN_METHOD(setDelay, CAPPluginReturnPromise);
|
|
16
|
+
CAP_PLUGIN_METHOD(setMultiDelay, CAPPluginReturnPromise);
|
|
16
17
|
CAP_PLUGIN_METHOD(cancelDelay, CAPPluginReturnPromise);
|
|
17
18
|
CAP_PLUGIN_METHOD(getLatest, CAPPluginReturnPromise);
|
|
18
19
|
CAP_PLUGIN_METHOD(getDeviceId, CAPPluginReturnPromise);
|