@aparajita/capacitor-biometric-auth 5.0.2 → 5.2.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
@@ -137,23 +137,25 @@ Register a function that will be called when the app resumes. The function will
137
137
 
138
138
  #### CheckBiometryResult
139
139
 
140
- | Prop | Type | Description |
141
- | :----------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
142
- | isAvailable | boolean | True if the device has biometric authentication capability and the current user has enrolled in biometry. |
143
- | biometryType | <a href="#biometrytype">BiometryType</a> | The type of biometry available on the device. |
144
- | reason | string | If biometry is not available and the system gives a reason why, it will be returned here. Otherwise it's an empty string. |
145
- | code | <a href="#biometryerrortype">BiometryErrorType</a> | If biometry is not available, the error code will be returned here. Otherwise it's an empty string. The error code will be one of the <a href="#biometryerrortype">`BiometryErrorType`</a> enum values, and is consistent across platforms. This allows you to check for specific errors in a platform- independent way, for example:<br><br>if (result.code === <a href="#biometryerrortype">BiometryErrorType.biometryNotEnrolled</a>) { ... } |
140
+ | Prop | Type | Description |
141
+ | :------------ | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
142
+ | isAvailable | boolean | True if the device has biometric authentication capability and the current user has enrolled in some form of biometry. |
143
+ | biometryType | <a href="#biometrytype">BiometryType</a> | The primary type of biometry available on the device. If the device supports both fingerprint and face authentication, this will be <a href="#biometrytype">`BiometryType.touchId`</a>. |
144
+ | biometryTypes | BiometryType[] | All of the biometry types supported by the device (currently only Android devices support multiple biometry types). If no biometry is available, this will be an empty array. If multiple types are supported, Android only guarantees that one of them is actually available. |
145
+ | reason | string | If biometry is not available and the system gives a reason why, it will be returned here. Otherwise it's an empty string. |
146
+ | code | <a href="#biometryerrortype">BiometryErrorType</a> | If biometry is not available, the error code will be returned here. Otherwise it's an empty string. The error code will be one of the <a href="#biometryerrortype">`BiometryErrorType`</a> enum values, and is consistent across platforms. This allows you to check for specific errors in a platform- independent way, for example:<br><br>if (result.code === <a href="#biometryerrortype">BiometryErrorType.biometryNotEnrolled</a>) { ... } |
146
147
 
147
148
  #### AuthenticateOptions
148
149
 
