MCPcopy Create free account
hub / github.com/cloudflare/computer / remoteAdd

Function remoteAdd

packages/computer/src/artifacts/cli.test.ts:380–388  ·  view source on GitHub ↗
(opts: { name: string; url: string; force?: boolean })

Source from the content-addressed store, hash-verified

378 const calls: RemoteCall[] = [];
379 const existing = new Set(options.existing ?? []);
380 const remoteAdd = async (opts: { name: string; url: string; force?: boolean }) => {
381 const force = opts.force === true;
382 calls.push({ name: opts.name, url: opts.url, force });
383 if (existing.has(opts.name) && !force) {
384 return { ok: false, exists: true, message: `remote ${opts.name} already exists` };
385 }
386 existing.add(opts.name);
387 return { ok: true };
388 };
389 return { remoteAdd, calls };
390 }
391

Callers 1

runCreateFunction · 0.70

Calls 3

hasMethod · 0.80
pushMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected