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

Function importedFilePaths

__tests__/resolution.test.ts:5200–5209  ·  view source on GitHub ↗
(fromFile: string)

Source from the content-addressed store, hash-verified

5198 }
5199
5200 function importedFilePaths(fromFile: string): string[] {
5201 const source = fileNode(fromFile);
5202 expect(source, `${fromFile} file node`).toBeDefined();
5203 return cg
5204 .getOutgoingEdges(source!.id)
5205 .filter((edge) => edge.kind === 'imports')
5206 .map((edge) => cg.getNodesByKind('file').find((n) => n.id === edge.target)?.filePath)
5207 .filter((filePath): filePath is string => Boolean(filePath))
5208 .sort();
5209 }
5210
5211 it('resolves relative Nix imports to indexed file nodes', async () => {
5212 fs.mkdirSync(path.join(tempDir, 'core'), { recursive: true });

Callers 1

resolution.test.tsFile · 0.85

Calls 3

fileNodeFunction · 0.85
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected