(run)
| 18 | } = require('../core/telemetry/report'); |
| 19 | |
| 20 | function withTempProject(run) { |
| 21 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-telemetry-')); |
| 22 | try { |
| 23 | return run(dir); |
| 24 | } finally { |
| 25 | fs.rmSync(dir, { recursive: true, force: true }); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | function writeJsonl(file, lines) { |
| 30 | fs.mkdirSync(path.dirname(file), { recursive: true }); |
no test coverage detected