@capacitor/background-runner 1.0.0-rc.1

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.
Files changed (61) hide show
  1. package/CapacitorBackgroundRunner.podspec +17 -0
  2. package/README.md +310 -0
  3. package/android/build.gradle +67 -0
  4. package/android/src/main/AndroidManifest.xml +12 -0
  5. package/android/src/main/java/io/ionic/backgroundrunner/plugin/BackgroundRunner.kt +166 -0
  6. package/android/src/main/java/io/ionic/backgroundrunner/plugin/BackgroundRunnerPlugin.kt +102 -0
  7. package/android/src/main/java/io/ionic/backgroundrunner/plugin/CoroutineHelper.kt +21 -0
  8. package/android/src/main/java/io/ionic/backgroundrunner/plugin/RunnerConfig.kt +33 -0
  9. package/android/src/main/java/io/ionic/backgroundrunner/plugin/RunnerWorker.kt +46 -0
  10. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/Device.kt +99 -0
  11. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/Geolocation.kt +55 -0
  12. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/KV.kt +29 -0
  13. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/NetworkStatus.kt +10 -0
  14. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/Notification.kt +59 -0
  15. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/Notifications.kt +158 -0
  16. package/android/src/main/java/io/ionic/backgroundrunner/plugin/api/TimedNotificationPublisher.kt +40 -0
  17. package/android/src/main/libs/android-js-engine-release.aar +0 -0
  18. package/android/src/main/res/.gitkeep +0 -0
  19. package/dist/docs.json +208 -0
  20. package/dist/esm/apis.d.ts +52 -0
  21. package/dist/esm/apis.js +2 -0
  22. package/dist/esm/apis.js.map +1 -0
  23. package/dist/esm/definitions.d.ts +82 -0
  24. package/dist/esm/definitions.js +3 -0
  25. package/dist/esm/definitions.js.map +1 -0
  26. package/dist/esm/index.d.ts +5 -0
  27. package/dist/esm/index.js +8 -0
  28. package/dist/esm/index.js.map +1 -0
  29. package/dist/esm/web.d.ts +8 -0
  30. package/dist/esm/web.js +16 -0
  31. package/dist/esm/web.js.map +1 -0
  32. package/dist/plugin.cjs.js +32 -0
  33. package/dist/plugin.cjs.js.map +1 -0
  34. package/dist/plugin.js +35 -0
  35. package/dist/plugin.js.map +1 -0
  36. package/ios/Plugin/BackgroundRunner.swift +223 -0
  37. package/ios/Plugin/BackgroundRunnerErrors.swift +8 -0
  38. package/ios/Plugin/BackgroundRunnerPlugin.h +10 -0
  39. package/ios/Plugin/BackgroundRunnerPlugin.m +11 -0
  40. package/ios/Plugin/BackgroundRunnerPlugin.swift +161 -0
  41. package/ios/Plugin/CapacitorAPI/Device.swift +116 -0
  42. package/ios/Plugin/CapacitorAPI/Geolocation.swift +190 -0
  43. package/ios/Plugin/CapacitorAPI/KV.swift +22 -0
  44. package/ios/Plugin/CapacitorAPI/Notifications.swift +165 -0
  45. package/ios/Plugin/CapacitorAPI/Reachability.swift +395 -0
  46. package/ios/Plugin/CapacitorAPI/Wearable.swift +48 -0
  47. package/ios/Plugin/Context+CapacitorAPI.swift +11 -0
  48. package/ios/Plugin/Info.plist +24 -0
  49. package/ios/Plugin/RunnerConfig.swift +36 -0
  50. package/ios/Plugin/RunnerEngine/Context.swift +151 -0
  51. package/ios/Plugin/RunnerEngine/Errors.swift +8 -0
  52. package/ios/Plugin/RunnerEngine/JSConsole.swift +38 -0
  53. package/ios/Plugin/RunnerEngine/JSCrypto.swift +38 -0
  54. package/ios/Plugin/RunnerEngine/JSError.swift +33 -0
  55. package/ios/Plugin/RunnerEngine/JSFetch.swift +50 -0
  56. package/ios/Plugin/RunnerEngine/JSResponse.swift +69 -0
  57. package/ios/Plugin/RunnerEngine/JSTextDecoder.swift +60 -0
  58. package/ios/Plugin/RunnerEngine/JSTextEncoder.swift +12 -0
  59. package/ios/Plugin/RunnerEngine/Runner.swift +23 -0
  60. package/ios/Plugin/WatchConnectivtySessionDelegate.swift +34 -0
  61. package/package.json +81 -0
