Skip to content

Commit

Permalink
fix(repl): use ApplicationContext for repl
Browse files Browse the repository at this point in the history
  • Loading branch information
wodCZ authored Aug 1, 2022
1 parent adff379 commit b23af7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/repl/repl-context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INestApplication, InjectionToken, Logger } from '@nestjs/common';
import { INestApplicationContext, InjectionToken, Logger } from '@nestjs/common';
import { ApplicationConfig } from '../application-config';
import { ModuleRef, NestContainer } from '../injector';
import { InternalCoreModule } from '../injector/internal-core-module';
Expand Down Expand Up @@ -33,7 +33,7 @@ export class ReplContext {
private readonly container: NestContainer;

constructor(
public readonly app: INestApplication,
public readonly app: INestApplicationContext,
nativeFunctionsClassRefs?: ReplFunctionClass[],
) {
this.container = (app as any).container; // Using `any` because `app.container` is not public.
Expand Down
4 changes: 2 additions & 2 deletions packages/core/repl/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { ReplContext } from './repl-context';
import { ReplLogger } from './repl-logger';
import { AbstractHttpAdapter } from '../adapters/http-adapter';

export async function repl(module: Type, httpAdapter?: AbstractHttpAdapter) {
const app = await NestFactory.create(module, httpAdapter, {
export async function repl(module: Type) {
const app = await NestFactory.createApplicationContext(module, {
abortOnError: false,
logger: new ReplLogger(),
});
Expand Down

0 comments on commit b23af7a

Please sign in to comment.