(projectRoot: string, run: RunInfo)
| 76 | } |
| 77 | |
| 78 | function writeRunMeta(projectRoot: string, run: RunInfo) { |
| 79 | try { |
| 80 | const p = runMetaPath(projectRoot, run.id) |
| 81 | fs.mkdirSync(path.dirname(p), { recursive: true }) |
| 82 | fs.writeFileSync( |
| 83 | p, |
| 84 | JSON.stringify( |
| 85 | { |
| 86 | id: run.id, |
| 87 | planPath: run.planPath, |
| 88 | dashboardPort: run.dashboardPort ?? null, |
| 89 | dashboardPid: run.dashboardPid ?? null, |
| 90 | updatedAt: Date.now(), |
| 91 | }, |
| 92 | null, |
| 93 | 2 |
| 94 | ), |
| 95 | 'utf8' |
| 96 | ) |
| 97 | } catch { |
| 98 | // best-effort |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | function readRunMeta(projectRoot: string, runId: string): { dashboardPort?: number; dashboardPid?: number } | null { |
| 103 | try { |
no test coverage detected