@capgo/capacitor-updater 6.14.0 → 6.14.2
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 +11 -11
- package/android/src/main/java/ee/forgr/capacitor_updater/BundleInfo.java +134 -194
- package/android/src/main/java/ee/forgr/capacitor_updater/BundleStatus.java +23 -23
- package/android/src/main/java/ee/forgr/capacitor_updater/Callback.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java +960 -1165
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1259 -1629
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipher.java +161 -197
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipherV2.java +202 -256
- package/android/src/main/java/ee/forgr/capacitor_updater/DataManager.java +16 -16
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayCondition.java +44 -48
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayUntilNext.java +4 -4
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +378 -467
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadWorkerManager.java +71 -83
- package/android/src/main/java/ee/forgr/capacitor_updater/InternalUtils.java +19 -28
- package/dist/docs.json +17 -17
- package/dist/esm/definitions.d.ts +13 -13
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +43 -43
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +43 -43
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +43 -43
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CapacitorUpdater.swift +8 -8
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +1 -1
- package/package.json +5 -7
package/dist/esm/web.js
CHANGED
|
@@ -3,128 +3,128 @@
|
|
|
3
3
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
4
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
5
|
*/
|
|
6
|
-
import { WebPlugin } from
|
|
6
|
+
import { WebPlugin } from '@capacitor/core';
|
|
7
7
|
const BUNDLE_BUILTIN = {
|
|
8
|
-
status:
|
|
9
|
-
version:
|
|
10
|
-
downloaded:
|
|
11
|
-
id:
|
|
12
|
-
checksum:
|
|
8
|
+
status: 'success',
|
|
9
|
+
version: '',
|
|
10
|
+
downloaded: '1970-01-01T00:00:00.000Z',
|
|
11
|
+
id: 'builtin',
|
|
12
|
+
checksum: '',
|
|
13
13
|
};
|
|
14
14
|
export class CapacitorUpdaterWeb extends WebPlugin {
|
|
15
15
|
async setStatsUrl(options) {
|
|
16
|
-
console.warn(
|
|
16
|
+
console.warn('Cannot setStatsUrl in web', options);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
async setUpdateUrl(options) {
|
|
20
|
-
console.warn(
|
|
20
|
+
console.warn('Cannot setUpdateUrl in web', options);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
async setChannelUrl(options) {
|
|
24
|
-
console.warn(
|
|
24
|
+
console.warn('Cannot setChannelUrl in web', options);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
async download(options) {
|
|
28
|
-
console.warn(
|
|
28
|
+
console.warn('Cannot download version in web', options);
|
|
29
29
|
return BUNDLE_BUILTIN;
|
|
30
30
|
}
|
|
31
31
|
async next(options) {
|
|
32
|
-
console.warn(
|
|
32
|
+
console.warn('Cannot set next version in web', options);
|
|
33
33
|
return BUNDLE_BUILTIN;
|
|
34
34
|
}
|
|
35
35
|
async isAutoUpdateEnabled() {
|
|
36
|
-
console.warn(
|
|
36
|
+
console.warn('Cannot get isAutoUpdateEnabled in web');
|
|
37
37
|
return { enabled: false };
|
|
38
38
|
}
|
|
39
39
|
async set(options) {
|
|
40
|
-
console.warn(
|
|
40
|
+
console.warn('Cannot set active bundle in web', options);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
async getDeviceId() {
|
|
44
|
-
console.warn(
|
|
45
|
-
return { deviceId:
|
|
44
|
+
console.warn('Cannot get ID in web');
|
|
45
|
+
return { deviceId: 'default' };
|
|
46
46
|
}
|
|
47
47
|
async getBuiltinVersion() {
|
|
48
|
-
console.warn(
|
|
49
|
-
return { version:
|
|
48
|
+
console.warn('Cannot get version in web');
|
|
49
|
+
return { version: 'default' };
|
|
50
50
|
}
|
|
51
51
|
async getPluginVersion() {
|
|
52
|
-
console.warn(
|
|
53
|
-
return { version:
|
|
52
|
+
console.warn('Cannot get plugin version in web');
|
|
53
|
+
return { version: 'default' };
|
|
54
54
|
}
|
|
55
55
|
async delete(options) {
|
|
56
|
-
console.warn(
|
|
56
|
+
console.warn('Cannot delete bundle in web', options);
|
|
57
57
|
}
|
|
58
58
|
async list() {
|
|
59
|
-
console.warn(
|
|
59
|
+
console.warn('Cannot list bundles in web');
|
|
60
60
|
return { bundles: [] };
|
|
61
61
|
}
|
|
62
62
|
async reset(options) {
|
|
63
|
-
console.warn(
|
|
63
|
+
console.warn('Cannot reset version in web', options);
|
|
64
64
|
}
|
|
65
65
|
async current() {
|
|
66
|
-
console.warn(
|
|
67
|
-
return { bundle: BUNDLE_BUILTIN, native:
|
|
66
|
+
console.warn('Cannot get current bundle in web');
|
|
67
|
+
return { bundle: BUNDLE_BUILTIN, native: '0.0.0' };
|
|
68
68
|
}
|
|
69
69
|
async reload() {
|
|
70
|
-
console.warn(
|
|
70
|
+
console.warn('Cannot reload current bundle in web');
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
async getLatest() {
|
|
74
|
-
console.warn(
|
|
74
|
+
console.warn('Cannot getLatest current bundle in web');
|
|
75
75
|
return {
|
|
76
|
-
version:
|
|
77
|
-
message:
|
|
76
|
+
version: '0.0.0',
|
|
77
|
+
message: 'Cannot getLatest current bundle in web',
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
async setChannel(options) {
|
|
81
|
-
console.warn(
|
|
81
|
+
console.warn('Cannot setChannel in web', options);
|
|
82
82
|
return {
|
|
83
|
-
status:
|
|
84
|
-
error:
|
|
83
|
+
status: 'error',
|
|
84
|
+
error: 'Cannot setChannel in web',
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
async unsetChannel(options) {
|
|
88
|
-
console.warn(
|
|
88
|
+
console.warn('Cannot unsetChannel in web', options);
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
async setCustomId(options) {
|
|
92
|
-
console.warn(
|
|
92
|
+
console.warn('Cannot setCustomId in web', options);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
async getChannel() {
|
|
96
|
-
console.warn(
|
|
96
|
+
console.warn('Cannot getChannel in web');
|
|
97
97
|
return {
|
|
98
|
-
status:
|
|
99
|
-
error:
|
|
98
|
+
status: 'error',
|
|
99
|
+
error: 'Cannot getChannel in web',
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
async notifyAppReady() {
|
|
103
|
-
console.warn(
|
|
103
|
+
console.warn('Cannot notify App Ready in web');
|
|
104
104
|
return { bundle: BUNDLE_BUILTIN };
|
|
105
105
|
}
|
|
106
106
|
async setMultiDelay(options) {
|
|
107
|
-
console.warn(
|
|
107
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === void 0 ? void 0 : options.delayConditions);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
async setDelay(option) {
|
|
111
|
-
console.warn(
|
|
111
|
+
console.warn('Cannot setDelay in web', option);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
async cancelDelay() {
|
|
115
|
-
console.warn(
|
|
115
|
+
console.warn('Cannot cancelDelay in web');
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
async isAutoUpdateAvailable() {
|
|
119
|
-
console.warn(
|
|
119
|
+
console.warn('Cannot isAutoUpdateAvailable in web');
|
|
120
120
|
return { available: false };
|
|
121
121
|
}
|
|
122
122
|
async getCurrentBundle() {
|
|
123
|
-
console.warn(
|
|
123
|
+
console.warn('Cannot get current bundle in web');
|
|
124
124
|
return BUNDLE_BUILTIN;
|
|
125
125
|
}
|
|
126
126
|
async getNextBundle() {
|
|
127
|
-
console.warn(
|
|
127
|
+
console.warn('Cannot get next bundle in web');
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA6B5C,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,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA6B5C,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,WAAW,CAAC,OAAiB;QACjC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;QACnD,OAAO;IACT,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAAkB;QACnC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;QACpD,OAAO;IACT,CAAC;IAED,KAAK,CAAC,aAAa,CA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OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAA6B;QAC/C,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,CAAC,CAAC;QACtE,OAAO;IACT,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAsB;QACnC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO;IACT,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC1C,OAAO;IACT,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\nimport { WebPlugin } from '@capacitor/core';\n\nimport type {\n CapacitorUpdaterPlugin,\n BundleInfo,\n LatestVersion,\n DelayCondition,\n ChannelRes,\n SetChannelOptions,\n GetChannelRes,\n SetCustomIdOptions,\n UnsetChannelOptions,\n StatsUrl,\n UpdateUrl,\n ChannelUrl,\n DownloadOptions,\n BundleId,\n AutoUpdateEnabled,\n DeviceId,\n BuiltinVersion,\n PluginVersion,\n BundleListResult,\n ResetOptions,\n CurrentBundleResult,\n AppReadyResult,\n MultiDelayConditions,\n AutoUpdateAvailable,\n} from './definitions';\n\nconst BUNDLE_BUILTIN: BundleInfo = {\n status: 'success',\n version: '',\n downloaded: '1970-01-01T00:00:00.000Z',\n id: 'builtin',\n checksum: '',\n};\n\nexport class CapacitorUpdaterWeb extends WebPlugin implements CapacitorUpdaterPlugin {\n async setStatsUrl(options: StatsUrl): Promise<void> {\n console.warn('Cannot setStatsUrl in web', options);\n return;\n }\n\n async setUpdateUrl(options: UpdateUrl): Promise<void> {\n console.warn('Cannot setUpdateUrl in web', options);\n return;\n }\n\n async setChannelUrl(options: ChannelUrl): Promise<void> {\n console.warn('Cannot setChannelUrl in web', options);\n return;\n }\n\n async download(options: DownloadOptions): Promise<BundleInfo> {\n console.warn('Cannot download version in web', options);\n return BUNDLE_BUILTIN;\n }\n\n async next(options: BundleId): Promise<BundleInfo> {\n console.warn('Cannot set next version in web', options);\n return BUNDLE_BUILTIN;\n }\n\n async isAutoUpdateEnabled(): Promise<AutoUpdateEnabled> {\n console.warn('Cannot get isAutoUpdateEnabled in web');\n return { enabled: false };\n }\n\n async set(options: BundleId): Promise<void> {\n console.warn('Cannot set active bundle in web', options);\n return;\n }\n\n async getDeviceId(): Promise<DeviceId> {\n console.warn('Cannot get ID in web');\n return { deviceId: 'default' };\n }\n\n async getBuiltinVersion(): Promise<BuiltinVersion> {\n console.warn('Cannot get version in web');\n return { version: 'default' };\n }\n\n async getPluginVersion(): Promise<PluginVersion> {\n console.warn('Cannot get plugin version in web');\n return { version: 'default' };\n }\n\n async delete(options: BundleId): Promise<void> {\n console.warn('Cannot delete bundle in web', options);\n }\n\n async list(): Promise<BundleListResult> {\n console.warn('Cannot list bundles in web');\n return { bundles: [] };\n }\n\n async reset(options?: ResetOptions): Promise<void> {\n console.warn('Cannot reset version in web', options);\n }\n\n async current(): Promise<CurrentBundleResult> {\n console.warn('Cannot get current bundle in web');\n return { bundle: BUNDLE_BUILTIN, native: '0.0.0' };\n }\n\n async reload(): Promise<void> {\n console.warn('Cannot reload current bundle in web');\n return;\n }\n\n async getLatest(): Promise<LatestVersion> {\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\n async setChannel(options: SetChannelOptions): Promise<ChannelRes> {\n console.warn('Cannot setChannel in web', options);\n return {\n status: 'error',\n error: 'Cannot setChannel in web',\n };\n }\n\n async unsetChannel(options: UnsetChannelOptions): Promise<void> {\n console.warn('Cannot unsetChannel in web', options);\n return;\n }\n\n async setCustomId(options: SetCustomIdOptions): Promise<void> {\n console.warn('Cannot setCustomId in web', options);\n return;\n }\n\n async getChannel(): Promise<GetChannelRes> {\n console.warn('Cannot getChannel in web');\n return {\n status: 'error',\n error: 'Cannot getChannel in web',\n };\n }\n\n async notifyAppReady(): Promise<AppReadyResult> {\n console.warn('Cannot notify App Ready in web');\n return { bundle: BUNDLE_BUILTIN };\n }\n\n async setMultiDelay(options: MultiDelayConditions): Promise<void> {\n console.warn('Cannot setMultiDelay in web', options?.delayConditions);\n return;\n }\n\n async setDelay(option: DelayCondition): Promise<void> {\n console.warn('Cannot setDelay in web', option);\n return;\n }\n\n async cancelDelay(): Promise<void> {\n console.warn('Cannot cancelDelay in web');\n return;\n }\n\n async isAutoUpdateAvailable(): Promise<AutoUpdateAvailable> {\n console.warn('Cannot isAutoUpdateAvailable in web');\n return { available: false };\n }\n\n async getCurrentBundle(): Promise<BundleInfo> {\n console.warn('Cannot get current bundle in web');\n return BUNDLE_BUILTIN;\n }\n\n async getNextBundle(): Promise<BundleInfo | null> {\n console.warn('Cannot get next bundle in web');\n return null;\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var core = require('@capacitor/core');
|
|
|
7
7
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
8
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
9
|
*/
|
|
10
|
-
const CapacitorUpdater = core.registerPlugin(
|
|
10
|
+
const CapacitorUpdater = core.registerPlugin('CapacitorUpdater', {
|
|
11
11
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorUpdaterWeb()),
|
|
12
12
|
});
|
|
13
13
|
|
|
@@ -17,126 +17,126 @@ const CapacitorUpdater = core.registerPlugin("CapacitorUpdater", {
|
|
|
17
17
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
18
18
|
*/
|
|
19
19
|
const BUNDLE_BUILTIN = {
|
|
20
|
-
status:
|
|
21
|
-
version:
|
|
22
|
-
downloaded:
|
|
23
|
-
id:
|
|
24
|
-
checksum:
|
|
20
|
+
status: 'success',
|
|
21
|
+
version: '',
|
|
22
|
+
downloaded: '1970-01-01T00:00:00.000Z',
|
|
23
|
+
id: 'builtin',
|
|
24
|
+
checksum: '',
|
|
25
25
|
};
|
|
26
26
|
class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
27
27
|
async setStatsUrl(options) {
|
|
28
|
-
console.warn(
|
|
28
|
+
console.warn('Cannot setStatsUrl in web', options);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
async setUpdateUrl(options) {
|
|
32
|
-
console.warn(
|
|
32
|
+
console.warn('Cannot setUpdateUrl in web', options);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
async setChannelUrl(options) {
|
|
36
|
-
console.warn(
|
|
36
|
+
console.warn('Cannot setChannelUrl in web', options);
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
async download(options) {
|
|
40
|
-
console.warn(
|
|
40
|
+
console.warn('Cannot download version in web', options);
|
|
41
41
|
return BUNDLE_BUILTIN;
|
|
42
42
|
}
|
|
43
43
|
async next(options) {
|
|
44
|
-
console.warn(
|
|
44
|
+
console.warn('Cannot set next version in web', options);
|
|
45
45
|
return BUNDLE_BUILTIN;
|
|
46
46
|
}
|
|
47
47
|
async isAutoUpdateEnabled() {
|
|
48
|
-
console.warn(
|
|
48
|
+
console.warn('Cannot get isAutoUpdateEnabled in web');
|
|
49
49
|
return { enabled: false };
|
|
50
50
|
}
|
|
51
51
|
async set(options) {
|
|
52
|
-
console.warn(
|
|
52
|
+
console.warn('Cannot set active bundle in web', options);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
async getDeviceId() {
|
|
56
|
-
console.warn(
|
|
57
|
-
return { deviceId:
|
|
56
|
+
console.warn('Cannot get ID in web');
|
|
57
|
+
return { deviceId: 'default' };
|
|
58
58
|
}
|
|
59
59
|
async getBuiltinVersion() {
|
|
60
|
-
console.warn(
|
|
61
|
-
return { version:
|
|
60
|
+
console.warn('Cannot get version in web');
|
|
61
|
+
return { version: 'default' };
|
|
62
62
|
}
|
|
63
63
|
async getPluginVersion() {
|
|
64
|
-
console.warn(
|
|
65
|
-
return { version:
|
|
64
|
+
console.warn('Cannot get plugin version in web');
|
|
65
|
+
return { version: 'default' };
|
|
66
66
|
}
|
|
67
67
|
async delete(options) {
|
|
68
|
-
console.warn(
|
|
68
|
+
console.warn('Cannot delete bundle in web', options);
|
|
69
69
|
}
|
|
70
70
|
async list() {
|
|
71
|
-
console.warn(
|
|
71
|
+
console.warn('Cannot list bundles in web');
|
|
72
72
|
return { bundles: [] };
|
|
73
73
|
}
|
|
74
74
|
async reset(options) {
|
|
75
|
-
console.warn(
|
|
75
|
+
console.warn('Cannot reset version in web', options);
|
|
76
76
|
}
|
|
77
77
|
async current() {
|
|
78
|
-
console.warn(
|
|
79
|
-
return { bundle: BUNDLE_BUILTIN, native:
|
|
78
|
+
console.warn('Cannot get current bundle in web');
|
|
79
|
+
return { bundle: BUNDLE_BUILTIN, native: '0.0.0' };
|
|
80
80
|
}
|
|
81
81
|
async reload() {
|
|
82
|
-
console.warn(
|
|
82
|
+
console.warn('Cannot reload current bundle in web');
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
async getLatest() {
|
|
86
|
-
console.warn(
|
|
86
|
+
console.warn('Cannot getLatest current bundle in web');
|
|
87
87
|
return {
|
|
88
|
-
version:
|
|
89
|
-
message:
|
|
88
|
+
version: '0.0.0',
|
|
89
|
+
message: 'Cannot getLatest current bundle in web',
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
async setChannel(options) {
|
|
93
|
-
console.warn(
|
|
93
|
+
console.warn('Cannot setChannel in web', options);
|
|
94
94
|
return {
|
|
95
|
-
status:
|
|
96
|
-
error:
|
|
95
|
+
status: 'error',
|
|
96
|
+
error: 'Cannot setChannel in web',
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
async unsetChannel(options) {
|
|
100
|
-
console.warn(
|
|
100
|
+
console.warn('Cannot unsetChannel in web', options);
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
async setCustomId(options) {
|
|
104
|
-
console.warn(
|
|
104
|
+
console.warn('Cannot setCustomId in web', options);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
async getChannel() {
|
|
108
|
-
console.warn(
|
|
108
|
+
console.warn('Cannot getChannel in web');
|
|
109
109
|
return {
|
|
110
|
-
status:
|
|
111
|
-
error:
|
|
110
|
+
status: 'error',
|
|
111
|
+
error: 'Cannot getChannel in web',
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
async notifyAppReady() {
|
|
115
|
-
console.warn(
|
|
115
|
+
console.warn('Cannot notify App Ready in web');
|
|
116
116
|
return { bundle: BUNDLE_BUILTIN };
|
|
117
117
|
}
|
|
118
118
|
async setMultiDelay(options) {
|
|
119
|
-
console.warn(
|
|
119
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === undefined ? undefined : options.delayConditions);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
async setDelay(option) {
|
|
123
|
-
console.warn(
|
|
123
|
+
console.warn('Cannot setDelay in web', option);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
async cancelDelay() {
|
|
127
|
-
console.warn(
|
|
127
|
+
console.warn('Cannot cancelDelay in web');
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
async isAutoUpdateAvailable() {
|
|
131
|
-
console.warn(
|
|
131
|
+
console.warn('Cannot isAutoUpdateAvailable in web');
|
|
132
132
|
return { available: false };
|
|
133
133
|
}
|
|
134
134
|
async getCurrentBundle() {
|
|
135
|
-
console.warn(
|
|
135
|
+
console.warn('Cannot get current bundle in web');
|
|
136
136
|
return BUNDLE_BUILTIN;
|
|
137
137
|
}
|
|
138
138
|
async getNextBundle() {
|
|
139
|
-
console.warn(
|
|
139
|
+
console.warn('Cannot get next bundle in web');
|
|
140
140
|
return null;
|
|
141
141
|
}
|
|
142
142
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { registerPlugin } from
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { 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","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { 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 setStatsUrl(options) {\n console.warn('Cannot setStatsUrl in web', options);\n return;\n }\n async setUpdateUrl(options) {\n console.warn('Cannot setUpdateUrl in web', options);\n return;\n }\n async setChannelUrl(options) {\n console.warn('Cannot setChannelUrl in web', options);\n return;\n }\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 getBuiltinVersion() {\n console.warn('Cannot get version in web');\n return { version: '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 unsetChannel(options) {\n console.warn('Cannot unsetChannel in web', options);\n return;\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: 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 async isAutoUpdateAvailable() {\n console.warn('Cannot isAutoUpdateAvailable in web');\n return { available: false };\n }\n async getCurrentBundle() {\n console.warn('Cannot get current bundle in web');\n return BUNDLE_BUILTIN;\n }\n async getNextBundle() {\n console.warn('Cannot get next bundle in web');\n return null;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAEK,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;;ACRD;AACA;AACA;AACA;AACA;AAEA,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;AACM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,CAAC;AAC1D,QAAQ;AACR;AACA,IAAI,MAAM,YAAY,CAAC,OAAO,EAAE;AAChC,QAAQ,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC3D,QAAQ;AACR;AACA,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;AACjC,QAAQ,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,CAAC;AAC5D,QAAQ;AACR;AACA,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OA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,EAAE;AACzC;AACA,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;AACjC,QAAQ,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAM,GAAG,SAAM,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9H,QAAQ;AACR;AACA,IAAI,MAAM,QAAQ,CAAC,MAAM,EAAE;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC;AACtD,QAAQ;AACR;AACA,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC;AACjD,QAAQ;AACR;AACA,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC;AAC3D,QAAQ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;AACnC;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC;AACxD,QAAQ,OAAO,cAAc;AAC7B;AACA,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,OAAO,CAAC,IAAI,CAAC,+BAA+B,CAAC;AACrD,QAAQ,OAAO,IAAI;AACnB;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -6,7 +6,7 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
6
6
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
7
7
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
8
8
|
*/
|
|
9
|
-
const CapacitorUpdater = core.registerPlugin(
|
|
9
|
+
const CapacitorUpdater = core.registerPlugin('CapacitorUpdater', {
|
|
10
10
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorUpdaterWeb()),
|
|
11
11
|
});
|
|
12
12
|
|
|
@@ -16,126 +16,126 @@ var capacitorCapacitorUpdater = (function (exports, core) {
|
|
|
16
16
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
17
17
|
*/
|
|
18
18
|
const BUNDLE_BUILTIN = {
|
|
19
|
-
status:
|
|
20
|
-
version:
|
|
21
|
-
downloaded:
|
|
22
|
-
id:
|
|
23
|
-
checksum:
|
|
19
|
+
status: 'success',
|
|
20
|
+
version: '',
|
|
21
|
+
downloaded: '1970-01-01T00:00:00.000Z',
|
|
22
|
+
id: 'builtin',
|
|
23
|
+
checksum: '',
|
|
24
24
|
};
|
|
25
25
|
class CapacitorUpdaterWeb extends core.WebPlugin {
|
|
26
26
|
async setStatsUrl(options) {
|
|
27
|
-
console.warn(
|
|
27
|
+
console.warn('Cannot setStatsUrl in web', options);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
async setUpdateUrl(options) {
|
|
31
|
-
console.warn(
|
|
31
|
+
console.warn('Cannot setUpdateUrl in web', options);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
async setChannelUrl(options) {
|
|
35
|
-
console.warn(
|
|
35
|
+
console.warn('Cannot setChannelUrl in web', options);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
async download(options) {
|
|
39
|
-
console.warn(
|
|
39
|
+
console.warn('Cannot download version in web', options);
|
|
40
40
|
return BUNDLE_BUILTIN;
|
|
41
41
|
}
|
|
42
42
|
async next(options) {
|
|
43
|
-
console.warn(
|
|
43
|
+
console.warn('Cannot set next version in web', options);
|
|
44
44
|
return BUNDLE_BUILTIN;
|
|
45
45
|
}
|
|
46
46
|
async isAutoUpdateEnabled() {
|
|
47
|
-
console.warn(
|
|
47
|
+
console.warn('Cannot get isAutoUpdateEnabled in web');
|
|
48
48
|
return { enabled: false };
|
|
49
49
|
}
|
|
50
50
|
async set(options) {
|
|
51
|
-
console.warn(
|
|
51
|
+
console.warn('Cannot set active bundle in web', options);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
async getDeviceId() {
|
|
55
|
-
console.warn(
|
|
56
|
-
return { deviceId:
|
|
55
|
+
console.warn('Cannot get ID in web');
|
|
56
|
+
return { deviceId: 'default' };
|
|
57
57
|
}
|
|
58
58
|
async getBuiltinVersion() {
|
|
59
|
-
console.warn(
|
|
60
|
-
return { version:
|
|
59
|
+
console.warn('Cannot get version in web');
|
|
60
|
+
return { version: 'default' };
|
|
61
61
|
}
|
|
62
62
|
async getPluginVersion() {
|
|
63
|
-
console.warn(
|
|
64
|
-
return { version:
|
|
63
|
+
console.warn('Cannot get plugin version in web');
|
|
64
|
+
return { version: 'default' };
|
|
65
65
|
}
|
|
66
66
|
async delete(options) {
|
|
67
|
-
console.warn(
|
|
67
|
+
console.warn('Cannot delete bundle in web', options);
|
|
68
68
|
}
|
|
69
69
|
async list() {
|
|
70
|
-
console.warn(
|
|
70
|
+
console.warn('Cannot list bundles in web');
|
|
71
71
|
return { bundles: [] };
|
|
72
72
|
}
|
|
73
73
|
async reset(options) {
|
|
74
|
-
console.warn(
|
|
74
|
+
console.warn('Cannot reset version in web', options);
|
|
75
75
|
}
|
|
76
76
|
async current() {
|
|
77
|
-
console.warn(
|
|
78
|
-
return { bundle: BUNDLE_BUILTIN, native:
|
|
77
|
+
console.warn('Cannot get current bundle in web');
|
|
78
|
+
return { bundle: BUNDLE_BUILTIN, native: '0.0.0' };
|
|
79
79
|
}
|
|
80
80
|
async reload() {
|
|
81
|
-
console.warn(
|
|
81
|
+
console.warn('Cannot reload current bundle in web');
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
async getLatest() {
|
|
85
|
-
console.warn(
|
|
85
|
+
console.warn('Cannot getLatest current bundle in web');
|
|
86
86
|
return {
|
|
87
|
-
version:
|
|
88
|
-
message:
|
|
87
|
+
version: '0.0.0',
|
|
88
|
+
message: 'Cannot getLatest current bundle in web',
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
async setChannel(options) {
|
|
92
|
-
console.warn(
|
|
92
|
+
console.warn('Cannot setChannel in web', options);
|
|
93
93
|
return {
|
|
94
|
-
status:
|
|
95
|
-
error:
|
|
94
|
+
status: 'error',
|
|
95
|
+
error: 'Cannot setChannel in web',
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
async unsetChannel(options) {
|
|
99
|
-
console.warn(
|
|
99
|
+
console.warn('Cannot unsetChannel in web', options);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
async setCustomId(options) {
|
|
103
|
-
console.warn(
|
|
103
|
+
console.warn('Cannot setCustomId in web', options);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
async getChannel() {
|
|
107
|
-
console.warn(
|
|
107
|
+
console.warn('Cannot getChannel in web');
|
|
108
108
|
return {
|
|
109
|
-
status:
|
|
110
|
-
error:
|
|
109
|
+
status: 'error',
|
|
110
|
+
error: 'Cannot getChannel in web',
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
async notifyAppReady() {
|
|
114
|
-
console.warn(
|
|
114
|
+
console.warn('Cannot notify App Ready in web');
|
|
115
115
|
return { bundle: BUNDLE_BUILTIN };
|
|
116
116
|
}
|
|
117
117
|
async setMultiDelay(options) {
|
|
118
|
-
console.warn(
|
|
118
|
+
console.warn('Cannot setMultiDelay in web', options === null || options === undefined ? undefined : options.delayConditions);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
async setDelay(option) {
|
|
122
|
-
console.warn(
|
|
122
|
+
console.warn('Cannot setDelay in web', option);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
async cancelDelay() {
|
|
126
|
-
console.warn(
|
|
126
|
+
console.warn('Cannot cancelDelay in web');
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
async isAutoUpdateAvailable() {
|
|
130
|
-
console.warn(
|
|
130
|
+
console.warn('Cannot isAutoUpdateAvailable in web');
|
|
131
131
|
return { available: false };
|
|
132
132
|
}
|
|
133
133
|
async getCurrentBundle() {
|
|
134
|
-
console.warn(
|
|
134
|
+
console.warn('Cannot get current bundle in web');
|
|
135
135
|
return BUNDLE_BUILTIN;
|
|
136
136
|
}
|
|
137
137
|
async getNextBundle() {
|
|
138
|
-
console.warn(
|
|
138
|
+
console.warn('Cannot get next bundle in web');
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
141
141
|
}
|