MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / toNodeRef

Function toNodeRef

src/ui-server/api/wire.ts:123–139  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

121const rel = (p: string): string => p.replace(/\\/g, '/');
122
123export function toNodeRef(node: Node): WireNodeRef {
124 const file = rel(node.filePath);
125 const ref: WireNodeRef = {
126 id: node.id,
127 kind: node.kind,
128 name: node.name,
129 qualifiedName: node.qualifiedName,
130 file,
131 line: node.startLine,
132 endLine: node.endLine,
133 language: node.language,
134 test: isTestFile(file),
135 };
136 if (node.signature) ref.signature = node.signature;
137 if (node.isExported) ref.exported = true;
138 return ref;
139}
140
141export function toNodeDetail(node: Node): WireNodeDetail {
142 const detail: WireNodeDetail = {

Callers 15

toWireFlowFunction · 0.90
toContinuationFunction · 0.90
buildBoundaryFunction · 0.90
ambiguitiesOfFunction · 0.90
buildMembersFunction · 0.90
buildDeadCodeFunction · 0.90
buildOutlineEntriesFunction · 0.90
saveTrailFunction · 0.90
buildNodeRefsFunction · 0.90
buildSearchFunction · 0.90
buildScreensFunction · 0.90
collapseSharedChromeFunction · 0.90

Calls 2

isTestFileFunction · 0.90
relFunction · 0.85

Tested by

no test coverage detected