149
- | Prop | Type | Description |
150
- | :-------------------- | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
151
- | reason | string | The reason for requesting authentication. Displays in the authentication dialog presented to the user. If not supplied, a default message is displayed. |
152
- | cancelTitle | string | iOS: The system presents a cancel button during biometric authentication to let the user abort the authentication attempt. The button appears every time the system asks the user to present a finger registered with Touch ID. For Face ID, the button only appears if authentication fails and the user is prompted to try again. Either way, the user can stop trying to authenticate by tapping the button.<br><br>Android: The text for the negative button. This would typically be used as a "Cancel" button, but may be also used to show an alternative method for authentication, such as a screen that asks for a backup password.<br><br>Default: "Cancel" |
153
- | allowDeviceCredential | boolean | If true, allows for authentication using device unlock credentials. Default is false.<br><br>iOS: If biometry is available, enrolled, and not disabled, the system uses that first. After the first Touch ID failure or second Face ID failure, if `iosFallbackTitle` is not an empty string, a fallback button appears in the authentication dialog. If the user taps the fallback button, the system prompts the user for the device passcode or the user’s password. If `iosFallbackTitle` is an empty string, no fallback button will appear.<br><br>If biometry is not available, enrolled and enabled, and a passcode is set, the system immediately prompts the user for the device passcode or user’s password. Authentication fails with the error code `passcodeNotSet` if the device passcode isn’t enabled.<br><br>If a passcode is not set on the device, a `passcodeNotSet` error is returned.<br><br>The system disables passcode authentication after 6 unsuccessful attempts, with progressively increasing delays between attempts.<br><br>The title of the fallback button may be customized by setting `iosFallbackTitle` to a non-empty string.<br><br>Android: The user will first be prompted to authenticate with biometrics, but also given the option to authenticate with their device PIN, pattern, or password by tapping a button in the authentication dialog. The title of the button is supplied by the system. |
154
- | iosFallbackTitle | string | The system presents a fallback button when biometric authentication fails — for example, because the system doesn’t recognize the presented finger, or after several failed attempts to recognize the user’s face.<br><br>If `allowDeviceCredential` is false, tapping this button dismisses the authentication dialog and returns the error code userFallback. If undefined, the localized systetm default title is used. Passing an empty string hides the fallback button completely.<br><br>If `allowDeviceCredential` is true and this is undefined, the localized system default title is used. |
155
- | androidTitle | string | Title for the Android dialog. If not supplied, the system default is used. |
156
- | androidSubtitle | string | Subtitle for the Android dialog. If not supplied, the system default is used. |
150
+ | Prop | Type | Description |
151
+ | :-------------------------- | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
152
+ | reason | string | The reason for requesting authentication. Displays in the authentication dialog presented to the user. If not supplied, a default message is displayed. |
153
+ | cancelTitle | string | iOS: The system presents a cancel button during biometric authentication to let the user abort the authentication attempt. The button appears every time the system asks the user to present a finger registered with Touch ID. For Face ID, the button only appears if authentication fails and the user is prompted to try again. Either way, the user can stop trying to authenticate by tapping the button.<br><br>Android: The text for the negative button. This would typically be used as a "Cancel" button, but may be also used to show an alternative method for authentication, such as a screen that asks for a backup password.<br><br>Default: "Cancel" |
154
+ | allowDeviceCredential | boolean | If true, allows for authentication using device unlock credentials. Default is false.<br><br>iOS: If biometry is available, enrolled, and not disabled, the system uses that first. After the first Touch ID failure or second Face ID failure, if `iosFallbackTitle` is not an empty string, a fallback button appears in the authentication dialog. If the user taps the fallback button, the system prompts the user for the device passcode or the user’s password. If `iosFallbackTitle` is an empty string, no fallback button will appear.<br><br>If biometry is not available, enrolled and enabled, and a passcode is set, the system immediately prompts the user for the device passcode or user’s password. Authentication fails with the error code `passcodeNotSet` if the device passcode isn’t enabled.<br><br>If a passcode is not set on the device, a `passcodeNotSet` error is returned.<br><br>The system disables passcode authentication after 6 unsuccessful attempts, with progressively increasing delays between attempts.<br><br>The title of the fallback button may be customized by setting `iosFallbackTitle` to a non-empty string.<br><br>Android: The user will first be prompted to authenticate with biometrics, but also given the option to authenticate with their device PIN, pattern, or password by tapping a button in the authentication dialog. The title of the button is supplied by the system. |
155
+ | iosFallbackTitle | string | The system presents a fallback button when biometric authentication fails — for example, because the system doesn’t recognize the presented finger, or after several failed attempts to recognize the user’s face.<br><br>If `allowDeviceCredential` is false, tapping this button dismisses the authentication dialog and returns the error code userFallback. If undefined, the localized system default title is used. Passing an empty string hides the fallback button completely.<br><br>If `allowDeviceCredential` is true and this is undefined, the localized system default title is used. |
156
+ | androidTitle | string | Title for the Android dialog. If not supplied, the system default is used. |
157
+ | androidSubtitle | string | Subtitle for the Android dialog. If not supplied, the system default is used. |
158
+ | androidConfirmationRequired | boolean | For information on this setting, see:<br><br>https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setConfirmationRequired(boolean)<br><br>If not set, defaults to true. |
157
159
 
158
160
  #### PluginListenerHandle
159
161
 
@@ -1,6 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- >
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
4
3
 
5
4
  <application>
6
5
  <activity
@@ -7,6 +7,7 @@ import android.hardware.biometrics.BiometricManager;
7
7
  import android.os.Build;
8
8
  import android.os.Bundle;
9
9
  import android.os.Handler;
10
+ import android.util.Log;
10
11
  import androidx.annotation.NonNull;
11
12
  import androidx.appcompat.app.AppCompatActivity;
12
13
  import androidx.biometric.BiometricPrompt;
@@ -81,6 +82,10 @@ public class AuthActivity extends AppCompatActivity {
81
82
  );
82
83
  }
83
84
 
85
+ builder.setConfirmationRequired(
86
+ intent.getBooleanExtra(BiometricAuthNative.CONFIRMATION_REQUIRED, true)
87
+ );
88
+
84
89
  BiometricPrompt.PromptInfo promptInfo = builder.build();
