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

@nestjs/platform-express

Package Overview
Dependencies
Maintainers
2
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/platform-express - npm Package Compare versions

Comparing version 10.4.11 to 11.0.0-next.1

6

adapters/express-adapter.d.ts

@@ -1,2 +0,1 @@

import type { Server } from 'http';
import { RequestMethod, VersioningOptions } from '@nestjs/common';

@@ -7,2 +6,3 @@ import { VersionValue } from '@nestjs/common/interfaces';

import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter';
import type { Server } from 'http';
import * as http from 'http';

@@ -35,3 +35,3 @@ import * as https from 'https';

listen(port: string | number, hostname: string, callback?: () => void): Server;
close(): Promise<unknown>;
close(): Promise<unknown> | undefined;
set(...args: any[]): any;

@@ -51,3 +51,3 @@ enable(...args: any[]): any;

registerParserMiddleware(prefix?: string, rawBody?: boolean): void;
useBodyParser<Options = NestExpressBodyParserOptions>(type: NestExpressBodyParserType, rawBody: boolean, options?: Omit<Options, 'verify'>): this;
useBodyParser<Options extends NestExpressBodyParserOptions = NestExpressBodyParserOptions>(type: NestExpressBodyParserType, rawBody: boolean, options?: Omit<Options, 'verify'>): this;
setLocal(key: string, value: any): this;

@@ -54,0 +54,0 @@ getType(): string;

@@ -8,4 +8,5 @@ "use strict";

const router_method_factory_1 = require("@nestjs/core/helpers/router-method-factory");
const legacy_route_converter_1 = require("@nestjs/core/router/legacy-route-converter");
const bodyparser = require("body-parser");
const body_parser_1 = require("body-parser");
const bodyparser = require("body-parser");
const cors = require("cors");

@@ -142,5 +143,16 @@ const express = require("express");

createMiddlewareFactory(requestMethod) {
return this.routerMethodFactory
.get(this.instance, requestMethod)
.bind(this.instance);
return (path, callback) => {
try {
const convertedPath = legacy_route_converter_1.LegacyRouteConverter.tryConvert(path);
return this.routerMethodFactory
.get(this.instance, requestMethod)
.call(this.instance, convertedPath, callback);
}
catch (e) {
if (e instanceof TypeError) {
legacy_route_converter_1.LegacyRouteConverter.printError(path);
}
throw e;
}
};
}

@@ -292,2 +304,3 @@ initHttpServer(options) {

}
throw new Error('Unsupported versioning options');
}

@@ -294,0 +307,0 @@ trackOpenConnections() {

import type { NestExpressBodyParserOptions } from '../../interfaces';
export declare function getBodyParserOptions<Options = NestExpressBodyParserOptions>(rawBody: boolean, options?: Omit<Options, 'verify'> | undefined): Options;
export declare function getBodyParserOptions<Options = NestExpressBodyParserOptions>(rawBody: boolean, options?: Omit<Options, 'verify'>): Options;

@@ -1,1 +0,6 @@

export declare function transformException(error: Error | undefined): Error;
import { HttpException } from '@nestjs/common';
export declare function transformException(error: (Error & {
field?: string;
}) | undefined): HttpException | (Error & {
field?: string;
}) | undefined;

@@ -6,2 +6,4 @@ "use strict";

const multer_constants_1 = require("./multer.constants");
// Multer may add in a 'field' property to the error
// https://github.com/expressjs/multer/blob/aa42bea6ac7d0cb8fcb279b15a7278cda805dc63/lib/multer-error.js#L19
function transformException(error) {

@@ -21,2 +23,5 @@ if (!error || error instanceof common_1.HttpException) {

case multer_constants_1.multerExceptions.MISSING_FIELD_NAME:
if (error.field) {
return new common_1.BadRequestException(`${error.message} - ${error.field}`);
}
return new common_1.BadRequestException(error.message);

@@ -23,0 +28,0 @@ case multer_constants_1.busboyExceptions.MULTIPART_BOUNDARY_NOT_FOUND:

{
"name": "@nestjs/platform-express",
"version": "10.4.11",
"version": "11.0.0-next.1",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",

@@ -23,3 +23,3 @@ "author": "Kamil Mysliwiec",

"cors": "2.8.5",
"express": "4.21.1",
"express": "5.0.1",
"multer": "1.4.4-lts.1",

@@ -29,4 +29,4 @@ "tslib": "2.7.0"

"devDependencies": {
"@nestjs/common": "10.4.11",
"@nestjs/core": "10.4.11"
"@nestjs/common": "^11.0.0-next.1",
"@nestjs/core": "^11.0.0-next.1"
},

@@ -33,0 +33,0 @@ "peerDependencies": {

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