@nestjs/common 5.3.14 → 5.4.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.
package/Readme.md CHANGED
@@ -14,7 +14,7 @@
14
14
  <a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
15
15
  <a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
16
16
  <a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
17
- <a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#7" alt="Coverage" /></a>
17
+ <a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
18
18
  <a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
19
19
  <a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
20
20
  <a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
@@ -53,12 +53,12 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
53
53
  <a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="220" /></a>
54
54
 
55
55
  #### Silver Sponsors
56
-
57
- <a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" /></a>
56
+ <a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" /></a> &nbsp;
57
+ <a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="bottom" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" /> </a>
58
58
 
59
59
  #### Sponsors
60
60
 
61
- <a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" /></a> &nbsp; <a href="http://gojob.com"><img src="https://gojob.com/w/wp-content/uploads/2017/02/cropped-Logo-web-home.png" height="40" /> &nbsp; <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> &nbsp;--> <a href="https://hostpresto.com"><img src="https://nestjs.com/img/hostpresto.png" height="30" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" /></a>
61
+ <a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" /></a> &nbsp; <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> &nbsp;--> <a href="https://hostpresto.com"><img src="https://nestjs.com/img/hostpresto.png" height="30" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" /></a>
62
62
 
63
63
 
64
64
  ## Backers
@@ -1,11 +1,10 @@
1
1
  import { Observable } from 'rxjs';
2
- import { ExecutionContext, HttpServer, NestInterceptor } from '../../interfaces';
2
+ import { ExecutionContext, NestInterceptor } from '../../interfaces';
3
3
  export declare class CacheInterceptor implements NestInterceptor {
4
- protected readonly httpServer: HttpServer;
5
4
  protected readonly cacheManager: any;
6
5
  protected readonly reflector: any;
7
- protected readonly isHttpApp: boolean;
8
- constructor(httpServer: HttpServer, cacheManager: any, reflector: any);
6
+ protected readonly applicationRefHost: any;
7
+ constructor(cacheManager: any, reflector: any);
9
8
  intercept(context: ExecutionContext, call$: Observable<any>): Promise<Observable<any>>;
10
9
  trackBy(context: ExecutionContext): string | undefined;
11
10
  }
@@ -16,17 +16,12 @@ const rxjs_1 = require("rxjs");
16
16
  const operators_1 = require("rxjs/operators");
17
17
  const decorators_1 = require("../../decorators");
18
18
  const cache_constants_1 = require("../cache.constants");
19
- // NOTE (external)
20
- // We need to deduplicate them here due to the circular dependency
21
- // between core and common packages
22
- const HTTP_SERVER_REF = 'HTTP_SERVER_REF';
19
+ const APPLICATION_REFERENCE_HOST = 'ApplicationReferenceHost';
23
20
  const REFLECTOR = 'Reflector';
