MCPcopy Create free account
hub / github.com/vercel/vercel / readKeyringStorageCredentials

Function readKeyringStorageCredentials

packages/cli-auth/credentials-store.ts:348–373  ·  view source on GitHub ↗
(
  configPath: string,
  runtimeFlags: RuntimeFlags
)

Source from the content-addressed store, hash-verified

346}
347
348function readKeyringStorageCredentials(
349 configPath: string,
350 runtimeFlags: RuntimeFlags
351): Credentials {
352 const credentials = readCredentialsFromKeyring(configPath, runtimeFlags);
353
354 if (credentials !== null) {
355 return credentials;
356 }
357
358 try {
359 const fileCredentials = readCredentialsFromFile(configPath);
360
361 return migrateCredentialsToKeyring(
362 configPath,
363 fileCredentials,
364 runtimeFlags
365 );
366 } catch (error) {
367 if (isENOENTError(error)) {
368 throw createMissingCredentialsError(configPath);
369 }
370
371 throw error;
372 }
373}
374
375function readAutoStorageCredentials(
376 configPath: string,

Callers 1

getFunction · 0.85

Calls 5

readCredentialsFromFileFunction · 0.85
isENOENTErrorFunction · 0.85

Tested by

no test coverage detected