(files: Record<string, string>)
| 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 |
no test coverage detected