@nestjs/common 12.0.0-alpha.3 → 12.0.0-alpha.5
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/Readme.md +1 -0
- package/index.d.ts +1 -1
- package/interfaces/http/http-server.interface.d.ts +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.js +1 -0
- package/interfaces/nest-application-options.interface.d.ts +15 -0
- package/interfaces/router-options.interface.d.ts +28 -0
- package/interfaces/router-options.interface.js +1 -0
- package/package.json +2 -2
package/Readme.md
CHANGED
|
@@ -129,6 +129,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
129
129
|
<tr>
|
|
130
130
|
<td align="center" valign="middle"><a href="https://solcellsforetag.se/" target="_blank"><img src="https://nestjs.com/img/logos/solcellsforetag-logo.svg" width="140" valign="middle" /></a></td>
|
|
131
131
|
<td align="center" valign="middle"><a href="https://www.route4me.com/" target="_blank"><img src="https://nestjs.com/img/logos/route4me-logo.svg" width="100" valign="middle" /></a></td>
|
|
132
|
+
<td align="center" valign="middle"><a href="https://memory2.co/" target="_blank"><img src="https://images.opencollective.com/memory-squared/bbe37f5/avatar/256.png?height=50" width="50" valign="middle" /></a></td>
|
|
132
133
|
</tr>
|
|
133
134
|
</table>
|
|
134
135
|
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './decorators/index.js';
|
|
|
3
3
|
export * from './enums/index.js';
|
|
4
4
|
export * from './exceptions/index.js';
|
|
5
5
|
export * from './file-stream/index.js';
|
|
6
|
-
export { Abstract, ArgumentMetadata, ArgumentsHost, BeforeApplicationShutdown, CallHandler, CanActivate, ClassProvider, ContextType, DynamicModule, ExceptionFilter, ExecutionContext, ExistingProvider, FactoryProvider, ForwardReference, HttpServer, HttpExceptionBody, HttpExceptionBodyMessage, HttpRedirectResponse, INestApplication, INestApplicationContext, INestMicroservice, InjectionToken, IntrospectionResult, MessageEvent, MiddlewareConsumer, ModuleMetadata, NestApplicationOptions, NestHybridApplicationOptions, NestInterceptor, NestMiddleware, PreRequestHook, NestModule, OnApplicationBootstrap, OnApplicationShutdown, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency, Paramtype, PipeTransform, Provider, RawBodyRequest, RpcExceptionFilter, Scope, ScopeOptions, Type, ValidationError, ValueProvider, VersioningOptions, VERSION_NEUTRAL, WebSocketAdapter, WsExceptionFilter, WsMessageHandler, } from './interfaces/index.js';
|
|
6
|
+
export { Abstract, ArgumentMetadata, ArgumentsHost, BeforeApplicationShutdown, CallHandler, CanActivate, ClassProvider, ContextType, DynamicModule, ExceptionFilter, ExecutionContext, ExistingProvider, FactoryProvider, ForwardReference, HttpServer, HttpExceptionBody, HttpExceptionBodyMessage, HttpRedirectResponse, INestApplication, INestApplicationContext, INestMicroservice, InjectionToken, IntrospectionResult, MessageEvent, MiddlewareConsumer, ModuleMetadata, NestApplicationOptions, NestHybridApplicationOptions, NestInterceptor, NestMiddleware, PreRequestHook, NestModule, OnApplicationBootstrap, OnApplicationShutdown, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency, Paramtype, PipeTransform, Provider, RawBodyRequest, RouteConflictPolicy, RouteConflictPolicyLevel, RouteResolutionStrategy, RpcExceptionFilter, Scope, ScopeOptions, Type, ValidationError, ValueProvider, VersioningOptions, VERSION_NEUTRAL, WebSocketAdapter, WsExceptionFilter, WsMessageHandler, } from './interfaces/index.js';
|
|
7
7
|
export * from './module-utils/index.js';
|
|
8
8
|
export * from './pipes/index.js';
|
|
9
9
|
export * from './serializer/index.js';
|
|
@@ -68,4 +68,5 @@ export interface HttpServer<TRequest = any, TResponse = any, ServerInstance = an
|
|
|
68
68
|
init?(): Promise<void>;
|
|
69
69
|
applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): (req: TRequest, res: TResponse, next: () => void) => Function;
|
|
70
70
|
normalizePath?(path: string): string;
|
|
71
|
+
isRouteOrderSensitive?(): boolean;
|
|
71
72
|
}
|
package/interfaces/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from './nest-application-context.interface.js';
|
|
|
24
24
|
export * from './nest-application-options.interface.js';
|
|
25
25
|
export * from './nest-application.interface.js';
|
|
26
26
|
export * from './nest-microservice.interface.js';
|
|
27
|
+
export * from './router-options.interface.js';
|
|
27
28
|
export * from './scope-options.interface.js';
|
|
28
29
|
export * from './shutdown-hooks-options.interface.js';
|
|
29
30
|
export * from './type.interface.js';
|
package/interfaces/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export * from './nest-application-context.interface.js';
|
|
|
24
24
|
export * from './nest-application-options.interface.js';
|
|
25
25
|
export * from './nest-application.interface.js';
|
|
26
26
|
export * from './nest-microservice.interface.js';
|
|
27
|
+
export * from './router-options.interface.js';
|
|
27
28
|
export * from './scope-options.interface.js';
|
|
28
29
|
export * from './shutdown-hooks-options.interface.js';
|
|
29
30
|
export * from './type.interface.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CorsOptions, CorsOptionsDelegate } from './external/cors-options.interface.js';
|
|
2
2
|
import { HttpsOptions } from './external/https-options.interface.js';
|
|
3
3
|
import { NestApplicationContextOptions } from './nest-application-context-options.interface.js';
|
|
4
|
+
import { RouteConflictPolicy, RouteResolutionStrategy } from './router-options.interface.js';
|
|
4
5
|
/**
|
|
5
6
|
* @publicApi
|
|
6
7
|
*/
|
|
@@ -32,4 +33,18 @@ export interface NestApplicationOptions extends NestApplicationContextOptions {
|
|
|
32
33
|
* @default false
|
|
33
34
|
*/
|
|
34
35
|
return503OnClosing?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Per-kind policy for overlapping HTTP routes detected at bootstrap.
|
|
38
|
+
* Distinguishes `duplicate` (identical method+path+host+version) from
|
|
39
|
+
* `shadow` (patterns that can match the same request, e.g. `/users/me`
|
|
40
|
+
* vs `/users/:id`). Each kind defaults to `'off'`.
|
|
41
|
+
*/
|
|
42
|
+
routeConflictPolicy?: RouteConflictPolicy;
|
|
43
|
+
/**
|
|
44
|
+
* Order in which HTTP routes are registered on the underlying adapter.
|
|
45
|
+
* `'specificity'` registers literal segments before parametric and
|
|
46
|
+
* wildcard ones on order-sensitive adapters (such as Express). Defaults
|
|
47
|
+
* to `'declaration'`.
|
|
48
|
+
*/
|
|
49
|
+
routeResolutionStrategy?: RouteResolutionStrategy;
|
|
35
50
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Severity level applied to a single kind of route conflict detected at
|
|
3
|
+
* bootstrap.
|
|
4
|
+
*
|
|
5
|
+
* @publicApi
|
|
6
|
+
*/
|
|
7
|
+
export type RouteConflictPolicyLevel = 'off' | 'warn' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* Per-kind policy for overlapping routes detected at bootstrap.
|
|
10
|
+
* `duplicate` covers identical (method, path, host, version) registrations.
|
|
11
|
+
* `shadow` covers patterns that can match the same request (for example
|
|
12
|
+
* `/users/me` vs `/users/:id`). Each kind defaults to `'off'`.
|
|
13
|
+
*
|
|
14
|
+
* @publicApi
|
|
15
|
+
*/
|
|
16
|
+
export interface RouteConflictPolicy {
|
|
17
|
+
duplicate?: RouteConflictPolicyLevel;
|
|
18
|
+
shadow?: RouteConflictPolicyLevel;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Order in which routes are registered on the underlying HTTP adapter.
|
|
22
|
+
* `'specificity'` registers literal segments before parametric and
|
|
23
|
+
* wildcard ones on order-sensitive adapters (such as Express). Defaults
|
|
24
|
+
* to `'declaration'`.
|
|
25
|
+
*
|
|
26
|
+
* @publicApi
|
|
27
|
+
*/
|
|
28
|
+
export type RouteResolutionStrategy = 'declaration' | 'specificity';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/common",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.5",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"homepage": "https://nestjs.com",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"optional": true
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "d91b72cc9567e6a09e3ad6075b2fb801e71adfc8"
|
|
50
50
|
}
|