@gachlab/capacitor-dnd-plugin 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,44 +13,21 @@ npx cap sync
13
13
 
14
14
  <docgen-index>
15
15
 
16
- * [`monitor(...)`](#monitor)
17
- * [`toggleDoNotDisturb()`](#toggledonotdisturb)
18
- * [Interfaces](#interfaces)
16
+ * [`monitor()`](#monitor)
19
17
 
20
18
  </docgen-index>
21
19
 
22
20
  <docgen-api>
23
21
  <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
24
22
 
25
- ### monitor(...)
23
+ ### monitor()
26
24
 
27
25
  ```typescript
28
- monitor(callback: (result: DoNotDisturbState) => void) => Promise<void>
26
+ monitor() => Promise<any>
29
27
  ```
30
28
 
31
- | Param | Type |
32
- | -------------- | ------------------------------------------------------------------------------------ |
33
- | **`callback`** | <code>(result: <a href="#donotdisturbstate">DoNotDisturbState</a>) =&gt; void</code> |
29
+ **Returns:** <code>Promise&lt;any&gt;</code>
34
30
 
35
31
  --------------------
36
32
 
37
-
38
- ### toggleDoNotDisturb()
39
-
40
- ```typescript
41
- toggleDoNotDisturb() => Promise<void>
42
- ```
43
-
44
- --------------------
45
-
46
-
47
- ### Interfaces
48
-
49
-
50
- #### DoNotDisturbState
51
-
52
- | Prop | Type |
53
- | ------------------ | -------------------- |
54
- | **`doNotDisturb`** | <code>boolean</code> |
55
-
56
33
  </docgen-api>
@@ -1,2 +1,20 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <application>
3
+ <service android:name="NotificationListener"
4
+ android:label="@string/service_name"
5
+ android:exported="false"
6
+ android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
7
+ <intent-filter>
8
+ <action android:name="android.service.notification.NotificationListenerService" />
9
+ </intent-filter>
10
+ <meta-data
11
+ android:name="android.service.notification.default_filter_types"
12
+ android:value="conversations|alerting">
13
+ </meta-data>
14
+ <meta-data
15
+ android:name="android.service.notification.disabled_filter_types"
16
+ android:value="ongoing|silent">
17
+ </meta-data>
18
+ </service>
19
+ </application>
2
20
  </manifest>
@@ -0,0 +1,11 @@
1
+ package com.gachlab.capacitor.dnd;
2
+
3
+ import android.util.Log;
4
+
5
+ public class DoNotDisturb {
6
+
7
+ public String echo(String value) {
8
+ Log.i("Echo", value);
9
+ return value;
10
+ }
11
+ }
@@ -1,84 +1,27 @@
1
1
  package com.gachlab.capacitor.dnd;
2
2
 
3
- import static android.Manifest.permission.ACCESS_NOTIFICATION_POLICY;
4
-
5
- import android.app.NotificationManager;
6
- import android.content.Context;
7
- import android.os.Build;
8
- import android.provider.Settings;
9
-
10
- import androidx.annotation.RequiresApi;
3
+ import android.Manifest;
11
4
 
12
5
  import com.getcapacitor.JSObject;
13
- import com.getcapacitor.PermissionState;
14
6
  import com.getcapacitor.Plugin;
15
7
  import com.getcapacitor.PluginCall;
16
8
  import com.getcapacitor.PluginMethod;
17
9
  import com.getcapacitor.annotation.CapacitorPlugin;
18
10
  import com.getcapacitor.annotation.Permission;
19
- import com.getcapacitor.annotation.PermissionCallback;
20
-
21
- import java.util.Timer;
22
- import java.util.TimerTask;
23
11
 
24
- @RequiresApi(api = Build.VERSION_CODES.M)
25
- @CapacitorPlugin(
26
- name = "DoNotDisturb",
27
- permissions = {
28
- @Permission(alias = "notifications-policy", strings = {ACCESS_NOTIFICATION_POLICY})
29
- })
12
+ @CapacitorPlugin(name = "DoNotDisturb", permissions = {
13
+ @Permission(alias = "notifications-policy", strings = { Manifest.permission.ACCESS_NOTIFICATION_POLICY })
14
+ })
30
15
  public class DoNotDisturbPlugin extends Plugin {
31
- private NotificationManager notificationManager = null;
32
-
33
- @PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)
34
- public void monitor(PluginCall call) {
35
- call.setKeepAlive(true);
36
- JSObject ret = new JSObject();
37
- new Timer().scheduleAtFixedRate(new TimerTask() {
38
- @Override
39
- public void run() {
40
- try {
41
- ret.put(
42
- "doNotDisturb",
43
- Settings.Global.getInt(getActivity().getApplicationContext().getContentResolver(), "zen_mode") == 1
44
- );
45
- } catch (Settings.SettingNotFoundException e) {
46
- ret.put(
47
- "doNotDisturb",
48
- null);
49
- }
50
- call.resolve(ret);
51
- }
52
- }, 5000, 10000);
53
- }
54
16
 
55
- @PluginMethod(returnType = PluginMethod.RETURN_NONE)
56
- public void toggleDoNotDisturb(PluginCall call) {
57
- this.notificationManager = (NotificationManager) getActivity().getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
58
- // Check if the notification policy access has been granted for the app.
59
- if (!notificationManager.isNotificationPolicyAccessGranted()) {
60
- requestPermissionForAlias("notifications-policy", call, "doNotDisturbPermsCallback");
17
+ private DoNotDisturb implementation = new DoNotDisturb();
61
18
 
62
- } else {
63
- ToggleDoNotDisturb(call);
64
- }
65
- }
19
+ @PluginMethod
20
+ public void echo(PluginCall call) {
21
+ String value = call.getString("value");
66
22
 
67
- @PermissionCallback
68
- private void doNotDisturbPermsCallback(PluginCall call) {
69
- if (getPermissionState("notifications-policy") == PermissionState.GRANTED) {
70
- ToggleDoNotDisturb(call);
71
- } else {
72
- call.reject("Permission is required to take a picture");
73
- }
74
- }
75
-
76
- private void ToggleDoNotDisturb(PluginCall call) {
77
- if (notificationManager.getCurrentInterruptionFilter() == NotificationManager.INTERRUPTION_FILTER_ALL) {
78
- notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_NONE);
79
- } else {
80
- notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_ALL);
81
- }
82
- call.resolve();
23
+ JSObject ret = new JSObject();
24
+ ret.put("value", implementation.echo(value));
25
+ call.resolve(ret);
83
26
  }
84
27
  }
package/dist/docs.json CHANGED
@@ -7,53 +7,18 @@
7
7
  "methods": [
8
8
  {
9
9
  "name": "monitor",
10
- "signature": "(callback: (result: DoNotDisturbState) => void) => Promise<void>",
11
- "parameters": [
12
- {
13
- "name": "callback",
14
- "docs": "",
15
- "type": "(result: DoNotDisturbState) => void"
16
- }
17
- ],
18
- "returns": "Promise<void>",
19
- "tags": [],
20
- "docs": "",
21
- "complexTypes": [
22
- "DoNotDisturbState"
23
- ],
24
- "slug": "monitor"
25
- },
26
- {
27
- "name": "toggleDoNotDisturb",
28
- "signature": "() => Promise<void>",
10
+ "signature": "() => Promise<any>",
29
11
  "parameters": [],
30
- "returns": "Promise<void>",
12
+ "returns": "Promise<any>",
31
13
  "tags": [],
32
14
  "docs": "",
33
15
  "complexTypes": [],
34
- "slug": "toggledonotdisturb"
16
+ "slug": "monitor"
35
17
  }
36
18
  ],
37
19
  "properties": []
38
20
  },
39
- "interfaces": [
40
- {
41
- "name": "DoNotDisturbState",
42
- "slug": "donotdisturbstate",
43
- "docs": "",
44
- "tags": [],
45
- "methods": [],
46
- "properties": [
47
- {
48
- "name": "doNotDisturb",
49
- "tags": [],
50
- "docs": "",
51
- "complexTypes": [],
52
- "type": "boolean"
53
- }
54
- ]
55
- }
56
- ],
21
+ "interfaces": [],
57
22
  "enums": [],
58
23
  "typeAliases": [],
59
24
  "pluginConfigs": []
@@ -1,7 +1,3 @@
1
- export interface DoNotDisturbState {
2
- doNotDisturb: boolean;
3
- }
4
1
  export interface DoNotDisturbPlugin {
5
- monitor(callback: (result: DoNotDisturbState) => void): Promise<void>;
6
- toggleDoNotDisturb(): Promise<void>;
2
+ monitor(): Promise<any>;
7
3
  }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface DoNotDisturbState {\n doNotDisturb: boolean\n}\n\nexport interface DoNotDisturbPlugin {\n monitor(callback: (result: DoNotDisturbState) => void): Promise<void>\n\n toggleDoNotDisturb(): Promise<void>\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface DoNotDisturbPlugin {\n monitor(): Promise<any>;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { WebPlugin } from '@capacitor/core';
2
- import type { DoNotDisturbPlugin, DoNotDisturbState } from './definitions';
1
+ import { WebPlugin } from "@capacitor/core";
2
+ import type { DoNotDisturbPlugin } from "./definitions";
3
3
  export declare class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {
4
- private currentState;
5
- monitor(callback: (result: DoNotDisturbState) => void): Promise<void>;
6
- toggleDoNotDisturb(): Promise<void>;
4
+ monitor(): Promise<any>;
7
5
  }
package/dist/esm/web.js CHANGED
@@ -1,16 +1,7 @@
1
- import { WebPlugin } from '@capacitor/core';
1
+ import { WebPlugin } from "@capacitor/core";
2
2
  export class DoNotDisturbWeb extends WebPlugin {
3
- constructor() {
4
- super(...arguments);
5
- this.currentState = { doNotDisturb: false };
6
- }
7
- monitor(callback) {
8
- callback(this.currentState);
9
- return Promise.resolve();
10
- }
11
- toggleDoNotDisturb() {
12
- Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb });
13
- return Promise.resolve();
3
+ monitor() {
4
+ throw new Error("Method not implemented in web.");
14
5
  }
15
6
  }
16
7
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAA9C;;QACU,iBAAY,GAAsB,EAAE,YAAY,EAAE,KAAK,EAAE,CAAA;IAUnE,CAAC;IATC,OAAO,CAAC,QAA6C;QACnD,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QAC3B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;IACD,kBAAkB;QAChB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAA;QACnF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CAEF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin, DoNotDisturbState } from './definitions';\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n private currentState: DoNotDisturbState = { doNotDisturb: false }\n monitor(callback: (result: DoNotDisturbState) => void): Promise<void> {\n callback(this.currentState)\n return Promise.resolve()\n }\n toggleDoNotDisturb(): Promise<void> {\n Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb })\n return Promise.resolve()\n }\n\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,OAAO;QACL,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n monitor(): Promise<any> {\n throw new Error(\"Method not implemented in web.\");\n }\n}\n"]}
@@ -1,7 +1,5 @@
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 DoNotDisturb = core.registerPlugin('DoNotDisturb', {
@@ -9,17 +7,8 @@ const DoNotDisturb = core.registerPlugin('DoNotDisturb', {
9
7
  });
10
8
 
11
9
  class DoNotDisturbWeb extends core.WebPlugin {
12
- constructor() {
13
- super(...arguments);
14
- this.currentState = { doNotDisturb: false };
15
- }
16
- monitor(callback) {
17
- callback(this.currentState);
18
- return Promise.resolve();
19
- }
20
- toggleDoNotDisturb() {
21
- Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb });
22
- return Promise.resolve();
10
+ monitor() {
11
+ throw new Error("Method not implemented in web.");
23
12
  }
24
13
  }
25
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DoNotDisturb = registerPlugin('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\nexport * from './definitions';\nexport { DoNotDisturb };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DoNotDisturbWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.currentState = { doNotDisturb: false };\n }\n monitor(callback) {\n callback(this.currentState);\n return Promise.resolve();\n }\n toggleDoNotDisturb() {\n Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb });\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,eAAe,SAASC,cAAS,CAAC;AAC/C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AAC5B,QAAQ,IAAI,CAAC,YAAY,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;AACpD,KAAK;AACL,IAAI,OAAO,CAAC,QAAQ,EAAE;AACtB,QAAQ,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACpC,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;AAC5F,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DoNotDisturb = registerPlugin('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\nexport * from './definitions';\nexport { DoNotDisturb };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class DoNotDisturbWeb extends WebPlugin {\n monitor() {\n throw new Error(\"Method not implemented in web.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,eAAe,SAASC,cAAS,CAAC;AAC/C,IAAI,OAAO,GAAG;AACd,QAAQ,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC;AACzD;AACA;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -6,17 +6,8 @@ var capacitorDoNotDisturb = (function (exports, core) {
6
6
  });
7
7
 
8
8
  class DoNotDisturbWeb extends core.WebPlugin {
9
- constructor() {
10
- super(...arguments);
11
- this.currentState = { doNotDisturb: false };
12
- }
13
- monitor(callback) {
14
- callback(this.currentState);
15
- return Promise.resolve();
16
- }
17
- toggleDoNotDisturb() {
18
- Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb });
19
- return Promise.resolve();
9
+ monitor() {
10
+ throw new Error("Method not implemented in web.");
20
11
  }
21
12
  }
22
13
 
@@ -27,8 +18,6 @@ var capacitorDoNotDisturb = (function (exports, core) {
27
18
 
28
19
  exports.DoNotDisturb = DoNotDisturb;
29
20
 
30
- Object.defineProperty(exports, '__esModule', { value: true });
31
-
32
21
  return exports;
33
22
 
34
23
  })({}, capacitorExports);
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DoNotDisturb = registerPlugin('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\nexport * from './definitions';\nexport { DoNotDisturb };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DoNotDisturbWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.currentState = { doNotDisturb: false };\n }\n monitor(callback) {\n callback(this.currentState);\n return Promise.resolve();\n }\n toggleDoNotDisturb() {\n Object.assign(this.currentState, { doNotDisturb: !this.currentState.doNotDisturb });\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,eAAe,SAASC,cAAS,CAAC;IAC/C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IAC5B,QAAQ,IAAI,CAAC,YAAY,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IACpD,KAAK;IACL,IAAI,OAAO,CAAC,QAAQ,EAAE;IACtB,QAAQ,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,kBAAkB,GAAG;IACzB,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5F,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DoNotDisturb = registerPlugin('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\nexport * from './definitions';\nexport { DoNotDisturb };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class DoNotDisturbWeb extends WebPlugin {\n monitor() {\n throw new Error(\"Method not implemented in web.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,eAAe,SAASC,cAAS,CAAC;IAC/C,IAAI,OAAO,GAAG;IACd,QAAQ,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC;IACzD;IACA;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gachlab/capacitor-dnd-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A plugin to set and monitor the Do Not Disturb state",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -35,32 +35,32 @@
35
35
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
36
36
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
37
37
  "eslint": "eslint . --ext ts",
38
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
38
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
39
39
  "swiftlint": "node-swiftlint",
40
40
  "docgen": "docgen --api DoNotDisturbPlugin --output-readme README.md --output-json dist/docs.json",
41
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
41
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
42
42
  "clean": "rimraf ./dist",
43
43
  "watch": "tsc --watch",
44
44
  "prepublishOnly": "npm run build"
45
45
  },
46
46
  "devDependencies": {
47
- "@capacitor/android": "^5.0.0",
48
- "@capacitor/core": "^5.0.0",
49
- "@capacitor/docgen": "^0.0.18",
50
- "@capacitor/ios": "^5.0.0",
51
- "@ionic/eslint-config": "^0.3.0",
52
- "@ionic/prettier-config": "^1.0.1",
53
- "@ionic/swiftlint-config": "^1.1.2",
54
- "eslint": "^7.11.0",
55
- "prettier": "~2.3.0",
56
- "prettier-plugin-java": "~1.0.2",
57
- "rimraf": "^3.0.2",
58
- "rollup": "^2.32.0",
59
- "swiftlint": "^1.0.1",
60
- "typescript": "~4.1.5"
47
+ "@capacitor/android": "^7.0.0",
48
+ "@capacitor/core": "^7.0.0",
49
+ "@capacitor/docgen": "^0.3.0",
50
+ "@capacitor/ios": "^7.0.0",
51
+ "@ionic/eslint-config": "^0.4.0",
52
+ "@ionic/prettier-config": "^4.0.0",
53
+ "@ionic/swiftlint-config": "^2.0.0",
54
+ "eslint": "^8.57.0",
55
+ "prettier": "^3.4.2",
56
+ "prettier-plugin-java": "^2.6.6",
57
+ "rimraf": "^6.0.1",
58
+ "rollup": "^4.30.1",
59
+ "swiftlint": "^2.0.0",
60
+ "typescript": "~5.3.3"
61
61
  },
62
62
  "peerDependencies": {
63
- "@capacitor/core": "^5.0.0"
63
+ "@capacitor/core": ">=7.0.0"
64
64
  },
65
65
  "prettier": "@ionic/prettier-config",
66
66
  "swiftlint": "@ionic/swiftlint-config",