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

Function credentialURL

packages/computer/src/artifacts/cli.ts:306–312  ·  view source on GitHub ↗
(remote: string, token: string)

Source from the content-addressed store, hash-verified

304 * secret needs encoding, so encode just that.
305 */
306export function credentialURL(remote: string, token: string): string {
307 const secret = encodeURIComponent(token.split("?expires=", 1)[0]);
308 const sep = remote.indexOf("://");
309 if (sep === -1) return remote;
310 const scheme = remote.slice(0, sep + 3);
311 return `${scheme}x:${secret}@${remote.slice(sep + 3)}`;
312}
313
314// ---------------------------------------------------------------
315// repo group

Callers 3

cli.test.tsFile · 0.85
runCreateFunction · 0.85
runShareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected