@nestjs/core
Advanced tools
Comparing version 4.4.0 to 4.4.1
{ | ||
"name": "@nestjs/core", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@core)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -10,3 +10,3 @@ "use strict"; | ||
case route_paramtypes_enum_1.RouteParamtypes.QUERY: return 'query'; | ||
default: return null; | ||
default: return 'custom'; | ||
} | ||
@@ -13,0 +13,0 @@ } |
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; | ||
export interface IRouteParamsFactory { | ||
exchangeKeyForValue(key: RouteParamtypes, data: any, {req, res, next}: { | ||
exchangeKeyForValue(key: RouteParamtypes | string, data: any, {req, res, next}: { | ||
req: any; | ||
@@ -5,0 +5,0 @@ res: any; |
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; | ||
import { IRouteParamsFactory } from './interfaces/route-params-factory.interface'; | ||
export declare class RouteParamsFactory implements IRouteParamsFactory { | ||
exchangeKeyForValue(key: RouteParamtypes, data: any, {req, res, next}: { | ||
exchangeKeyForValue(key: RouteParamtypes | string, data: any, {req, res, next}: { | ||
req: any; | ||
@@ -6,0 +6,0 @@ res: any; |
@@ -15,3 +15,3 @@ import 'reflect-metadata'; | ||
index: number; | ||
type: RouteParamtypes; | ||
type: RouteParamtypes | string; | ||
data: ParamData; | ||
@@ -32,3 +32,3 @@ pipes: PipeTransform<any>[]; | ||
create(instance: Controller, callback: (...args) => any, methodName: string, module: string, requestMethod: RequestMethod): (req: any, res: any, next: any) => Promise<any>; | ||
mapParamType(key: string): RouteParamtypes | number; | ||
mapParamType(key: string): string; | ||
reflectCallbackMetadata(instance: Controller, methodName: string): RouteParamsMetadata; | ||
@@ -35,0 +35,0 @@ reflectCallbackParamtypes(instance: Controller, methodName: string): any[]; |
@@ -61,3 +61,3 @@ "use strict"; | ||
const keyPair = key.split(':'); | ||
return Number(keyPair[0]); | ||
return keyPair[0]; | ||
} | ||
@@ -88,4 +88,5 @@ reflectCallbackMetadata(instance, methodName) { | ||
} | ||
const extractValue = (req, res, next) => this.paramsFactory.exchangeKeyForValue(type, data, { req, res, next }); | ||
return { index, extractValue, type, data, pipes }; | ||
const nType = Number(type); | ||
const extractValue = (req, res, next) => this.paramsFactory.exchangeKeyForValue(nType, data, { req, res, next }); | ||
return { index, extractValue, type: nType, data, pipes }; | ||
}); | ||
@@ -108,3 +109,4 @@ } | ||
|| type === route_paramtypes_enum_1.RouteParamtypes.QUERY | ||
|| type === route_paramtypes_enum_1.RouteParamtypes.PARAM) { | ||
|| type === route_paramtypes_enum_1.RouteParamtypes.PARAM | ||
|| shared_utils_1.isString(type)) { | ||
return yield this.pipesConsumer.apply(value, { metatype, type, data }, transforms); | ||
@@ -111,0 +113,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162363
3282