(text: string, n = 40)
| 8 | |
| 9 | /** Last `n` non-empty lines of a log blob, oldest→newest. PURE. */ |
| 10 | export function tailLines(text: string, n = 40): string[] { |
| 11 | return text.split('\n').filter(l => l.trim()).slice(-n); |
| 12 | } |
| 13 | |
| 14 | /** Roll up a few at-a-glance health signals from the gathered dashboard facts. PURE. */ |
| 15 | export function computeHealth(input: { |
no outgoing calls
no test coverage detected