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

Function indexProject

__tests__/const-alias-flow.test.ts:33–40  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

31}
32
33async function indexProject(files: Record<string, string>): Promise<{ cg: CodeGraph; root: string }> {
34 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-const-alias-'));
35 roots.push(root);
36 write(root, files);
37 const cg = await CodeGraph.init(root, { index: true });
38 graphs.push(cg);
39 return { cg, root };
40}
41
42/** What the alias named `name` in `file` links on to: `<file>:<qualified name>`, sorted. */
43function aliasTargets(cg: CodeGraph, file: string, name: string): string[] {

Callers 1

Calls 4

pushMethod · 0.80
writeFunction · 0.70
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected