MCPcopy
hub / github.com/nestjs/nest / createInstances

Method createInstances

packages/core/injector/instance-loader.ts:48–60  ·  view source on GitHub ↗
(modules: Map<string, Module>)

Source from the content-addressed store, hash-verified

46 }
47
48 private async createInstances(modules: Map<string, Module>) {
49 await Promise.all(
50 [...modules.values()].map(async moduleRef => {
51 await this.createInstancesOfProviders(moduleRef);
52 await this.createInstancesOfInjectables(moduleRef);
53 await this.createInstancesOfControllers(moduleRef);
54
55 const { name } = moduleRef;
56 this.isModuleWhitelisted(name) &&
57 this.logger.log(MODULE_INIT_MESSAGE`${name}`);
58 }),
59 );
60 }
61
62 private createPrototypesOfProviders(moduleRef: Module) {
63 const { providers } = moduleRef;

Callers 1

Calls 7

isModuleWhitelistedMethod · 0.95
MODULE_INIT_MESSAGEFunction · 0.90
allMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected