(url, destPath, label)
| 207 | // Download with redirect-following, timeout, and progress. |
| 208 | // --------------------------------------------------------------------------- |
| 209 | async function downloadToFile(url, destPath, label) { |
| 210 | await pipeline( |
| 211 | (await fetchWithRedirects(url, label)), |
| 212 | createWriteStream(destPath) |
| 213 | ); |
| 214 | } |
| 215 | |
| 216 | async function fetchWithRedirects(url, label) { |
| 217 | const { Readable } = await import('stream'); |
no test coverage detected