@unchainedshop/core-quotations 1.1.4 → 1.2.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/jest.config.js +5 -0
- package/lib/quotations-settings.d.ts +2 -3
- package/package.json +16 -15
- package/tests/quotations-index.test.ts +1 -1
- package/tsconfig.json +26 -5
- package/tsconfig.build.json +0 -26
package/jest.config.js
ADDED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export namespace quotationsSettings {
|
|
2
2
|
const quotationNumberHashFn: any;
|
|
3
3
|
function configureSettings({ quotationNumberHashFn }?: {
|
|
4
|
-
quotationNumberHashFn?:
|
|
4
|
+
quotationNumberHashFn?: () => string;
|
|
5
5
|
}): void;
|
|
6
6
|
function configureSettings({ quotationNumberHashFn }?: {
|
|
7
|
-
quotationNumberHashFn?:
|
|
7
|
+
quotationNumberHashFn?: () => string;
|
|
8
8
|
}): void;
|
|
9
9
|
}
|
|
10
|
-
import { generateRandomHash } from "@unchainedshop/utils";
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-quotations",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "lib/quotations-index.js",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./lib/quotations-index.js",
|
|
7
|
+
"./*": "./lib/*"
|
|
8
|
+
},
|
|
5
9
|
"types": "lib/quotations-index.d.ts",
|
|
6
10
|
"type": "module",
|
|
7
11
|
"scripts": {
|
|
12
|
+
"prepublishOnly": "npm install && npm run build || :",
|
|
8
13
|
"clean": "rm -rf lib",
|
|
9
|
-
"build": "npm run clean && tsc
|
|
10
|
-
"watch": "tsc
|
|
11
|
-
"
|
|
12
|
-
"test": "cross-env METEOR_PACKAGE_DIRS=../ TEST_CLIENT=0 TEST_WATCH=1 meteor test-packages ./ --driver-package meteortesting:mocha --port 4200"
|
|
14
|
+
"build": "npm run clean && tsc",
|
|
15
|
+
"watch": "tsc -w",
|
|
16
|
+
"test": "jest --watch"
|
|
13
17
|
},
|
|
14
18
|
"repository": {
|
|
15
19
|
"type": "git",
|
|
@@ -27,20 +31,17 @@
|
|
|
27
31
|
},
|
|
28
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@unchainedshop/
|
|
31
|
-
"@unchainedshop/
|
|
34
|
+
"@unchainedshop/events": "^1.1.9",
|
|
35
|
+
"@unchainedshop/logger": "^1.1.9",
|
|
36
|
+
"@unchainedshop/utils": "^1.1.9",
|
|
32
37
|
"simpl-schema": "^1.12.2"
|
|
33
38
|
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"@unchainedshop/events": "1.1.3"
|
|
36
|
-
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@types/chai": "^4.3.1",
|
|
39
40
|
"@types/locale": "^0.1.1",
|
|
40
|
-
"@types/
|
|
41
|
-
"@unchainedshop/types": "^1.1.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
41
|
+
"@types/node": "^16.11.44",
|
|
42
|
+
"@unchainedshop/types": "^1.1.9",
|
|
43
|
+
"jest": "^28.1.2",
|
|
44
|
+
"ts-jest": "^28.0.5",
|
|
44
45
|
"typescript": "^4.7.4"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -4,7 +4,7 @@ import { UsersModule } from '@unchainedshop/types/user';
|
|
|
4
4
|
import { assert } from 'chai';
|
|
5
5
|
import { configureQuotationsModule } from '@unchainedshop/core-quotations';
|
|
6
6
|
import { configureUsersModule } from '@unchainedshop/core-users';
|
|
7
|
-
import { initDb } from '
|
|
7
|
+
import { initDb } from '@unchainedshop/mongodb';
|
|
8
8
|
import '../plugins/manual';
|
|
9
9
|
|
|
10
10
|
describe('Test exports', () => {
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "./tsconfig.build.json",
|
|
3
2
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"lib": [
|
|
10
|
+
"esnext"
|
|
11
|
+
],
|
|
12
|
+
"module": "esnext",
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"noUnusedLocals": false,
|
|
16
|
+
"outDir": "lib",
|
|
17
|
+
"preserveWatchOutput": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"target": "esnext",
|
|
21
|
+
"types": [
|
|
22
|
+
"node",
|
|
23
|
+
"jest"
|
|
24
|
+
]
|
|
6
25
|
},
|
|
7
|
-
"include": [
|
|
8
|
-
|
|
26
|
+
"include": [
|
|
27
|
+
"src"
|
|
28
|
+
]
|
|
29
|
+
}
|
package/tsconfig.build.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"lib": ["esnext"],
|
|
10
|
-
"module": "esnext",
|
|
11
|
-
"moduleResolution": "node",
|
|
12
|
-
"noImplicitReturns": true,
|
|
13
|
-
"noUnusedLocals": false,
|
|
14
|
-
"outDir": "lib",
|
|
15
|
-
"preserveWatchOutput": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"sourceMap": true,
|
|
18
|
-
"target": "esnext",
|
|
19
|
-
"types": ["node"],
|
|
20
|
-
"baseUrl": ".", // This must be specified if "paths" is.
|
|
21
|
-
"paths": {
|
|
22
|
-
"meteor/unchained:*": ["node_modules/@unchainedshop/types/index.d.ts"]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"include": ["src"]
|
|
26
|
-
}
|