MCPcopy
hub / github.com/google/zx / readScriptFromHttp

Function readScriptFromHttp

src/cli.ts:246–253  ·  view source on GitHub ↗
(remote: string)

Source from the content-addressed store, hash-verified

244}
245
246async function readScriptFromHttp(remote: string): Promise<string> {
247 const res = await fetch(remote)
248 if (!res.ok) {
249 console.error(`Error: Can't get ${remote}`)
250 process.exit(1)
251 }
252 return res.text()
253}
254
255export function injectGlobalRequire(origin: string): void {
256 const __filename = path.resolve(origin)

Callers 1

readScriptFunction · 0.85

Calls 2

fetchFunction · 0.90
textMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…