24
21
  let CacheInterceptor = class CacheInterceptor {
25
- constructor(httpServer, cacheManager, reflector) {
26
- this.httpServer = httpServer;
22
+ constructor(cacheManager, reflector) {
27
23
  this.cacheManager = cacheManager;
28
24
  this.reflector = reflector;
29
- this.isHttpApp = httpServer && !!httpServer.getRequestMethod;
30
25
  }
31
26
  async intercept(context, call$) {
32
27
  const key = this.trackBy(context);
@@ -45,22 +40,27 @@ let CacheInterceptor = class CacheInterceptor {
45
40
  }
46
41
  }
47
42
  trackBy(context) {
48
- if (!this.isHttpApp) {
43
+ const httpServer = this.applicationRefHost.applicationRef;
44
+ const isHttpApp = httpServer && !!httpServer.getRequestMethod;
45
+ if (!isHttpApp) {
49
46
  return this.reflector.get(cache_constants_1.CACHE_KEY_METADATA, context.getHandler());
50
47
  }
51
48
  const request = context.getArgByIndex(0);
52
- if (this.httpServer.getRequestMethod(request) !== 'GET') {
49
+ if (httpServer.getRequestMethod(request) !== 'GET') {
53
50
  return undefined;
54
51
  }
55
- return this.httpServer.getRequestUrl(request);
52
+ return httpServer.getRequestUrl(request);
56
53
  }
57
54
  };
55
+ __decorate([
56
+ decorators_1.Optional(),
57
+ decorators_1.Inject(APPLICATION_REFERENCE_HOST),
58
+ __metadata("design:type", Object)
59
+ ], CacheInterceptor.prototype, "applicationRefHost", void 0);
58
60
  CacheInterceptor = __decorate([
59
61
  decorators_1.Injectable(),
60
- __param(0, decorators_1.Optional()),
61
- __param(0, decorators_1.Inject(HTTP_SERVER_REF)),
62
- __param(1, decorators_1.Inject(cache_constants_1.CACHE_MANAGER)),
63
- __param(2, decorators_1.Inject(REFLECTOR)),
64
- __metadata("design:paramtypes", [Object, Object, Object])
62
+ __param(0, decorators_1.Inject(cache_constants_1.CACHE_MANAGER)),
63
+ __param(1, decorators_1.Inject(REFLECTOR)),
64
+ __metadata("design:paramtypes", [Object, Object])
65
65
  ], CacheInterceptor);
66
66
  exports.CacheInterceptor = CacheInterceptor;
package/constants.d.ts CHANGED
@@ -12,6 +12,8 @@ export declare const PATH_METADATA = "path";
12
12
  export declare const PARAMTYPES_METADATA = "design:paramtypes";
13
13
  export declare const SELF_DECLARED_DEPS_METADATA = "self:paramtypes";
14
14
  export declare const OPTIONAL_DEPS_METADATA = "optional:paramtypes";
15
+ export declare const PROPERTY_DEPS_METADATA = "self:properties_metadata";
16
+ export declare const OPTIONAL_PROPERTY_DEPS_METADATA = "optional:properties_metadata";
15
17
  export declare const METHOD_METADATA = "method";
16
18
  export declare const ROUTE_ARGS_METADATA = "__routeArguments__";
17
19
  export declare const CUSTOM_ROUTE_AGRS_METADATA = "__customRouteArgs__";
package/constants.js CHANGED
@@ -14,6 +14,8 @@ exports.PATH_METADATA = 'path';
14
14
  exports.PARAMTYPES_METADATA = 'design:paramtypes';
15
15
  exports.SELF_DECLARED_DEPS_METADATA = 'self:paramtypes';
16
16
  exports.OPTIONAL_DEPS_METADATA = 'optional:paramtypes';
17
+ exports.PROPERTY_DEPS_METADATA = 'self:properties_metadata';
18
+ exports.OPTIONAL_PROPERTY_DEPS_METADATA = 'optional:properties_metadata';
17
19
  exports.METHOD_METADATA = 'method';
18
20
  exports.ROUTE_ARGS_METADATA = '__routeArguments__';
19
21
  exports.CUSTOM_ROUTE_AGRS_METADATA = '__customRouteArgs__';
@@ -2,4 +2,4 @@
2
2
  * Injects provider which has to be available in the current injector (module) scope.
3
3
  * Providers are recognized by types or tokens.
4
4
  */
5
- export declare function Inject<T = any>(token: T): ParameterDecorator;
5
+ export declare function Inject<T = any>(token?: T): (target: Object, key: string | symbol, index?: number) => void;
@@ -8,10 +8,17 @@ const shared_utils_1 = require("../../utils/shared.utils");
8
8
  */
9
9
  function Inject(token) {
10
10
  return (target, key, index) => {
11
- const args = Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, target) || [];
12
- const type = shared_utils_1.isFunction(token) ? token.name : token;
13
- args.push({ index, param: type });
14
- Reflect.defineMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, args, target);
11
+ token = token || Reflect.getMetadata('design:type', target, key);
12
+ const type = token && shared_utils_1.isFunction(token) ? token.name : token;
13
+ if (!shared_utils_1.isUndefined(index)) {
14
+ const dependencies = Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, target) || [];
15
+ dependencies.push({ index, param: type });
16
+ Reflect.defineMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, dependencies, target);
17
+ return;
18
+ }
19
+ const properties = Reflect.getMetadata(constants_1.PROPERTY_DEPS_METADATA, target.constructor) || [];
20
+ properties.push({ key, type });
21
+ Reflect.defineMetadata(constants_1.PROPERTY_DEPS_METADATA, properties, target.constructor);
15
22
  };
