Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs/core

Package Overview
Dependencies
Maintainers
1
Versions
377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/core - npm Package Compare versions

Comparing version 4.4.0 to 4.4.1

2

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc