MCPcopy Create free account
hub / github.com/anus-dev/ANUS / cacheCredentials

Function cacheCredentials

packages/core/src/code_assist/oauth2.ts:383–389  ·  view source on GitHub ↗
(credentials: Credentials)

Source from the content-addressed store, hash-verified

381}
382
383async function cacheCredentials(credentials: Credentials) {
384 const filePath = getCachedCredentialPath();
385 await fs.mkdir(path.dirname(filePath), { recursive: true });
386
387 const credString = JSON.stringify(credentials, null, 2);
388 await fs.writeFile(filePath, credString, { mode: 0o600 });
389}
390
391function getCachedCredentialPath(): string {
392 return path.join(os.homedir(), ANUS_DIR, CREDENTIAL_FILENAME);

Callers 1

initOauthClientFunction · 0.85

Calls 2

getCachedCredentialPathFunction · 0.85
mkdirMethod · 0.80

Tested by

no test coverage detected