koatty_validation 1.3.6 → 1.4.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/.rollup.config.js +62 -59
- package/.vscode/launch.json +81 -0
- package/CHANGELOG.md +83 -75
- package/LICENSE +29 -29
- package/README.md +363 -116
- package/coverage.lcov +1607 -0
- package/dist/LICENSE +29 -29
- package/dist/README.md +363 -116
- package/dist/index.d.ts +421 -219
- package/dist/index.js +799 -2074
- package/dist/index.mjs +768 -2059
- package/dist/package.json +91 -94
- package/examples/README.md +90 -0
- package/examples/basic-usage.ts +239 -0
- package/examples/custom-decorators-example.ts +230 -0
- package/examples/usage-example.ts +284 -0
- package/package.json +91 -94
package/package.json
CHANGED
|
@@ -1,94 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "koatty_validation",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Validation Util for Koatty and ThinkORM.",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
|
|
7
|
-
"build:cp": "node scripts/postBuild &&
|
|
8
|
-
"build:js": "npx rollup --bundleConfigAsCjs -c .rollup.config.js",
|
|
9
|
-
"build:doc": "npx api-documenter markdown --input temp --output docs/api",
|
|
10
|
-
"build:dts": "npx tsc && npx api-extractor run --local --verbose",
|
|
11
|
-
"eslint": "eslint --ext .ts,.js ./",
|
|
12
|
-
"lock": "
|
|
13
|
-
"prepublishOnly": "npm test && npm run build && git push --follow-tags origin",
|
|
14
|
-
"prerelease": "npm
|
|
15
|
-
"release": "standard-version",
|
|
16
|
-
"release:pre": "npm run release -- --prerelease",
|
|
17
|
-
"release:major": "npm run release -- --release-as major",
|
|
18
|
-
"release:minor": "npm run release -- --release-as minor",
|
|
19
|
-
"test": "npm run eslint && jest --passWithNoTests"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"koatty_logger": "^2.x.x"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "koatty_validation",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Validation Util for Koatty and ThinkORM.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
|
|
7
|
+
"build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
|
|
8
|
+
"build:js": "del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js",
|
|
9
|
+
"build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
|
|
10
|
+
"build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
|
|
11
|
+
"eslint": "eslint --ext .ts,.js ./",
|
|
12
|
+
"lock": "npm i --package-lock-only",
|
|
13
|
+
"prepublishOnly": "npm test && npm run build && git push --follow-tags origin",
|
|
14
|
+
"prerelease": "npm test && npm run build",
|
|
15
|
+
"release": "standard-version",
|
|
16
|
+
"release:pre": "npm run release -- --prerelease",
|
|
17
|
+
"release:major": "npm run release -- --release-as major",
|
|
18
|
+
"release:minor": "npm run release -- --release-as minor",
|
|
19
|
+
"test": "npm run eslint && jest --passWithNoTests"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
"require": "./dist/index.js",
|
|
24
|
+
"import": "./dist/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/koatty/koatty_validation.git"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">10.0.0"
|
|
32
|
+
},
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "richenlin",
|
|
35
|
+
"email": "richenlin@gmail.com"
|
|
36
|
+
},
|
|
37
|
+
"license": "BSD-3-Clause",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/koatty/koatty_validation/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/koatty/koatty_validation",
|
|
42
|
+
"maintainers": [
|
|
43
|
+
{
|
|
44
|
+
"name": "richenlin",
|
|
45
|
+
"email": "richenlin@gmail.com"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@commitlint/cli": "^19.x.x",
|
|
50
|
+
"@commitlint/config-conventional": "^19.x.x",
|
|
51
|
+
"@microsoft/api-documenter": "^7.x.x",
|
|
52
|
+
"@microsoft/api-extractor": "^7.x.x",
|
|
53
|
+
"@rollup/plugin-json": "^6.x.x",
|
|
54
|
+
"@types/jest": "^29.x.x",
|
|
55
|
+
"@types/koa": "^2.x.x",
|
|
56
|
+
"@types/lodash": "^4.17.17",
|
|
57
|
+
"@types/node": "^24.x.x",
|
|
58
|
+
"@types/validator": "^13.x.x",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^8.x.x",
|
|
60
|
+
"@typescript-eslint/parser": "^8.x.x",
|
|
61
|
+
"conventional-changelog-cli": "^5.x.x",
|
|
62
|
+
"copyfiles": "^2.x.x",
|
|
63
|
+
"del-cli": "^6.x.x",
|
|
64
|
+
"eslint": "^8.x.x",
|
|
65
|
+
"eslint-plugin-jest": "^28.x.x",
|
|
66
|
+
"husky": "^4.x.x",
|
|
67
|
+
"jest": "^29.x.x",
|
|
68
|
+
"jest-html-reporters": "^3.x.x",
|
|
69
|
+
"libphonenumber-js": "^1.x.x",
|
|
70
|
+
"reflect-metadata": "^0.x.x",
|
|
71
|
+
"rollup": "^4.x.x",
|
|
72
|
+
"rollup-plugin-typescript2": "^0.x.x",
|
|
73
|
+
"standard-version": "^9.x.x",
|
|
74
|
+
"ts-jest": "^29.x.x",
|
|
75
|
+
"ts-node": "^10.x.x",
|
|
76
|
+
"tslib": "^2.x.x",
|
|
77
|
+
"typescript": "^5.x.x"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"class-validator": "^0.14.2",
|
|
81
|
+
"koatty_container": "^1.x.x",
|
|
82
|
+
"koatty_lib": "^1.x.x",
|
|
83
|
+
"koatty_logger": "^2.x.x",
|
|
84
|
+
"lru-cache": "^11.1.0"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"koatty_container": "^1.x.x",
|
|
88
|
+
"koatty_lib": "^1.x.x",
|
|
89
|
+
"koatty_logger": "^2.x.x"
|
|
90
|
+
}
|
|
91
|
+
}
|