@atscript/moost-validator 0.1.17 → 0.1.19
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/README.md +3 -3
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -80,9 +80,9 @@ async create(@Body() dto: CreateUserDto) {}
|
|
|
80
80
|
|
|
81
81
|
| Export | Type | Description |
|
|
82
82
|
| ------------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
83
|
-
| `validatorPipe(opts?)` | `
|
|
83
|
+
| `validatorPipe(opts?)` | `TPipeFn` | Low‑level factory. Returns a pipe that runs `type.validator(opts).validate(value)` on the argument **if** the type was produced by atscript. Registered with priority `VALIDATE`. |
|
|
84
84
|
| `UseValidatorPipe(opts?)` | `Decorator` | Sugar over `validatorPipe`. Apply to a class, method, parameter, or property. |
|
|
85
|
-
| `validationErrorTransform()` | `
|
|
85
|
+
| `validationErrorTransform()` | `TInterceptorFn` | Catches `ValidatorError`, wraps it into `HttpError(400)` with `{ message, statusCode, _body }`. Priority `CATCH_ERROR`. |
|
|
86
86
|
| `UseValidationErrorTransform()` | `Decorator` | Sugar over `validationErrorTransform()`. |
|
|
87
87
|
|
|
88
88
|
### `opts` (`Partial<TValidatorOptions>`)
|
|
@@ -105,4 +105,4 @@ Any options accepted by `atscript.validator(opts)`. E.g. `{ abortEarly: false }`
|
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
ISC © 2025 Artem Maltsev
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-validator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Validator pipe and utils for Moost.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
5
|
"keywords": [
|
|
20
|
-
"atscript",
|
|
21
6
|
"annotations",
|
|
22
|
-
"
|
|
7
|
+
"atscript",
|
|
23
8
|
"moost",
|
|
9
|
+
"typescript",
|
|
24
10
|
"validator"
|
|
25
11
|
],
|
|
12
|
+
"homepage": "https://github.com/moostjs/atscript/tree/main/packages/moost-validator#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/moostjs/atscript/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "ISC",
|
|
26
17
|
"author": "Artem Maltsev",
|
|
27
18
|
"repository": {
|
|
28
19
|
"type": "git",
|
|
29
20
|
"url": "git+https://github.com/moostjs/atscript.git",
|
|
30
21
|
"directory": "packages/moost-validator"
|
|
31
22
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "dist/index.mjs",
|
|
28
|
+
"types": "dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.mjs",
|
|
33
|
+
"require": "./dist/index.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
34
36
|
},
|
|
35
|
-
"homepage": "https://github.com/moostjs/atscript/tree/main/packages/moost-validator#readme",
|
|
36
|
-
"license": "ISC",
|
|
37
37
|
"dependencies": {},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"vitest": "3.2.4"
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@moostjs/event-http": "^0.5.32",
|
|
43
43
|
"moost": "^0.5.32",
|
|
44
|
-
"@atscript/
|
|
45
|
-
"@atscript/
|
|
44
|
+
"@atscript/typescript": "^0.1.19",
|
|
45
|
+
"@atscript/core": "^0.1.19"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"pub": "pnpm publish --access public",
|