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

Function indexProject

__tests__/query-pool.test.ts:683–690  ·  view source on GitHub ↗
(name: string, symbol: string)

Source from the content-addressed store, hash-verified

681 });
682
683 async function indexProject(name: string, symbol: string): Promise<string> {
684 const root = path.join(tempDir, name);
685 fs.mkdirSync(root, { recursive: true });
686 fs.writeFileSync(path.join(root, 'app.ts'), `export function ${symbol}() { return 42; }\n`);
687 const cg = await CodeGraph.init(root);
688 try { await cg.indexAll(); } finally { cg.close(); }
689 return root;
690 }
691
692 async function start(root: string): Promise<MCPEngine> {
693 engine = new BuiltEngine({ watch: false, queryPool: true });

Callers 1

query-pool.test.tsFile · 0.70

Calls 4

closeMethod · 0.65
joinMethod · 0.45
initMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected