koatty_validation 1.2.5 → 1.2.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.6](https://github.com/koatty/koatty_validation/compare/v1.2.5...v1.2.6) (2023-01-09)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * err msg ([18632d4](https://github.com/koatty/koatty_validation/commit/18632d4c9b05b1d117be7f8170da0ce014018ab8))
11
+
5
12
  ### [1.2.5](https://github.com/koatty/koatty_validation/compare/v1.2.4...v1.2.5) (2022-08-19)
6
13
 
7
14
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-08-19 14:24:55
3
+ * @Date: 2023-01-10 00:29:01
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-08-19 14:24:42
3
+ * @Date: 2023-01-10 00:28:47
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -96,7 +96,7 @@ function convertOrCheckDtoParamsType(clazz, cls, convert) {
96
96
  }
97
97
  else {
98
98
  if (!checkParamsType(cls[key], cls._typeDef[key])) {
99
- throw new Error("invalid arguments type");
99
+ throw new Error(`parameter ${key} type error`);
100
100
  }
101
101
  }
102
102
  }
@@ -111,7 +111,7 @@ function convertOrCheckDtoParamsType(clazz, cls, convert) {
111
111
  }
112
112
  else {
113
113
  if (!checkParamsType(cls[key], type)) {
114
- throw new Error("invalid arguments type");
114
+ throw new Error(`parameter ${key} type error`);
115
115
  }
116
116
  }
117
117
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-08-19 14:24:42
3
+ * @Date: 2023-01-10 00:28:47
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -72,7 +72,7 @@ function convertOrCheckDtoParamsType(clazz, cls, convert) {
72
72
  }
73
73
  else {
74
74
  if (!checkParamsType(cls[key], cls._typeDef[key])) {
75
- throw new Error("invalid arguments type");
75
+ throw new Error(`parameter ${key} type error`);
76
76
  }
77
77
  }
78
78
  }
@@ -87,7 +87,7 @@ function convertOrCheckDtoParamsType(clazz, cls, convert) {
87
87
  }
88
88
  else {
89
89
  if (!checkParamsType(cls[key], type)) {
90
- throw new Error("invalid arguments type");
90
+ throw new Error(`parameter ${key} type error`);
91
91
  }
92
92
  }
93
93
  }
