@nestjs/core 11.1.11 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2025 Kamil Mysliwiec <https://kamilmysliwiec.com>
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
@@ -60,4 +60,5 @@ export declare class NestApplication extends NestApplicationContext<NestApplicat
60
60
  private host;
61
61
  private getProtocol;
62
62
  private registerMiddleware;
63
+ private applyInstanceDecoratorIfRegistered;
63
64
  }
@@ -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.11",
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.11"
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": "20529c07e3cc6647fa7611ef6eb776ad5507a325"
63
+ "gitHead": "96932ad073cc417e26f0bdea8f58d58145b1ca19"
64
64
  }