16
23
  }
17
24
  exports.Inject = Inject;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Sets dependency as an optional one.
3
3
  */
4
- export declare function Optional(): ParameterDecorator;
4
+ export declare function Optional(): (target: Object, key: string | symbol, index?: number) => void;
@@ -1,13 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const constants_1 = require("../../constants");
4
+ const shared_utils_1 = require("../../utils/shared.utils");
4
5
  /**
5
6
  * Sets dependency as an optional one.
6
7
  */
7
8
  function Optional() {
8
9
  return (target, key, index) => {
9
- const args = Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, target) || [];
10
- Reflect.defineMetadata(constants_1.OPTIONAL_DEPS_METADATA, [...args, index], target);
10
+ if (!shared_utils_1.isUndefined(index)) {
11
+ const args = Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, target) || [];
12
+ Reflect.defineMetadata(constants_1.OPTIONAL_DEPS_METADATA, [...args, index], target);
13
+ return;
14
+ }
15
+ const properties = Reflect.getMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, target.constructor) || [];
16
+ Reflect.defineMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, [...properties, key], target.constructor);
11
17
  };
12
18
  }
13
19
  exports.Optional = Optional;
@@ -4,4 +4,5 @@ export declare enum Transport {
4
4
  NATS = 2,
5
5
  MQTT = 3,
6
6
  GRPC = 4,
7
+ RMQ = 5,
7
8
  }
@@ -7,4 +7,5 @@ var Transport;
7
7
  Transport[Transport["NATS"] = 2] = "NATS";
8
8
  Transport[Transport["MQTT"] = 3] = "MQTT";
9
9
  Transport[Transport["GRPC"] = 4] = "GRPC";
10
+ Transport[Transport["RMQ"] = 5] = "RMQ";
10
11
  })(Transport = exports.Transport || (exports.Transport = {}));
