(text)
| 72 | }; |
| 73 | |
| 74 | const extractClixmlErrors = (text) => { |
| 75 | if (!text) return ""; |
| 76 | const matches = text.match( |
| 77 | /<S S="Error">([^<]*(?:<[^/][^>]*>[^<]*<\/[^>]*>)*[^<]*)<\/S>/g |
| 78 | ); |
| 79 | if (!matches) return text; |
| 80 | return matches |
| 81 | .map((m) => |
| 82 | m |
| 83 | .replace(/<\/?S[^>]*>/g, "") |
| 84 | .replace(/<[^>]+>/g, "") |
| 85 | .replace(/_x000D__x000A_/g, "\n") |
| 86 | .trim() |
| 87 | ) |
| 88 | .filter(Boolean) |
| 89 | .join("\n"); |
| 90 | }; |
| 91 | |
| 92 | const runPowerShellScript = (script, timeout = 30000) => { |
| 93 | return new Promise((resolve, reject) => { |
no test coverage detected