@aparajita/capacitor-biometric-auth
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -166,3 +166,3 @@ import type { PluginListenerHandle, PluginResultError, WebPlugin } from '@capacitor/core'; | ||
*/ | ||
export declare type ResumeListener = (info: CheckBiometryResult) => void; | ||
export type ResumeListener = (info: CheckBiometryResult) => void; | ||
export interface BiometricAuthPlugin extends WebPlugin { | ||
@@ -169,0 +169,0 @@ /** |
import { registerPlugin } from '@capacitor/core'; | ||
import info from './info.json'; | ||
console.log(`loaded ${info.name} v${info.version}`); | ||
const proxy = registerPlugin('BiometricAuthNative', { | ||
web: async () => import('./web').then((module) => new module.BiometricAuthWeb()), | ||
ios: async () => import('./native').then((module) => new module.BiometricAuthNative(proxy)), | ||
android: async () => import('./native').then((module) => new module.BiometricAuthNative(proxy)) | ||
android: async () => import('./native').then((module) => new module.BiometricAuthNative(proxy)), | ||
}); | ||
@@ -9,0 +7,0 @@ export * from './definitions'; |
@@ -16,3 +16,3 @@ import { BiometricAuthBase } from './base'; | ||
reason: '', | ||
code: BiometryErrorType.none | ||
code: BiometryErrorType.none, | ||
}); | ||
@@ -19,0 +19,0 @@ } |
@@ -8,3 +8,3 @@ import { BiometryType } from './definitions'; | ||
[BiometryType.faceAuthentication]: 'Face Authentication', | ||
[BiometryType.irisAuthentication]: 'Iris Authentication' | ||
[BiometryType.irisAuthentication]: 'Iris Authentication', | ||
}; | ||
@@ -11,0 +11,0 @@ /** |
@@ -15,3 +15,3 @@ import { BiometricAuthBase } from './base'; | ||
reason: '', | ||
code: BiometryErrorType.none | ||
code: BiometryErrorType.none, | ||
}); | ||
@@ -18,0 +18,0 @@ } |
@@ -6,7 +6,2 @@ 'use strict'; | ||
var info = { | ||
name: "@aparajita/capacitor-biometric-auth", | ||
version: "4.0.0" | ||
}; | ||
exports.BiometryType = void 0; | ||
@@ -76,3 +71,3 @@ (function (BiometryType) { | ||
[exports.BiometryType.faceAuthentication]: 'Face Authentication', | ||
[exports.BiometryType.irisAuthentication]: 'Iris Authentication' | ||
[exports.BiometryType.irisAuthentication]: 'Iris Authentication', | ||
}; | ||
@@ -87,7 +82,6 @@ /** | ||
console.log(`loaded ${info.name} v${info.version}`); | ||
const proxy = core.registerPlugin('BiometricAuthNative', { | ||
web: async () => Promise.resolve().then(function () { return web; }).then((module) => new module.BiometricAuthWeb()), | ||
ios: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)), | ||
android: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)) | ||
android: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)), | ||
}); | ||
@@ -121,3 +115,3 @@ | ||
reason: '', | ||
code: exports.BiometryErrorType.none | ||
code: exports.BiometryErrorType.none, | ||
}); | ||
@@ -175,3 +169,3 @@ } | ||
reason: '', | ||
code: exports.BiometryErrorType.none | ||
code: exports.BiometryErrorType.none, | ||
}); | ||
@@ -178,0 +172,0 @@ } |
var capacitorBiometricAuth = (function (exports, core, app) { | ||
'use strict'; | ||
var info = { | ||
name: "@aparajita/capacitor-biometric-auth", | ||
version: "4.0.0" | ||
}; | ||
exports.BiometryType = void 0; | ||
@@ -73,3 +68,3 @@ (function (BiometryType) { | ||
[exports.BiometryType.faceAuthentication]: 'Face Authentication', | ||
[exports.BiometryType.irisAuthentication]: 'Iris Authentication' | ||
[exports.BiometryType.irisAuthentication]: 'Iris Authentication', | ||
}; | ||
@@ -84,7 +79,6 @@ /** | ||
console.log(`loaded ${info.name} v${info.version}`); | ||
const proxy = core.registerPlugin('BiometricAuthNative', { | ||
web: async () => Promise.resolve().then(function () { return web; }).then((module) => new module.BiometricAuthWeb()), | ||
ios: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)), | ||
android: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)) | ||
android: async () => Promise.resolve().then(function () { return native; }).then((module) => new module.BiometricAuthNative(proxy)), | ||
}); | ||
@@ -118,3 +112,3 @@ | ||
reason: '', | ||
code: exports.BiometryErrorType.none | ||
code: exports.BiometryErrorType.none, | ||
}); | ||
@@ -172,3 +166,3 @@ } | ||
reason: '', | ||
code: exports.BiometryErrorType.none | ||
code: exports.BiometryErrorType.none, | ||
}); | ||
@@ -175,0 +169,0 @@ } |
{ | ||
"name": "@aparajita/capacitor-biometric-auth", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Provides access to the native biometric auth APIs for Capacitor apps", | ||
@@ -59,37 +59,35 @@ "author": "Aparajita Fishman", | ||
"@aparajita/swiftly": "^1.0.4", | ||
"@capacitor/cli": "^4.7.2", | ||
"@commitlint/cli": "^17.5.1", | ||
"@commitlint/config-conventional": "^17.4.4", | ||
"@capacitor/cli": "^5.0.5", | ||
"@commitlint/cli": "^17.6.5", | ||
"@commitlint/config-conventional": "^17.6.5", | ||
"@ionic/swiftlint-config": "^1.1.2", | ||
"@rollup/plugin-json": "^6.0.0", | ||
"@types/node": "^18.15.11", | ||
"@typescript-eslint/eslint-plugin": "^5.57.0", | ||
"@typescript-eslint/parser": "^5.57.0", | ||
"commit-and-tag-version": "^11.2.0", | ||
"eslint": "^8.37.0", | ||
"@types/node": "^20.3.1", | ||
"@typescript-eslint/eslint-plugin": "^5.59.11", | ||
"@typescript-eslint/parser": "^5.59.11", | ||
"commit-and-tag-version": "^11.2.1", | ||
"eslint": "^8.42.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-import-resolver-typescript": "^3.5.4", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-import-resolver-typescript": "^3.5.5", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-n": "^15.7.0", | ||
"eslint-plugin-n": "^16.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"husky": "^8.0.3", | ||
"nodemon": "^2.0.22", | ||
"prettier": "^2.8.7", | ||
"prettier": "^2.8.8", | ||
"prettier-plugin-java": "^2.1.0", | ||
"rimraf": "^4.4.1", | ||
"rollup": "^3.20.2", | ||
"swiftlint": "^1.0.1", | ||
"typescript": "~4.7.4" | ||
"rimraf": "^5.0.1", | ||
"rollup": "^3.25.1", | ||
"swiftlint": "^1.0.2", | ||
"typescript": "~5.1.3" | ||
}, | ||
"dependencies": { | ||
"@capacitor/android": "^4.7.2", | ||
"@capacitor/app": "^4.1.1", | ||
"@capacitor/core": "^4.7.2", | ||
"@capacitor/ios": "^4.7.2" | ||
"@capacitor/android": "^5.0.5", | ||
"@capacitor/app": "^5.0.3", | ||
"@capacitor/core": "^5.0.5", | ||
"@capacitor/ios": "^5.0.5" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf dist", | ||
"extract-info": "node scripts/extractPackageInfo.js", | ||
"lint.eslint": "eslint --fix --cache --ext .js,.cjs,.mjs,.ts --max-warnings 0", | ||
@@ -99,3 +97,3 @@ "lint.prettier": "prettier --write --cache --list-different", | ||
"lint": "pnpm lint.eslint . && pnpm lint.prettier . && pnpm lint.tsc", | ||
"prebuilder": "pnpm clean && pnpm extract-info", | ||
"prebuilder": "pnpm clean", | ||
"builder": "tsc ${SOURCE_MAP:-} && rollup -c rollup.config.mjs", | ||
@@ -102,0 +100,0 @@ "prebuild": "pnpm lint", |
@@ -35,3 +35,3 @@ <div class="markdown-body"> | ||
Before giving the user the option to use biometry (such as displaying a biometry icon), call [`checkBiometry`](#checkbiometry) and inspect the [`CheckBiometryResult`](#checkbiometryresult) to see what (if any) biometry is available on the device. Note that `isAvailable` may be `false` but `biometryType` may indicate the presence of biometry on the device. This occurs if the current user is not enrolled in biometry, or if biometry has been disabled for the current app. In such cases the `reason` will tell you why. | ||
Before giving the user the option to use biometry (such as displaying a biometry icon), call [`checkBiometry`](#checkbiometry) and inspect the [`CheckBiometryResult`](#checkbiometryresult) to see what (if any) biometry is available on the device. Note that `isAvailable` may be `false` but `biometryType` may indicate the presence of biometry on the device. This occurs if the current user is not enrolled in biometry, or if biometry has been disabled for the current app. In such cases the `reason` and `code` will tell you why. | ||
@@ -38,0 +38,0 @@ Because the availability of biometry can change while your app is in the background, it’s important to check availability when your app resumes. By calling [`addResumeListener`](#addresumelistener) you can register a callback that is passed a [`CheckBiometryResult`](#checkbiometryresult) when your app resumes. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29
84401
30
766
+ Added@capacitor/android@5.7.8(transitive)
+ Added@capacitor/app@5.0.8(transitive)
+ Added@capacitor/core@5.7.8(transitive)
+ Added@capacitor/ios@5.7.8(transitive)
- Removed@capacitor/android@4.8.2(transitive)
- Removed@capacitor/app@4.1.1(transitive)
- Removed@capacitor/core@4.8.2(transitive)
- Removed@capacitor/ios@4.8.2(transitive)
Updated@capacitor/android@^5.0.5
Updated@capacitor/app@^5.0.3
Updated@capacitor/core@^5.0.5
Updated@capacitor/ios@^5.0.5