()
| 74 | }); |
| 75 | |
| 76 | async function indexProject(): Promise<CodeGraph> { |
| 77 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-vue-tsx-')); |
| 78 | roots.push(root); |
| 79 | for (const [file, text] of Object.entries(PROJECT)) { |
| 80 | fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true }); |
| 81 | fs.writeFileSync(path.join(root, file), text); |
| 82 | } |
| 83 | const graph = await CodeGraph.init(root, { index: true }); |
| 84 | graphs.push(graph); |
| 85 | return graph; |
| 86 | } |
| 87 | |
| 88 | const named = (nodes: Node[], kind: string, name: string) => nodes.find((n) => n.kind === kind && n.name === name); |
| 89 |
no test coverage detected