@nestjs/core 8.1.2 → 8.2.3
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/CHANGELOG.md +12 -0
- package/Readme.md +6 -2
- package/hooks/before-app-shutdown.hook.js +1 -1
- package/hooks/on-app-bootstrap.hook.js +1 -1
- package/hooks/on-app-shutdown.hook.js +1 -1
- package/hooks/on-module-destroy.hook.js +1 -1
- package/hooks/on-module-init.hook.js +1 -1
- package/injector/injector.d.ts +1 -1
- package/injector/injector.js +3 -2
- package/injector/instance-loader.d.ts +3 -2
- package/injector/module-ref.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
<a name="8.2.0"></a>
|
|
7
|
+
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nestjs/core
|
package/Readme.md
CHANGED
|
@@ -57,10 +57,12 @@ With official support, you can get expert help straight from Nest core team. We
|
|
|
57
57
|
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
58
58
|
|
|
59
59
|
#### Principal Sponsors
|
|
60
|
-
<table style="text-align:center;"><tr
|
|
60
|
+
<table style="text-align:center;"><tr>
|
|
61
|
+
<td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
|
|
62
|
+
<td>
|
|
61
63
|
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
|
|
62
64
|
<td>
|
|
63
|
-
<a href="https://
|
|
65
|
+
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
|
|
64
66
|
</tr></table>
|
|
65
67
|
|
|
66
68
|
#### Gold Sponsors
|
|
@@ -113,6 +115,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
113
115
|
<td align="center" valign="middle"><a href="https://studyclerk.com/pay-for-research-paper" target="_blank"><img src="https://nestjs.com/img/studyclerk-logo.png" width="125" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://xyndata.com" target="_blank"><img src="https://nestjs.com/img/xyndata-logo.png" width="125" valign="middle" /></a></td></tr><tr>
|
|
114
116
|
<td align="center" valign="middle"><a href="https://www.anonymistic.com/" target="_blank"><img src="https://nestjs.com/img/anonymistic-logo.png" width="125" valign="middle" /></a></td>
|
|
115
117
|
<td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
|
|
118
|
+
<td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
|
|
119
|
+
<td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
|
|
116
120
|
</tr></table>
|
|
117
121
|
|
|
118
122
|
## Backers
|
|
@@ -10,7 +10,7 @@ const transient_instances_1 = require("../injector/helpers/transient-instances")
|
|
|
10
10
|
* @param instance The instance which should be checked
|
|
11
11
|
*/
|
|
12
12
|
function hasBeforeApplicationShutdownHook(instance) {
|
|
13
|
-
return
|
|
13
|
+
return shared_utils_1.isFunction(instance.beforeApplicationShutdown);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Calls the given instances
|
|
@@ -10,7 +10,7 @@ const transient_instances_1 = require("../injector/helpers/transient-instances")
|
|
|
10
10
|
* @param instance The instance which should be checked
|
|
11
11
|
*/
|
|
12
12
|
function hasOnAppBootstrapHook(instance) {
|
|
13
|
-
return
|
|
13
|
+
return shared_utils_1.isFunction(instance.onApplicationBootstrap);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Calls the given instances
|
|
@@ -10,7 +10,7 @@ const transient_instances_1 = require("../injector/helpers/transient-instances")
|
|
|
10
10
|
* @param instance The instance which should be checked
|
|
11
11
|
*/
|
|
12
12
|
function hasOnAppShutdownHook(instance) {
|
|
13
|
-
return
|
|
13
|
+
return shared_utils_1.isFunction(instance.onApplicationShutdown);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Calls the given instances
|
|
@@ -10,7 +10,7 @@ const transient_instances_1 = require("../injector/helpers/transient-instances")
|
|
|
10
10
|
* @param instance The instance which should be checked
|
|
11
11
|
*/
|
|
12
12
|
function hasOnModuleDestroyHook(instance) {
|
|
13
|
-
return
|
|
13
|
+
return shared_utils_1.isFunction(instance.onModuleDestroy);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Calls the given instances onModuleDestroy hook
|
|
@@ -10,7 +10,7 @@ const transient_instances_1 = require("../injector/helpers/transient-instances")
|
|
|
10
10
|
* @param instance The instance which should be checked
|
|
11
11
|
*/
|
|
12
12
|
function hasOnModuleInitHook(instance) {
|
|
13
|
-
return
|
|
13
|
+
return shared_utils_1.isFunction(instance.onModuleInit);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Calls the given instances
|
package/injector/injector.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare class Injector {
|
|
|
71
71
|
private resolveScopedComponentHost;
|
|
72
72
|
private isInquirerRequest;
|
|
73
73
|
private isInquirer;
|
|
74
|
-
|
|
74
|
+
protected addDependencyMetadata(keyOrIndex: number | string, hostWrapper: InstanceWrapper, instanceWrapper: InstanceWrapper): void;
|
|
75
75
|
private getTokenName;
|
|
76
76
|
private printResolvingDependenciesLog;
|
|
77
77
|
private printLookingForProviderLog;
|
package/injector/injector.js
CHANGED
|
@@ -137,6 +137,7 @@ class Injector {
|
|
|
137
137
|
}
|
|
138
138
|
async resolveSingleParam(wrapper, param, dependencyContext, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) {
|
|
139
139
|
if (shared_utils_1.isUndefined(param)) {
|
|
140
|
+
this.logger.log('Nest encountered an undefined dependency. This may be due to a circular import or a missing dependency declaration.');
|
|
140
141
|
throw new undefined_dependency_exception_1.UndefinedDependencyException(wrapper.name, dependencyContext, moduleRef);
|
|
141
142
|
}
|
|
142
143
|
const token = this.resolveParamToken(wrapper, param);
|
|
@@ -364,12 +365,12 @@ class Injector {
|
|
|
364
365
|
return shared_utils_1.isFunction(token) ? token.name : token.toString();
|
|
365
366
|
}
|
|
366
367
|
printResolvingDependenciesLog(token, inquirer) {
|
|
367
|
-
var _a;
|
|
368
|
+
var _a, _b, _c;
|
|
368
369
|
if (!this.isDebugMode()) {
|
|
369
370
|
return;
|
|
370
371
|
}
|
|
371
372
|
const tokenName = this.getTokenName(token);
|
|
372
|
-
const dependentName = (
|
|
373
|
+
const dependentName = (_c = ((inquirer === null || inquirer === void 0 ? void 0 : inquirer.name) && ((_b = (_a = inquirer.name).toString) === null || _b === void 0 ? void 0 : _b.call(_a)))) !== null && _c !== void 0 ? _c : 'unknown';
|
|
373
374
|
const isAlias = dependentName === tokenName;
|
|
374
375
|
const messageToPrint = `Resolving dependency ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(' in the ')}${cli_colors_util_1.clc.yellow(dependentName)}${cli_colors_util_1.clc.green(` provider ${isAlias ? '(alias)' : ''}`)}`;
|
|
375
376
|
this.logger.log(messageToPrint);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
2
|
import { NestContainer } from './container';
|
|
3
|
+
import { Injector } from './injector';
|
|
3
4
|
import { Module } from './module';
|
|
4
5
|
export declare class InstanceLoader {
|
|
5
|
-
|
|
6
|
+
protected readonly container: NestContainer;
|
|
6
7
|
private readonly logger;
|
|
7
|
-
|
|
8
|
+
protected readonly injector: Injector;
|
|
8
9
|
constructor(container: NestContainer, logger?: Logger);
|
|
9
10
|
createInstancesOfDependencies(modules?: Map<string, Module>): Promise<void>;
|
|
10
11
|
private createPrototypes;
|
package/injector/module-ref.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare abstract class ModuleRef {
|
|
|
8
8
|
private _instanceLinksHost;
|
|
9
9
|
private get instanceLinksHost();
|
|
10
10
|
constructor(container: NestContainer);
|
|
11
|
-
abstract get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | string | symbol, options?: {
|
|
11
|
+
abstract get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, options?: {
|
|
12
12
|
strict: boolean;
|
|
13
13
|
}): TResult;
|
|
14
|
-
abstract resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | string | symbol, contextId?: ContextId, options?: {
|
|
14
|
+
abstract resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, contextId?: ContextId, options?: {
|
|
15
15
|
strict: boolean;
|
|
16
16
|
}): Promise<TResult>;
|
|
17
17
|
abstract create<T = any>(type: Type<T>): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.3",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"uuid": "8.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@nestjs/common": "8.
|
|
39
|
+
"@nestjs/common": "8.2.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@nestjs/common": "^8.0.0",
|