(value: Record<string, unknown>)
| 45 | } |
| 46 | |
| 47 | function extractDevcontainerLogText(value: Record<string, unknown>): string | null { |
| 48 | const text = typeof value.text === "string" ? value.text : undefined; |
| 49 | if (text) { |
| 50 | const level = typeof value.level === "number" ? value.level : 0; |
| 51 | const channel = typeof value.channel === "string" ? value.channel : ""; |
| 52 | const type = typeof value.type === "string" ? value.type : ""; |
| 53 | const isError = channel === "error" || type === "error"; |
| 54 | if (level >= 2 || isError) { |
| 55 | return text; |
| 56 | } |
| 57 | return null; |
| 58 | } |
| 59 | |
| 60 | const name = typeof value.name === "string" ? value.name : undefined; |
| 61 | if (name) { |
| 62 | return name; |
| 63 | } |
| 64 | |
| 65 | return null; |
| 66 | } |
| 67 | |
| 68 | function parseJsonLine(line: string): unknown { |
| 69 | try { |
no outgoing calls
no test coverage detected