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

Function getToken

packages/computer/src/artifacts/client.ts:181–189  ·  view source on GitHub ↗
(name, id)

Source from the content-addressed store, hash-verified

179 },
180
181 async getToken(name, id) {
182 const handle = await binding.get(scopedName(sessionId, name));
183 const { tokens } = await handle.listTokens();
184 const found = tokens.find((t) => t.id === id);
185 if (!found) {
186 throw new NotFoundError(`no such token '${id}' in repo '${name}'`);
187 }
188 return found;
189 },
190
191 async revokeToken(name, tokenOrId) {
192 const handle = await binding.get(scopedName(sessionId, name));

Callers

nothing calls this directly

Calls 4

scopedNameFunction · 0.85
getMethod · 0.65
listTokensMethod · 0.65
findMethod · 0.65

Tested by

no test coverage detected