(path: string)
| 286 | } |
| 287 | |
| 288 | function readJsonl(path: string): EnrichedTelemetryEvent[] { |
| 289 | const text = readFileSync(path, 'utf-8'); |
| 290 | const events: EnrichedTelemetryEvent[] = []; |
| 291 | for (const line of text.split('\n')) { |
| 292 | const trimmed = line.trim(); |
| 293 | if (trimmed.length === 0) continue; |
| 294 | events.push(JSON.parse(trimmed) as EnrichedTelemetryEvent); |
| 295 | } |
| 296 | return events; |
| 297 | } |
| 298 | |
| 299 | async function fetchWithTimeout( |
| 300 | fetchImpl: typeof fetch, |