(ver)
| 32 | // --------------------------------------------------------------------------- |
| 33 | |
| 34 | function sanitizeVersion (ver) { |
| 35 | const clean = String(ver).trim().replace(/^v/, '') |
| 36 | if (!/^\d+\.\d+\.\d+$/.test(clean)) { |
| 37 | throw new Error( |
| 38 | `Refusing to continue: remote version string failed validation: "${ver}"` |
| 39 | ) |
| 40 | } |
| 41 | return clean |
| 42 | } |
| 43 | |
| 44 | function sanitizeFilename (name) { |
| 45 | const clean = String(name).trim() |
no outgoing calls
no test coverage detected