package/dist/package.json CHANGED
@@ -1,84 +1,85 @@
1
1
  {
2
- "name": "koatty_validation",
3
- "version": "1.2.5",
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 -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
- "prepublishOnly": "npm test && npm run build",
13
- "prerelease": "npm test && npm run build",
14
- "release": "standard-version",
15
- "test": "npm run eslint && jest --passWithNoTests"
16
- },
17
- "main": "./dist/index.js",
18
- "exports": {
19
- "require": "./dist/index.js",
20
- "import": "./dist/index.mjs"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/koatty/koatty_validation.git"
25
- },
26
- "engines": {
27
- "node": ">10.0.0"
28
- },
29
- "author": {
30
- "name": "richenlin",
31
- "email": "richenlin@gmail.com"
32
- },
33
- "license": "BSD-3-Clause",
34
- "bugs": {
35
- "url": "https://github.com/koatty/koatty_validation/issues"
36
- },
37
- "homepage": "https://github.com/koatty/koatty_validation",
38
- "maintainers": [
39
- {
40
- "name": "richenlin",
41
- "email": "richenlin@gmail.com"
42
- }
43
- ],
44
- "devDependencies": {
45
- "@commitlint/cli": "^17.x.x",
46
- "@commitlint/config-conventional": "^17.x.x",
47
- "@microsoft/api-documenter": "^7.x.x",
48
- "@microsoft/api-extractor": "^7.x.x",
49
- "@rollup/plugin-json": "^4.x.x",
50
- "@types/jest": "^27.x.x",
51
- "@types/koa": "^2.x.x",
52
- "@types/node": "^16.x.x",
53
- "@types/validator": "^13.7.2",
54
- "@typescript-eslint/eslint-plugin": "^5.x.x",
55
- "@typescript-eslint/parser": "^5.x.x",
56
- "conventional-changelog-cli": "^2.x.x",
57
- "copyfiles": "^2.x.x",
58
- "del-cli": "^4.x.x",
59
- "eslint": "^8.x.x",
60
- "eslint-plugin-jest": "^26.x.x",
61
- "husky": "^4.x.x",
62
- "jest": "^28.x.x",
63
- "jest-html-reporters": "^3.x.x",
64
- "rollup": "^2.x.x",
65
- "rollup-plugin-typescript2": "^0.x.x",
66
- "standard-version": "^9.x.x",
67
- "ts-jest": "^28.x.x",
68
- "ts-node": "^10.x.x",
69
- "typescript": "^4.x.x"
70
- },
71
- "dependencies": {
72
- "class-validator": "^0.13.2",
73
- "koatty_container": "^1.x.x",
74
- "koatty_lib": "^1.x.x",
75
- "koatty_logger": "^1.x.x",
76
- "reflect-metadata": "^0.1.13",
77
- "tslib": "^2.4.0"
78
- },
79
- "peerDependencies": {
80
- "koatty_container": "^1.x.x",
81
- "koatty_lib": "^1.x.x",
82
- "koatty_logger": "^1.x.x"
2
+ "name": "koatty_validation",
3
+ "version": "1.2.6",
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 -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
+ "prepublishOnly": "npm test && npm run build",
13
+ "prerelease": "npm test && npm run build",
14
+ "pub": "git push --follow-tags origin && npm publish",
15
+ "release": "standard-version",
16
+ "test": "npm run eslint && jest --passWithNoTests"
17
+ },
18
+ "main": "./dist/index.js",
19
+ "exports": {
20
+ "require": "./dist/index.js",
21
+ "import": "./dist/index.mjs"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/koatty/koatty_validation.git"
26
+ },
27
+ "engines": {
28
+ "node": ">10.0.0"
29
+ },
30
+ "author": {
31
+ "name": "richenlin",
32
+ "email": "richenlin@gmail.com"
33
+ },
34
+ "license": "BSD-3-Clause",
35
+ "bugs": {
36
+ "url": "https://github.com/koatty/koatty_validation/issues"
37
+ },
38
+ "homepage": "https://github.com/koatty/koatty_validation",
39
+ "maintainers": [
40
+ {
41
+ "name": "richenlin",
42
+ "email": "richenlin@gmail.com"
83
43
  }
84
- }
44
+ ],
45
+ "devDependencies": {
46
+ "@commitlint/cli": "^17.x.x",
47
+ "@commitlint/config-conventional": "^17.x.x",
48
+ "@microsoft/api-documenter": "^7.x.x",
49
+ "@microsoft/api-extractor": "^7.x.x",
50
+ "@rollup/plugin-json": "^4.x.x",
51
+ "@types/jest": "^27.x.x",
52
+ "@types/koa": "^2.x.x",
53
+ "@types/node": "^16.x.x",
54
+ "@types/validator": "^13.7.2",
55
+ "@typescript-eslint/eslint-plugin": "^5.x.x",
56
+ "@typescript-eslint/parser": "^5.x.x",
57
+ "conventional-changelog-cli": "^2.x.x",
58
+ "copyfiles": "^2.x.x",
59
+ "del-cli": "^4.x.x",
60
+ "eslint": "^8.x.x",
61
+ "eslint-plugin-jest": "^26.x.x",
62
+ "husky": "^4.x.x",
63
+ "jest": "^28.x.x",
64
+ "jest-html-reporters": "^3.x.x",
65
+ "rollup": "^2.x.x",
66
+ "rollup-plugin-typescript2": "^0.x.x",
67
+ "standard-version": "^9.x.x",
68
+ "ts-jest": "^28.x.x",
69
+ "ts-node": "^10.x.x",
70
+ "typescript": "^4.x.x"
71
+ },
72
+ "dependencies": {
73
+ "class-validator": "^0.14.0",
74
+ "koatty_container": "^1.x.x",
75
+ "koatty_lib": "^1.x.x",
76
+ "koatty_logger": "^2.x.x",
77
+ "reflect-metadata": "^0.1.13",
78
+ "tslib": "^2.4.1"
79
+ },
80
+ "peerDependencies": {
81
+ "koatty_container": "^1.x.x",
82
+ "koatty_lib": "^1.x.x",
83
+ "koatty_logger": "^2.x.x"
84
+ }
85
+ }
package/package.json CHANGED
@@ -1,84 +1,85 @@
1
1
  {
2
- "name": "koatty_validation",
3
- "version": "1.2.5",
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 -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
- "prepublishOnly": "npm test && npm run build",
13
- "prerelease": "npm test && npm run build",
14
- "release": "standard-version",
15
- "test": "npm run eslint && jest --passWithNoTests"
16
- },
17
- "main": "./dist/index.js",
18
- "exports": {
19
- "require": "./dist/index.js",
20
- "import": "./dist/index.mjs"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/koatty/koatty_validation.git"
25
- },
26
- "engines": {
27
- "node": ">10.0.0"
28
- },
29
- "author": {
30
- "name": "richenlin",
31
- "email": "richenlin@gmail.com"
32
- },
33
- "license": "BSD-3-Clause",
34
- "bugs": {
35
- "url": "https://github.com/koatty/koatty_validation/issues"
36
- },
37
- "homepage": "https://github.com/koatty/koatty_validation",
38
- "maintainers": [
39
- {
40
- "name": "richenlin",
41
- "email": "richenlin@gmail.com"
42
- }
43
- ],
44
- "devDependencies": {
45
- "@commitlint/cli": "^17.x.x",
46
- "@commitlint/config-conventional": "^17.x.x",
47
- "@microsoft/api-documenter": "^7.x.x",
48
- "@microsoft/api-extractor": "^7.x.x",
49
- "@rollup/plugin-json": "^4.x.x",
50
- "@types/jest": "^27.x.x",
51
- "@types/koa": "^2.x.x",
52
- "@types/node": "^16.x.x",
53
- "@types/validator": "^13.7.2",
54
- "@typescript-eslint/eslint-plugin": "^5.x.x",
55
- "@typescript-eslint/parser": "^5.x.x",
56
- "conventional-changelog-cli": "^2.x.x",
57
- "copyfiles": "^2.x.x",
58
- "del-cli": "^4.x.x",
59
- "eslint": "^8.x.x",
60
- "eslint-plugin-jest": "^26.x.x",
61
- "husky": "^4.x.x",
62
- "jest": "^28.x.x",
63
- "jest-html-reporters": "^3.x.x",
64
- "rollup": "^2.x.x",
65
- "rollup-plugin-typescript2": "^0.x.x",
66
- "standard-version": "^9.x.x",
67
- "ts-jest": "^28.x.x",
68
- "ts-node": "^10.x.x",
69
- "typescript": "^4.x.x"
70
- },
71
- "dependencies": {
72
- "class-validator": "^0.13.2",
73
- "koatty_container": "^1.x.x",
74
- "koatty_lib": "^1.x.x",
75
- "koatty_logger": "^1.x.x",
76
- "reflect-metadata": "^0.1.13",
77
- "tslib": "^2.4.0"
78
- },
79
- "peerDependencies": {
80
- "koatty_container": "^1.x.x",
81
- "koatty_lib": "^1.x.x",
82
- "koatty_logger": "^1.x.x"
2
+ "name": "koatty_validation",
3
+ "version": "1.2.6",
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 -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
+ "prepublishOnly": "npm test && npm run build",
13
+ "prerelease": "npm test && npm run build",
14
+ "pub": "git push --follow-tags origin && npm publish",
15
+ "release": "standard-version",
16
+ "test": "npm run eslint && jest --passWithNoTests"
17
+ },
18
+ "main": "./dist/index.js",
19
+ "exports": {
20
+ "require": "./dist/index.js",
21
+ "import": "./dist/index.mjs"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/koatty/koatty_validation.git"
26
+ },
27
+ "engines": {
28
+ "node": ">10.0.0"
29
+ },
30
+ "author": {
31
+ "name": "richenlin",
32
+ "email": "richenlin@gmail.com"
33
+ },
34
+ "license": "BSD-3-Clause",
35
+ "bugs": {
36
+ "url": "https://github.com/koatty/koatty_validation/issues"
37
+ },
38
+ "homepage": "https://github.com/koatty/koatty_validation",
39
+ "maintainers": [
40
+ {
41
+ "name": "richenlin",
42
+ "email": "richenlin@gmail.com"
83
43
  }
84
- }
44
+ ],
45
+ "devDependencies": {
46
+ "@commitlint/cli": "^17.x.x",
47
+ "@commitlint/config-conventional": "^17.x.x",
48
+ "@microsoft/api-documenter": "^7.x.x",
49
+ "@microsoft/api-extractor": "^7.x.x",
50
+ "@rollup/plugin-json": "^4.x.x",
51
+ "@types/jest": "^27.x.x",
52
+ "@types/koa": "^2.x.x",
53
+ "@types/node": "^16.x.x",
54
+ "@types/validator": "^13.7.2",
55
+ "@typescript-eslint/eslint-plugin": "^5.x.x",
56
+ "@typescript-eslint/parser": "^5.x.x",
57
+ "conventional-changelog-cli": "^2.x.x",
58
+ "copyfiles": "^2.x.x",
59
+ "del-cli": "^4.x.x",
60
+ "eslint": "^8.x.x",
61
+ "eslint-plugin-jest": "^26.x.x",
62
+ "husky": "^4.x.x",
63
+ "jest": "^28.x.x",
64
+ "jest-html-reporters": "^3.x.x",
65
+ "rollup": "^2.x.x",
66
+ "rollup-plugin-typescript2": "^0.x.x",
67
+ "standard-version": "^9.x.x",
68
+ "ts-jest": "^28.x.x",
69
+ "ts-node": "^10.x.x",
70
+ "typescript": "^4.x.x"
71
+ },
72
+ "dependencies": {
73
+ "class-validator": "^0.14.0",
74
+ "koatty_container": "^1.x.x",
75
+ "koatty_lib": "^1.x.x",
76
+ "koatty_logger": "^2.x.x",
77
+ "reflect-metadata": "^0.1.13",
78
+ "tslib": "^2.4.1"
79
+ },
80
+ "peerDependencies": {
81
+ "koatty_container": "^1.x.x",
82
+ "koatty_lib": "^1.x.x",
83
+ "koatty_logger": "^2.x.x"
84
+ }
85
+ }