Skip to content

chore: dep updates #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ demo/platforms
node_modules
demo/hooks/
publish/package/
package-lock.json
1 change: 1 addition & 0 deletions src/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ references.d.ts
platforms/android/*
!platforms/android/include.gradle
!platforms/android/*.aar
*.tgz
20 changes: 9 additions & 11 deletions src/fingerprint-auth.android.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import * as app from "tns-core-modules/application";
import { AndroidActivityResultEventData } from "tns-core-modules/application";
import { ad as androidUtils } from "tns-core-modules/utils/utils";
import { Application, AndroidActivityResultEventData, Utils, AndroidApplication } from "@nativescript/core";
import { BiometricIDAvailableResult, ERROR_CODES, FingerprintAuthApi, VerifyFingerprintOptions, VerifyFingerprintWithCustomFallbackOptions } from "./fingerprint-auth.common";

declare const com: any;
Expand All @@ -14,7 +12,7 @@ export class FingerprintAuth implements FingerprintAuthApi {
private fingerPrintManager: any;

constructor() {
this.keyguardManager = androidUtils
this.keyguardManager = Utils.android
.getApplicationContext()
.getSystemService("keyguard");
}
Expand All @@ -36,7 +34,7 @@ export class FingerprintAuth implements FingerprintAuthApi {
return;
}

const fingerprintManager = androidUtils
const fingerprintManager = Utils.android
.getApplicationContext()
.getSystemService(
"fingerprint"
Expand Down Expand Up @@ -108,7 +106,7 @@ export class FingerprintAuth implements FingerprintAuthApi {
} else if (options.useCustomAndroidUI && hasSupportFragment) {
if (!this.fingerPrintManager) {
this.fingerPrintManager = new com.jesusm.kfingerprintmanager.KFingerprintManager(
androidUtils.getApplicationContext(),
Utils.android.getApplicationContext(),
KEY_NAME
);
}
Expand Down Expand Up @@ -181,14 +179,14 @@ export class FingerprintAuth implements FingerprintAuthApi {
});
}
}
app.android.off(
app.AndroidApplication.activityResultEvent,
Application.android.off(
AndroidApplication.activityResultEvent,
onActivityResult
);
};

app.android.on(
app.AndroidApplication.activityResultEvent,
Application.android.on(
AndroidApplication.activityResultEvent,
onActivityResult
);

Expand Down Expand Up @@ -355,6 +353,6 @@ export class FingerprintAuth implements FingerprintAuthApi {
}

private getActivity(): any /* android.app.Activity */ {
return app.android.foregroundActivity || app.android.startActivity;
return Application.android.foregroundActivity || Application.android.startActivity;
}
}
4 changes: 2 additions & 2 deletions src/fingerprint-auth.ios.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ios as iOSUtils } from "tns-core-modules/utils/utils";
import { Utils } from "@nativescript/core";
import {
BiometricIDAvailableResult,
FingerprintAuthApi,
Expand Down Expand Up @@ -46,7 +46,7 @@ export class FingerprintAuth implements FingerprintAuthApi {
}

// only supported on iOS9+, so check this.. if not supported just report back as false
if (iOSUtils.MajorVersion < 9) {
if (Utils.ios.MajorVersion < 9) {
resolve(false);
return;
}
Expand Down
21 changes: 13 additions & 8 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-fingerprint-auth",
"version": "7.0.2",
"name": "@nativescript/fingerprint-auth",
"version": "7.0.0",
"description": "A fingerprint authentication plugin for use in NativeScript apps",
"main": "fingerprint-auth",
"nativescript": {
Expand All @@ -13,13 +13,13 @@
"android": {
"tns-java-classes": {
"modules": [
"nativescript-fingerprint-auth/appcompat-activity"
"@nativescript/fingerprint-auth/appcompat-activity"
]
}
}
},
"scripts": {
"build": "npm i && tsc",
"build": "npm i && ts-patch install && tsc",
"demo.ios": "npm run preparedemo && cd ../demo && tns run ios",
"demo.android": "npm run preparedemo && cd ../demo && tns platform remove android && tns run android",
"test": "npm run tslint && npm run tslint.demo && cd ../demo && tns build ios && tns build android",
Expand Down Expand Up @@ -65,9 +65,14 @@
"homepage": "https://github.com/eddyverbruggen/nativescript-fingerprint-auth",
"readmeFilename": "README.md",
"devDependencies": {
"tns-core-modules": "~6.1.1",
"tns-platform-declarations": "~6.1.1",
"typescript": "~3.4.5",
"tslint": "^5.17.0"
"@nativescript/core": "rc",
"@nativescript/types": "rc",
"@nativescript/webpack": "rc",
"typescript": "~3.9.0",
"tslint": "^6.1.3",
"ts-patch": "~1.3.0"
},
"dependencies": {
"ts-node": "^8.10.2"
}
}
4 changes: 2 additions & 2 deletions src/references.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android-23.d.ts" />
/// <reference path="./node_modules/@nativescript/types/ios.d.ts" />
/// <reference path="./node_modules/@nativescript/types/android-23.d.ts" />
13 changes: 6 additions & 7 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"target": "es2017",
"module": "esnext",
"moduleResolution": "node",
"declaration": true,
"removeComments": true,
"noLib": false,
Expand All @@ -22,11 +23,9 @@
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"typeRoots": [
"./node_modules/@types",
"./node_modules"
],
"types": [
"baseUrl": ".",
"plugins": [
{ "transform": "@nativescript/webpack/transformers/ns-transform-native-classes", "type": "raw" }
]
},
"exclude": [
Expand Down