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

Method loadPropertiesMetadata

packages/core/injector/injector.ts:970–994  ·  view source on GitHub ↗
(
    metadata: PropertyMetadata[],
    contextId: ContextId,
    inquirer?: InstanceWrapper,
  )

Source from the content-addressed store, hash-verified

968 }
969
970 public async loadPropertiesMetadata(
971 metadata: PropertyMetadata[],
972 contextId: ContextId,
973 inquirer?: InstanceWrapper,
974 ): Promise<PropertyDependency[]> {
975 const dependenciesHosts = await Promise.all(
976 metadata.map(async ({ wrapper: item, key }) => ({
977 key,
978 host: await this.resolveComponentHost(
979 item.host!,
980 item,
981 this.createResolutionContext(contextId, inquirer),
982 ),
983 })),
984 );
985 const inquirerId = this.getInquirerId(inquirer);
986 return dependenciesHosts.map(({ key, host }) => ({
987 key,
988 name: key,
989 instance: host.getInstanceByContextId(
990 this.getContextId(contextId, host),
991 inquirerId,
992 ).instance,
993 }));
994 }
995
996 private getInquirerId(
997 inquirer: InstanceWrapper | undefined,

Callers 2

resolvePropertiesMethod · 0.95
injector.spec.tsFile · 0.80

Calls 6

resolveComponentHostMethod · 0.95
getInquirerIdMethod · 0.95
getContextIdMethod · 0.95
allMethod · 0.80

Tested by

no test coverage detected