* Get list of available log files sorted by date (newest first).
()
| 75 | * Get list of available log files sorted by date (newest first). |
| 76 | */ |
| 77 | async function getLogFiles(): Promise<string[]> { |
| 78 | try { |
| 79 | const files = await readdir(LOG_DIR); |
| 80 | return files |
| 81 | .filter((f) => f.startsWith("usage-") && f.endsWith(".jsonl")) |
| 82 | .sort() |
| 83 | .reverse(); |
| 84 | } catch { |
| 85 | return []; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Aggregate stats for a single day. |
no outgoing calls
no test coverage detected