(filePath, value)
| 32 | } |
| 33 | |
| 34 | function writeJson(filePath, value) { |
| 35 | fs.mkdirSync(path.dirname(filePath), { recursive: true }); |
| 36 | fs.writeFileSync(filePath, JSON.stringify(value, null, 2) + '\n', 'utf8'); |
| 37 | } |
| 38 | |
| 39 | function appendJsonl(filePath, rows) { |
| 40 | fs.mkdirSync(path.dirname(filePath), { recursive: true }); |