@capawesome/capacitor-live-update 6.8.0 → 7.0.0-dev.2633ff2.1765953041
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapawesomeCapacitorLiveUpdate.podspec +3 -3
- package/Package.swift +32 -0
- package/README.md +438 -86
- package/android/build.gradle +12 -12
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +754 -279
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateConfig.java +29 -27
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateHttpClient.java +40 -7
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +210 -67
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePreferences.java +52 -3
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +11 -2
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/events/DownloadBundleProgressEvent.java +32 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/{results/GetBundleResult.java → events/NextBundleSetEvent.java} +9 -7
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetConfigOptions.java +19 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SyncOptions.java +4 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/FetchLatestBundleResult.java +8 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBlockedBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetConfigResult.java +40 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetDownloadedBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/IsSyncingResult.java +26 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/ReadyResult.java +32 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/DownloadProgressCallback.java +5 -0
- package/dist/docs.json +597 -102
- package/dist/esm/definitions.d.ts +338 -39
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +9 -2
- package/dist/esm/web.js +21 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +22 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +22 -3
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Classes/Events/DownloadBundleProgressEvent.swift +25 -0
- package/ios/Plugin/Classes/{Results/GetBundleResult.swift → Events/NextBundleSetEvent.swift} +3 -3
- package/ios/Plugin/Classes/Options/SetConfigOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SyncOptions.swift +4 -0
- package/ios/Plugin/Classes/Results/{FetchLatestBundle.swift → FetchLatestBundleResult.swift} +6 -1
- package/ios/Plugin/Classes/Results/GetBlockedBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetConfigResult.swift +19 -0
- package/ios/Plugin/Classes/Results/GetDownloadedBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/IsSyncingResult.swift +16 -0
- package/ios/Plugin/Classes/Results/ReadyResult.swift +22 -0
- package/ios/Plugin/LiveUpdate.swift +365 -149
- package/ios/Plugin/LiveUpdateConfig.swift +4 -4
- package/ios/Plugin/LiveUpdateHttpClient.swift +10 -4
- package/ios/Plugin/LiveUpdatePlugin.swift +136 -34
- package/ios/Plugin/LiveUpdatePreferences.swift +54 -12
- package/ios/Plugin/Protocols/Api/GetLatestBundleResponse.swift +1 -0
- package/package.json +19 -20
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetBundleOptions.java +0 -18
- package/ios/Plugin/Classes/Options/SetBundleOptions.swift +0 -14
- package/ios/Plugin/LiveUpdatePlugin.h +0 -10
- package/ios/Plugin/LiveUpdatePlugin.m +0 -27
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerPlugin } from '@capacitor/core';
|
|
2
2
|
const LiveUpdate = registerPlugin('LiveUpdate', {
|
|
3
|
-
web: () => import('./web').then(
|
|
3
|
+
web: () => import('./web').then(m => new m.LiveUpdateWeb()),
|
|
4
4
|
});
|
|
5
5
|
export * from './definitions';
|
|
6
6
|
export { LiveUpdate };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { LiveUpdatePlugin } from './definitions';\n\nconst LiveUpdate = registerPlugin<LiveUpdatePlugin>('LiveUpdate', {\n web: () => import('./web').then(m => new m.LiveUpdateWeb()),\n});\n\nexport * from './definitions';\nexport { LiveUpdate };\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type { DeleteBundleOptions, DownloadBundleOptions, FetchLatestBundleResult, GetBundleResult, GetBundlesResult, GetChannelResult, GetCurrentBundleResult, GetCustomIdResult, GetDeviceIdResult, GetNextBundleResult, GetVersionCodeResult, GetVersionNameResult, LiveUpdatePlugin, SetBundleOptions, SetChannelOptions, SetCustomIdOptions, SetNextBundleOptions, SyncResult } from './definitions';
|
|
2
|
+
import type { DeleteBundleOptions, DownloadBundleOptions, FetchLatestBundleResult, GetBlockedBundlesResult, GetBundleResult, GetBundlesResult, GetChannelResult, GetConfigResult, GetCurrentBundleResult, GetCustomIdResult, GetDeviceIdResult, GetDownloadedBundlesResult, GetNextBundleResult, GetVersionCodeResult, GetVersionNameResult, IsSyncingResult, LiveUpdatePlugin, ReadyResult, SetBundleOptions, SetChannelOptions, SetConfigOptions, SetCustomIdOptions, SetNextBundleOptions, SyncResult } from './definitions';
|
|
3
3
|
export declare class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {
|
|
4
|
+
clearBlockedBundles(): Promise<void>;
|
|
4
5
|
deleteBundle(_options: DeleteBundleOptions): Promise<void>;
|
|
5
6
|
downloadBundle(_options: DownloadBundleOptions): Promise<void>;
|
|
6
7
|
fetchLatestBundle(): Promise<FetchLatestBundleResult>;
|
|
8
|
+
getBlockedBundles(): Promise<GetBlockedBundlesResult>;
|
|
7
9
|
getBundle(): Promise<GetBundleResult>;
|
|
8
10
|
getBundles(): Promise<GetBundlesResult>;
|
|
11
|
+
getDownloadedBundles(): Promise<GetDownloadedBundlesResult>;
|
|
9
12
|
getChannel(): Promise<GetChannelResult>;
|
|
13
|
+
getConfig(): Promise<GetConfigResult>;
|
|
10
14
|
getCurrentBundle(): Promise<GetCurrentBundleResult>;
|
|
11
15
|
getCustomId(): Promise<GetCustomIdResult>;
|
|
12
16
|
getDeviceId(): Promise<GetDeviceIdResult>;
|
|
13
17
|
getNextBundle(): Promise<GetNextBundleResult>;
|
|
14
18
|
getVersionCode(): Promise<GetVersionCodeResult>;
|
|
15
19
|
getVersionName(): Promise<GetVersionNameResult>;
|
|
16
|
-
|
|
20
|
+
isSyncing(): Promise<IsSyncingResult>;
|
|
21
|
+
ready(): Promise<ReadyResult>;
|
|
17
22
|
reload(): Promise<void>;
|
|
18
23
|
reset(): Promise<void>;
|
|
24
|
+
resetConfig(): Promise<void>;
|
|
19
25
|
setBundle(_options: SetBundleOptions): Promise<void>;
|
|
20
26
|
setChannel(_options: SetChannelOptions): Promise<void>;
|
|
27
|
+
setConfig(_options: SetConfigOptions): Promise<void>;
|
|
21
28
|
setCustomId(_options: SetCustomIdOptions): Promise<void>;
|
|
22
29
|
setNextBundle(_options: SetNextBundleOptions): Promise<void>;
|
|
23
30
|
sync(): Promise<SyncResult>;
|
package/dist/esm/web.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
export class LiveUpdateWeb extends WebPlugin {
|
|
3
|
+
async clearBlockedBundles() {
|
|
4
|
+
this.throwUnimplementedError();
|
|
5
|
+
}
|
|
3
6
|
async deleteBundle(_options) {
|
|
4
7
|
this.throwUnimplementedError();
|
|
5
8
|
}
|
|
@@ -9,15 +12,24 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
9
12
|
async fetchLatestBundle() {
|
|
10
13
|
this.throwUnimplementedError();
|
|
11
14
|
}
|
|
15
|
+
async getBlockedBundles() {
|
|
16
|
+
this.throwUnimplementedError();
|
|
17
|
+
}
|
|
12
18
|
async getBundle() {
|
|
13
19
|
this.throwUnimplementedError();
|
|
14
20
|
}
|
|
15
21
|
async getBundles() {
|
|
16
22
|
this.throwUnimplementedError();
|
|
17
23
|
}
|
|
24
|
+
async getDownloadedBundles() {
|
|
25
|
+
this.throwUnimplementedError();
|
|
26
|
+
}
|
|
18
27
|
async getChannel() {
|
|
19
28
|
this.throwUnimplementedError();
|
|
20
29
|
}
|
|
30
|
+
async getConfig() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
21
33
|
async getCurrentBundle() {
|
|
22
34
|
this.throwUnimplementedError();
|
|
23
35
|
}
|
|
@@ -36,6 +48,9 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
36
48
|
async getVersionName() {
|
|
37
49
|
this.throwUnimplementedError();
|
|
38
50
|
}
|
|
51
|
+
async isSyncing() {
|
|
52
|
+
this.throwUnimplementedError();
|
|
53
|
+
}
|
|
39
54
|
async ready() {
|
|
40
55
|
this.throwUnimplementedError();
|
|
41
56
|
}
|
|
@@ -45,12 +60,18 @@ export class LiveUpdateWeb extends WebPlugin {
|
|
|
45
60
|
async reset() {
|
|
46
61
|
this.throwUnimplementedError();
|
|
47
62
|
}
|
|
63
|
+
async resetConfig() {
|
|
64
|
+
this.throwUnimplementedError();
|
|
65
|
+
}
|
|
48
66
|
async setBundle(_options) {
|
|
49
67
|
this.throwUnimplementedError();
|
|
50
68
|
}
|
|
51
69
|
async setChannel(_options) {
|
|
52
70
|
this.throwUnimplementedError();
|
|
53
71
|
}
|
|
72
|
+
async setConfig(_options) {
|
|
73
|
+
this.throwUnimplementedError();
|
|
74
|
+
}
|
|
54
75
|
async setCustomId(_options) {
|
|
55
76
|
this.throwUnimplementedError();
|
|
56
77
|
}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA6B5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IACn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C;IAEM,KAAK,CAAC,SAAS;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW;QACtB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,QAA0B;QAC/C,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,QAA2B;QACjD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,QAA0B;QAC/C,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,QAA4B;QACnD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,QAA8B;QACvD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEO,uBAAuB;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n DeleteBundleOptions,\n DownloadBundleOptions,\n FetchLatestBundleResult,\n GetBlockedBundlesResult,\n GetBundleResult,\n GetBundlesResult,\n GetChannelResult,\n GetConfigResult,\n GetCurrentBundleResult,\n GetCustomIdResult,\n GetDeviceIdResult,\n GetDownloadedBundlesResult,\n GetNextBundleResult,\n GetVersionCodeResult,\n GetVersionNameResult,\n IsSyncingResult,\n LiveUpdatePlugin,\n ReadyResult,\n SetBundleOptions,\n SetChannelOptions,\n SetConfigOptions,\n SetCustomIdOptions,\n SetNextBundleOptions,\n SyncResult,\n} from './definitions';\n\nexport class LiveUpdateWeb extends WebPlugin implements LiveUpdatePlugin {\n public async clearBlockedBundles(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async deleteBundle(_options: DeleteBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async downloadBundle(_options: DownloadBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async fetchLatestBundle(): Promise<FetchLatestBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBlockedBundles(): Promise<GetBlockedBundlesResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundle(): Promise<GetBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getBundles(): Promise<GetBundlesResult> {\n this.throwUnimplementedError();\n }\n\n public async getDownloadedBundles(): Promise<GetDownloadedBundlesResult> {\n this.throwUnimplementedError();\n }\n\n public async getChannel(): Promise<GetChannelResult> {\n this.throwUnimplementedError();\n }\n\n public async getConfig(): Promise<GetConfigResult> {\n this.throwUnimplementedError();\n }\n\n public async getCurrentBundle(): Promise<GetCurrentBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getCustomId(): Promise<GetCustomIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getDeviceId(): Promise<GetDeviceIdResult> {\n this.throwUnimplementedError();\n }\n\n public async getNextBundle(): Promise<GetNextBundleResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionCode(): Promise<GetVersionCodeResult> {\n this.throwUnimplementedError();\n }\n\n public async getVersionName(): Promise<GetVersionNameResult> {\n this.throwUnimplementedError();\n }\n\n public async isSyncing(): Promise<IsSyncingResult> {\n this.throwUnimplementedError();\n }\n\n public async ready(): Promise<ReadyResult> {\n this.throwUnimplementedError();\n }\n\n public async reload(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async reset(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async resetConfig(): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setBundle(_options: SetBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setChannel(_options: SetChannelOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setConfig(_options: SetConfigOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setCustomId(_options: SetCustomIdOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async setNextBundle(_options: SetNextBundleOptions): Promise<void> {\n this.throwUnimplementedError();\n }\n\n public async sync(): Promise<SyncResult> {\n this.throwUnimplementedError();\n }\n\n private throwUnimplementedError(): never {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var core = require('@capacitor/core');
|
|
6
4
|
|
|
7
5
|
const LiveUpdate = core.registerPlugin('LiveUpdate', {
|
|
8
|
-
web: () => Promise.resolve().then(function () { return web; }).then(
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.LiveUpdateWeb()),
|
|
9
7
|
});
|
|
10
8
|
|
|
11
9
|
class LiveUpdateWeb extends core.WebPlugin {
|
|
10
|
+
async clearBlockedBundles() {
|
|
11
|
+
this.throwUnimplementedError();
|
|
12
|
+
}
|
|
12
13
|
async deleteBundle(_options) {
|
|
13
14
|
this.throwUnimplementedError();
|
|
14
15
|
}
|
|
@@ -18,15 +19,24 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
18
19
|
async fetchLatestBundle() {
|
|
19
20
|
this.throwUnimplementedError();
|
|
20
21
|
}
|
|
22
|
+
async getBlockedBundles() {
|
|
23
|
+
this.throwUnimplementedError();
|
|
24
|
+
}
|
|
21
25
|
async getBundle() {
|
|
22
26
|
this.throwUnimplementedError();
|
|
23
27
|
}
|
|
24
28
|
async getBundles() {
|
|
25
29
|
this.throwUnimplementedError();
|
|
26
30
|
}
|
|
31
|
+
async getDownloadedBundles() {
|
|
32
|
+
this.throwUnimplementedError();
|
|
33
|
+
}
|
|
27
34
|
async getChannel() {
|
|
28
35
|
this.throwUnimplementedError();
|
|
29
36
|
}
|
|
37
|
+
async getConfig() {
|
|
38
|
+
this.throwUnimplementedError();
|
|
39
|
+
}
|
|
30
40
|
async getCurrentBundle() {
|
|
31
41
|
this.throwUnimplementedError();
|
|
32
42
|
}
|
|
@@ -45,6 +55,9 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
45
55
|
async getVersionName() {
|
|
46
56
|
this.throwUnimplementedError();
|
|
47
57
|
}
|
|
58
|
+
async isSyncing() {
|
|
59
|
+
this.throwUnimplementedError();
|
|
60
|
+
}
|
|
48
61
|
async ready() {
|
|
49
62
|
this.throwUnimplementedError();
|
|
50
63
|
}
|
|
@@ -54,12 +67,18 @@ class LiveUpdateWeb extends core.WebPlugin {
|
|
|
54
67
|
async reset() {
|
|
55
68
|
this.throwUnimplementedError();
|
|
56
69
|
}
|
|
70
|
+
async resetConfig() {
|
|
71
|
+
this.throwUnimplementedError();
|
|
72
|
+
}
|
|
57
73
|
async setBundle(_options) {
|
|
58
74
|
this.throwUnimplementedError();
|
|
59
75
|
}
|
|
60
76
|
async setChannel(_options) {
|
|
61
77
|
this.throwUnimplementedError();
|
|
62
78
|
}
|
|
79
|
+
async setConfig(_options) {
|
|
80
|
+
this.throwUnimplementedError();
|
|
81
|
+
}
|
|
63
82
|
async setCustomId(_options) {
|
|
64
83
|
this.throwUnimplementedError();
|
|
65
84
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then(
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then(m => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async clearBlockedBundles() {\n this.throwUnimplementedError();\n }\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBlockedBundles() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getDownloadedBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getConfig() {\n this.throwUnimplementedError();\n }\n async getCurrentBundle() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getNextBundle() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async isSyncing() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async resetConfig() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setConfig(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async setNextBundle(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimpl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AQ,EAAE;AAClC,QAAQ,IAAI,CAAC,uBAAuB,EAAE;AACtC,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,uBAAuB,EAAE;AACtC,IAAI;AACJ,IAAI,uBAAuB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -2,10 +2,13 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const LiveUpdate = core.registerPlugin('LiveUpdate', {
|
|
5
|
-
web: () => Promise.resolve().then(function () { return web; }).then(
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.LiveUpdateWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class LiveUpdateWeb extends core.WebPlugin {
|
|
9
|
+
async clearBlockedBundles() {
|
|
10
|
+
this.throwUnimplementedError();
|
|
11
|
+
}
|
|
9
12
|
async deleteBundle(_options) {
|
|
10
13
|
this.throwUnimplementedError();
|
|
11
14
|
}
|
|
@@ -15,15 +18,24 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
15
18
|
async fetchLatestBundle() {
|
|
16
19
|
this.throwUnimplementedError();
|
|
17
20
|
}
|
|
21
|
+
async getBlockedBundles() {
|
|
22
|
+
this.throwUnimplementedError();
|
|
23
|
+
}
|
|
18
24
|
async getBundle() {
|
|
19
25
|
this.throwUnimplementedError();
|
|
20
26
|
}
|
|
21
27
|
async getBundles() {
|
|
22
28
|
this.throwUnimplementedError();
|
|
23
29
|
}
|
|
30
|
+
async getDownloadedBundles() {
|
|
31
|
+
this.throwUnimplementedError();
|
|
32
|
+
}
|
|
24
33
|
async getChannel() {
|
|
25
34
|
this.throwUnimplementedError();
|
|
26
35
|
}
|
|
36
|
+
async getConfig() {
|
|
37
|
+
this.throwUnimplementedError();
|
|
38
|
+
}
|
|
27
39
|
async getCurrentBundle() {
|
|
28
40
|
this.throwUnimplementedError();
|
|
29
41
|
}
|
|
@@ -42,6 +54,9 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
42
54
|
async getVersionName() {
|
|
43
55
|
this.throwUnimplementedError();
|
|
44
56
|
}
|
|
57
|
+
async isSyncing() {
|
|
58
|
+
this.throwUnimplementedError();
|
|
59
|
+
}
|
|
45
60
|
async ready() {
|
|
46
61
|
this.throwUnimplementedError();
|
|
47
62
|
}
|
|
@@ -51,12 +66,18 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
51
66
|
async reset() {
|
|
52
67
|
this.throwUnimplementedError();
|
|
53
68
|
}
|
|
69
|
+
async resetConfig() {
|
|
70
|
+
this.throwUnimplementedError();
|
|
71
|
+
}
|
|
54
72
|
async setBundle(_options) {
|
|
55
73
|
this.throwUnimplementedError();
|
|
56
74
|
}
|
|
57
75
|
async setChannel(_options) {
|
|
58
76
|
this.throwUnimplementedError();
|
|
59
77
|
}
|
|
78
|
+
async setConfig(_options) {
|
|
79
|
+
this.throwUnimplementedError();
|
|
80
|
+
}
|
|
60
81
|
async setCustomId(_options) {
|
|
61
82
|
this.throwUnimplementedError();
|
|
62
83
|
}
|
|
@@ -78,8 +99,6 @@ var capacitorLiveUpdate = (function (exports, core) {
|
|
|
78
99
|
|
|
79
100
|
exports.LiveUpdate = LiveUpdate;
|
|
80
101
|
|
|
81
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
82
|
-
|
|
83
102
|
return exports;
|
|
84
103
|
|
|
85
104
|
})({}, capacitorExports);
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then(
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst LiveUpdate = registerPlugin('LiveUpdate', {\n web: () => import('./web').then(m => new m.LiveUpdateWeb()),\n});\nexport * from './definitions';\nexport { LiveUpdate };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LiveUpdateWeb extends WebPlugin {\n async clearBlockedBundles() {\n this.throwUnimplementedError();\n }\n async deleteBundle(_options) {\n this.throwUnimplementedError();\n }\n async downloadBundle(_options) {\n this.throwUnimplementedError();\n }\n async fetchLatestBundle() {\n this.throwUnimplementedError();\n }\n async getBlockedBundles() {\n this.throwUnimplementedError();\n }\n async getBundle() {\n this.throwUnimplementedError();\n }\n async getBundles() {\n this.throwUnimplementedError();\n }\n async getDownloadedBundles() {\n this.throwUnimplementedError();\n }\n async getChannel() {\n this.throwUnimplementedError();\n }\n async getConfig() {\n this.throwUnimplementedError();\n }\n async getCurrentBundle() {\n this.throwUnimplementedError();\n }\n async getCustomId() {\n this.throwUnimplementedError();\n }\n async getDeviceId() {\n this.throwUnimplementedError();\n }\n async getNextBundle() {\n this.throwUnimplementedError();\n }\n async getVersionCode() {\n this.throwUnimplementedError();\n }\n async getVersionName() {\n this.throwUnimplementedError();\n }\n async isSyncing() {\n this.throwUnimplementedError();\n }\n async ready() {\n this.throwUnimplementedError();\n }\n async reload() {\n this.throwUnimplementedError();\n }\n async reset() {\n this.throwUnimplementedError();\n }\n async resetConfig() {\n this.throwUnimplementedError();\n }\n async setBundle(_options) {\n this.throwUnimplementedError();\n }\n async setChannel(_options) {\n this.throwUnimplementedError();\n }\n async setConfig(_options) {\n this.throwUnimplementedError();\n }\n async setCustomId(_options) {\n this.throwUnimplementedError();\n }\n async setNextBundle(_options) {\n this.throwUnimplementedError();\n }\n async sync() {\n this.throwUnimplementedError();\n }\n throwUnimplementedError() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,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I,GAAG;IACjB,QAAQ,IAAI,CAAC,uBAAuB,EAAE;IACtC,IAAI;IACJ,IAAI,uBAAuB,GAAG;IAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class DownloadBundleProgressEvent: NSObject, Result {
|
|
5
|
+
let bundleId: String
|
|
6
|
+
let downloadedBytes: Int64
|
|
7
|
+
let progress: Double
|
|
8
|
+
let totalBytes: Int64
|
|
9
|
+
|
|
10
|
+
init(bundleId: String, downloadedBytes: Int64, totalBytes: Int64) {
|
|
11
|
+
self.bundleId = bundleId
|
|
12
|
+
self.downloadedBytes = downloadedBytes
|
|
13
|
+
self.progress = Double(downloadedBytes) / Double(totalBytes)
|
|
14
|
+
self.totalBytes = totalBytes
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public func toJSObject() -> AnyObject {
|
|
18
|
+
var result = JSObject()
|
|
19
|
+
result["bundleId"] = bundleId
|
|
20
|
+
result["downloadedBytes"] = Int(truncatingIfNeeded: downloadedBytes)
|
|
21
|
+
result["progress"] = progress
|
|
22
|
+
result["totalBytes"] = Int(truncatingIfNeeded: totalBytes)
|
|
23
|
+
return result as AnyObject
|
|
24
|
+
}
|
|
25
|
+
}
|
package/ios/Plugin/Classes/{Results/GetBundleResult.swift → Events/NextBundleSetEvent.swift}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import Capacitor
|
|
3
3
|
|
|
4
|
-
@objc public class
|
|
4
|
+
@objc public class NextBundleSetEvent: NSObject {
|
|
5
5
|
let bundleId: String?
|
|
6
6
|
|
|
7
7
|
init(bundleId: String?) {
|
|
8
8
|
self.bundleId = bundleId
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
public func toJSObject() ->
|
|
11
|
+
public func toJSObject() -> JSObject {
|
|
12
12
|
var result = JSObject()
|
|
13
13
|
result["bundleId"] = bundleId == nil ? NSNull() : bundleId
|
|
14
|
-
return result
|
|
14
|
+
return result
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class SetConfigOptions: NSObject {
|
|
5
|
+
let appId: String?
|
|
6
|
+
|
|
7
|
+
init(_ call: CAPPluginCall) {
|
|
8
|
+
self.appId = call.getString("appId")
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public func getAppId() -> String? {
|
|
12
|
+
return appId
|
|
13
|
+
}
|
|
14
|
+
}
|
package/ios/Plugin/Classes/Results/{FetchLatestBundle.swift → FetchLatestBundleResult.swift}
RENAMED
|
@@ -5,13 +5,15 @@ import Capacitor
|
|
|
5
5
|
private let artifactType: ArtifactType?
|
|
6
6
|
private let bundleId: String?
|
|
7
7
|
private let checksum: String?
|
|
8
|
+
private let customProperties: [String: Any]?
|
|
8
9
|
private let downloadUrl: String?
|
|
9
10
|
private let signature: String?
|
|
10
11
|
|
|
11
|
-
init(artifactType: ArtifactType?, bundleId: String?, checksum: String?, downloadUrl: String?, signature: String?) {
|
|
12
|
+
init(artifactType: ArtifactType?, bundleId: String?, checksum: String?, customProperties: [String: Any]?, downloadUrl: String?, signature: String?) {
|
|
12
13
|
self.artifactType = artifactType
|
|
13
14
|
self.bundleId = bundleId
|
|
14
15
|
self.checksum = checksum
|
|
16
|
+
self.customProperties = customProperties
|
|
15
17
|
self.downloadUrl = downloadUrl
|
|
16
18
|
self.signature = signature
|
|
17
19
|
}
|
|
@@ -27,6 +29,9 @@ import Capacitor
|
|
|
27
29
|
if let checksum = checksum {
|
|
28
30
|
result["checksum"] = checksum
|
|
29
31
|
}
|
|
32
|
+
if let customProperties = JSTypes.coerceDictionaryToJSObject(customProperties) {
|
|
33
|
+
result["customProperties"] = customProperties
|
|
34
|
+
}
|
|
30
35
|
if let downloadUrl = downloadUrl {
|
|
31
36
|
result["downloadUrl"] = downloadUrl
|
|
32
37
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class GetBlockedBundlesResult: NSObject, Result {
|
|
5
|
+
let bundleIds: [String]
|
|
6
|
+
|
|
7
|
+
init(bundleIds: [String]) {
|
|
8
|
+
self.bundleIds = bundleIds
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
result["bundleIds"] = bundleIds
|
|
14
|
+
return result as AnyObject
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class GetConfigResult: NSObject, Result {
|
|
5
|
+
let appId: String?
|
|
6
|
+
let autoUpdateStrategy: String
|
|
7
|
+
|
|
8
|
+
init(appId: String?, autoUpdateStrategy: String) {
|
|
9
|
+
self.appId = appId
|
|
10
|
+
self.autoUpdateStrategy = autoUpdateStrategy
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public func toJSObject() -> AnyObject {
|
|
14
|
+
var result = JSObject()
|
|
15
|
+
result["appId"] = appId == nil ? NSNull() : appId
|
|
16
|
+
result["autoUpdateStrategy"] = autoUpdateStrategy
|
|
17
|
+
return result as AnyObject
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class GetDownloadedBundlesResult: NSObject, Result {
|
|
5
|
+
let bundleIds: [String]
|
|
6
|
+
|
|
7
|
+
init(bundleIds: [String]) {
|
|
8
|
+
self.bundleIds = bundleIds
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
result["bundleIds"] = bundleIds
|
|
14
|
+
return result as AnyObject
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class IsSyncingResult: NSObject, Result {
|
|
5
|
+
let syncing: Bool
|
|
6
|
+
|
|
7
|
+
init(syncing: Bool) {
|
|
8
|
+
self.syncing = syncing
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@objc public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
result["syncing"] = syncing
|
|
14
|
+
return result as AnyObject
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class ReadyResult: NSObject, Result {
|
|
5
|
+
let currentBundleId: String?
|
|
6
|
+
let previousBundleId: String?
|
|
7
|
+
let rollback: Bool
|
|
8
|
+
|
|
9
|
+
init(currentBundleId: String?, previousBundleId: String?, rollback: Bool) {
|
|
10
|
+
self.currentBundleId = currentBundleId
|
|
11
|
+
self.previousBundleId = previousBundleId
|
|
12
|
+
self.rollback = rollback
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public func toJSObject() -> AnyObject {
|
|
16
|
+
var result = JSObject()
|
|
17
|
+
result["currentBundleId"] = currentBundleId == nil ? NSNull() : currentBundleId
|
|
18
|
+
result["previousBundleId"] = previousBundleId == nil ? NSNull() : previousBundleId
|
|
19
|
+
result["rollback"] = rollback
|
|
20
|
+
return result as AnyObject
|
|
21
|
+
}
|
|
22
|
+
}
|