@nestjs/platform-express 11.0.0-next.4 → 11.0.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/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(The MIT License)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2025 Kamil Mysliwiec <https://kamilmysliwiec.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
|
@@ -12,6 +12,7 @@ const cors = require("cors");
|
|
|
12
12
|
const express = require("express");
|
|
13
13
|
const http = require("http");
|
|
14
14
|
const https = require("https");
|
|
15
|
+
const path_to_regexp_1 = require("path-to-regexp");
|
|
15
16
|
const stream_1 = require("stream");
|
|
16
17
|
const get_body_parser_options_util_1 = require("./utils/get-body-parser-options.util");
|
|
17
18
|
/**
|
|
@@ -95,6 +96,8 @@ class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
95
96
|
normalizePath(path) {
|
|
96
97
|
try {
|
|
97
98
|
const convertedPath = legacy_route_converter_1.LegacyRouteConverter.tryConvert(path);
|
|
99
|
+
// Call "pathToRegexp" to trigger a TypeError if the path is invalid
|
|
100
|
+
(0, path_to_regexp_1.pathToRegexp)(convertedPath);
|
|
98
101
|
return convertedPath;
|
|
99
102
|
}
|
|
100
103
|
catch (e) {
|
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpServer, INestApplication } from '@nestjs/common';
|
|
2
|
+
import type { CorsOptions, CorsOptionsDelegate } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
3
|
+
import type { Express } from 'express';
|
|
2
4
|
import type { Server as CoreHttpServer } from 'http';
|
|
3
5
|
import type { Server as CoreHttpsServer } from 'https';
|
|
4
|
-
import type { Express } from 'express';
|
|
5
6
|
import { NestExpressBodyParserOptions } from './nest-express-body-parser-options.interface';
|
|
6
7
|
import { NestExpressBodyParserType } from './nest-express-body-parser.interface';
|
|
7
8
|
import { ServeStaticOptions } from './serve-static-options.interface';
|
|
@@ -72,6 +73,7 @@ export interface NestExpressApplication<TServer extends CoreHttpServer | CoreHtt
|
|
|
72
73
|
* @returns {this}
|
|
73
74
|
*/
|
|
74
75
|
useStaticAssets(path: string, options?: ServeStaticOptions): this;
|
|
76
|
+
enableCors(options?: CorsOptions | CorsOptionsDelegate<any>): void;
|
|
75
77
|
/**
|
|
76
78
|
* Register Express body parsers on the fly. Will respect
|
|
77
79
|
* the application's `rawBody` option.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/platform-express",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"body-parser": "1.20.3",
|
|
22
22
|
"cors": "2.8.5",
|
|
23
23
|
"express": "5.0.1",
|
|
24
|
-
"multer": "1.4.
|
|
25
|
-
"tslib": "2.
|
|
24
|
+
"multer": "1.4.5-lts.1",
|
|
25
|
+
"tslib": "2.8.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@nestjs/common": "
|
|
29
|
-
"@nestjs/core": "
|
|
28
|
+
"@nestjs/common": "11.0.1",
|
|
29
|
+
"@nestjs/core": "11.0.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@nestjs/common": "^
|
|
33
|
-
"@nestjs/core": "^
|
|
32
|
+
"@nestjs/common": "^11.0.0",
|
|
33
|
+
"@nestjs/core": "^11.0.0"
|
|
34
34
|
}
|
|
35
35
|
}
|