@nestjs/platform-express 8.4.6 → 9.0.0-next.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RequestMethod } from '@nestjs/common';
|
|
2
|
-
import {
|
|
1
|
+
import { RequestMethod, VersioningOptions } from '@nestjs/common';
|
|
2
|
+
import { VersionValue } from '@nestjs/common/interfaces';
|
|
3
3
|
import { CorsOptions, CorsOptionsDelegate } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
4
4
|
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
|
|
5
5
|
import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExpressAdapter = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const interfaces_1 = require("@nestjs/common/interfaces");
|
|
6
5
|
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
|
7
6
|
const http_adapter_1 = require("@nestjs/core/adapters/http-adapter");
|
|
8
7
|
const router_method_factory_1 = require("@nestjs/core/helpers/router-method-factory");
|
|
@@ -151,7 +150,7 @@ class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
151
150
|
}
|
|
152
151
|
return next();
|
|
153
152
|
};
|
|
154
|
-
if (version ===
|
|
153
|
+
if (version === common_1.VERSION_NEUTRAL ||
|
|
155
154
|
// URL Versioning is done via the path, so the filter continues forward
|
|
156
155
|
versioningOptions.type === common_1.VersioningType.URI) {
|
|
157
156
|
const handlerForNoVersioning = (req, res, next) => handler(req, res, next);
|
|
@@ -201,7 +200,7 @@ class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
201
200
|
// No version was supplied
|
|
202
201
|
if ((0, shared_utils_1.isUndefined)(acceptHeaderVersionParameter)) {
|
|
203
202
|
if (Array.isArray(version)) {
|
|
204
|
-
if (version.includes(
|
|
203
|
+
if (version.includes(common_1.VERSION_NEUTRAL)) {
|
|
205
204
|
return handler(req, res, next);
|
|
206
205
|
}
|
|
207
206
|
}
|
|
@@ -232,7 +231,7 @@ class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
232
231
|
// No version was supplied
|
|
233
232
|
if ((0, shared_utils_1.isUndefined)(customHeaderVersionParameter)) {
|
|
234
233
|
if (Array.isArray(version)) {
|
|
235
|
-
if (version.includes(
|
|
234
|
+
if (version.includes(common_1.VERSION_NEUTRAL)) {
|
|
236
235
|
return handler(req, res, next);
|
|
237
236
|
}
|
|
238
237
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/platform-express",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-next.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"tslib": "2.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@nestjs/common": "
|
|
28
|
-
"@nestjs/core": "
|
|
27
|
+
"@nestjs/common": "^9.0.0-next.1",
|
|
28
|
+
"@nestjs/core": "^9.0.0-next.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@nestjs/common": "^8.0.0",
|