@nestjs/core 8.0.0 → 8.0.4
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.
|
@@ -9,6 +9,6 @@ export declare class BaseExceptionFilterContext extends ContextCreator {
|
|
|
9
9
|
constructor(container: NestContainer);
|
|
10
10
|
createConcreteContext<T extends any[], R extends any[]>(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R;
|
|
11
11
|
getFilterInstance(filter: Function | ExceptionFilter, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): ExceptionFilter | null;
|
|
12
|
-
getInstanceByMetatype
|
|
12
|
+
getInstanceByMetatype(metatype: Type<unknown>): InstanceWrapper | undefined;
|
|
13
13
|
reflectCatchExceptions(instance: ExceptionFilter): Type<any>[];
|
|
14
14
|
}
|
|
@@ -37,7 +37,7 @@ class BaseExceptionFilterContext extends context_creator_1.ContextCreator {
|
|
|
37
37
|
const instanceHost = instanceWrapper.getInstanceByContextId(contextId, inquirerId);
|
|
38
38
|
return instanceHost && instanceHost.instance;
|
|
39
39
|
}
|
|
40
|
-
getInstanceByMetatype(
|
|
40
|
+
getInstanceByMetatype(metatype) {
|
|
41
41
|
if (!this.moduleContext) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
@@ -46,7 +46,7 @@ class BaseExceptionFilterContext extends context_creator_1.ContextCreator {
|
|
|
46
46
|
if (!moduleRef) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
return moduleRef.injectables.get(
|
|
49
|
+
return moduleRef.injectables.get(metatype);
|
|
50
50
|
}
|
|
51
51
|
reflectCatchExceptions(instance) {
|
|
52
52
|
const prototype = Object.getPrototypeOf(instance);
|
package/injector/module.js
CHANGED
|
@@ -259,8 +259,8 @@ class Module {
|
|
|
259
259
|
return addExportedUnit(provider);
|
|
260
260
|
}
|
|
261
261
|
else if (this.isDynamicModule(provider)) {
|
|
262
|
-
const { module } = provider;
|
|
263
|
-
return addExportedUnit(
|
|
262
|
+
const { module: moduleClassRef } = provider;
|
|
263
|
+
return addExportedUnit(moduleClassRef);
|
|
264
264
|
}
|
|
265
265
|
addExportedUnit(provider);
|
|
266
266
|
}
|
package/nest-application.js
CHANGED
|
@@ -16,7 +16,7 @@ const middleware_module_1 = require("./middleware/middleware-module");
|
|
|
16
16
|
const nest_application_context_1 = require("./nest-application-context");
|
|
17
17
|
const routes_resolver_1 = require("./router/routes-resolver");
|
|
18
18
|
const { SocketModule } = optional_require_1.optionalRequire('@nestjs/websockets/socket-module', () => require('@nestjs/websockets/socket-module'));
|
|
19
|
-
const { MicroservicesModule
|
|
19
|
+
const { MicroservicesModule } = optional_require_1.optionalRequire('@nestjs/microservices/microservices-module', () => require('@nestjs/microservices/microservices-module'));
|
|
20
20
|
/**
|
|
21
21
|
* @publicApi
|
|
22
22
|
*/
|
|
@@ -166,8 +166,8 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
|
|
|
166
166
|
? args.slice(0, args.length - 1)
|
|
167
167
|
: args;
|
|
168
168
|
this.httpAdapter.listen(port, ...listenFnArgs, (...originalCallbackArgs) => {
|
|
169
|
-
var _a;
|
|
170
|
-
if ((_a = this.appOptions) === null || _a === void 0 ? void 0 : _a.autoFlushLogs) {
|
|
169
|
+
var _a, _b;
|
|
170
|
+
if ((_b = (_a = this.appOptions) === null || _a === void 0 ? void 0 : _a.autoFlushLogs) !== null && _b !== void 0 ? _b : true) {
|
|
171
171
|
this.flushLogs();
|
|
172
172
|
}
|
|
173
173
|
const address = this.httpServer.address();
|
package/nest-factory.js
CHANGED
|
@@ -143,7 +143,7 @@ class NestFactoryStatic {
|
|
|
143
143
|
if (bufferLogs) {
|
|
144
144
|
logger_service_1.Logger.attachBuffer();
|
|
145
145
|
}
|
|
146
|
-
this.autoFlushLogs = autoFlushLogs;
|
|
146
|
+
this.autoFlushLogs = autoFlushLogs !== null && autoFlushLogs !== void 0 ? autoFlushLogs : true;
|
|
147
147
|
}
|
|
148
148
|
createHttpAdapter(httpServer) {
|
|
149
149
|
const { ExpressAdapter } = load_adapter_1.loadAdapter('@nestjs/platform-express', 'HTTP', () => require('@nestjs/platform-express'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@nuxtjs/opencollective": "0.3.2",
|
|
31
|
-
"fast-safe-stringify": "2.0.
|
|
31
|
+
"fast-safe-stringify": "2.0.8",
|
|
32
32
|
"iterare": "1.2.1",
|
|
33
33
|
"object-hash": "2.2.0",
|
|
34
34
|
"path-to-regexp": "3.2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"uuid": "8.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@nestjs/common": "
|
|
39
|
+
"@nestjs/common": "8.0.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@nestjs/common": "^8.0.0",
|
package/scanner.js
CHANGED
|
@@ -159,7 +159,7 @@ class DependenciesScanner {
|
|
|
159
159
|
// Skip "InternalCoreModule" from calculating distance
|
|
160
160
|
modulesGenerator.next();
|
|
161
161
|
const modulesStack = [];
|
|
162
|
-
const calculateDistance = (moduleRef, distance =
|
|
162
|
+
const calculateDistance = (moduleRef, distance = 1) => {
|
|
163
163
|
if (modulesStack.includes(moduleRef)) {
|
|
164
164
|
return;
|
|
165
165
|
}
|