(files: Record<string, string>)
| 136 | }); |
| 137 | |
| 138 | const project = (files: Record<string, string>): string => { |
| 139 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-operator-names-')); |
| 140 | roots.push(root); |
| 141 | for (const [rel, text] of Object.entries(files)) { |
| 142 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 143 | fs.writeFileSync(path.join(root, rel), text); |
| 144 | } |
| 145 | return root; |
| 146 | }; |
| 147 | |
| 148 | const index = async (root: string): Promise<CodeGraph> => { |
| 149 | const cg = await CodeGraph.init(root, { index: true }); |
no test coverage detected