(root: string, files: Files)
| 276 | type Files = Record<string, string>; |
| 277 | |
| 278 | function write(root: string, files: Files): void { |
| 279 | for (const [rel, content] of Object.entries(files)) { |
| 280 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 281 | fs.writeFileSync(path.join(root, rel), content); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | function tempRoot(): string { |
| 286 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ambient-modules-')); |
no test coverage detected