(raw: unknown)
| 264 | } |
| 265 | |
| 266 | export function readUiLogTail(raw: unknown): UiLogTail { |
| 267 | const record = isRecord(raw) ? raw : {}; |
| 268 | const lines = strings(record['lines']); |
| 269 | return { |
| 270 | path: text(record['path']), |
| 271 | previousPath: text(record['previous_path']), |
| 272 | sizeBytes: optionalNumber(record['size_bytes']) ?? 0, |
| 273 | partial: record['partial'] === true, |
| 274 | lines, |
| 275 | total: optionalNumber(record['total']) ?? lines.length, |
| 276 | }; |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * One line of the frontend log as the panel shows it: time, level, source |
no test coverage detected