@capgo/capacitor-downloader 0.0.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/dist/docs.json ADDED
@@ -0,0 +1,293 @@
1
+ {
2
+ "api": {
3
+ "name": "CapacitorDownloaderPlugin",
4
+ "slug": "capacitordownloaderplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "download",
10
+ "signature": "(options: DownloadOptions) => Promise<DownloadTask>",
11
+ "parameters": [
12
+ {
13
+ "name": "options",
14
+ "docs": "",
15
+ "type": "DownloadOptions"
16
+ }
17
+ ],
18
+ "returns": "Promise<DownloadTask>",
19
+ "tags": [],
20
+ "docs": "",
21
+ "complexTypes": [
22
+ "DownloadTask",
23
+ "DownloadOptions"
24
+ ],
25
+ "slug": "download"
26
+ },
27
+ {
28
+ "name": "pause",
29
+ "signature": "(id: string) => Promise<void>",
30
+ "parameters": [
31
+ {
32
+ "name": "id",
33
+ "docs": "",
34
+ "type": "string"
35
+ }
36
+ ],
37
+ "returns": "Promise<void>",
38
+ "tags": [],
39
+ "docs": "",
40
+ "complexTypes": [],
41
+ "slug": "pause"
42
+ },
43
+ {
44
+ "name": "resume",
45
+ "signature": "(id: string) => Promise<void>",
46
+ "parameters": [
47
+ {
48
+ "name": "id",
49
+ "docs": "",
50
+ "type": "string"
51
+ }
52
+ ],
53
+ "returns": "Promise<void>",
54
+ "tags": [],
55
+ "docs": "",
56
+ "complexTypes": [],
57
+ "slug": "resume"
58
+ },
59
+ {
60
+ "name": "stop",
61
+ "signature": "(id: string) => Promise<void>",
62
+ "parameters": [
63
+ {
64
+ "name": "id",
65
+ "docs": "",
66
+ "type": "string"
67
+ }
68
+ ],
69
+ "returns": "Promise<void>",
70
+ "tags": [],
71
+ "docs": "",
72
+ "complexTypes": [],
73
+ "slug": "stop"
74
+ },
75
+ {
76
+ "name": "checkStatus",
77
+ "signature": "(id: string) => Promise<DownloadTask>",
78
+ "parameters": [
79
+ {
80
+ "name": "id",
81
+ "docs": "",
82
+ "type": "string"
83
+ }
84
+ ],
85
+ "returns": "Promise<DownloadTask>",
86
+ "tags": [],
87
+ "docs": "",
88
+ "complexTypes": [
89
+ "DownloadTask"
90
+ ],
91
+ "slug": "checkstatus"
92
+ },
93
+ {
94
+ "name": "getFileInfo",
95
+ "signature": "(path: string) => Promise<{ size: number; type: string; }>",
96
+ "parameters": [
97
+ {
98
+ "name": "path",
99
+ "docs": "",
100
+ "type": "string"
101
+ }
102
+ ],
103
+ "returns": "Promise<{ size: number; type: string; }>",
104
+ "tags": [],
105
+ "docs": "",
106
+ "complexTypes": [],
107
+ "slug": "getfileinfo"
108
+ },
109
+ {
110
+ "name": "addListener",
111
+ "signature": "(eventName: 'downloadProgress', listenerFunc: (progress: { id: string; progress: number; }) => void) => Promise<PluginListenerHandle>",
112
+ "parameters": [
113
+ {
114
+ "name": "eventName",
115
+ "docs": "",
116
+ "type": "'downloadProgress'"
117
+ },
118
+ {
119
+ "name": "listenerFunc",
120
+ "docs": "",
121
+ "type": "(progress: { id: string; progress: number; }) => void"
122
+ }
123
+ ],
124
+ "returns": "Promise<PluginListenerHandle>",
125
+ "tags": [],
126
+ "docs": "",
127
+ "complexTypes": [
128
+ "PluginListenerHandle"
129
+ ],
130
+ "slug": "addlistenerdownloadprogress-"
131
+ },
132
+ {
133
+ "name": "addListener",
134
+ "signature": "(eventName: 'downloadCompleted', listenerFunc: (result: { id: string; }) => void) => Promise<PluginListenerHandle>",
135
+ "parameters": [
136
+ {
137
+ "name": "eventName",
138
+ "docs": "",
139
+ "type": "'downloadCompleted'"
140
+ },
141
+ {
142
+ "name": "listenerFunc",
143
+ "docs": "",
144
+ "type": "(result: { id: string; }) => void"
145
+ }
146
+ ],
147
+ "returns": "Promise<PluginListenerHandle>",
148
+ "tags": [],
149
+ "docs": "",
150
+ "complexTypes": [
151
+ "PluginListenerHandle"
152
+ ],
153
+ "slug": "addlistenerdownloadcompleted-"
154
+ },
155
+ {
156
+ "name": "addListener",
157
+ "signature": "(eventName: 'downloadFailed', listenerFunc: (error: { id: string; error: string; }) => void) => Promise<PluginListenerHandle>",
158
+ "parameters": [
159
+ {
160
+ "name": "eventName",
161
+ "docs": "",
162
+ "type": "'downloadFailed'"
163
+ },
164
+ {
165
+ "name": "listenerFunc",
166
+ "docs": "",
167
+ "type": "(error: { id: string; error: string; }) => void"
168
+ }
169
+ ],
170
+ "returns": "Promise<PluginListenerHandle>",
171
+ "tags": [],
172
+ "docs": "",
173
+ "complexTypes": [
174
+ "PluginListenerHandle"
175
+ ],
176
+ "slug": "addlistenerdownloadfailed-"
177
+ },
178
+ {
179
+ "name": "removeAllListeners",
180
+ "signature": "() => Promise<void>",
181
+ "parameters": [],
182
+ "returns": "Promise<void>",
183
+ "tags": [],
184
+ "docs": "",
185
+ "complexTypes": [],
186
+ "slug": "removealllisteners"
187
+ }
188
+ ],
189
+ "properties": []
190
+ },
191
+ "interfaces": [
192
+ {
193
+ "name": "DownloadTask",
194
+ "slug": "downloadtask",
195
+ "docs": "",
196
+ "tags": [],
197
+ "methods": [],
198
+ "properties": [
199
+ {
200
+ "name": "id",
201
+ "tags": [],
202
+ "docs": "",
203
+ "complexTypes": [],
204
+ "type": "string"
205
+ },
206
+ {
207
+ "name": "progress",
208
+ "tags": [],
209
+ "docs": "",
210
+ "complexTypes": [],
211
+ "type": "number"
212
+ },
213
+ {
214
+ "name": "state",
215
+ "tags": [],
216
+ "docs": "",
217
+ "complexTypes": [],
218
+ "type": "'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR'"
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "name": "DownloadOptions",
224
+ "slug": "downloadoptions",
225
+ "docs": "",
226
+ "tags": [],
227
+ "methods": [],
228
+ "properties": [
229
+ {
230
+ "name": "id",
231
+ "tags": [],
232
+ "docs": "",
233
+ "complexTypes": [],
234
+ "type": "string"
235
+ },
236
+ {
237
+ "name": "url",
238
+ "tags": [],
239
+ "docs": "",
240
+ "complexTypes": [],
241
+ "type": "string"
242
+ },
243
+ {
244
+ "name": "destination",
245
+ "tags": [],
246
+ "docs": "",
247
+ "complexTypes": [],
248
+ "type": "string"
249
+ },
250
+ {
251
+ "name": "headers",
252
+ "tags": [],
253
+ "docs": "",
254
+ "complexTypes": [],
255
+ "type": "{ [key: string]: string; } | undefined"
256
+ },
257
+ {
258
+ "name": "network",
259
+ "tags": [],
260
+ "docs": "",
261
+ "complexTypes": [],
262
+ "type": "'cellular' | 'wifi-only' | undefined"
263
+ },
264
+ {
265
+ "name": "priority",
266
+ "tags": [],
267
+ "docs": "",
268
+ "complexTypes": [],
269
+ "type": "'high' | 'normal' | 'low' | undefined"
270
+ }
271
+ ]
272
+ },
273
+ {
274
+ "name": "PluginListenerHandle",
275
+ "slug": "pluginlistenerhandle",
276
+ "docs": "",
277
+ "tags": [],
278
+ "methods": [],
279
+ "properties": [
280
+ {
281
+ "name": "remove",
282
+ "tags": [],
283
+ "docs": "",
284
+ "complexTypes": [],
285
+ "type": "() => Promise<void>"
286
+ }
287
+ ]
288
+ }
289
+ ],
290
+ "enums": [],
291
+ "typeAliases": [],
292
+ "pluginConfigs": []
293
+ }
@@ -0,0 +1,39 @@
1
+ import type { PluginListenerHandle } from "@capacitor/core";
2
+ export interface DownloadTask {
3
+ id: string;
4
+ progress: number;
5
+ state: 'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR';
6
+ }
7
+ export interface DownloadOptions {
8
+ id: string;
9
+ url: string;
10
+ destination: string;
11
+ headers?: {
12
+ [key: string]: string;
13
+ };
14
+ network?: 'cellular' | 'wifi-only';
15
+ priority?: 'high' | 'normal' | 'low';
16
+ }
17
+ export interface CapacitorDownloaderPlugin {
18
+ download(options: DownloadOptions): Promise<DownloadTask>;
19
+ pause(id: string): Promise<void>;
20
+ resume(id: string): Promise<void>;
21
+ stop(id: string): Promise<void>;
22
+ checkStatus(id: string): Promise<DownloadTask>;
23
+ getFileInfo(path: string): Promise<{
24
+ size: number;
25
+ type: string;
26
+ }>;
27
+ addListener(eventName: 'downloadProgress', listenerFunc: (progress: {
28
+ id: string;
29
+ progress: number;
30
+ }) => void): Promise<PluginListenerHandle>;
31
+ addListener(eventName: 'downloadCompleted', listenerFunc: (result: {
32
+ id: string;
33
+ }) => void): Promise<PluginListenerHandle>;
34
+ addListener(eventName: 'downloadFailed', listenerFunc: (error: {
35
+ id: string;
36
+ error: string;
37
+ }) => void): Promise<PluginListenerHandle>;
38
+ removeAllListeners(): Promise<void>;
39
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from \"@capacitor/core\";\n\nexport interface DownloadTask {\n id: string;\n progress: number;\n state: 'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR';\n}\n\nexport interface DownloadOptions {\n id: string;\n url: string;\n destination: string;\n headers?: { [key: string]: string };\n network?: 'cellular' | 'wifi-only';\n priority?: 'high' | 'normal' | 'low';\n}\n\nexport interface CapacitorDownloaderPlugin {\n download(options: DownloadOptions): Promise<DownloadTask>;\n pause(id: string): Promise<void>;\n resume(id: string): Promise<void>;\n stop(id: string): Promise<void>;\n checkStatus(id: string): Promise<DownloadTask>;\n getFileInfo(path: string): Promise<{ size: number; type: string }>;\n \n addListener(eventName: 'downloadProgress', listenerFunc: (progress: { id: string; progress: number }) => void): Promise<PluginListenerHandle>;\n addListener(eventName: 'downloadCompleted', listenerFunc: (result: { id: string }) => void): Promise<PluginListenerHandle>;\n addListener(eventName: 'downloadFailed', listenerFunc: (error: { id: string; error: string }) => void): Promise<PluginListenerHandle>;\n removeAllListeners(): Promise<void>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { CapacitorDownloaderPlugin } from './definitions';
2
+ declare const CapacitorDownloader: CapacitorDownloaderPlugin;
3
+ export * from './definitions';
4
+ export { CapacitorDownloader };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const CapacitorDownloader = registerPlugin('CapacitorDownloader', {
3
+ web: () => import('./web').then((m) => new m.CapacitorDownloaderWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { CapacitorDownloader };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,mBAAmB,GAAG,cAAc,CAA4B,qBAAqB,EAAE;IAC3F,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,sBAAsB,EAAE,CAAC;CACvE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorDownloaderPlugin } from './definitions';\n\nconst CapacitorDownloader = registerPlugin<CapacitorDownloaderPlugin>('CapacitorDownloader', {\n web: () => import('./web').then((m) => new m.CapacitorDownloaderWeb()),\n});\n\nexport * from './definitions';\nexport { CapacitorDownloader };\n"]}
@@ -0,0 +1,13 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { CapacitorDownloaderPlugin, DownloadTask, DownloadOptions } from './definitions';
3
+ export declare class CapacitorDownloaderWeb extends WebPlugin implements CapacitorDownloaderPlugin {
4
+ download(options: DownloadOptions): Promise<DownloadTask>;
5
+ pause(id: string): Promise<void>;
6
+ resume(id: string): Promise<void>;
7
+ stop(id: string): Promise<void>;
8
+ checkStatus(id: string): Promise<DownloadTask>;
9
+ getFileInfo(path: string): Promise<{
10
+ size: number;
11
+ type: string;
12
+ }>;
13
+ }
@@ -0,0 +1,28 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class CapacitorDownloaderWeb extends WebPlugin {
3
+ async download(options) {
4
+ console.log('DOWNLOAD', options);
5
+ throw new Error('Method not implemented.');
6
+ }
7
+ async pause(id) {
8
+ console.log('PAUSE', id);
9
+ throw new Error('Method not implemented.');
10
+ }
11
+ async resume(id) {
12
+ console.log('RESUME', id);
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ async stop(id) {
16
+ console.log('STOP', id);
17
+ throw new Error('Method not implemented.');
18
+ }
19
+ async checkStatus(id) {
20
+ console.log('CHECK STATUS', id);
21
+ throw new Error('Method not implemented.');
22
+ }
23
+ async getFileInfo(path) {
24
+ console.log('GET FILE INFO', path);
25
+ throw new Error('Method not implemented.');
26
+ }
27
+ }
28
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IACnD,KAAK,CAAC,QAAQ,CAAC,OAAwB;QACrC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,EAAU;QACpB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAU;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,EAAU;QAC1B,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,IAAY;QAC5B,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorDownloaderPlugin, DownloadTask, DownloadOptions } from './definitions';\n\nexport class CapacitorDownloaderWeb extends WebPlugin implements CapacitorDownloaderPlugin {\n async download(options: DownloadOptions): Promise<DownloadTask> {\n console.log('DOWNLOAD', options);\n throw new Error('Method not implemented.');\n }\n async pause(id: string): Promise<void> {\n console.log('PAUSE', id);\n throw new Error('Method not implemented.');\n }\n async resume(id: string): Promise<void> {\n console.log('RESUME', id);\n throw new Error('Method not implemented.');\n }\n async stop(id: string): Promise<void> {\n console.log('STOP', id);\n throw new Error('Method not implemented.');\n }\n async checkStatus(id: string): Promise<DownloadTask> {\n console.log('CHECK STATUS', id);\n throw new Error('Method not implemented.');\n }\n async getFileInfo(path: string): Promise<{ size: number; type: string }> {\n console.log('GET FILE INFO', path);\n throw new Error('Method not implemented.');\n }\n}\n"]}
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ const CapacitorDownloader = core.registerPlugin('CapacitorDownloader', {
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorDownloaderWeb()),
7
+ });
8
+
9
+ class CapacitorDownloaderWeb extends core.WebPlugin {
10
+ async download(options) {
11
+ console.log('DOWNLOAD', options);
12
+ throw new Error('Method not implemented.');
13
+ }
14
+ async pause(id) {
15
+ console.log('PAUSE', id);
16
+ throw new Error('Method not implemented.');
17
+ }
18
+ async resume(id) {
19
+ console.log('RESUME', id);
20
+ throw new Error('Method not implemented.');
21
+ }
22
+ async stop(id) {
23
+ console.log('STOP', id);
24
+ throw new Error('Method not implemented.');
25
+ }
26
+ async checkStatus(id) {
27
+ console.log('CHECK STATUS', id);
28
+ throw new Error('Method not implemented.');
29
+ }
30
+ async getFileInfo(path) {
31
+ console.log('GET FILE INFO', path);
32
+ throw new Error('Method not implemented.');
33
+ }
34
+ }
35
+
36
+ var web = /*#__PURE__*/Object.freeze({
37
+ __proto__: null,
38
+ CapacitorDownloaderWeb: CapacitorDownloaderWeb
39
+ });
40
+
41
+ exports.CapacitorDownloader = CapacitorDownloader;
42
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorDownloader = registerPlugin('CapacitorDownloader', {\n web: () => import('./web').then((m) => new m.CapacitorDownloaderWeb()),\n});\nexport * from './definitions';\nexport { CapacitorDownloader };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorDownloaderWeb extends WebPlugin {\n async download(options) {\n console.log('DOWNLOAD', options);\n throw new Error('Method not implemented.');\n }\n async pause(id) {\n console.log('PAUSE', id);\n throw new Error('Method not implemented.');\n }\n async resume(id) {\n console.log('RESUME', id);\n throw new Error('Method not implemented.');\n }\n async stop(id) {\n console.log('STOP', id);\n throw new Error('Method not implemented.');\n }\n async checkStatus(id) {\n console.log('CHECK STATUS', id);\n throw new Error('Method not implemented.');\n }\n async getFileInfo(path) {\n console.log('GET FILE INFO', path);\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,mBAAmB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,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,45 @@
1
+ var capacitorCapacitorDownloader = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const CapacitorDownloader = core.registerPlugin('CapacitorDownloader', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorDownloaderWeb()),
6
+ });
7
+
8
+ class CapacitorDownloaderWeb extends core.WebPlugin {
9
+ async download(options) {
10
+ console.log('DOWNLOAD', options);
11
+ throw new Error('Method not implemented.');
12
+ }
13
+ async pause(id) {
14
+ console.log('PAUSE', id);
15
+ throw new Error('Method not implemented.');
16
+ }
17
+ async resume(id) {
18
+ console.log('RESUME', id);
19
+ throw new Error('Method not implemented.');
20
+ }
21
+ async stop(id) {
22
+ console.log('STOP', id);
23
+ throw new Error('Method not implemented.');
24
+ }
25
+ async checkStatus(id) {
26
+ console.log('CHECK STATUS', id);
27
+ throw new Error('Method not implemented.');
28
+ }
29
+ async getFileInfo(path) {
30
+ console.log('GET FILE INFO', path);
31
+ throw new Error('Method not implemented.');
32
+ }
33
+ }
34
+
35
+ var web = /*#__PURE__*/Object.freeze({
36
+ __proto__: null,
37
+ CapacitorDownloaderWeb: CapacitorDownloaderWeb
38
+ });
39
+
40
+ exports.CapacitorDownloader = CapacitorDownloader;
41
+
42
+ return exports;
43
+
44
+ })({}, capacitorExports);
45
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorDownloader = registerPlugin('CapacitorDownloader', {\n web: () => import('./web').then((m) => new m.CapacitorDownloaderWeb()),\n});\nexport * from './definitions';\nexport { CapacitorDownloader };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorDownloaderWeb extends WebPlugin {\n async download(options) {\n console.log('DOWNLOAD', options);\n throw new Error('Method not implemented.');\n }\n async pause(id) {\n console.log('PAUSE', id);\n throw new Error('Method not implemented.');\n }\n async resume(id) {\n console.log('RESUME', id);\n throw new Error('Method not implemented.');\n }\n async stop(id) {\n console.log('STOP', id);\n throw new Error('Method not implemented.');\n }\n async checkStatus(id) {\n console.log('CHECK STATUS', id);\n throw new Error('Method not implemented.');\n }\n async getFileInfo(path) {\n console.log('GET FILE INFO', path);\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,mBAAmB,GAAGA,mBAAc,CAAC,qBAAqB,EAAE;IAClE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,sBAAsB,EAAE,CAAC;IAC1E,CAAC;;ICFM,MAAM,sBAAsB,SAASC,cAAS,CAAC;IACtD,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,KAAK,CAAC,EAAE,EAAE;IACpB,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,MAAM,CAAC,EAAE,EAAE;IACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAClC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,EAAE,EAAE;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChC,QAAQ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