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

Function indexProject

__tests__/cli-cycles.test.ts:23–32  ·  view source on GitHub ↗
(dir: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

21}
22
23async function indexProject(dir: string, files: Record<string, string>): Promise<void> {
24 for (const [rel, content] of Object.entries(files)) {
25 const abs = path.join(dir, rel);
26 fs.mkdirSync(path.dirname(abs), { recursive: true });
27 fs.writeFileSync(abs, content);
28 }
29 const cg = CodeGraph.initSync(dir);
30 await cg.indexAll();
31 cg.close();
32}
33
34/** `count` files in one import ring: each imports the next, the last the first. */
35function ring(count: number): Record<string, string> {

Callers 1

cli-cycles.test.tsFile · 0.70

Calls 4

initSyncMethod · 0.80
closeMethod · 0.65
joinMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected