| 98 | } |
| 99 | |
| 100 | function failedRemoves(...chunks: string[]) { |
| 101 | return chunks.filter(Boolean).flatMap((chunk) => |
| 102 | chunk |
| 103 | .split("\n") |
| 104 | .map((line) => line.trim()) |
| 105 | .flatMap((line) => { |
| 106 | const match = line.match(/^warning:\s+failed to remove\s+(.+):\s+/i) |
| 107 | if (!match) return [] |
| 108 | const value = match[1]?.trim().replace(/^['"]|['"]$/g, "") |
| 109 | if (!value) return [] |
| 110 | return [value] |
| 111 | }), |
| 112 | ) |
| 113 | } |
| 114 | |
| 115 | // --------------------------------------------------------------------------- |
| 116 | // Effect service |