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

Method insertNode

packages/core/inspector/serialized-graph.ts:60–75  ·  view source on GitHub ↗
(nodeDefinition: Node)

Source from the content-addressed store, hash-verified

58 }
59
60 public insertNode(nodeDefinition: Node) {
61 if (
62 nodeDefinition.metadata.type === 'provider' &&
63 SerializedGraph.INTERNAL_PROVIDERS.includes(nodeDefinition.metadata.token)
64 ) {
65 nodeDefinition.metadata = {
66 ...nodeDefinition.metadata,
67 internal: true,
68 };
69 }
70 if (this.nodes.has(nodeDefinition.id)) {
71 return this.nodes.get(nodeDefinition.id);
72 }
73 this.nodes.set(nodeDefinition.id, nodeDefinition);
74 return nodeDefinition;
75 }
76
77 public insertEdge(edgeDefinition: WithOptionalId<Edge>) {
78 if (

Callers 4

insertClassNodeMethod · 0.80
insertModuleNodeMethod · 0.80

Calls 3

hasMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected