@aparajita/capacitor-biometric-auth 2.0.5 β†’ 2.0.6

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
@@ -6,6 +6,8 @@ This plugin for [Capacitor 3](https://capacitorjs.com) provides access to native
6
6
 
7
7
  πŸ‘‰ **NOTE:** This plugin only works with Capacitor 3. If you are upgrading from the Capacitor 2 version, note that the plugin name has changed to `BiometricAuth`.
8
8
 
9
+ πŸ›‘ **IMPORTANT:** If you are upgrading from a version prior to 2.0.5, please note that `androidMaxAttempts` in [`AuthenticateOptions`](#authenticateoptions) is now the maximum consecutive failed attempts that are allowed, vs. the previous behavior which was maximum consecutive failed attempts + 1 (which was a bug). So if `androidMaxAttempts` is set to 3, [`authenticate`](#authenticate) will return `BiometryErrorType.authenticationFailed`as soon as the third consecutive attempt fails.
10
+
9
11
  ## Demos
10
12
 
11
13
  Here is `capacitor-biometric-auth` running on the [demo app](https://github.com/aparajita/capacitor-biometric-auth-demo) on both iOS and Android.
@@ -155,7 +157,7 @@ Register a function that will be called when the app resumes. The function will
155
157
  |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. |
156
158
  |androidTitle|string| Title for the Android dialog. If not supplied, the system default is used. |
157
159
  |androidSubtitle|string| Subtitle for the Android dialog. If not supplied, the system default is used. |
158
- |androidMaxAttempts|number| The maximum number of failed biometric verification attempts before returning `BiometryError.authenticationFailed`. The default is 3. |
160
+ |androidMaxAttempts|number| When this many consecutive biometric verification attempts fail, `authenticate` returns `BiometryErrorType.authenticationFailed`. The default is 3. |
159
161
 
160
162
 
161
163
  #### PluginListenerHandle
@@ -102,8 +102,9 @@ export interface AuthenticateOptions {
102
102
  */
103
103
  androidSubtitle?: string;
104
104
  /**
105
- * The maximum number of failed biometric verification attempts before
106
- * returning `BiometryError.authenticationFailed`. The default is 3.
105
+ * When this many consecutive biometric verification attempts fail,
106
+ * `authenticate` returns `BiometryErrorType.authenticationFailed`.
107
+ * The default is 3.
107
108
  */
108
109
  androidMaxAttempts?: number;
109
110
  }
@@ -55,3 +55,4 @@ export class BiometryError {
55
55
  }
56
56
  }
57
57
  export const kPluginName = 'BiometricAuth';
58
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YA8BX;AA9BD,WAAY,YAAY;IACtB;;OAEG;IACH,+CAAI,CAAA;IAEJ;;OAEG;IACH,qDAAO,CAAA;IAEP;;OAEG;IACH,mDAAM,CAAA;IAEN;;OAEG;IACH,yFAAyB,CAAA;IAEzB;;OAEG;IACH,2EAAkB,CAAA;IAElB;;OAEG;IACH,2EAAkB,CAAA;AACpB,CAAC,EA9BW,YAAY,KAAZ,YAAY,QA8BvB;AA2FD;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,mEAAS,CAAA;IACT,yFAAoB,CAAA;IACpB,6EAAc,CAAA;IACd,6EAAc,CAAA;IACd,6EAAc,CAAA;IACd,yEAAY,CAAA;IACZ,qEAAU,CAAA;IACV,yEAAY,CAAA;IACZ,+EAAe,CAAA;IACf,yFAAoB,CAAA;IACpB,wFAAmB,CAAA;IACnB,sFAAkB,CAAA;AACpB,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B;AAMD,MAAM,OAAO,aAAa;IAIxB,YAAY,OAAe,EAAE,IAAuB;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;CACF;AAoED,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAA"}
package/dist/esm/index.js CHANGED
@@ -7,7 +7,6 @@ console.log(`loaded ${name}`);
7
7
  // we have one version of the TS code to rule them all, and there
8
8
  // is no need to lazy load. 😁
9
9
  const plugin = new BiometricAuth();
10
- // eslint-disable-next-line @typescript-eslint/naming-convention
11
10
  const biometricAuth = registerPlugin(kPluginName, {
12
11
  web: plugin,
13
12
  ios: plugin,
@@ -16,3 +15,4 @@ const biometricAuth = registerPlugin(kPluginName, {
16
15
  export * from './definitions';
17
16
  export { biometricAuth as BiometricAuth };
18
17
  export { getBiometryName } from './web';
18
+ //# 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,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAA;AAE7B,8DAA8D;AAC9D,iEAAiE;AACjE,8BAA8B;AAC9B,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAA;AAElC,MAAM,aAAa,GAAG,cAAc,CAAsB,WAAW,EAAE;IACrE,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA;AAEF,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparajita/capacitor-biometric-auth",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Provides access to the native biometric auth APIs for Capacitor apps",
5
5
  "author": "Aparajita Fishman",
6
6
  "license": "MIT",
@@ -21,12 +21,14 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "clean": "rimraf ./dist",
24
- "build": "pnpm check && pnpm build.only",
25
- "build.dev": "pnpm check && pnpm build.only.dev",
24
+ "build": "pnpm check.fix && pnpm build.only",
25
+ "build.dev": "pnpm check.fix && pnpm build.only.dev",
26
26
  "build.only": "pnpm clean && tsc $SOURCE_MAP && pnpm rollup && make-ios-plugin && pnpm docgen",
27
27
  "build.only.dev": "SOURCE_MAP=--sourceMap pnpm build.only",
28
28
  "rollup": "rollup -c rollup.config.mjs",
29
- "watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.mjs --exec 'pnpm build --silent' -e ts",
29
+ "watcher": "nodemon -w ./src -w tsconfig.json -w rollup.config.mjs --exec 'pnpm $BUILD --silent' -e ts",
30
+ "watch": "BUILD=build pnpm watcher",
31
+ "watch.dev": "BUILD=build.dev pnpm watcher",
30
32
  "lint": "eslint . && pnpm typecheck",
31
33
  "lint.fix": "eslint --fix . && pnpm typecheck",
32
34
  "typecheck": "tsc --noEmit",
@@ -75,13 +77,13 @@
75
77
  "devDependencies": {
76
78
  "@aparajita/capacitor-docgen": "github:aparajita/capacitor-docgen",
77
79
  "@aparajita/capacitor-docgen-format": "github:aparajita/capacitor-docgen-format",
78
- "@aparajita/eslint-config-base": "^1.1.2",
80
+ "@aparajita/eslint-config-base": "^1.1.4",
79
81
  "@aparajita/prettier-config": "^1.0.0",
80
- "@aparajita/swiftly": "^1.0.1",
82
+ "@aparajita/swiftly": "^1.0.4",
81
83
  "@capacitor/core": "^3.6.0",
82
84
  "@ionic/swiftlint-config": "^1.1.2",
83
85
  "@rollup/plugin-json": "^4.1.0",
84
- "@types/node": "^18.0.1",
86
+ "@types/node": "^18.0.3",
85
87
  "@typescript-eslint/eslint-plugin": "^5.30.5",
86
88
  "@typescript-eslint/parser": "^5.30.5",
87
89
  "chalk": "^5.0.1",
@@ -89,20 +91,22 @@
89
91
  "eslint": "^8.19.0",
90
92
  "eslint-config-prettier": "^8.5.0",
91
93
  "eslint-config-standard": "^17.0.0",
92
- "eslint-import-resolver-typescript": "^3.2.1",
94
+ "eslint-import-resolver-typescript": "^3.2.5",
93
95
  "eslint-plugin-import": "^2.26.0",
94
96
  "eslint-plugin-n": "^15.2.4",
95
97
  "eslint-plugin-prettier": "^4.2.1",
96
98
  "eslint-plugin-promise": "^6.0.0",
97
- "nodemon": "^2.0.18",
99
+ "nodemon": "^2.0.19",
98
100
  "prettier": "^2.7.1",
99
101
  "prettier-plugin-java": "^1.6.2",
100
102
  "rimraf": "^3.0.2",
101
- "rollup": "^2.75.7",
103
+ "rollup": "^2.76.0",
104
+ "swiftlint": "^1.0.1",
102
105
  "typescript": "~4.7.4"
103
106
  },
104
107
  "dependencies": {
105
- "@aparajita/capacitor-native-decorator": "^2.0.4",
108
+ "@aparajita/capacitor-logger": "link:../capacitor-logger",
109
+ "@aparajita/capacitor-native-decorator": "^2.0.6",
106
110
  "@capacitor/android": "^3.6.0",
107
111
  "@capacitor/app": "^1.1.1",
108
112
  "@capacitor/ios": "^3.6.0"
package/dist/esm/web.js CHANGED
@@ -89,3 +89,4 @@ __decorate([
89
89
  export function getBiometryName(type) {
90
90
  return kBiometryTypeNameMap[type] || '';
91
91
  }
92
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAQ3C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAA;AAEtB,MAAM,oBAAoB,GAAG;IAC3B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AAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM;oBACb,qBAAqB,oBAAoB,CAAC,YAAY,CAAC,GAAG,CAC7D,EACD;oBACA,OAAM;iBACP;gBAED,MAAM,IAAI,aAAa,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAA;aACxE;YAED,MAAM,IAAI,aAAa,CACrB,wBAAwB,EACxB,iBAAiB,CAAC,oBAAoB,CACvC,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,iBAAiB,CACf,QAAwB;QAExB,OAAO,GAAG,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAQ,EAAE;YAC9D,IAAI,QAAQ,EAAE;gBACZ,IAAI,CAAC,aAAa,EAAE;qBACjB,IAAI,CAAC,CAAC,IAAyB,EAAE,EAAE;oBAClC,QAAQ,CAAC,IAAI,CAAC,CAAA;gBAChB,CAAC,CAAC;qBACD,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;oBACtB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;gBAC9B,CAAC,CAAC,CAAA;aACL;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA/CC;IADC,MAAM,EAAE;kDAOR;AAGD;IADC,MAAM,EAAE;iDAsBR;AAmBH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAkB;IAChD,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;AACzC,CAAC"}
@@ -159,7 +159,6 @@ console.log(`loaded ${name}`);
159
159
  // we have one version of the TS code to rule them all, and there
160
160
  // is no need to lazy load. 😁
161
161
  const plugin = new BiometricAuth();
162
- // eslint-disable-next-line @typescript-eslint/naming-convention
163
162
  const biometricAuth = core.registerPlugin(kPluginName, {
164
163
  web: plugin,
165
164
  ios: plugin,
@@ -170,3 +169,4 @@ exports.BiometricAuth = biometricAuth;
170
169
  exports.BiometryError = BiometryError;
171
170
  exports.getBiometryName = getBiometryName;
172
171
  exports.kPluginName = kPluginName;
172
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n /**\n * No biometry is available\n */\n BiometryType[BiometryType[\"none\"] = 0] = \"none\";\n /**\n * iOS Touch ID is available\n */\n BiometryType[BiometryType[\"touchId\"] = 1] = \"touchId\";\n /**\n * iOS Face ID is available\n */\n BiometryType[BiometryType[\"faceId\"] = 2] = \"faceId\";\n /**\n * Android fingerprint authentication is available\n */\n BiometryType[BiometryType[\"fingerprintAuthentication\"] = 3] = \"fingerprintAuthentication\";\n /**\n * Android face authentication is available\n */\n BiometryType[BiometryType[\"faceAuthentication\"] = 4] = \"faceAuthentication\";\n /**\n * Android iris authentication is available\n */\n BiometryType[BiometryType[\"irisAuthentication\"] = 5] = \"irisAuthentication\";\n})(BiometryType || (BiometryType = {}));\n/**\n * If the `authenticate()` method throws an exception, the error object\n * contains a .code property which will contain one of these strings,\n * indicating what the error was.\n *\n * See https://developer.apple.com/documentation/localauthentication/laerror\n * for a description of each error code.\n */\nexport var BiometryErrorType;\n(function (BiometryErrorType) {\n BiometryErrorType[BiometryErrorType[\"appCancel\"] = 0] = \"appCancel\";\n BiometryErrorType[BiometryErrorType[\"authenticationFailed\"] = 1] = \"authenticationFailed\";\n BiometryErrorType[BiometryErrorType[\"invalidContext\"] = 2] = \"invalidContext\";\n BiometryErrorType[BiometryErrorType[\"notInteractive\"] = 3] = \"notInteractive\";\n BiometryErrorType[BiometryErrorType[\"passcodeNotSet\"] = 4] = \"passcodeNotSet\";\n BiometryErrorType[BiometryErrorType[\"systemCancel\"] = 5] = \"systemCancel\";\n BiometryErrorType[BiometryErrorType[\"userCancel\"] = 6] = \"userCancel\";\n BiometryErrorType[BiometryErrorType[\"userFallback\"] = 7] = \"userFallback\";\n BiometryErrorType[BiometryErrorType[\"biometryLockout\"] = 8] = \"biometryLockout\";\n BiometryErrorType[BiometryErrorType[\"biometryNotAvailable\"] = 9] = \"biometryNotAvailable\";\n BiometryErrorType[BiometryErrorType[\"biometryNotEnrolled\"] = 10] = \"biometryNotEnrolled\";\n BiometryErrorType[BiometryErrorType[\"noDeviceCredential\"] = 11] = \"noDeviceCredential\";\n})(BiometryErrorType || (BiometryErrorType = {}));\nexport class BiometryError {\n constructor(message, code) {\n this.message = message;\n this.code = BiometryErrorType[code];\n }\n}\nexport const kPluginName = 'BiometricAuth';\n//# sourceMappingURL=definitions.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { native } from '@aparajita/capacitor-native-decorator';\nimport { App } from '@capacitor/app';\nimport { WebPlugin } from '@capacitor/core';\nimport { BiometryError, BiometryErrorType, BiometryType, kPluginName } from './definitions';\nconst kBiometryTypeNameMap = {\n [BiometryType.none]: '',\n [BiometryType.touchId]: 'Touch ID',\n [BiometryType.faceId]: 'Face ID',\n [BiometryType.fingerprintAuthentication]: 'Fingerprint Authentication',\n [BiometryType.faceAuthentication]: 'Face Authentication',\n [BiometryType.irisAuthentication]: 'Iris Authentication'\n};\nexport class BiometricAuth extends WebPlugin {\n constructor() {\n super(...arguments);\n this.biometryType = BiometryType.none;\n }\n getRegisteredPluginName() {\n return kPluginName;\n }\n setBiometryType(type) {\n if (typeof type === 'undefined') {\n return;\n }\n if (typeof type === 'string') {\n // eslint-disable-next-line no-prototype-builtins\n if (BiometryType.hasOwnProperty(type)) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.biometryType = BiometryType[type];\n }\n }\n else {\n this.biometryType = type;\n }\n }\n async checkBiometry() {\n return Promise.resolve({\n isAvailable: this.biometryType !== BiometryType.none,\n biometryType: this.biometryType,\n reason: ''\n });\n }\n async authenticate(options) {\n return this.checkBiometry().then(({ isAvailable, biometryType }) => {\n if (isAvailable) {\n if (\n // eslint-disable-next-line no-alert\n confirm((options === null || options === void 0 ? void 0 : options.reason) ||\n `Authenticate with ${kBiometryTypeNameMap[biometryType]}?`)) {\n return;\n }\n throw new BiometryError('User cancelled', BiometryErrorType.userCancel);\n }\n throw new BiometryError('Biometry not available', BiometryErrorType.biometryNotAvailable);\n });\n }\n addResumeListener(listener) {\n return App.addListener('appStateChange', ({ isActive }) => {\n if (isActive) {\n this.checkBiometry()\n .then((info) => {\n listener(info);\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n });\n }\n}\n__decorate([\n native()\n], BiometricAuth.prototype, \"checkBiometry\", null);\n__decorate([\n native()\n], BiometricAuth.prototype, \"authenticate\", null);\n/**\n * Return a human-readable name for a BiometryType.\n *\n * @param {BiometryType} type\n * @returns {string}\n */\nexport function getBiometryName(type) {\n return kBiometryTypeNameMap[type] || '';\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { kPluginName } from './definitions';\nimport { name } from './package.json';\nimport { BiometricAuth } from './web';\nconsole.log(`loaded ${name}`);\n// Because we are using @aparajita/capacitor-native-decorator,\n// we have one version of the TS code to rule them all, and there\n// is no need to lazy load. 😁\nconst plugin = new BiometricAuth();\nconst biometricAuth = registerPlugin(kPluginName, {\n web: plugin,\n ios: plugin,\n android: plugin\n});\nexport * from './definitions';\nexport { biometricAuth as BiometricAuth };\nexport { getBiometryName } from './web';\n//# sourceMappingURL=index.js.map"],"names":["BiometryType","BiometryErrorType","this","WebPlugin","App","native","registerPlugin"],"mappings":";;;;;;;;AAAWA,8BAAa;AACxB,CAAC,UAAU,YAAY,E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C9B;AACA;AACA;AACA,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;AAC9B,MAAC,aAAa,GAAGC,mBAAc,CAAC,WAAW,EAAE;AAClD,IAAI,GAAG,EAAE,MAAM;AACf,IAAI,GAAG,EAAE,MAAM;AACf,IAAI,OAAO,EAAE,MAAM;AACnB,CAAC;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -154,7 +154,6 @@ var capacitorBiometricAuth = (function (exports, core, capacitorNativeDecorator,
154
154
  // we have one version of the TS code to rule them all, and there
155
155
  // is no need to lazy load. 😁
156
156
  const plugin = new BiometricAuth();
157
- // eslint-disable-next-line @typescript-eslint/naming-convention
158
157
  const biometricAuth = core.registerPlugin(kPluginName, {
159
158
  web: plugin,
160
159
  ios: plugin,
@@ -171,3 +170,4 @@ var capacitorBiometricAuth = (function (exports, core, capacitorNativeDecorator,
171
170
  return exports;
172
171
 
173
172
  })({}, capacitorExports, capacitorNativeDecorator, app);
173
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n /**\n * No biometry is available\n */\n BiometryType[BiometryType[\"none\"] = 0] = \"none\";\n /**\n * iOS Touch ID is available\n */\n BiometryType[BiometryType[\"touchId\"] = 1] = \"touchId\";\n /**\n * iOS Face ID is available\n */\n BiometryType[BiometryType[\"faceId\"] = 2] = \"faceId\";\n /**\n * Android fingerprint authentication is available\n */\n BiometryType[BiometryType[\"fingerprintAuthentication\"] = 3] = \"fingerprintAuthentication\";\n /**\n * Android face authentication is available\n */\n BiometryType[BiometryType[\"faceAuthentication\"] = 4] = \"faceAuthentication\";\n /**\n * Android iris authentication is available\n */\n BiometryType[BiometryType[\"irisAuthentication\"] = 5] = \"irisAuthentication\";\n})(BiometryType || (BiometryType = {}));\n/**\n * If the `authenticate()` method throws an exception, the error object\n * contains a .code property which will contain one of these strings,\n * indicating what the error was.\n *\n * See https://developer.apple.com/documentation/localauthentication/laerror\n * for a description of each error code.\n */\nexport var BiometryErrorType;\n(function (BiometryErrorType) {\n BiometryErrorType[BiometryErrorType[\"appCancel\"] = 0] = \"appCancel\";\n BiometryErrorType[BiometryErrorType[\"authenticationFailed\"] = 1] = \"authenticationFailed\";\n BiometryErrorType[BiometryErrorType[\"invalidContext\"] = 2] = \"invalidContext\";\n BiometryErrorType[BiometryErrorType[\"notInteractive\"] = 3] = \"notInteractive\";\n BiometryErrorType[BiometryErrorType[\"passcodeNotSet\"] = 4] = \"passcodeNotSet\";\n BiometryErrorType[BiometryErrorType[\"systemCancel\"] = 5] = \"systemCancel\";\n BiometryErrorType[BiometryErrorType[\"userCancel\"] = 6] = \"userCancel\";\n BiometryErrorType[BiometryErrorType[\"userFallback\"] = 7] = \"userFallback\";\n BiometryErrorType[BiometryErrorType[\"biometryLockout\"] = 8] = \"biometryLockout\";\n BiometryErrorType[BiometryErrorType[\"biometryNotAvailable\"] = 9] = \"biometryNotAvailable\";\n BiometryErrorType[BiometryErrorType[\"biometryNotEnrolled\"] = 10] = \"biometryNotEnrolled\";\n BiometryErrorType[BiometryErrorType[\"noDeviceCredential\"] = 11] = \"noDeviceCredential\";\n})(BiometryErrorType || (BiometryErrorType = {}));\nexport class BiometryError {\n constructor(message, code) {\n this.message = message;\n this.code = BiometryErrorType[code];\n }\n}\nexport const kPluginName = 'BiometricAuth';\n//# sourceMappingURL=definitions.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { native } from '@aparajita/capacitor-native-decorator';\nimport { App } from '@capacitor/app';\nimport { WebPlugin } from '@capacitor/core';\nimport { BiometryError, BiometryErrorType, BiometryType, kPluginName } from './definitions';\nconst kBiometryTypeNameMap = {\n [BiometryType.none]: '',\n [BiometryType.touchId]: 'Touch ID',\n [BiometryType.faceId]: 'Face ID',\n [BiometryType.fingerprintAuthentication]: 'Fingerprint Authentication',\n [BiometryType.faceAuthentication]: 'Face Authentication',\n [BiometryType.irisAuthentication]: 'Iris Authentication'\n};\nexport class BiometricAuth extends WebPlugin {\n constructor() {\n super(...arguments);\n this.biometryType = BiometryType.none;\n }\n getRegisteredPluginName() {\n return kPluginName;\n }\n setBiometryType(type) {\n if (typeof type === 'undefined') {\n return;\n }\n if (typeof type === 'string') {\n // eslint-disable-next-line no-prototype-builtins\n if (BiometryType.hasOwnProperty(type)) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.biometryType = BiometryType[type];\n }\n }\n else {\n this.biometryType = type;\n }\n }\n async checkBiometry() {\n return Promise.resolve({\n isAvailable: this.biometryType !== BiometryType.none,\n biometryType: this.biometryType,\n reason: ''\n });\n }\n async authenticate(options) {\n return this.checkBiometry().then(({ isAvailable, biometryType }) => {\n if (isAvailable) {\n if (\n // eslint-disable-next-line no-alert\n confirm((options === null || options === void 0 ? void 0 : options.reason) ||\n `Authenticate with ${kBiometryTypeNameMap[biometryType]}?`)) {\n return;\n }\n throw new BiometryError('User cancelled', BiometryErrorType.userCancel);\n }\n throw new BiometryError('Biometry not available', BiometryErrorType.biometryNotAvailable);\n });\n }\n addResumeListener(listener) {\n return App.addListener('appStateChange', ({ isActive }) => {\n if (isActive) {\n this.checkBiometry()\n .then((info) => {\n listener(info);\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n });\n }\n}\n__decorate([\n native()\n], BiometricAuth.prototype, \"checkBiometry\", null);\n__decorate([\n native()\n], BiometricAuth.prototype, \"authenticate\", null);\n/**\n * Return a human-readable name for a BiometryType.\n *\n * @param {BiometryType} type\n * @returns {string}\n */\nexport function getBiometryName(type) {\n return kBiometryTypeNameMap[type] || '';\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { kPluginName } from './definitions';\nimport { name } from './package.json';\nimport { BiometricAuth } from './web';\nconsole.log(`loaded ${name}`);\n// Because we are using @aparajita/capacitor-native-decorator,\n// we have one version of the TS code to rule them all, and there\n// is no need to lazy load. 😁\nconst plugin = new BiometricAuth();\nconst biometricAuth = registerPlugin(kPluginName, {\n web: plugin,\n ios: plugin,\n android: plugin\n});\nexport * from './definitions';\nexport { biometricAuth as BiometricAuth };\nexport { getBiometryName } from './web';\n//# sourceMappingURL=index.js.map"],"names":["BiometryType","BiometryErrorType","this","WebPlugin","App","native","registerPlugin"],"mappings":";;;AAAWA,kCAAa;IACxB,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpD;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAC1D;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACxD;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC,GAAG,2BAA2B,CAAC;IAC9F;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IAChF;IACA;IACA;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IAChF,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC,CAAC;IACxC;IACA;IACA;IAC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D,iBAAiB,CAAC,CAAC;IACnB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK;IACL,CAAC;IACD,UAAU,CAAC;IACX,IAAIC,+BAAM,EAAE;IACZ,CAAC,EAAE,aAAa,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC;IACX,IAAIA,+BAAM,EAAE;IACZ,CAAC,EAAE,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClD;IACA;IACA;IACA;IACA;IACA;IACO,SAAS,eAAe,CAAC,IAAI,EAAE;IACtC,IAAI,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5C;;ICtFA,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B;IACA;IACA;IACA,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;AAC9B,UAAC,aAAa,GAAGC,mBAAc,CAAC,WAAW,EAAE;IAClD,IAAI,GAAG,EAAE,MAAM;IACf,IAAI,GAAG,EAAE,MAAM;IACf,IAAI,OAAO,EAAE,MAAM;IACnB,CAAC;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparajita/capacitor-biometric-auth",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Provides access to the native biometric auth APIs for Capacitor apps",
5
5
  "author": "Aparajita Fishman",
6
6
  "license": "MIT",
@@ -48,13 +48,13 @@
48
48
  "devDependencies": {
49
49
  "@aparajita/capacitor-docgen": "github:aparajita/capacitor-docgen",
50
50
  "@aparajita/capacitor-docgen-format": "github:aparajita/capacitor-docgen-format",
51
- "@aparajita/eslint-config-base": "^1.1.2",
51
+ "@aparajita/eslint-config-base": "^1.1.4",
52
52
  "@aparajita/prettier-config": "^1.0.0",
53
- "@aparajita/swiftly": "^1.0.1",
53
+ "@aparajita/swiftly": "^1.0.4",
54
54
  "@capacitor/core": "^3.6.0",
55
55
  "@ionic/swiftlint-config": "^1.1.2",
56
56
  "@rollup/plugin-json": "^4.1.0",
57
- "@types/node": "^18.0.1",
57
+ "@types/node": "^18.0.3",
58
58
  "@typescript-eslint/eslint-plugin": "^5.30.5",
59
59
  "@typescript-eslint/parser": "^5.30.5",
60
60
  "chalk": "^5.0.1",
@@ -62,20 +62,21 @@
62
62
  "eslint": "^8.19.0",
63
63
  "eslint-config-prettier": "^8.5.0",
64
64
  "eslint-config-standard": "^17.0.0",
65
- "eslint-import-resolver-typescript": "^3.2.1",
65
+ "eslint-import-resolver-typescript": "^3.2.5",
66
66
  "eslint-plugin-import": "^2.26.0",
67
67
  "eslint-plugin-n": "^15.2.4",
68
68
  "eslint-plugin-prettier": "^4.2.1",
69
69
  "eslint-plugin-promise": "^6.0.0",
70
- "nodemon": "^2.0.18",
70
+ "nodemon": "^2.0.19",
71
71
  "prettier": "^2.7.1",
72
72
  "prettier-plugin-java": "^1.6.2",
73
73
  "rimraf": "^3.0.2",
74
- "rollup": "^2.75.7",
74
+ "rollup": "^2.76.0",
75
+ "swiftlint": "^1.0.1",
75
76
  "typescript": "~4.7.4"
76
77
  },
77
78
  "dependencies": {
78
- "@aparajita/capacitor-native-decorator": "^2.0.4",
79
+ "@aparajita/capacitor-native-decorator": "^2.0.6",
79
80
  "@capacitor/android": "^3.6.0",
80
81
  "@capacitor/app": "^1.1.1",
81
82
  "@capacitor/ios": "^3.6.0"
@@ -85,14 +86,16 @@
85
86
  },
86
87
  "scripts": {
87
88
  "clean": "rimraf ./dist",
88
- "build": "pnpm check && pnpm build.only",
89
- "build.dev": "pnpm check && pnpm build.only.dev",
89
+ "build": "pnpm check.fix && pnpm build.only",
90
+ "build.dev": "pnpm check.fix && pnpm build.only.dev",
90
91
  "build.only": "pnpm clean && tsc $SOURCE_MAP && pnpm rollup && make-ios-plugin && pnpm docgen",
91
92
  "build.only.dev": "SOURCE_MAP=--sourceMap pnpm build.only",
92
93
  "rollup": "rollup -c rollup.config.mjs",
93
- "watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.mjs --exec 'pnpm build --silent' -e ts",
94
- "lint": "eslint . && pnpm typecheck",
95
- "lint.fix": "eslint --fix . && pnpm typecheck",
94
+ "watcher": "nodemon -w ./src -w tsconfig.json -w rollup.config.mjs --exec 'pnpm $BUILD --silent' -e ts",
95
+ "watch": "BUILD=build pnpm watcher",
96
+ "watch.dev": "BUILD=build.dev pnpm watcher",
97
+ "lint": "eslint --cache . && pnpm typecheck",
98
+ "lint.fix": "eslint --cache --fix . && pnpm typecheck",
96
99
  "typecheck": "tsc --noEmit",
97
100
  "lint.swift": "pnpm swiftlint",
98
101
  "prettier": "prettier --check \"**/*.{css,html,ts,js,json,java}\"",
@@ -107,7 +110,7 @@
107
110
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
108
111
  "verify:web": "pnpm build",
109
112
  "push": "git push --follow-tags origin main",
110
- "release.check": "commit-and-tag-version ${VERSION:+-r $VERSION} --dry-run",
113
+ "release.check": "pnpm check.fix && commit-and-tag-version ${VERSION:+-r $VERSION} --dry-run",
111
114
  "release": "commit-and-tag-version ${VERSION:+-r $VERSION} && pnpm push && pnpm publish"
112
115
  }
113
116
  }