(name: string)
| 29 | if ((err as NodeJS.ErrnoException).code === 'ENOENT') return []; |
| 30 | throw err; |
| 31 | } |
| 32 | let parsed: unknown; |
| 33 | try { |
| 34 | parsed = JSON.parse(raw); |
| 35 | } catch { |
| 36 | return []; // unreadable registry → no projects, not a crashed request |
| 37 | } |
| 38 | // Accept the canonical `{projects: [...]}`, and tolerate a bare array, which is what a |
no test coverage detected