@nestjs/core 9.0.7 → 9.0.10

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
@@ -89,7 +89,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
89
89
  <a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
90
90
  <a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
91
91
  <td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
92
- <td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr></table>
92
+ <td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr><tr>
93
+ <td><a href="https://bilberrry.com/" target="_blank"><img src="https://nestjs.com/img/bilberrry-logo.svg" width="180" valign="middle" /></td></tr></table>
93
94
 
94
95
  #### Sponsors
95
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "9.0.7",
3
+ "version": "9.0.10",
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": "9.0.7"
39
+ "@nestjs/common": "9.0.10"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@nestjs/common": "^9.0.0",
@@ -1,4 +1,4 @@
1
- import { INestApplication, InjectionToken, Logger } from '@nestjs/common';
1
+ import { INestApplicationContext, InjectionToken, Logger } from '@nestjs/common';
2
2
  import { ReplFunction } from './repl-function';
3
3
  import type { ReplFunctionClass } from './repl.interfaces';
4
4
  declare type ModuleKey = string;
@@ -8,13 +8,13 @@ export declare type ModuleDebugEntry = {
8
8
  };
9
9
  declare type ReplScope = Record<string, any>;
10
10
  export declare class ReplContext {
11
- readonly app: INestApplication;
11
+ readonly app: INestApplicationContext;
12
12
  readonly logger: Logger;
13
13
  debugRegistry: Record<ModuleKey, ModuleDebugEntry>;
14
14
  readonly globalScope: ReplScope;
15
15
  readonly nativeFunctions: Map<string, ReplFunction<unknown[], any>>;
16
16
  private readonly container;
17
- constructor(app: INestApplication, nativeFunctionsClassRefs?: ReplFunctionClass[]);
17
+ constructor(app: INestApplicationContext, nativeFunctionsClassRefs?: ReplFunctionClass[]);
18
18
  writeToStdout(text: string): void;
19
19
  private initializeContext;
20
20
  private introspectCollection;
@@ -46,16 +46,17 @@ class ReplContext {
46
46
  moduleRef[collection].forEach(({ token }) => {
47
47
  const stringifiedToken = this.stringifyToken(token);
48
48
  if (stringifiedToken === application_config_1.ApplicationConfig.name ||
49
- stringifiedToken === moduleRef.metatype.name ||
50
- this.globalScope[stringifiedToken]) {
49
+ stringifiedToken === moduleRef.metatype.name) {
51
50
  return;
52
51
  }
53
- // For in REPL auto-complete functionality
54
- Object.defineProperty(this.globalScope, stringifiedToken, {
55
- value: token,
56
- configurable: false,
57
- enumerable: true,
58
- });
52
+ if (!this.globalScope[stringifiedToken]) {
53
+ // For in REPL auto-complete functionality
54
+ Object.defineProperty(this.globalScope, stringifiedToken, {
55
+ value: token,
56
+ configurable: false,
57
+ enumerable: true,
58
+ });
59
+ }
59
60
  if (stringifiedToken === injector_1.ModuleRef.name) {
60
61
  return;
61
62
  }
@@ -68,7 +69,7 @@ class ReplContext {
68
69
  ? typeof token === 'function'
69
70
  ? token.name
70
71
  : token === null || token === void 0 ? void 0 : token.toString()
71
- : token;
72
+ : `"${token}"`;
72
73
  }
73
74
  addNativeFunction(NativeFunctionRef) {
74
75
  var _a;
package/repl/repl.js CHANGED
@@ -9,7 +9,7 @@ const constants_1 = require("./constants");
9
9
  const repl_context_1 = require("./repl-context");
10
10
  const repl_logger_1 = require("./repl-logger");
11
11
  async function repl(module) {
12
- const app = await nest_factory_1.NestFactory.create(module, {
12
+ const app = await nest_factory_1.NestFactory.createApplicationContext(module, {
13
13
  abortOnError: false,
14
14
  logger: new repl_logger_1.ReplLogger(),
15
15
  });