@golevelup/nestjs-discovery
Advanced tools
Comparing version
@@ -13,2 +13,3 @@ "use strict"; | ||
exports.DiscoveryService = exports.withMetaAtKey = exports.getComponentMetaAtKey = void 0; | ||
/* eslint-disable @typescript-eslint/no-unsafe-function-type */ | ||
const common_1 = require("@nestjs/common"); | ||
@@ -41,6 +42,4 @@ const constants_1 = require("@nestjs/common/constants"); | ||
const withMetaAtKey = (key) => (component) => { | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
const metaTargets = [ | ||
(0, lodash_1.get)(component, 'instance.constructor'), | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
component.injectType, | ||
@@ -123,3 +122,6 @@ ].filter((x) => !(0, lodash_1.isNil)(x)); | ||
const prototype = Object.getPrototypeOf(instance); | ||
return this.metadataScanner.getAllMethodNames(prototype).map((name) => this.extractMethodMetaAtKey(metaKey, component, prototype, name)).filter((x) => !(0, lodash_1.isNil)(x.meta)); | ||
return this.metadataScanner | ||
.getAllMethodNames(prototype) | ||
.map((name) => this.extractMethodMetaAtKey(metaKey, component, prototype, name)) | ||
.filter((x) => !(0, lodash_1.isNil)(x.meta)); | ||
} | ||
@@ -126,0 +128,0 @@ /** |
{ | ||
"name": "@golevelup/nestjs-discovery", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "A Badass NestJS module for querying your app's controllers, providers and handlers", | ||
@@ -58,3 +58,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "3e37d37e9282308d1aa714889501e014a86a060c" | ||
"gitHead": "aa7ef033151857ff147cee8fc04c11c8ff7d2f4c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
345
0.58%33107
-15.39%19
-5%