@nestjs/core 11.0.0-next.1 → 11.0.0-next.2
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.
|
@@ -49,6 +49,7 @@ export declare abstract class AbstractHttpAdapter<TServer = any, TRequest = any,
|
|
|
49
49
|
setHttpServer(httpServer: TServer): void;
|
|
50
50
|
setInstance<T = any>(instance: T): void;
|
|
51
51
|
getInstance<T = any>(): T;
|
|
52
|
+
normalizePath(path: string): string;
|
|
52
53
|
abstract close(): any;
|
|
53
54
|
abstract initHttpServer(options: NestApplicationOptions): any;
|
|
54
55
|
abstract useStaticAssets(...args: any[]): any;
|
|
@@ -64,9 +65,7 @@ export declare abstract class AbstractHttpAdapter<TServer = any, TRequest = any,
|
|
|
64
65
|
abstract setErrorHandler(handler: Function, prefix?: string): any;
|
|
65
66
|
abstract setNotFoundHandler(handler: Function, prefix?: string): any;
|
|
66
67
|
abstract isHeadersSent(response: any): any;
|
|
67
|
-
abstract getHeader?(response: any, name: string): any;
|
|
68
68
|
abstract setHeader(response: any, name: string, value: string): any;
|
|
69
|
-
abstract appendHeader?(response: any, name: string, value: string): any;
|
|
70
69
|
abstract registerParserMiddleware(prefix?: string, rawBody?: boolean): any;
|
|
71
70
|
abstract enableCors(options: CorsOptions | CorsOptionsDelegate<TRequest>, prefix?: string): any;
|
|
72
71
|
abstract createMiddlewareFactory(requestMethod: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>;
|
package/adapters/http-adapter.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "11.0.0-next.
|
|
3
|
+
"version": "11.0.0-next.2",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"uid": "2.0.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@nestjs/common": "^11.0.0-next.
|
|
39
|
+
"@nestjs/common": "^11.0.0-next.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@nestjs/common": "^10.0.0",
|
|
@@ -16,7 +16,6 @@ const router_method_factory_1 = require("../helpers/router-method-factory");
|
|
|
16
16
|
const constants_2 = require("../injector/constants");
|
|
17
17
|
const interceptors_1 = require("../interceptors");
|
|
18
18
|
const pipes_1 = require("../pipes");
|
|
19
|
-
const legacy_route_converter_1 = require("./legacy-route-converter");
|
|
20
19
|
const paths_explorer_1 = require("./paths-explorer");
|
|
21
20
|
const request_constants_1 = require("./request/request-constants");
|
|
22
21
|
const route_params_factory_1 = require("./route-params-factory");
|
|
@@ -103,16 +102,10 @@ class RouterExplorer {
|
|
|
103
102
|
},
|
|
104
103
|
};
|
|
105
104
|
this.copyMetadataToCallback(targetCallback, routeHandler);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
catch (e) {
|
|
111
|
-
if (e instanceof TypeError) {
|
|
112
|
-
legacy_route_converter_1.LegacyRouteConverter.printError(path);
|
|
113
|
-
}
|
|
114
|
-
throw e;
|
|
115
|
-
}
|
|
105
|
+
const normalizedPath = router.normalizePath
|
|
106
|
+
? router.normalizePath(path)
|
|
107
|
+
: path;
|
|
108
|
+
routerMethodRef(normalizedPath, routeHandler);
|
|
116
109
|
this.graphInspector.insertEntrypointDefinition(entrypointDefinition, instanceWrapper.id);
|
|
117
110
|
});
|
|
118
111
|
const pathsToLog = this.routePathFactory.create({
|