@myparcel-dev/pdk-checkout-common 2.2.3 → 2.2.4-beta-oidc.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/dist/__tests__/spies.d.ts +7 -6
- package/package.json +22 -20
- package/src/__tests__/spies.ts +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type Mock } from 'vitest';
|
|
1
2
|
import { type PdkFormData } from '../types';
|
|
2
|
-
export declare const doRequestSpy:
|
|
3
|
-
export declare const getFormSpy:
|
|
4
|
-
export declare const getFormDataSpy:
|
|
5
|
-
export declare const hasAddressTypeSpy:
|
|
6
|
-
export declare const initializeSpy:
|
|
7
|
-
export declare const toggleFieldSpy:
|
|
3
|
+
export declare const doRequestSpy: Mock;
|
|
4
|
+
export declare const getFormSpy: Mock<() => HTMLFormElement>;
|
|
5
|
+
export declare const getFormDataSpy: Mock<() => PdkFormData>;
|
|
6
|
+
export declare const hasAddressTypeSpy: Mock<() => boolean>;
|
|
7
|
+
export declare const initializeSpy: Mock<() => Promise<void>>;
|
|
8
|
+
export declare const toggleFieldSpy: Mock;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myparcel-dev/pdk-checkout-common",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4-beta-oidc.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/myparcelnl/js-pdk.git",
|
|
@@ -13,37 +13,39 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"files": [
|
|
15
15
|
"./src",
|
|
16
|
-
"./dist"
|
|
16
|
+
"./dist",
|
|
17
|
+
"CHANGELOG.md"
|
|
17
18
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "run ws:ts:build \"$(pwd)\"",
|
|
20
|
-
"clean": "run ws:clean \"$(pwd)\"",
|
|
21
|
-
"lint": "run ws:lint \"$(pwd)\"",
|
|
22
|
-
"lint:fix": "run ws:lint:fix \"$(pwd)\"",
|
|
23
|
-
"test": "run ws:test \"$(pwd)\"",
|
|
24
|
-
"test:coverage": "run ws:test:coverage \"$(pwd)\"",
|
|
25
|
-
"test:run": "run ws:test:run \"$(pwd)\"",
|
|
26
|
-
"test:update": "run ws:test:update \"$(pwd)\"",
|
|
27
|
-
"typecheck": "run ws:ts:typecheck \"$(pwd)\""
|
|
28
|
-
},
|
|
29
19
|
"dependencies": {
|
|
30
20
|
"@myparcel-dev/constants": "^2.7.0",
|
|
31
21
|
"@myparcel-dev/delivery-options": "^7.5.0",
|
|
32
|
-
"@myparcel-dev/pdk-common": "^2.3.
|
|
22
|
+
"@myparcel-dev/pdk-common": "^2.3.2-beta-oidc.0",
|
|
23
|
+
"@myparcel-dev/ts-utils": "^1.15.0",
|
|
33
24
|
"radash": "^12.1.0"
|
|
34
25
|
},
|
|
35
26
|
"devDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
27
|
+
"@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
|
|
28
|
+
"typescript": "^5.2.2"
|
|
38
29
|
},
|
|
39
30
|
"engines": {
|
|
40
31
|
"node": ">=20"
|
|
41
32
|
},
|
|
42
|
-
"volta": {
|
|
43
|
-
"extends": "../../package.json"
|
|
44
|
-
},
|
|
45
33
|
"publishConfig": {
|
|
46
34
|
"access": "public"
|
|
47
35
|
},
|
|
48
|
-
"
|
|
36
|
+
"nx": {
|
|
37
|
+
"targets": {
|
|
38
|
+
"clean": {},
|
|
39
|
+
"lint": {},
|
|
40
|
+
"lint:fix": {},
|
|
41
|
+
"test": {},
|
|
42
|
+
"test:coverage": {},
|
|
43
|
+
"test:run": {},
|
|
44
|
+
"test:update": {}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc --project tsconfig.base.json --noEmit false --declaration --emitDeclarationOnly --declarationDir dist",
|
|
49
|
+
"typecheck": "tsc --project tsconfig.base.json --noEmit"
|
|
50
|
+
}
|
|
49
51
|
}
|
package/src/__tests__/spies.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {vi} from 'vitest';
|
|
1
|
+
import {type Mock, vi} from 'vitest';
|
|
2
2
|
import {type PdkFormData} from '../types';
|
|
3
3
|
import {DEFAULT_MOCK_FORM_DATA} from './constants';
|
|
4
4
|
|
|
5
|
-
export const doRequestSpy = vi.fn();
|
|
5
|
+
export const doRequestSpy: Mock = vi.fn();
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
8
8
|
export const getFormSpy = vi.fn(() => document.querySelector<HTMLFormElement>('form')!);
|
|
@@ -13,4 +13,4 @@ export const hasAddressTypeSpy = vi.fn(() => true);
|
|
|
13
13
|
|
|
14
14
|
export const initializeSpy = vi.fn(() => Promise.resolve());
|
|
15
15
|
|
|
16
|
-
export const toggleFieldSpy = vi.fn();
|
|
16
|
+
export const toggleFieldSpy: Mock = vi.fn();
|