MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / download

Function download

pkg/npm/install.js:174–182  ·  view source on GitHub ↗
(rawUrl, dest, maxBytes = 0)

Source from the content-addressed store, hash-verified

172}
173
174async function download(rawUrl, dest, maxBytes = 0) {
175 let url = validateUrl(rawUrl);
176 for (let redirects = 0; redirects <= MAX_REDIRECTS; redirects += 1) {
177 const result = await downloadHop(url, dest, maxBytes);
178 if (!result.redirect) return;
179 if (redirects === MAX_REDIRECTS) throw new Error('Too many redirects');
180 url = result.redirect;
181 }
182}
183
184function parseExpectedChecksum(manifest, archiveName) {
185 let expected = null;

Callers 2

verifyChecksumFunction · 0.70
mainFunction · 0.70

Calls 2

validateUrlFunction · 0.85
downloadHopFunction · 0.85

Tested by

no test coverage detected