(durationText?: string)
| 131 | } |
| 132 | |
| 133 | export function parseDurationMs(durationText?: string): number | undefined { |
| 134 | if (!durationText) { |
| 135 | return undefined; |
| 136 | } |
| 137 | |
| 138 | const normalized = durationText.trim().replace(/\s+seconds?$/u, 's'); |
| 139 | const match = normalized.match(/^([\d.]+)s$/u); |
| 140 | if (!match) { |
| 141 | return undefined; |
| 142 | } |
| 143 | |
| 144 | const seconds = Number(match[1]); |
| 145 | if (!Number.isFinite(seconds)) { |
| 146 | return undefined; |
| 147 | } |
| 148 | |
| 149 | return Math.round(seconds * 1000); |
| 150 | } |
| 151 | |
| 152 | export function parseBuildErrorDiagnostic(line: string): ParsedBuildError | null { |
| 153 | // File path with line number: /path/to/File.swift:42:10: error: message |
no outgoing calls
no test coverage detected