()
| 400 | |
| 401 | /** $D daemon status — for the CLI sub-command. */ |
| 402 | export async function daemonStatus(): Promise< |
| 403 | | { running: false } |
| 404 | | { running: true; port: number; pid: number; version: string; boards: number; activeBoards: number; uptime: number } |
| 405 | > { |
| 406 | const existing = readStateFile(); |
| 407 | if (!existing) return { running: false }; |
| 408 | const h = await healthCheck(existing.port); |
| 409 | if (!h) return { running: false }; |
| 410 | return { |
| 411 | running: true, |
| 412 | port: existing.port, |
| 413 | pid: existing.pid, |
| 414 | version: h.version, |
| 415 | boards: h.boards, |
| 416 | activeBoards: h.activeBoards, |
| 417 | uptime: h.uptime, |
| 418 | }; |
| 419 | } |
no test coverage detected