package/dist/docs.json ADDED
@@ -0,0 +1,208 @@
1
+ {
2
+ "api": {
3
+ "name": "BackgroundRunnerPlugin",
4
+ "slug": "backgroundrunnerplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "checkPermissions",
10
+ "signature": "() => any",
11
+ "parameters": [],
12
+ "returns": "any",
13
+ "tags": [
14
+ {
15
+ "name": "since",
16
+ "text": "1.0.0"
17
+ }
18
+ ],
19
+ "docs": "Check permissions for the various Capacitor device APIs.",
20
+ "complexTypes": [
21
+ "PermissionStatus"
22
+ ],
23
+ "slug": "checkpermissions"
24
+ },
25
+ {
26
+ "name": "requestPermissions",
27
+ "signature": "(options: RequestPermissionOptions) => any",
28
+ "parameters": [
29
+ {
30
+ "name": "options",
31
+ "docs": "",
32
+ "type": "RequestPermissionOptions"
33
+ }
34
+ ],
35
+ "returns": "any",
36
+ "tags": [
37
+ {
38
+ "name": "since",
39
+ "text": "1.0.0"
40
+ }
41
+ ],
42
+ "docs": "Request permission to display local notifications.",
43
+ "complexTypes": [
44
+ "RequestPermissionOptions",
45
+ "PermissionStatus"
46
+ ],
47
+ "slug": "requestpermissions"
48
+ },
49
+ {
50
+ "name": "dispatchEvent",
51
+ "signature": "(options: DispatchEventOptions) => any",
52
+ "parameters": [
53
+ {
54
+ "name": "options",
55
+ "docs": "",
56
+ "type": "DispatchEventOptions"
57
+ }
58
+ ],
59
+ "returns": "any",
60
+ "tags": [
61
+ {
62
+ "name": "param",
63
+ "text": "options"
64
+ },
65
+ {
66
+ "name": "since",
67
+ "text": "1.0.0"
68
+ }
69
+ ],
70
+ "docs": "Dispatches an event to the configured runner.",
71
+ "complexTypes": [
72
+ "DispatchEventOptions"
73
+ ],
74
+ "slug": "dispatchevent"
75
+ }
76
+ ],
77
+ "properties": []
78
+ },
79
+ "interfaces": [
80
+ {
81
+ "name": "PermissionStatus",
82
+ "slug": "permissionstatus",
83
+ "docs": "",
84
+ "tags": [],
85
+ "methods": [],
86
+ "properties": [
87
+ {
88
+ "name": "geolocation",
89
+ "tags": [],
90
+ "docs": "",
91
+ "complexTypes": [
92
+ "PermissionState"
93
+ ],
94
+ "type": "PermissionState"
95
+ },
96
+ {
97
+ "name": "notifications",
98
+ "tags": [],
99
+ "docs": "",
100
+ "complexTypes": [
101
+ "PermissionState"
102
+ ],
103
+ "type": "PermissionState"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "name": "RequestPermissionOptions",
109
+ "slug": "requestpermissionoptions",
110
+ "docs": "",
111
+ "tags": [],
112
+ "methods": [],
113
+ "properties": [
114
+ {
115
+ "name": "apis",
116
+ "tags": [],
117
+ "docs": "",
118
+ "complexTypes": [
119
+ "API"
120
+ ],
121
+ "type": "{}"
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "name": "DispatchEventOptions",
127
+ "slug": "dispatcheventoptions",
128
+ "docs": "",
129
+ "tags": [],
130
+ "methods": [],
131
+ "properties": [
132
+ {
133
+ "name": "label",
134
+ "tags": [
135
+ {
136
+ "text": "1.0.0",
137
+ "name": "since"
138
+ }
139
+ ],
140
+ "docs": "The runner label to dispatch the event to",
141
+ "complexTypes": [],
142
+ "type": "string"
143
+ },
144
+ {
145
+ "name": "event",
146
+ "tags": [
147
+ {
148
+ "text": "1.0.0",
149
+ "name": "since"
150
+ }
151
+ ],
152
+ "docs": "The name of the registered event listener.",
153
+ "complexTypes": [],
154
+ "type": "string"
155
+ },
156
+ {
157
+ "name": "details",
158
+ "tags": [],
159
+ "docs": "",
160
+ "complexTypes": [],
161
+ "type": "{ [key: string]: any; }"
162
+ }
163
+ ]
164
+ }
165
+ ],
166
+ "enums": [],
167
+ "typeAliases": [
168
+ {
169
+ "name": "PermissionState",
170
+ "slug": "permissionstate",
171
+ "docs": "",
172
+ "types": [
173
+ {
174
+ "text": "'prompt'",
175
+ "complexTypes": []
176
+ },
177
+ {
178
+ "text": "'prompt-with-rationale'",
179
+ "complexTypes": []
180
+ },
181
+ {
182
+ "text": "'granted'",
183
+ "complexTypes": []
184
+ },
185
+ {
186
+ "text": "'denied'",
187
+ "complexTypes": []
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "name": "API",
193
+ "slug": "api",
194
+ "docs": "",
195
+ "types": [
196
+ {
197
+ "text": "'geolocation'",
198
+ "complexTypes": []
199
+ },
200
+ {
201
+ "text": "'notifications'",
202
+ "complexTypes": []
203
+ }
204
+ ]
205
+ }
206
+ ],
207
+ "pluginConfigs": []
208
+ }
@@ -0,0 +1,52 @@
1
+ export interface GetCurrentPositionResult {
2
+ latitude: number;
3
+ longitude: number;
4
+ accuracy: number;
5
+ altitude: number;
6
+ altitudeAccuracy?: number;
7
+ speed: number;
8
+ heading: number;
9
+ }
10
+ export interface BatteryStatus {
11
+ batteryLevel: number;
12
+ isCharging: boolean;
13
+ }
14
+ export interface NetworkStatus {
15
+ connected: boolean;
16
+ connectionType: string;
17
+ }
18
+ export interface NotificationScheduleOptions {
19
+ id: number;
20
+ title: string;
21
+ body: string;
22
+ scheduleAt: Date;
23
+ sound?: string;
24
+ actionTypeId?: string;
25
+ threadIdentifier?: string;
26
+ summaryArgument?: string;
27
+ groupSummary?: string;
28
+ extra?: unknown;
29
+ ongoing?: boolean;
30
+ autoCancel?: boolean;
31
+ largeBody?: string;
32
+ summaryText?: string;
33
+ smallIcon?: string;
34
+ largeIcon?: string;
35
+ group?: string;
36
+ channelId?: string;
37
+ }
38
+ export interface CapacitorGeolocation {
39
+ getCurrentLocation: () => GetCurrentPositionResult;
40
+ }
41
+ export interface CapacitorKV {
42
+ set: (key: string, value: string) => void;
43
+ get: (key: string) => string;
44
+ remove: (key: string) => void;
45
+ }
46
+ export interface CapacitorDevice {
47
+ getBatteryStatus: () => BatteryStatus;
48
+ getNetworkStatus: () => NetworkStatus;
49
+ }
50
+ export interface CapacitorNotifications {
51
+ schedule: (options: NotificationScheduleOptions[]) => void;
52
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=apis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apis.js","sourceRoot":"","sources":["../../src/apis.ts"],"names":[],"mappings":"","sourcesContent":["export interface GetCurrentPositionResult {\n latitude: number;\n longitude: number;\n accuracy: number;\n altitude: number;\n altitudeAccuracy?: number;\n speed: number;\n heading: number;\n}\n\nexport interface BatteryStatus {\n batteryLevel: number;\n isCharging: boolean;\n}\n\nexport interface NetworkStatus {\n connected: boolean;\n connectionType: string;\n}\n\nexport interface NotificationScheduleOptions {\n id: number;\n title: string;\n body: string;\n scheduleAt: Date;\n sound?: string;\n actionTypeId?: string;\n threadIdentifier?: string;\n summaryArgument?: string;\n groupSummary?: string;\n extra?: unknown;\n ongoing?: boolean;\n autoCancel?: boolean;\n largeBody?: string;\n summaryText?: string;\n smallIcon?: string;\n largeIcon?: string;\n group?: string;\n channelId?: string;\n}\n\nexport interface CapacitorGeolocation {\n getCurrentLocation: () => GetCurrentPositionResult;\n}\n\nexport interface CapacitorKV {\n set: (key: string, value: string) => void;\n get: (key: string) => string;\n remove: (key: string) => void;\n}\n\nexport interface CapacitorDevice {\n getBatteryStatus: () => BatteryStatus;\n getNetworkStatus: () => NetworkStatus;\n}\n\nexport interface CapacitorNotifications {\n schedule: (options: NotificationScheduleOptions[]) => void;\n}\n"]}
@@ -0,0 +1,82 @@
1
+ import type { PermissionState } from '@capacitor/core';
2
+ export type API = 'geolocation' | 'notifications';
3
+ export interface PermissionStatus {
4
+ geolocation: PermissionState;
5
+ notifications: PermissionState;
6
+ }
7
+ export interface DispatchEventOptions {
8
+ /**
9
+ * The runner label to dispatch the event to
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ label: string;
14
+ /**
15
+ * The name of the registered event listener.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ event: string;
20
+ details: {
21
+ [key: string]: any;
22
+ };
23
+ }
24
+ export interface RequestPermissionOptions {
25
+ apis: API[];
26
+ }
27
+ export interface RegisterBackgroundTaskOptions {
28
+ runner: BackgroundRunnerConfig;
29
+ }
30
+ export interface BackgroundRunnerConfig {
31
+ /**
32
+ * The name of the runner, used in logs.
33
+ */
34
+ label: string;
35
+ /**
36
+ * The path to the runner JavaScript file, relative to the app bundle.
37
+ */
38
+ src: string;
39
+ /**
40
+ * The custom event that will be called when the background task is run.
41
+ */
42
+ event: string;
43
+ /**
44
+ * Repeats the execution of the background task based on the interval set in `interval`.
45
+ */
46
+ repeat: boolean;
47
+ /**
48
+ * The number of minutes after the the app is put into the background in which the background task should begin.
49
+ *
50
+ * If `repeat` is true, this also specifies the number of minutes between each execution.
51
+ */
52
+ interval: number;
53
+ /**
54
+ * Automatically register and schedule background task on app load.
55
+ */
56
+ autoStart?: boolean;
57
+ }
58
+ export interface BackgroundRunnerPlugin {
59
+ /**
60
+ * Check permissions for the various Capacitor device APIs.
61
+ *
62
+ * @since 1.0.0
63
+ */
64
+ checkPermissions(): Promise<PermissionStatus>;
65
+ /**
66
+ * Request permission to display local notifications.
67
+ *
68
+ * @since 1.0.0
69
+ */
70
+ requestPermissions(options: RequestPermissionOptions): Promise<PermissionStatus>;
71
+ /**
72
+ * Dispatches an event to the configured runner.
73
+ * @param options
74
+ * @since 1.0.0
75
+ */
76
+ dispatchEvent(options: DispatchEventOptions): Promise<void>;
77
+ }
78
+ declare module '@capacitor/cli' {
79
+ interface PluginsConfig {
80
+ BackgroundRunner?: BackgroundRunnerConfig;
81
+ }
82
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="@capacitor/cli" />
2
+ export {};
3
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\nimport type { PermissionState } from '@capacitor/core';\n\nexport type API = 'geolocation' | 'notifications';\n\nexport interface PermissionStatus {\n geolocation: PermissionState;\n notifications: PermissionState;\n}\n\nexport interface DispatchEventOptions {\n /**\n * The runner label to dispatch the event to\n *\n * @since 1.0.0\n */\n label: string;\n /**\n * The name of the registered event listener.\n *\n * @since 1.0.0\n */\n event: string;\n details: { [key: string]: any };\n}\n\nexport interface RequestPermissionOptions {\n apis: API[];\n}\n\nexport interface RegisterBackgroundTaskOptions {\n runner: BackgroundRunnerConfig;\n}\n\nexport interface BackgroundRunnerConfig {\n /**\n * The name of the runner, used in logs.\n */\n label: string;\n /**\n * The path to the runner JavaScript file, relative to the app bundle.\n */\n src: string;\n /**\n * The custom event that will be called when the background task is run.\n */\n event: string;\n /**\n * Repeats the execution of the background task based on the interval set in `interval`.\n */\n repeat: boolean;\n /**\n * The number of minutes after the the app is put into the background in which the background task should begin.\n *\n * If `repeat` is true, this also specifies the number of minutes between each execution.\n */\n interval: number;\n /**\n * Automatically register and schedule background task on app load.\n */\n autoStart?: boolean;\n}\n\nexport interface BackgroundRunnerPlugin {\n /**\n * Check permissions for the various Capacitor device APIs.\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n /**\n * Request permission to display local notifications.\n *\n * @since 1.0.0\n */\n requestPermissions(\n options: RequestPermissionOptions,\n ): Promise<PermissionStatus>;\n /**\n * Dispatches an event to the configured runner.\n * @param options\n * @since 1.0.0\n */\n dispatchEvent(options: DispatchEventOptions): Promise<void>;\n}\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n BackgroundRunner?: BackgroundRunnerConfig;\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { BackgroundRunnerPlugin } from './definitions';
2
+ declare const BackgroundRunner: BackgroundRunnerPlugin;
3
+ export * from './definitions';
4
+ export * from './apis';
5
+ export { BackgroundRunner };
@@ -0,0 +1,8 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const BackgroundRunner = registerPlugin('BackgroundRunner', {
3
+ web: () => import('./web').then(m => new m.BackgroundRunnerWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export * from './apis';
7
+ export { BackgroundRunner };
8
+ //# 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,gBAAgB,GAAG,cAAc,CACrC,kBAAkB,EAClB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;CAClE,CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BackgroundRunnerPlugin } from './definitions';\n\nconst BackgroundRunner = registerPlugin<BackgroundRunnerPlugin>(\n 'BackgroundRunner',\n {\n web: () => import('./web').then(m => new m.BackgroundRunnerWeb()),\n },\n);\n\nexport * from './definitions';\nexport * from './apis';\n\nexport { BackgroundRunner };\n"]}
@@ -0,0 +1,8 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { BackgroundRunnerPlugin, PermissionStatus } from './definitions';
3
+ export declare class BackgroundRunnerWeb extends WebPlugin implements BackgroundRunnerPlugin {
4
+ checkPermissions(): Promise<PermissionStatus>;
5
+ requestPermissions(): Promise<PermissionStatus>;
6
+ registerBackgroundTask(): Promise<void>;
7
+ dispatchEvent(): Promise<void>;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class BackgroundRunnerWeb extends WebPlugin {
3
+ checkPermissions() {
4
+ throw new Error('not available on web');
5
+ }
6
+ requestPermissions() {
7
+ throw new Error('not available on web');
8
+ }
9
+ registerBackgroundTask() {
10
+ throw new Error('not available on web');
11
+ }
12
+ dispatchEvent() {
13
+ throw new Error('not available on web');
14
+ }
15
+ }
16
+ //# 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,mBACX,SAAQ,SAAS;IAGjB,gBAAgB;QACd,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,kBAAkB;QAChB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,sBAAsB;QACpB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,aAAa;QACX,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BackgroundRunnerPlugin, PermissionStatus } from './definitions';\n\nexport class BackgroundRunnerWeb\n extends WebPlugin\n implements BackgroundRunnerPlugin\n{\n checkPermissions(): Promise<PermissionStatus> {\n throw new Error('not available on web');\n }\n\n requestPermissions(): Promise<PermissionStatus> {\n throw new Error('not available on web');\n }\n\n registerBackgroundTask(): Promise<void> {\n throw new Error('not available on web');\n }\n\n dispatchEvent(): Promise<void> {\n throw new Error('not available on web');\n }\n}\n"]}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@capacitor/core');
6
+
7
+ const BackgroundRunner = core.registerPlugin('BackgroundRunner', {
8
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BackgroundRunnerWeb()),
9
+ });
10
+
11
+ class BackgroundRunnerWeb extends core.WebPlugin {
12
+ checkPermissions() {
13
+ throw new Error('not available on web');
14
+ }
15
+ requestPermissions() {
16
+ throw new Error('not available on web');
17
+ }
18
+ registerBackgroundTask() {
19
+ throw new Error('not available on web');
20
+ }
21
+ dispatchEvent() {
22
+ throw new Error('not available on web');
23
+ }
24
+ }
25
+
26
+ var web = /*#__PURE__*/Object.freeze({
27
+ __proto__: null,
28
+ BackgroundRunnerWeb: BackgroundRunnerWeb
29
+ });
30
+
31
+ exports.BackgroundRunner = BackgroundRunner;
32
+ //# 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 BackgroundRunner = registerPlugin('BackgroundRunner', {\n web: () => import('./web').then(m => new m.BackgroundRunnerWeb()),\n});\nexport * from './definitions';\nexport * from './apis';\nexport { BackgroundRunner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BackgroundRunnerWeb extends WebPlugin {\n checkPermissions() {\n throw new Error('not available on web');\n }\n requestPermissions() {\n throw new Error('not available on web');\n }\n registerBackgroundTask() {\n throw new Error('not available on web');\n }\n dispatchEvent() {\n throw new Error('not available on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,gBAAgB,GAAG;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAChD,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAChD,KAAK;AACL,IAAI,sBAAsB,GAAG;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAChD,KAAK;AACL,IAAI,aAAa,GAAG;AACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAChD,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,35 @@
1
+ var capacitorBackgroundRunner = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const BackgroundRunner = core.registerPlugin('BackgroundRunner', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BackgroundRunnerWeb()),
6
+ });
7
+
8
+ class BackgroundRunnerWeb extends core.WebPlugin {
9
+ checkPermissions() {
10
+ throw new Error('not available on web');
11
+ }
12
+ requestPermissions() {
13
+ throw new Error('not available on web');
14
+ }
15
+ registerBackgroundTask() {
16
+ throw new Error('not available on web');
17
+ }
18
+ dispatchEvent() {
19
+ throw new Error('not available on web');
20
+ }
21
+ }
22
+
23
+ var web = /*#__PURE__*/Object.freeze({
24
+ __proto__: null,
25
+ BackgroundRunnerWeb: BackgroundRunnerWeb
26
+ });
27
+
28
+ exports.BackgroundRunner = BackgroundRunner;
29
+
30
+ Object.defineProperty(exports, '__esModule', { value: true });
31
+
32
+ return exports;
33
+
34
+ }({}, capacitorExports));
35
+ //# 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 BackgroundRunner = registerPlugin('BackgroundRunner', {\n web: () => import('./web').then(m => new m.BackgroundRunnerWeb()),\n});\nexport * from './definitions';\nexport * from './apis';\nexport { BackgroundRunner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BackgroundRunnerWeb extends WebPlugin {\n checkPermissions() {\n throw new Error('not available on web');\n }\n requestPermissions() {\n throw new Error('not available on web');\n }\n registerBackgroundTask() {\n throw new Error('not available on web');\n }\n dispatchEvent() {\n throw new Error('not available on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACrE,CAAC;;ICFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD,IAAI,gBAAgB,GAAG;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChD,KAAK;IACL,IAAI,kBAAkB,GAAG;IACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChD,KAAK;IACL,IAAI,sBAAsB,GAAG;IAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChD,KAAK;IACL,IAAI,aAAa,GAAG;IACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChD,KAAK;IACL;;;;;;;;;;;;;;;;;"}