MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / edgesFormatter

Function edgesFormatter

frontend/packages/common/src/utils/systemRunning.ts:83–96  ·  view source on GitHub ↗
(projectConnectMap: Map<string, Map<string, TopologyServiceItem[]>>)

Source from the content-addressed store, hash-verified

81 * @description
82 */
83export function edgesFormatter(projectConnectMap: Map<string, Map<string, TopologyServiceItem[]>>) {
84 const edges: EdgeConfig[] = []
85 for (const [projectKey, invokedMap] of projectConnectMap) {
86 for (const [invokedProjectId] of invokedMap) {
87 // 这里使用了 for...of 遍历 Map
88 edges.push({
89 source: projectKey,
90 target: invokedProjectId,
91 _projectInfo: invokedMap.get(invokedProjectId)
92 })
93 }
94 }
95 return edges
96}
97
98/**
99 * @description 修正节点,过长省略

Callers 1

relativeFormatterFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected