MCPcopy
hub / github.com/claude-code-best/claude-code / fetchRelease

Function fetchRelease

scripts/postinstall.cjs:151–162  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

149}
150
151async function fetchRelease(url) {
152 if (proxyEnvSet()) {
153 // Dynamic require so it works in node without bundling issues
154 const undici = require('undici')
155 return await undici.fetch(url, {
156 redirect: 'follow',
157 dispatcher: new undici.EnvHttpProxyAgent(),
158 })
159 }
160 // Node 18+ has global fetch, Bun has it too
161 return await fetch(url, { redirect: 'follow' })
162}
163
164async function downloadUrlToBuffer(url) {
165 const response = await fetchRelease(url)

Callers 1

downloadUrlToBufferFunction · 0.85

Calls 2

proxyEnvSetFunction · 0.85
fetchFunction · 0.85

Tested by

no test coverage detected