(rel: string, body: string)
| 41 | }); |
| 42 | |
| 43 | const write = (rel: string, body: string) => { |
| 44 | const p = path.join(dir, rel); |
| 45 | fs.mkdirSync(path.dirname(p), { recursive: true }); |
| 46 | fs.writeFileSync(p, body); |
| 47 | }; |
| 48 | |
| 49 | const indexAndCollect = async (): Promise<{ edges: EdgeRow[]; nodes: number }> => { |
| 50 | fs.rmSync(path.join(dir, '.codegraph'), { recursive: true, force: true }); |