@tsed/platform-params 7.0.0-beta.1 → 7.0.0-beta.4
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/lib/cjs/builder/PlatformParams.js +3 -3
- package/lib/cjs/builder/PlatformParams.js.map +1 -1
- package/lib/cjs/decorators/bodyParams.js +3 -10
- package/lib/cjs/decorators/bodyParams.js.map +1 -1
- package/lib/cjs/decorators/context.js +0 -1
- package/lib/cjs/decorators/context.js.map +1 -1
- package/lib/cjs/decorators/cookies.js +0 -1
- package/lib/cjs/decorators/cookies.js.map +1 -1
- package/lib/cjs/decorators/headerParams.js +0 -1
- package/lib/cjs/decorators/headerParams.js.map +1 -1
- package/lib/cjs/decorators/locals.js +0 -1
- package/lib/cjs/decorators/locals.js.map +1 -1
- package/lib/cjs/decorators/paramFn.js +2 -7
- package/lib/cjs/decorators/paramFn.js.map +1 -1
- package/lib/cjs/decorators/pathParams.js +0 -1
- package/lib/cjs/decorators/pathParams.js.map +1 -1
- package/lib/cjs/decorators/queryParams.js +4 -5
- package/lib/cjs/decorators/queryParams.js.map +1 -1
- package/lib/cjs/decorators/session.js +0 -1
- package/lib/cjs/decorators/session.js.map +1 -1
- package/lib/cjs/decorators/useParam.js +0 -4
- package/lib/cjs/decorators/useParam.js.map +1 -1
- package/lib/cjs/decorators/useParamType.js +8 -2
- package/lib/cjs/decorators/useParamType.js.map +1 -1
- package/lib/cjs/decorators/usePipe.js.map +1 -1
- package/lib/cjs/domain/ParamMetadata.js +2 -30
- package/lib/cjs/domain/ParamMetadata.js.map +1 -1
- package/lib/cjs/domain/ParamTypes.js +11 -1
- package/lib/cjs/domain/ParamTypes.js.map +1 -1
- package/lib/cjs/errors/ParamValidationError.js.map +1 -1
- package/lib/cjs/errors/RequiredValidationError.js.map +1 -1
- package/lib/cjs/exports.js +3 -0
- package/lib/cjs/exports.js.map +1 -0
- package/lib/cjs/index.js +31 -33
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/pipes/DeserializerPipe.js +3 -3
- package/lib/cjs/pipes/DeserializerPipe.js.map +1 -1
- package/lib/cjs/pipes/ParseExpressionPipe.js +10 -2
- package/lib/cjs/pipes/ParseExpressionPipe.js.map +1 -1
- package/lib/cjs/pipes/ValidationPipe.js +2 -2
- package/lib/cjs/pipes/ValidationPipe.js.map +1 -1
- package/lib/esm/builder/PlatformParams.js +2 -2
- package/lib/esm/builder/PlatformParams.js.map +1 -1
- package/lib/esm/decorators/bodyParams.js +6 -13
- package/lib/esm/decorators/bodyParams.js.map +1 -1
- package/lib/esm/decorators/context.js +3 -4
- package/lib/esm/decorators/context.js.map +1 -1
- package/lib/esm/decorators/cookies.js +3 -4
- package/lib/esm/decorators/cookies.js.map +1 -1
- package/lib/esm/decorators/headerParams.js +3 -4
- package/lib/esm/decorators/headerParams.js.map +1 -1
- package/lib/esm/decorators/locals.js +3 -4
- package/lib/esm/decorators/locals.js.map +1 -1
- package/lib/esm/decorators/paramFn.js +2 -7
- package/lib/esm/decorators/paramFn.js.map +1 -1
- package/lib/esm/decorators/pathParams.js +3 -4
- package/lib/esm/decorators/pathParams.js.map +1 -1
- package/lib/esm/decorators/queryParams.js +7 -8
- package/lib/esm/decorators/queryParams.js.map +1 -1
- package/lib/esm/decorators/session.js +3 -4
- package/lib/esm/decorators/session.js.map +1 -1
- package/lib/esm/decorators/useDeserialization.js +2 -2
- package/lib/esm/decorators/useParam.js +6 -10
- package/lib/esm/decorators/useParam.js.map +1 -1
- package/lib/esm/decorators/useParamExpression.js +1 -1
- package/lib/esm/decorators/useParamType.js +11 -5
- package/lib/esm/decorators/useParamType.js.map +1 -1
- package/lib/esm/decorators/usePipe.js +1 -1
- package/lib/esm/decorators/usePipe.js.map +1 -1
- package/lib/esm/decorators/useValidation.js +2 -2
- package/lib/esm/domain/ParamMetadata.js +1 -30
- package/lib/esm/domain/ParamMetadata.js.map +1 -1
- package/lib/esm/domain/ParamTypes.js +10 -0
- package/lib/esm/domain/ParamTypes.js.map +1 -1
- package/lib/esm/errors/ParamValidationError.js +1 -1
- package/lib/esm/errors/ParamValidationError.js.map +1 -1
- package/lib/esm/errors/RequiredValidationError.js +1 -1
- package/lib/esm/errors/RequiredValidationError.js.map +1 -1
- package/lib/esm/exports.js +2 -0
- package/lib/esm/exports.js.map +1 -0
- package/lib/esm/index.js +31 -33
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/pipes/DeserializerPipe.js.map +1 -1
- package/lib/esm/pipes/ParseExpressionPipe.js +10 -2
- package/lib/esm/pipes/ParseExpressionPipe.js.map +1 -1
- package/lib/esm/pipes/ValidationPipe.js +2 -2
- package/lib/esm/pipes/ValidationPipe.js.map +1 -1
- package/lib/types/builder/PlatformParams.d.ts +3 -4
- package/lib/types/decorators/bodyParams.d.ts +1 -0
- package/lib/types/decorators/context.d.ts +0 -6
- package/lib/types/decorators/paramFn.d.ts +2 -2
- package/lib/types/decorators/usePipe.d.ts +1 -1
- package/lib/types/domain/ParamMetadata.d.ts +1 -16
- package/lib/types/domain/ParamTypes.d.ts +1 -0
- package/lib/types/errors/ParamValidationError.d.ts +2 -2
- package/lib/types/errors/RequiredValidationError.d.ts +2 -2
- package/lib/types/exports.d.ts +1 -0
- package/lib/types/index.d.ts +24 -21
- package/lib/types/pipes/DeserializerPipe.d.ts +2 -2
- package/lib/types/pipes/ParseExpressionPipe.d.ts +3 -2
- package/lib/types/pipes/ValidationPipe.d.ts +5 -5
- package/package.json +34 -15
- package/readme.md +1 -2
- package/tsconfig.compile.esm.json +1 -12
package/lib/types/index.d.ts
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./pipes/ParseExpressionPipe";
|
|
6
|
-
export * from "./pipes/DeserializerPipe";
|
|
7
|
-
export * from "./pipes/ValidationPipe";
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./exports";
|
|
8
5
|
export * from "./builder/PlatformParams";
|
|
9
|
-
export * from "./errors/RequiredValidationError";
|
|
10
|
-
export * from "./errors/ValidationError";
|
|
11
|
-
export * from "./errors/ParamValidationError";
|
|
12
|
-
export * from "./decorators/context";
|
|
13
6
|
export * from "./decorators/bodyParams";
|
|
14
|
-
export * from "./decorators/
|
|
15
|
-
export * from "./decorators/useParam";
|
|
16
|
-
export * from "./decorators/useParamType";
|
|
17
|
-
export * from "./decorators/useType";
|
|
18
|
-
export * from "./decorators/useValidation";
|
|
19
|
-
export * from "./decorators/useDeserialization";
|
|
20
|
-
export * from "./decorators/useParamExpression";
|
|
21
|
-
export * from "./decorators/useParamType";
|
|
22
|
-
export * from "./decorators/headerParams";
|
|
7
|
+
export * from "./decorators/context";
|
|
23
8
|
export * from "./decorators/cookies";
|
|
9
|
+
export * from "./decorators/headerParams";
|
|
24
10
|
export * from "./decorators/locals";
|
|
11
|
+
export * from "./decorators/paramFn";
|
|
25
12
|
export * from "./decorators/pathParams";
|
|
26
13
|
export * from "./decorators/queryParams";
|
|
27
14
|
export * from "./decorators/session";
|
|
28
|
-
export * from "./decorators/
|
|
15
|
+
export * from "./decorators/useDeserialization";
|
|
16
|
+
export * from "./decorators/useParam";
|
|
17
|
+
export * from "./decorators/useParamExpression";
|
|
18
|
+
export * from "./decorators/useParamType";
|
|
19
|
+
export * from "./decorators/usePipe";
|
|
20
|
+
export * from "./decorators/useType";
|
|
21
|
+
export * from "./decorators/useValidation";
|
|
22
|
+
export * from "./domain/ParamMetadata";
|
|
23
|
+
export * from "./domain/ParamOptions";
|
|
24
|
+
export * from "./domain/ParamTypes";
|
|
25
|
+
export * from "./errors/ParamValidationError";
|
|
26
|
+
export * from "./errors/RequiredValidationError";
|
|
27
|
+
export * from "./errors/ValidationError";
|
|
28
|
+
export * from "./pipes/DeserializerPipe";
|
|
29
|
+
export * from "./pipes/ParseExpressionPipe";
|
|
30
|
+
export * from "./pipes/ValidationPipe";
|
|
31
|
+
export * from "./utils/mapParamsOptions";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JsonParameterStore, PipeMethods } from "@tsed/schema";
|
|
2
2
|
export declare class DeserializerPipe implements PipeMethods {
|
|
3
3
|
private settings;
|
|
4
|
-
transform(value: any, param:
|
|
4
|
+
transform(value: any, param: JsonParameterStore): any;
|
|
5
5
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JsonParameterStore, PipeMethods } from "@tsed/schema";
|
|
2
2
|
import type { ArgScope } from "../builder/PlatformParams";
|
|
3
3
|
export declare class ParseExpressionPipe implements PipeMethods {
|
|
4
|
-
transform(scope: ArgScope, param:
|
|
4
|
+
transform(scope: ArgScope, param: JsonParameterStore): any;
|
|
5
|
+
protected getKey(param: JsonParameterStore): string;
|
|
5
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InjectorService } from "@tsed/di";
|
|
2
|
-
import {
|
|
2
|
+
import { JsonParameterStore, PipeMethods } from "@tsed/schema";
|
|
3
3
|
export declare class ValidationPipe implements PipeMethods {
|
|
4
4
|
private validator;
|
|
5
5
|
constructor(injector: InjectorService);
|
|
6
|
-
coerceTypes(value: any, metadata:
|
|
7
|
-
skip(value: any, metadata:
|
|
8
|
-
transform(value: any, metadata:
|
|
9
|
-
protected checkIsRequired(value: any, metadata:
|
|
6
|
+
coerceTypes(value: any, metadata: JsonParameterStore): any;
|
|
7
|
+
skip(value: any, metadata: JsonParameterStore): boolean;
|
|
8
|
+
transform(value: any, metadata: JsonParameterStore): Promise<any>;
|
|
9
|
+
protected checkIsRequired(value: any, metadata: JsonParameterStore): boolean;
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-params",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.4",
|
|
4
4
|
"description": "Params module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
"types": "./lib/types/index.d.ts",
|
|
@@ -13,32 +14,50 @@
|
|
|
13
14
|
"default": "./lib/esm/index.js"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "yarn run build:esm && yarn run build:cjs",
|
|
17
|
+
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
17
18
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
18
|
-
"build:esm": "tsc --build tsconfig.compile.esm.json"
|
|
19
|
+
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
20
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\""
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"tslib": "2.
|
|
23
|
+
"tslib": "2.3.1"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
24
|
-
"@tsed/core": "7.0.0-beta.
|
|
25
|
-
"@tsed/di": "7.0.0-beta.
|
|
26
|
-
"@tsed/exceptions": "7.0.0-beta.
|
|
27
|
-
"@tsed/json-mapper": "7.0.0-beta.
|
|
28
|
-
"@tsed/schema": "7.0.0-beta.
|
|
26
|
+
"@tsed/core": "7.0.0-beta.4",
|
|
27
|
+
"@tsed/di": "7.0.0-beta.4",
|
|
28
|
+
"@tsed/exceptions": "7.0.0-beta.4",
|
|
29
|
+
"@tsed/json-mapper": "7.0.0-beta.4",
|
|
30
|
+
"@tsed/schema": "7.0.0-beta.4"
|
|
29
31
|
},
|
|
30
32
|
"peerDependencies": {
|
|
31
|
-
"@tsed/core": "^7.0.0-beta.
|
|
32
|
-
"@tsed/di": "^7.0.0-beta.
|
|
33
|
-
"@tsed/exceptions": "^7.0.0-beta.
|
|
34
|
-
"@tsed/json-mapper": "^7.0.0-beta.
|
|
35
|
-
"@tsed/schema": "^7.0.0-beta.
|
|
33
|
+
"@tsed/core": "^7.0.0-beta.4",
|
|
34
|
+
"@tsed/di": "^7.0.0-beta.4",
|
|
35
|
+
"@tsed/exceptions": "^7.0.0-beta.4",
|
|
36
|
+
"@tsed/json-mapper": "^7.0.0-beta.4",
|
|
37
|
+
"@tsed/schema": "^7.0.0-beta.4"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"@tsed/core": {
|
|
41
|
+
"optional": false
|
|
42
|
+
},
|
|
43
|
+
"@tsed/di": {
|
|
44
|
+
"optional": false
|
|
45
|
+
},
|
|
46
|
+
"@tsed/exceptions": {
|
|
47
|
+
"optional": false
|
|
48
|
+
},
|
|
49
|
+
"@tsed/json-mapper": {
|
|
50
|
+
"optional": false
|
|
51
|
+
},
|
|
52
|
+
"@tsed/schema": {
|
|
53
|
+
"optional": false
|
|
54
|
+
}
|
|
36
55
|
},
|
|
37
56
|
"repository": "https://github.com/tsedio/tsed",
|
|
38
57
|
"bugs": {
|
|
39
58
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
40
59
|
},
|
|
41
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
60
|
+
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-params",
|
|
42
61
|
"author": "Romain Lenzotti",
|
|
43
62
|
"license": "MIT"
|
|
44
63
|
}
|
package/readme.md
CHANGED
|
@@ -36,18 +36,17 @@ npm install --save @tsed/platform-params
|
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Contributors
|
|
39
|
+
|
|
39
40
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html).
|
|
40
41
|
|
|
41
42
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
42
43
|
|
|
43
|
-
|
|
44
44
|
## Backers
|
|
45
45
|
|
|
46
46
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
|
|
47
47
|
|
|
48
48
|
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
|
|
49
49
|
|
|
50
|
-
|
|
51
50
|
## Sponsors
|
|
52
51
|
|
|
53
52
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
|
|
@@ -8,16 +8,5 @@
|
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"declarationDir": "./lib/types"
|
|
10
10
|
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"node_modules",
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
11
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
12
|
}
|