(url)
| 162 | } |
| 163 | |
| 164 | async function downloadUrlToBuffer(url) { |
| 165 | const response = await fetchRelease(url) |
| 166 | if (!response.ok) { |
| 167 | throw new Error( |
| 168 | `Download failed: ${response.status} ${response.statusText}`, |
| 169 | ) |
| 170 | } |
| 171 | return Buffer.from(await response.arrayBuffer()) |
| 172 | } |
| 173 | |
| 174 | async function downloadUrlToBufferWithFallback(url) { |
| 175 | let firstError |
no test coverage detected