@tsed/platform-params 6.102.7 → 6.102.8-rc.1
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/package.json +3 -0
- package/lib/esm/builder/PlatformParams.js +2 -2
- package/lib/esm/decorators/bodyParams.js +3 -3
- package/lib/esm/decorators/context.js +3 -3
- package/lib/esm/decorators/cookies.js +3 -3
- package/lib/esm/decorators/headerParams.js +3 -3
- package/lib/esm/decorators/locals.js +3 -3
- package/lib/esm/decorators/pathParams.js +3 -3
- package/lib/esm/decorators/queryParams.js +3 -3
- package/lib/esm/decorators/session.js +3 -3
- package/lib/esm/decorators/useDeserialization.js +2 -2
- package/lib/esm/decorators/useParam.js +6 -6
- package/lib/esm/decorators/useParamExpression.js +1 -1
- package/lib/esm/decorators/useParamType.js +2 -2
- package/lib/esm/decorators/usePipe.js +1 -1
- package/lib/esm/decorators/useValidation.js +2 -2
- package/lib/esm/errors/ParamValidationError.js +1 -1
- package/lib/esm/errors/RequiredValidationError.js +1 -1
- package/lib/esm/index.js +28 -28
- package/lib/esm/package.json +3 -0
- package/lib/esm/pipes/ParseExpressionPipe.js +1 -1
- package/lib/esm/pipes/ValidationPipe.js +2 -2
- package/package.json +13 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Inject, Injectable, InjectorService, ProviderScope } from "@tsed/di";
|
|
3
3
|
import { JsonEntityStore, JsonParameterStore } from "@tsed/schema";
|
|
4
|
-
import { ParamValidationError } from "../errors/ParamValidationError";
|
|
5
|
-
import { ParseExpressionPipe } from "../pipes/ParseExpressionPipe";
|
|
4
|
+
import { ParamValidationError } from "../errors/ParamValidationError.js";
|
|
5
|
+
import { ParseExpressionPipe } from "../pipes/ParseExpressionPipe.js";
|
|
6
6
|
/**
|
|
7
7
|
* Platform Params abstraction layer.
|
|
8
8
|
* @platform
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDecorators } from "@tsed/core";
|
|
2
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
4
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
2
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
5
5
|
import { JsonEntityFn } from "@tsed/schema";
|
|
6
6
|
export function BodyParams(...args) {
|
|
7
7
|
const { expression, useType, useConverter = true, useValidation = true } = mapParamsOptions(args);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function Context(...args) {
|
|
5
5
|
const { expression, useType, useConverter = false, useValidation = false } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function CookiesParams(...args) {
|
|
5
5
|
const { expression, useType, useConverter = false, useValidation = false } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { UseParam } from "./useParam";
|
|
3
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { UseParam } from "./useParam.js";
|
|
3
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
4
4
|
export function HeaderParams(...args) {
|
|
5
5
|
const { expression, useType, useConverter = false, useValidation = false } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function Locals(...args) {
|
|
5
5
|
const { expression, useType, useConverter = false, useValidation = false } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function PathParams(...args) {
|
|
5
5
|
const { expression, useType, useConverter = true, useValidation = true } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function QueryParams(...args) {
|
|
5
5
|
const { expression, useType, useConverter = true, useValidation = true } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
2
|
-
import { mapParamsOptions } from "../utils/mapParamsOptions";
|
|
3
|
-
import { UseParam } from "./useParam";
|
|
1
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
2
|
+
import { mapParamsOptions } from "../utils/mapParamsOptions.js";
|
|
3
|
+
import { UseParam } from "./useParam.js";
|
|
4
4
|
export function Session(...args) {
|
|
5
5
|
const { expression, useType, useConverter = false, useValidation = false } = mapParamsOptions(args);
|
|
6
6
|
return UseParam({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isString, useDecorators } from "@tsed/core";
|
|
2
2
|
import { Any } from "@tsed/schema";
|
|
3
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
4
|
-
import { ParamFn } from "./paramFn";
|
|
5
|
-
import { UseDeserialization } from "./useDeserialization";
|
|
6
|
-
import { UseParamType } from "./useParamType";
|
|
7
|
-
import { UseType } from "./useType";
|
|
8
|
-
import { UseValidation } from "./useValidation";
|
|
3
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
4
|
+
import { ParamFn } from "./paramFn.js";
|
|
5
|
+
import { UseDeserialization } from "./useDeserialization.js";
|
|
6
|
+
import { UseParamType } from "./useParamType.js";
|
|
7
|
+
import { UseType } from "./useType.js";
|
|
8
|
+
import { UseValidation } from "./useValidation.js";
|
|
9
9
|
/**
|
|
10
10
|
* @ignore
|
|
11
11
|
* @param options
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDecorators } from "@tsed/core";
|
|
2
2
|
import { isParameterType, Name } from "@tsed/schema";
|
|
3
|
-
import { ParamFn } from "./paramFn";
|
|
4
|
-
import { UseParamExpression } from "./useParamExpression";
|
|
3
|
+
import { ParamFn } from "./paramFn.js";
|
|
4
|
+
import { UseParamExpression } from "./useParamExpression.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the object from request (like body, params, query, etc...).
|
|
7
7
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nameOf } from "@tsed/core";
|
|
2
2
|
import { BadRequest } from "@tsed/exceptions";
|
|
3
|
-
import { ValidationError } from "./ValidationError";
|
|
3
|
+
import { ValidationError } from "./ValidationError.js";
|
|
4
4
|
export class ParamValidationError extends BadRequest {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
package/lib/esm/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export * from "./utils/mapParamsOptions";
|
|
1
|
+
export * from "./utils/mapParamsOptions.js";
|
|
2
2
|
// domain
|
|
3
|
-
export * from "./domain/ParamMetadata";
|
|
4
|
-
export * from "./domain/ParamOptions";
|
|
5
|
-
export * from "./domain/ParamTypes";
|
|
3
|
+
export * from "./domain/ParamMetadata.js";
|
|
4
|
+
export * from "./domain/ParamOptions.js";
|
|
5
|
+
export * from "./domain/ParamTypes.js";
|
|
6
6
|
// pipes
|
|
7
|
-
export * from "./pipes/ParseExpressionPipe";
|
|
8
|
-
export * from "./pipes/DeserializerPipe";
|
|
9
|
-
export * from "./pipes/ValidationPipe";
|
|
7
|
+
export * from "./pipes/ParseExpressionPipe.js";
|
|
8
|
+
export * from "./pipes/DeserializerPipe.js";
|
|
9
|
+
export * from "./pipes/ValidationPipe.js";
|
|
10
10
|
// builder
|
|
11
|
-
export * from "./builder/PlatformParams";
|
|
11
|
+
export * from "./builder/PlatformParams.js";
|
|
12
12
|
// errors
|
|
13
|
-
export * from "./errors/RequiredValidationError";
|
|
14
|
-
export * from "./errors/ValidationError";
|
|
15
|
-
export * from "./errors/ParamValidationError";
|
|
13
|
+
export * from "./errors/RequiredValidationError.js";
|
|
14
|
+
export * from "./errors/ValidationError.js";
|
|
15
|
+
export * from "./errors/ParamValidationError.js";
|
|
16
16
|
// decorators
|
|
17
|
-
export * from "./decorators/context";
|
|
18
|
-
export * from "./decorators/bodyParams";
|
|
19
|
-
export * from "./decorators/usePipe";
|
|
20
|
-
export * from "./decorators/useParam";
|
|
21
|
-
export * from "./decorators/useParamType";
|
|
22
|
-
export * from "./decorators/useType";
|
|
23
|
-
export * from "./decorators/useValidation";
|
|
24
|
-
export * from "./decorators/useDeserialization";
|
|
25
|
-
export * from "./decorators/useParamExpression";
|
|
26
|
-
export * from "./decorators/useParamType";
|
|
27
|
-
export * from "./decorators/headerParams";
|
|
28
|
-
export * from "./decorators/cookies";
|
|
29
|
-
export * from "./decorators/locals";
|
|
30
|
-
export * from "./decorators/pathParams";
|
|
31
|
-
export * from "./decorators/queryParams";
|
|
32
|
-
export * from "./decorators/session";
|
|
33
|
-
export * from "./decorators/paramFn";
|
|
17
|
+
export * from "./decorators/context.js";
|
|
18
|
+
export * from "./decorators/bodyParams.js";
|
|
19
|
+
export * from "./decorators/usePipe.js";
|
|
20
|
+
export * from "./decorators/useParam.js";
|
|
21
|
+
export * from "./decorators/useParamType.js";
|
|
22
|
+
export * from "./decorators/useType.js";
|
|
23
|
+
export * from "./decorators/useValidation.js";
|
|
24
|
+
export * from "./decorators/useDeserialization.js";
|
|
25
|
+
export * from "./decorators/useParamExpression.js";
|
|
26
|
+
export * from "./decorators/useParamType.js";
|
|
27
|
+
export * from "./decorators/headerParams.js";
|
|
28
|
+
export * from "./decorators/cookies.js";
|
|
29
|
+
export * from "./decorators/locals.js";
|
|
30
|
+
export * from "./decorators/pathParams.js";
|
|
31
|
+
export * from "./decorators/queryParams.js";
|
|
32
|
+
export * from "./decorators/session.js";
|
|
33
|
+
export * from "./decorators/paramFn.js";
|
|
34
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { getValue } from "@tsed/core";
|
|
3
3
|
import { Injectable } from "@tsed/di";
|
|
4
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
4
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
5
5
|
let ParseExpressionPipe = class ParseExpressionPipe {
|
|
6
6
|
transform(scope, param) {
|
|
7
7
|
const { paramType, type } = param;
|
|
@@ -3,8 +3,8 @@ import { nameOf } from "@tsed/core";
|
|
|
3
3
|
import { Injectable, InjectorService } from "@tsed/di";
|
|
4
4
|
import { deserialize } from "@tsed/json-mapper";
|
|
5
5
|
import { getJsonSchema } from "@tsed/schema";
|
|
6
|
-
import { RequiredValidationError } from "../errors/RequiredValidationError";
|
|
7
|
-
import { ParamTypes } from "../domain/ParamTypes";
|
|
6
|
+
import { RequiredValidationError } from "../errors/RequiredValidationError.js";
|
|
7
|
+
import { ParamTypes } from "../domain/ParamTypes.js";
|
|
8
8
|
function cast(value, metadata) {
|
|
9
9
|
try {
|
|
10
10
|
return deserialize(value, {
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-params",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.1",
|
|
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",
|
|
@@ -21,24 +22,24 @@
|
|
|
21
22
|
"tslib": "2.2.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@tsed/core": "6.102.
|
|
25
|
-
"@tsed/di": "6.102.
|
|
26
|
-
"@tsed/exceptions": "6.102.
|
|
27
|
-
"@tsed/json-mapper": "6.102.
|
|
28
|
-
"@tsed/schema": "6.102.
|
|
25
|
+
"@tsed/core": "6.102.8-rc.1",
|
|
26
|
+
"@tsed/di": "6.102.8-rc.1",
|
|
27
|
+
"@tsed/exceptions": "6.102.8-rc.1",
|
|
28
|
+
"@tsed/json-mapper": "6.102.8-rc.1",
|
|
29
|
+
"@tsed/schema": "6.102.8-rc.1"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
|
-
"@tsed/core": "^6.102.
|
|
32
|
-
"@tsed/di": "^6.102.
|
|
33
|
-
"@tsed/exceptions": "^6.102.
|
|
34
|
-
"@tsed/json-mapper": "^6.102.
|
|
35
|
-
"@tsed/schema": "^6.102.
|
|
32
|
+
"@tsed/core": "^6.102.8-rc.1",
|
|
33
|
+
"@tsed/di": "^6.102.8-rc.1",
|
|
34
|
+
"@tsed/exceptions": "^6.102.8-rc.1",
|
|
35
|
+
"@tsed/json-mapper": "^6.102.8-rc.1",
|
|
36
|
+
"@tsed/schema": "^6.102.8-rc.1"
|
|
36
37
|
},
|
|
37
38
|
"repository": "https://github.com/tsedio/tsed",
|
|
38
39
|
"bugs": {
|
|
39
40
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
40
41
|
},
|
|
41
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
42
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/platform-params",
|
|
42
43
|
"author": "Romain Lenzotti",
|
|
43
44
|
"license": "MIT"
|
|
44
45
|
}
|