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

Function importedFilePaths

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

Source from the content-addressed store, hash-verified

4790 }
4791
4792 function importedFilePaths(fromFile: string): string[] {
4793 const source = fileNode(fromFile);
4794 expect(source, `${fromFile} file node`).toBeDefined();
4795 return cg
4796 .getOutgoingEdges(source!.id)
4797 .filter((edge) => edge.kind === 'imports')
4798 .map((edge) => cg.getNodesByKind('file').find((n) => n.id === edge.target)?.filePath)
4799 .filter((filePath): filePath is string => Boolean(filePath))
4800 .sort();
4801 }
4802
4803 it('resolves relative Nix imports to indexed file nodes', async () => {
4804 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