MCPcopy Create free account
hub / github.com/Leon-PanPan/dragonclaw / downloadToFile

Function downloadToFile

scripts/postinstall.mjs:209–214  ·  view source on GitHub ↗
(url, destPath, label)

Source from the content-addressed store, hash-verified

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

Callers 1

installForOneFunction · 0.85

Calls 1

fetchWithRedirectsFunction · 0.85

Tested by

no test coverage detected