@criipto/verify-react 1.1.4 → 1.1.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/.github/workflows/test.yml +2 -2
- package/.nvmrc +1 -0
- package/dist/__tests__/provider.test.d.ts +1 -0
- package/dist/components/AuthMethodButton.d.ts +1 -0
- package/dist/components/AuthMethodSelector.d.ts +1 -0
- package/dist/components/SEBankIDSameDeviceButton.d.ts +1 -0
- package/dist/criipto-verify-react.cjs.js +1 -1
- package/dist/criipto-verify-react.cjs.js.map +1 -1
- package/dist/criipto-verify-react.esm.js +1 -1
- package/dist/criipto-verify-react.esm.js.map +1 -1
- package/dist/device.d.ts +5 -5
- package/jest.config.ts +4 -2
- package/jest.setup.ts +12 -3
- package/package.json +2 -2
package/dist/device.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UAParser from 'ua-parser-js';
|
|
2
|
-
export declare function isiOS(): boolean;
|
|
3
|
-
export declare function isiOSSafari(): boolean;
|
|
4
|
-
export declare function isAndroid(): boolean;
|
|
2
|
+
export declare function isiOS(userAgent: string): boolean;
|
|
3
|
+
export declare function isiOSSafari(userAgent: string): boolean;
|
|
4
|
+
export declare function isAndroid(userAgent: string): boolean;
|
|
5
5
|
export declare type MobileOS = 'ios' | 'android';
|
|
6
|
-
export declare function getMobileOS(): MobileOS | null;
|
|
7
|
-
export declare function getUserAgent(): UAParser.IResult;
|
|
6
|
+
export declare function getMobileOS(userAgent: string): MobileOS | null;
|
|
7
|
+
export declare function getUserAgent(userAgent?: string): UAParser.IResult | null;
|
package/jest.config.ts
CHANGED
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
// forceCoverageMatch: [],
|
|
61
61
|
|
|
62
62
|
// A path to a module which exports an async function that is triggered once before all test suites
|
|
63
|
-
globalSetup: './jest.setup.ts',
|
|
63
|
+
//globalSetup: './jest.setup.ts',
|
|
64
64
|
|
|
65
65
|
// A path to a module which exports an async function that is triggered once after all test suites
|
|
66
66
|
// globalTeardown: undefined,
|
|
@@ -133,7 +133,9 @@ export default {
|
|
|
133
133
|
// runner: "jest-runner",
|
|
134
134
|
|
|
135
135
|
// The paths to modules that run some code to configure or set up the testing environment before each test
|
|
136
|
-
|
|
136
|
+
setupFiles: [
|
|
137
|
+
'./jest.setup.ts'
|
|
138
|
+
],
|
|
137
139
|
|
|
138
140
|
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
|
139
141
|
// setupFilesAfterEnv: [],
|
package/jest.setup.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import webcrypto from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(globalThis, "crypto", {
|
|
4
|
+
value: webcrypto
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
if (!("getRandomValues" in webcrypto)) {
|
|
8
|
+
(webcrypto as any).getRandomValues = (arr: Uint8Array) => {
|
|
9
|
+
const bytes = require('crypto').randomBytes(arr.length)
|
|
10
|
+
arr.fill(bytes);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@criipto/verify-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.6",
|
|
5
5
|
"description": "Verify SDK for React Single Page Applications",
|
|
6
6
|
"main": "dist/criipto-verify-react.cjs.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/criipto/criipto-verify-react#readme",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@criipto/auth-js": "^3.6.
|
|
72
|
+
"@criipto/auth-js": "^3.6.7",
|
|
73
73
|
"jwt-decode": "^3.1.2",
|
|
74
74
|
"ua-parser-js": "^1.0.34"
|
|
75
75
|
}
|