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

Function runRepoGet

packages/computer/src/artifacts/cli.ts:369–382  ·  view source on GitHub ↗
(client: ArtifactClient, args: string[])

Source from the content-addressed store, hash-verified

367}
368
369async function runRepoGet(client: ArtifactClient, args: string[]): Promise<ArtifactsCLIResult> {
370 const parsed = parseFlags(args, {});
371 if ("error" in parsed) return argvError("repo get", parsed.error);
372 const name = parsed.positional[0];
373 if (name === undefined) return argvError("repo get", "missing <name>");
374 if (parsed.positional.length > 1) {
375 return argvError("repo get", `unexpected argument '${parsed.positional[1]}'`);
376 }
377 try {
378 return ok(json(await client.get(name)));
379 } catch (cause) {
380 return mapError("repo get", cause);
381 }
382}
383
384async function runRepoList(client: ArtifactClient, args: string[]): Promise<ArtifactsCLIResult> {
385 const parsed = parseFlags(args, {});

Callers 1

runRepoFunction · 0.85

Calls 6

argvErrorFunction · 0.85
okFunction · 0.85
jsonFunction · 0.85
mapErrorFunction · 0.85
parseFlagsFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected