@nestjs/core 11.1.10 → 11.1.12
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 +1 -1
- package/injector/injector.js +5 -1
- package/nest-application.d.ts +1 -0
- package/nest-application.js +10 -0
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(The MIT License)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-present 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
|
package/injector/injector.js
CHANGED
|
@@ -257,7 +257,11 @@ class Injector {
|
|
|
257
257
|
* instantiated beforehand.
|
|
258
258
|
*/
|
|
259
259
|
instanceHost.donePromise &&
|
|
260
|
-
void instanceHost.donePromise
|
|
260
|
+
void instanceHost.donePromise
|
|
261
|
+
.then(() => this.loadProvider(instanceWrapper, moduleRef, contextId, inquirer))
|
|
262
|
+
.catch(err => {
|
|
263
|
+
instanceWrapper.settlementSignal?.error(err);
|
|
264
|
+
});
|
|
261
265
|
}
|
|
262
266
|
if (instanceWrapper.async) {
|
|
263
267
|
const host = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId);
|
package/nest-application.d.ts
CHANGED
package/nest-application.js
CHANGED
|
@@ -256,6 +256,7 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
256
256
|
return this;
|
|
257
257
|
}
|
|
258
258
|
useGlobalFilters(...filters) {
|
|
259
|
+
filters = this.applyInstanceDecoratorIfRegistered(...filters);
|
|
259
260
|
this.config.useGlobalFilters(...filters);
|
|
260
261
|
filters.forEach(item => this.graphInspector.insertOrphanedEnhancer({
|
|
261
262
|
subtype: 'filter',
|
|
@@ -264,6 +265,7 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
264
265
|
return this;
|
|
265
266
|
}
|
|
266
267
|
useGlobalPipes(...pipes) {
|
|
268
|
+
pipes = this.applyInstanceDecoratorIfRegistered(...pipes);
|
|
267
269
|
this.config.useGlobalPipes(...pipes);
|
|
268
270
|
pipes.forEach(item => this.graphInspector.insertOrphanedEnhancer({
|
|
269
271
|
subtype: 'pipe',
|
|
@@ -272,6 +274,7 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
272
274
|
return this;
|
|
273
275
|
}
|
|
274
276
|
useGlobalInterceptors(...interceptors) {
|
|
277
|
+
interceptors = this.applyInstanceDecoratorIfRegistered(...interceptors);
|
|
275
278
|
this.config.useGlobalInterceptors(...interceptors);
|
|
276
279
|
interceptors.forEach(item => this.graphInspector.insertOrphanedEnhancer({
|
|
277
280
|
subtype: 'interceptor',
|
|
@@ -280,6 +283,7 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
280
283
|
return this;
|
|
281
284
|
}
|
|
282
285
|
useGlobalGuards(...guards) {
|
|
286
|
+
guards = this.applyInstanceDecoratorIfRegistered(...guards);
|
|
283
287
|
this.config.useGlobalGuards(...guards);
|
|
284
288
|
guards.forEach(item => this.graphInspector.insertOrphanedEnhancer({
|
|
285
289
|
subtype: 'guard',
|
|
@@ -314,5 +318,11 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
314
318
|
async registerMiddleware(instance) {
|
|
315
319
|
await this.middlewareModule.registerMiddleware(this.middlewareContainer, instance);
|
|
316
320
|
}
|
|
321
|
+
applyInstanceDecoratorIfRegistered(...instances) {
|
|
322
|
+
if (this.appOptions.instrument?.instanceDecorator) {
|
|
323
|
+
return instances.map(instance => this.appOptions.instrument.instanceDecorator(instance));
|
|
324
|
+
}
|
|
325
|
+
return instances;
|
|
326
|
+
}
|
|
317
327
|
}
|
|
318
328
|
exports.NestApplication = NestApplication;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.12",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"uid": "2.0.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@nestjs/common": "11.1.
|
|
42
|
+
"@nestjs/common": "11.1.12"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@nestjs/common": "^11.0.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"optional": true
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "96932ad073cc417e26f0bdea8f58d58145b1ca19"
|
|
64
64
|
}
|