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

Function project

__tests__/angular-router.test.ts:585–593  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

583 });
584
585 async function project(files: Record<string, string>): Promise<CodeGraph> {
586 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-angular-ws-'));
587 roots.push(root);
588 for (const [rel, content] of Object.entries(files)) {
589 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
590 fs.writeFileSync(path.join(root, rel), content);
591 }
592 return CodeGraph.init(root, { index: true });
593 }
594 const routeNames = (cg: CodeGraph) => cg.getNodesByKind('route').map((n) => n.name).sort();
595 const navs = (cg: CodeGraph) =>
596 cg

Callers 1

Calls 3

pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected