@nestjs/core
Advanced tools
Comparing version 4.5.7 to 4.5.8
@@ -185,3 +185,3 @@ "use strict"; | ||
const provide = exportedComponent.provide; | ||
if (shared_utils_1.isString(provide)) { | ||
if (shared_utils_1.isString(provide) || shared_utils_1.isSymbol(provide)) { | ||
return this._exports.add(provide); | ||
@@ -188,0 +188,0 @@ } |
{ | ||
"name": "@nestjs/core", | ||
"version": "4.5.7", | ||
"version": "4.5.8", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@core)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -47,7 +47,6 @@ import 'reflect-metadata'; | ||
}, transforms: Transform<any>[]): Promise<any>; | ||
createGuardsFn(guards: any[], instance: Controller, callback: (...args) => any): (req: any) => Promise<any>; | ||
createGuardsFn(guards: any[], instance: Controller, callback: (...args) => any): (req: any) => Promise<void>; | ||
createPipesFn(pipes: any[], paramsOptions: (ParamProperties & { | ||
metatype?: any; | ||
})[]): (...args: any[]) => Promise<any>; | ||
createHandleResponseFn(isResponseHandled: boolean, httpStatusCode: number): (...args: any[]) => any; | ||
})[]): (args: any, req: any, res: any, next: any) => Promise<void>; | ||
} |
@@ -46,12 +46,11 @@ "use strict"; | ||
const fnApplyPipes = this.createPipesFn(pipes, paramsOptions); | ||
const fnHandleResponse = this.createHandleResponseFn(isResponseHandled, httpStatusCode); | ||
return (req, res, next) => __awaiter(this, void 0, void 0, function* () { | ||
const args = this.createNullArray(argsLength); | ||
yield fnCanActivate(req); | ||
fnCanActivate && (yield fnCanActivate(req)); | ||
const handler = () => __awaiter(this, void 0, void 0, function* () { | ||
yield fnApplyPipes(args, req, res, next); | ||
fnApplyPipes && (yield fnApplyPipes(args, req, res, next)); | ||
return callback.apply(instance, args); | ||
}); | ||
const result = yield this.interceptorsConsumer.intercept(interceptors, req, instance, callback, handler); | ||
fnHandleResponse(result, res); | ||
isResponseHandled && this.responseController.apply(result, res, httpStatusCode); | ||
}); | ||
@@ -121,3 +120,3 @@ } | ||
}); | ||
return guards.length ? canActivateFn : (req) => __awaiter(this, void 0, void 0, function* () { return undefined; }); | ||
return guards.length ? canActivateFn : null; | ||
} | ||
@@ -132,10 +131,5 @@ createPipesFn(pipes, paramsOptions) { | ||
}); | ||
return paramsOptions.length ? pipesFn : (...args) => __awaiter(this, void 0, void 0, function* () { return undefined; }); | ||
return paramsOptions.length ? pipesFn : null; | ||
} | ||
createHandleResponseFn(isResponseHandled, httpStatusCode) { | ||
return !isResponseHandled | ||
? (result, res) => this.responseController.apply(result, res, httpStatusCode) | ||
: (...args) => undefined; | ||
} | ||
} | ||
exports.RouterExecutionContext = RouterExecutionContext; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174580
3607