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

Function indexProject

__tests__/catch-all-path-alias.test.ts:26–34  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

24});
25
26async function indexProject(files: Record<string, string>): Promise<CodeGraph> {
27 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-catch-all-alias-'));
28 roots.push(root);
29 for (const [rel, content] of Object.entries(files)) {
30 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
31 fs.writeFileSync(path.join(root, rel), content);
32 }
33 return CodeGraph.init(root, { index: true });
34}
35
36/**
37 * `<kind> <target file>:<target qualified name>` for every edge leaving

Callers 1

Calls 3

pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected