()
| 24 | } |
| 25 | |
| 26 | function getArch() { |
| 27 | switch (process.arch) { |
| 28 | case 'arm64': return 'arm64'; |
| 29 | case 'x64': return 'amd64'; |
| 30 | default: throw new Error(`Unsupported architecture: ${process.arch}`); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // Security: only follow HTTPS URLs (defense-in-depth). |
| 35 | function validateUrl(url) { |