@@ -20,11 +20,11 @@ const multer_utils_1 = require("../multer/multer.utils");
20
20
  function FileFieldsInterceptor(uploadFields, localOptions) {
21
21
  let MixinInterceptor = class MixinInterceptor {
22
22
  constructor(options = {}) {
23
- this.upload = multer(Object.assign({}, options, localOptions));
23
+ this.multer = multer(Object.assign({}, options, localOptions));
24
24
  }
25
25
  async intercept(context, call$) {
26
26
  const ctx = context.switchToHttp();
27
- await new Promise((resolve, reject) => this.upload.fields(uploadFields)(ctx.getRequest(), ctx.getResponse(), err => {
27
+ await new Promise((resolve, reject) => this.multer.fields(uploadFields)(ctx.getRequest(), ctx.getResponse(), err => {
28
28
  if (err) {
29
29
  const error = multer_utils_1.transformException(err);
30
30
  return reject(error);
@@ -20,11 +20,11 @@ const multer_utils_1 = require("../multer/multer.utils");
20
20
  function FileInterceptor(fieldName, localOptions) {
21
21
  let MixinInterceptor = class MixinInterceptor {
22
22
  constructor(options = {}) {
23
- this.upload = multer(Object.assign({}, options, localOptions));
23
+ this.multer = multer(Object.assign({}, options, localOptions));
24
24
  }
25
25
  async intercept(context, call$) {
26
26
  const ctx = context.switchToHttp();
27
- await new Promise((resolve, reject) => this.upload.single(fieldName)(ctx.getRequest(), ctx.getResponse(), err => {
27
+ await new Promise((resolve, reject) => this.multer.single(fieldName)(ctx.getRequest(), ctx.getResponse(), err => {
28
28
  if (err) {
29
29
  const error = multer_utils_1.transformException(err);
30
30
  return reject(error);
@@ -20,11 +20,11 @@ const multer_utils_1 = require("../multer/multer.utils");
20
20
  function FilesInterceptor(fieldName, maxCount, localOptions) {
21
21
  let MixinInterceptor = class MixinInterceptor {
22
22
  constructor(options = {}) {
23
- this.upload = multer(Object.assign({}, options, localOptions));
23
+ this.multer = multer(Object.assign({}, options, localOptions));
24
24
  }
25
25
  async intercept(context, call$) {
26
26
  const ctx = context.switchToHttp();
27
- await new Promise((resolve, reject) => this.upload.array(fieldName, maxCount)(ctx.getRequest(), ctx.getResponse(), err => {
27
+ await new Promise((resolve, reject) => this.multer.array(fieldName, maxCount)(ctx.getRequest(), ctx.getResponse(), err => {
28
28
  if (err) {
29
29
  const error = multer_utils_1.transformException(err);
30
30
  return reject(error);
@@ -1,4 +1,4 @@
1
- import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
1
+ import { ModuleMetadata, Type } from '../../interfaces';
2
2
  import { MulterOptions } from '../../interfaces/external/multer-options.interface';
3
3
  export interface MulterModuleOptions extends MulterOptions {
4
4
  }
@@ -1,4 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
1
+ import { DynamicModule } from './../interfaces';
2
2
  import { MulterModuleAsyncOptions, MulterModuleOptions } from './interfaces/files-upload-module.interface';
3
3
  export declare class MulterModule {
4
4
  static register(options?: MulterModuleOptions): DynamicModule;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- const common_1 = require("@nestjs/common");
9
+ const decorators_1 = require("./../decorators");
10
10
  const files_constants_1 = require("./files.constants");
11
11
  let MulterModule = MulterModule_1 = class MulterModule {
12
12
  static register(options = {}) {
@@ -52,7 +52,7 @@ let MulterModule = MulterModule_1 = class MulterModule {
52
52
  }
53
53
  };
54
54
  MulterModule = MulterModule_1 = __decorate([
55
- common_1.Module({})
55
+ decorators_1.Module({})
56
56
  ], MulterModule);
57
57
  exports.MulterModule = MulterModule;
58
58
  var MulterModule_1;
@@ -0,0 +1,3 @@
1
+ export interface Abstract<T> extends Function {
2
+ prototype: T;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from './abstract.interface';
1
2
  export * from './controllers/controller-metadata.interface';
2
3
  export * from './controllers/controller.interface';
3
4
  export * from './exceptions/exception-filter.interface';
@@ -1,8 +1,8 @@
1
1
  import { Transport } from '../../enums/transport.enum';
2
- import { RedisOptions, NatsOptions, MqttOptions, GrpcOptions } from './microservice-configuration.interface';
2
+ import { RedisOptions, NatsOptions, MqttOptions, GrpcOptions, RmqOptions } from './microservice-configuration.interface';
3
3
  export interface ClientOptions {
4
4
  transport?: Transport;
5
- options?: TcpClientOptions | RedisOptions | NatsOptions | MqttOptions | GrpcOptions;
5
+ options?: TcpClientOptions | RedisOptions | NatsOptions | MqttOptions | GrpcOptions | RmqOptions;
6
6
  }
7
7
  export interface TcpClientOptions {
8
8
  host?: string;
@@ -1,7 +1,7 @@
1
1
  import { Transport } from '../../enums/transport.enum';
2
2
  import { MqttClientOptions } from '../external/mqtt-options.interface';
3
3
  import { CustomTransportStrategy } from './custom-transport-strategy.interface';
4
- export declare type MicroserviceOptions = GrpcOptions | TcpOptions | RedisOptions | NatsOptions | MqttOptions | CustomStrategy;
4
+ export declare type MicroserviceOptions = GrpcOptions | TcpOptions | RedisOptions | NatsOptions | MqttOptions | RmqOptions | CustomStrategy;
5
5
  export interface CustomStrategy {
6
6
  strategy?: CustomTransportStrategy;
7
7
  options?: {};
@@ -65,3 +65,13 @@ export interface NatsOptions {
65
65
  tls?: any;
66
66
  };
67
67
  }
68
+ export interface RmqOptions {
69
+ transport?: Transport.RMQ;
70
+ options?: {
71
+ urls?: string[];
72
+ queue?: string;
73
+ prefetchCount?: number;
74
+ isGlobalPrefetchCount?: boolean;
75
+ queueOptions?: any;
76
+ };
77
+ }
@@ -1,3 +1,4 @@
1
+ import { Abstract } from '../abstract.interface';
1
2
  import { Type } from '../type.interface';
2
3
  import { DynamicModule } from './dynamic-module.interface';
3
4
  import { ForwardReference } from './forward-reference.interface';
@@ -6,7 +7,7 @@ export interface ModuleMetadata {
6
7
  imports?: Array<Type<any> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
7
8
  controllers?: Type<any>[];
8
9
  providers?: Provider[];
9
- exports?: Array<DynamicModule | Promise<DynamicModule> | string | symbol | Provider | ForwardReference>;
10
+ exports?: Array<DynamicModule | Promise<DynamicModule> | string | symbol | Provider | ForwardReference | Abstract<any>>;
10
11
  /** @deprecated */
11
12
  modules?: Array<Type<any> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
12
13
  /** @deprecated */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "5.3.14",
3
+ "version": "5.4.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "axios": "0.17.1",
12
+ "axios": "0.18.0",
13
13
  "cli-color": "1.2.0",
14
14
  "deprecate": "1.0.0",
15
15
  "multer": "1.3.0",
@@ -1,6 +1,6 @@
1
- import { ExecutionContext, NestInterceptor } from '@nestjs/common';
2
1
  import { Observable } from 'rxjs';
3
2
  import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface';
3
+ import { ExecutionContext, NestInterceptor } from './../interfaces';
4
4
  export interface PlainLiteralObject {
5
5
  [key: string]: any;
6
6
  }
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const common_1 = require("@nestjs/common");
16
15
  const operators_1 = require("rxjs/operators");
17
16
  const core_1 = require("../decorators/core");
18
17
  const load_package_util_1 = require("../utils/load-package.util");
@@ -56,7 +55,7 @@ let ClassSerializerInterceptor = class ClassSerializerInterceptor {
56
55
  }
57
56
  };
58
57
  ClassSerializerInterceptor = __decorate([
59
- common_1.Injectable(),
58
+ core_1.Injectable(),
60
59
  __param(0, core_1.Inject(REFLECTOR)),
61
60
  __metadata("design:paramtypes", [Object])
62
61
  ], ClassSerializerInterceptor);
@@ -6,4 +6,4 @@ export declare const isConstructor: (fn: any) => boolean;
6
6
  export declare const validatePath: (path: any) => string;
7
7
  export declare const isNil: (obj: any) => boolean;
8
8
  export declare const isEmpty: (array: any) => boolean;
9
- export declare const isSymbol: (fn: any) => boolean;
9
+ export declare const isSymbol: (fn: any) => fn is symbol;
@@ -1,6 +1,7 @@
1
- import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.exception';
2
- export declare class InvalidDecoratorItemException extends RuntimeException {
1
+ export declare class InvalidDecoratorItemException extends Error {
2
+ private readonly msg;
3
3
  constructor(decorator: string, item: string, context: string);
4
+ what(): string;
4
5
  }
5
6
  export declare function validateEach(context: {
6
7
  name: string;
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const runtime_exception_1 = require("@nestjs/core/errors/exceptions/runtime.exception");
4
- class InvalidDecoratorItemException extends runtime_exception_1.RuntimeException {
3
+ class InvalidDecoratorItemException extends Error {
5
4
  constructor(decorator, item, context) {
6
- super(`Invalid ${item} passed to ${decorator}() decorator (${context}).`);
5
+ const message = `Invalid ${item} passed to ${decorator}() decorator (${context}).`;
6
+ super(message);
7
+ this.msg = message;
8
+ }
9
+ what() {
10
+ return this.msg;
7
11
  }
8
12
  }
9
13
  exports.InvalidDecoratorItemException = InvalidDecoratorItemException;