85
90
  BiometricPrompt prompt = new BiometricPrompt(
86
91
  this,
@@ -8,12 +8,14 @@ import android.os.Build;
8
8
  import androidx.activity.result.ActivityResult;
9
9
  import androidx.biometric.BiometricManager;
10
10
  import androidx.biometric.BiometricPrompt;
11
+ import com.getcapacitor.JSArray;
11
12
  import com.getcapacitor.JSObject;
12
13
  import com.getcapacitor.Plugin;
13
14
  import com.getcapacitor.PluginCall;
14
15
  import com.getcapacitor.PluginMethod;
15
16
  import com.getcapacitor.annotation.ActivityCallback;
16
17
  import com.getcapacitor.annotation.CapacitorPlugin;
18
+ import java.util.ArrayList;
17
19
  import java.util.HashMap;
18
20
 
19
21
  @SuppressLint("RestrictedApi")
@@ -28,6 +30,8 @@ public class BiometricAuthNative extends Plugin {
28
30
  public static final String REASON = "reason";
29
31
  public static final String CANCEL_TITLE = "cancelTitle";
30
32
  public static final String DEVICE_CREDENTIAL = "allowDeviceCredential";
33
+ public static final String CONFIRMATION_REQUIRED =
34
+ "androidConfirmationRequired";
31
35
  public static final String MAX_ATTEMPTS = "androidMaxAttempts";
32
36
  public static final int DEFAULT_MAX_ATTEMPTS = 3;
33
37
  // Error code when biometry is not recognized
@@ -40,6 +44,7 @@ public class BiometricAuthNative extends Plugin {
40
44
 
41
45
  static {
42
46
  biometryErrorCodeMap = new HashMap<>();
47
+ biometryErrorCodeMap.put(BiometricManager.BIOMETRIC_SUCCESS, "");
43
48
  biometryErrorCodeMap.put(BiometricPrompt.ERROR_CANCELED, "systemCancel");
44
49
  biometryErrorCodeMap.put(
45
50
  BiometricPrompt.ERROR_HW_NOT_PRESENT,
@@ -84,7 +89,7 @@ public class BiometricAuthNative extends Plugin {
84
89
  biometryNameMap.put(BiometryType.IRIS, "Iris Authentication");
85
90
  }
86
91
 
87
- private BiometryType biometryType;
92
+ private ArrayList<BiometryType> biometryTypes;
88
93
 
89
94
  /**
90
95
  * Check the device's availability and type of biometric authentication.
@@ -106,8 +111,17 @@ public class BiometricAuthNative extends Plugin {
106
111
  "isAvailable",
107
112
  biometryResult == BiometricManager.BIOMETRIC_SUCCESS
108
113
  );
109
- biometryType = getDeviceBiometryType();
110
- ret.put("biometryType", biometryType.getType());
114
+
115
+ biometryTypes = getDeviceBiometryTypes();
116
+ ret.put("biometryType", biometryTypes.get(0).getType());
117
+
118
+ JSArray returnTypes = new JSArray();
119
+
120
+ for (BiometryType type : biometryTypes) {
121
+ returnTypes.put(type.getType());
122
+ }
123
+
124
+ ret.put("biometryTypes", returnTypes);
111
125
 
112
126
  String reason = "";
113
127
 
@@ -147,22 +161,27 @@ public class BiometricAuthNative extends Plugin {
147
161
  call.resolve(ret);
148
162
  }
149
163
 
150
- private BiometryType getDeviceBiometryType() {
164
+ private ArrayList<BiometryType> getDeviceBiometryTypes() {
165
+ ArrayList<BiometryType> types = new ArrayList<BiometryType>();
151
166
  PackageManager manager = getContext().getPackageManager();
152
167
 
153
168
  if (manager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
154
- return BiometryType.FINGERPRINT;
169
+ types.add(BiometryType.FINGERPRINT);
155
170
  }
156
171
 
157
172
  if (manager.hasSystemFeature(PackageManager.FEATURE_FACE)) {
158
- return BiometryType.FACE;
173
+ types.add(BiometryType.FACE);
159
174
  }
160
175
 
161
176
  if (manager.hasSystemFeature(PackageManager.FEATURE_IRIS)) {
162
- return BiometryType.IRIS;
177
+ types.add(BiometryType.IRIS);
163
178
  }
164
179
 
165
- return BiometryType.NONE;
180
+ if (types.size() == 0) {
181
+ types.add(BiometryType.NONE);
182
+ }
183
+
184
+ return types;
166
185
  }
167
186
 
168
187
  /**
@@ -178,7 +197,7 @@ public class BiometricAuthNative extends Plugin {
178
197
  // Pass the options to the activity
179
198
  intent.putExtra(
180
199
  TITLE,
181
- call.getString(TITLE, biometryNameMap.get(biometryType))
200
+ call.getString(TITLE, biometryNameMap.get(biometryTypes.get(0)))
182
201
  );
183
202
  intent.putExtra(SUBTITLE, call.getString(SUBTITLE));
184
203
  intent.putExtra(REASON, call.getString(REASON));
@@ -188,6 +207,13 @@ public class BiometricAuthNative extends Plugin {
188
207
  call.getBoolean(DEVICE_CREDENTIAL, false)
189
208
  );
190
209
 
210
+ if (call.hasOption(CONFIRMATION_REQUIRED)) {
211
+ intent.putExtra(
212
+ CONFIRMATION_REQUIRED,
213
+ call.getBoolean(CONFIRMATION_REQUIRED, true)
214
+ );
215
+ }
216
+
191
217
  // Just in case the developer does something dumb like using a number < 1...
192
218
  Integer maxAttemptsConfig = call.getInt(MAX_ATTEMPTS, DEFAULT_MAX_ATTEMPTS);
193
219
  int maxAttempts = Math.max(
@@ -85,7 +85,7 @@ export interface AuthenticateOptions {
85
85
  *
86
86
  * If `allowDeviceCredential` is false, tapping this button dismisses the
87
87
  * authentication dialog and returns the error code userFallback. If undefined,
88
- * the localized systetm default title is used. Passing an empty string
88
+ * the localized system default title is used. Passing an empty string
89
89
  * hides the fallback button completely.
90
90
  *
91
91
  * If `allowDeviceCredential` is true and this is undefined,
@@ -100,6 +100,14 @@ export interface AuthenticateOptions {
100
100
  * Subtitle for the Android dialog. If not supplied, the system default is used.
101
101
  */
102
102
  androidSubtitle?: string;
103
+ /**
104
+ * For information on this setting, see:
105
+ *
106
+ * https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setConfirmationRequired(boolean)
107
+ *
108
+ * If not set, defaults to true.
109
+ */
110
+ androidConfirmationRequired?: boolean;
103
111
  }
104
112
  /**
105
113
  * If the `authenticate()` method throws an exception, the error object
@@ -135,13 +143,23 @@ export declare class BiometryError implements ResultError {
135
143
  export interface CheckBiometryResult {
136
144
  /**
137
145
  * True if the device has biometric authentication capability
138
- * and the current user has enrolled in biometry.
146
+ * and the current user has enrolled in some form of biometry.
139
147
  */
140
148
  isAvailable: boolean;
141
149
  /**
142
- * The type of biometry available on the device.
150
+ * The primary type of biometry available on the device. If the device
151
+ * supports both fingerprint and face authentication, this will be
152
+ * `BiometryType.touchId`.
143
153
  */
144
154
  biometryType: BiometryType;
155
+ /**
156
+ * All of the biometry types supported by the device (currently only
157
+ * Android devices support multiple biometry types). If no biometry
158
+ * is available, this will be an empty array. If multiple types
159
+ * are supported, Android only guarantees that one of them is actually
160
+ * available.
161
+ */
162
+ biometryTypes: BiometryType[];
145
163
  /**
146
164
  * If biometry is not available and the system gives a reason why,
147
165
  * it will be returned here. Otherwise it's an empty string.
@@ -12,6 +12,7 @@ export class BiometricAuthNative extends BiometricAuthBase {
12
12
  return Promise.resolve({
13
13
  isAvailable: true,
14
14
  biometryType: BiometryType.none,
15
+ biometryTypes: [],
15
16
  reason: '',
16
17
  code: BiometryErrorType.none,
17
18
  });
package/dist/esm/web.js CHANGED
@@ -11,17 +11,18 @@ export class BiometricAuthWeb extends BiometricAuthBase {
11
11
  return Promise.resolve({
12
12
  isAvailable: this.biometryType !== BiometryType.none,
13
13
  biometryType: this.biometryType,
14
+ biometryTypes: [],
14
15
  reason: '',
15
16
  code: BiometryErrorType.none,
16
17
  });
17
18
  }
18
19
  async authenticate(options) {
19
20
  return this.checkBiometry().then(({ isAvailable, biometryType }) => {
21
+ var _a;
20
22
  if (isAvailable) {
21
23
  if (
22
24
  // eslint-disable-next-line no-alert
23
- confirm((options === null || options === void 0 ? void 0 : options.reason) ||
24
- `Authenticate with ${getBiometryName(biometryType)}?`)) {
25
+ confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
25
26
  return;
26
27
  }
27
28
  throw new BiometryError('User cancelled', BiometryErrorType.userCancel);
@@ -108,17 +108,18 @@ class BiometricAuthWeb extends BiometricAuthBase {
108
108
  return Promise.resolve({
109
109
  isAvailable: this.biometryType !== exports.BiometryType.none,
110
110
  biometryType: this.biometryType,
111
+ biometryTypes: [],
111
112
  reason: '',
112
113
  code: exports.BiometryErrorType.none,
113
114
  });
114
115
  }
115
116
  async authenticate(options) {
116
117
  return this.checkBiometry().then(({ isAvailable, biometryType }) => {
118
+ var _a;
117
119
  if (isAvailable) {
118
120
  if (
119
121
  // eslint-disable-next-line no-alert
120
- confirm((options === null || options === void 0 ? void 0 : options.reason) ||
121
- `Authenticate with ${getBiometryName(biometryType)}?`)) {
122
+ confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
122
123
  return;
123
124
  }
124
125
  throw new BiometryError('User cancelled', exports.BiometryErrorType.userCancel);
@@ -161,6 +162,7 @@ class BiometricAuthNative extends BiometricAuthBase {
161
162
  return Promise.resolve({
162
163
  isAvailable: true,
163
164
  biometryType: exports.BiometryType.none,
165
+ biometryTypes: [],
164
166
  reason: '',
165
167
  code: exports.BiometryErrorType.none,
166
168
  });
package/dist/plugin.js CHANGED
@@ -106,17 +106,18 @@ var capacitorBiometricAuth = (function (exports, core, app) {
106
106
  return Promise.resolve({
107
107
  isAvailable: this.biometryType !== exports.BiometryType.none,
108
108
  biometryType: this.biometryType,
109
+ biometryTypes: [],
109
110
  reason: '',
110
111
  code: exports.BiometryErrorType.none,
111
112
  });
112
113
  }
113
114
  async authenticate(options) {
114
115
  return this.checkBiometry().then(({ isAvailable, biometryType }) => {
116
+ var _a;
115
117
  if (isAvailable) {
116
118
  if (
117
119
  // eslint-disable-next-line no-alert
118
- confirm((options === null || options === void 0 ? void 0 : options.reason) ||
119
- `Authenticate with ${getBiometryName(biometryType)}?`)) {
120
+ confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
120
121
  return;
121
122
  }
122
123
  throw new BiometryError('User cancelled', exports.BiometryErrorType.userCancel);
@@ -159,6 +160,7 @@ var capacitorBiometricAuth = (function (exports, core, app) {
159
160
  return Promise.resolve({
160
161
  isAvailable: true,
161
162
  biometryType: exports.BiometryType.none,
163
+ biometryTypes: [],
162
164
  reason: '',
163
165
  code: exports.BiometryErrorType.none,
164
166
  });
@@ -8,6 +8,7 @@ private let kMissingFaceIDUsageEntry = "The device supports Face ID, but NSFaceI
8
8
  @objc(BiometricAuthNative)
9
9
  public class BiometricAuthNative: CAPPlugin {
10
10
  let biometryErrorCodeMap: [Int: String] = [
11
+ 0: "",
11
12
  LAError.appCancel.rawValue: "appCancel",
12
13
  LAError.authenticationFailed.rawValue: "authenticationFailed",
13
14
  LAError.invalidContext.rawValue: "invalidContext",
@@ -57,9 +58,13 @@ public class BiometricAuthNative: CAPPlugin {
57
58
  errorCode = biometryErrorCodeMap[error.code] ?? biometryErrorCodeMap[LAError.biometryNotAvailable.rawValue] ?? ""
58
59
  }
59
60
 
61
+ var types = JSArray()
62
+ types.append(context.biometryType.rawValue)
63
+
60
64
  call.resolve([
61
65
  "isAvailable": available,
62
66
  "biometryType": context.biometryType.rawValue,
67
+ "biometryTypes": types,
63
68
  "reason": reason,
64
69
  "code": errorCode
65
70
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparajita/capacitor-biometric-auth",
3
- "version": "5.0.2",
3
+ "version": "5.2.0",
4
4
  "description": "Provides access to the native biometric auth APIs for Capacitor apps",
5
5
  "author": "Aparajita Fishman",
6
6
  "license": "MIT",
@@ -53,46 +53,45 @@
53
53
  "devDependencies": {
54
54
  "@aparajita/capacitor-docgen": "github:aparajita/capacitor-docgen",
55
55
  "@aparajita/capacitor-docgen-format": "github:aparajita/capacitor-docgen-format",
56
- "@aparajita/eslint-config-base": "^1.1.5",
57
- "@aparajita/prettier-config": "^1.0.0",
56
+ "@aparajita/eslint-config-base": "^1.1.6",
57
+ "@aparajita/prettier-config": "^2.0.0",
58
58
  "@aparajita/swiftly": "^1.0.4",
59
- "@capacitor/cli": "^5.0.5",
60
- "@commitlint/cli": "^17.6.5",
61
- "@commitlint/config-conventional": "^17.6.5",
59
+ "@capacitor/cli": "^5.4.1",
60
+ "@commitlint/cli": "^17.7.2",
61
+ "@commitlint/config-conventional": "^17.7.0",
62
62
  "@ionic/swiftlint-config": "^1.1.2",
63
63
  "@rollup/plugin-json": "^6.0.0",
64
- "@types/node": "^20.3.1",
65
- "@typescript-eslint/eslint-plugin": "^5.60.0",
66
- "@typescript-eslint/parser": "^5.60.0",
67
- "commit-and-tag-version": "^11.2.2",
68
- "eslint": "^8.43.0",
69
- "eslint-config-prettier": "^8.8.0",
64
+ "@types/node": "^20.8.0",
65
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
66
+ "@typescript-eslint/parser": "^6.7.3",
67
+ "commit-and-tag-version": "^11.2.3",
68
+ "eslint": "^8.50.0",
69
+ "eslint-config-prettier": "^9.0.0",
70
70
  "eslint-config-standard": "^17.1.0",
71
- "eslint-import-resolver-typescript": "^3.5.5",
72
- "eslint-plugin-import": "^2.27.5",
73
- "eslint-plugin-n": "^16.0.0",
74
- "eslint-plugin-prettier": "^4.2.1",
71
+ "eslint-import-resolver-typescript": "^3.6.1",
72
+ "eslint-plugin-import": "^2.28.1",
73
+ "eslint-plugin-n": "^16.1.0",
75
74
  "eslint-plugin-promise": "^6.1.1",
76
- "nodemon": "^2.0.22",
77
- "prettier": "^2.8.8",
78
- "prettier-plugin-java": "^2.1.0",
79
- "rimraf": "^5.0.1",
80
- "rollup": "^3.25.1",
75
+ "nodemon": "^3.0.1",
76
+ "prettier": "^3.0.3",
77
+ "prettier-plugin-java": "^2.3.1",
78
+ "rimraf": "^5.0.5",
79
+ "rollup": "^3.29.4",
81
80
  "swiftlint": "^1.0.2",
82
- "typescript": "~5.1.3"
81
+ "typescript": "~5.2.2"
83
82
  },
84
83
  "dependencies": {
85
- "@capacitor/android": "^5.0.5",
86
- "@capacitor/app": "^5.0.3",
87
- "@capacitor/core": "^5.0.5",
88
- "@capacitor/ios": "^5.0.5"
84
+ "@capacitor/android": "^5.4.1",
85
+ "@capacitor/app": "^5.0.6",
86
+ "@capacitor/core": "^5.4.1",
87
+ "@capacitor/ios": "^5.4.1"
89
88
  },
90
89
  "scripts": {
91
90
  "clean": "rimraf dist",
92
91
  "lint.eslint": "eslint --fix --cache --ext .js,.cjs,.mjs,.ts --max-warnings 0",
93
- "lint.prettier": "prettier --write --plugin ./node_modules/prettier-plugin-java --cache --list-different",
92
+ "lint.prettier": "prettier --write --cache --list-different",
94
93
  "lint.tsc": "tsc --noEmit",
95
- "lint": "pnpm lint.eslint . && pnpm lint.prettier . && pnpm lint.tsc && swiftly ios",
94
+ "lint": "pnpm lint.eslint . && pnpm lint.prettier '**/*.{js,mjs,ts,json,md,java}' && pnpm lint.tsc && swiftly ios",
96
95
  "prebuilder": "pnpm clean",
97
96
  "builder": "tsc ${SOURCE_MAP:-} && rollup -c rollup.config.mjs",
98
97
  "prebuild": "pnpm lint",