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

Function authConfigHasUsableTokenData

packages/cli-config/src/cred-storage.ts:39–53  ·  view source on GitHub ↗
(
  value: unknown
)

Source from the content-addressed store, hash-verified

37}
38
39export function authConfigHasUsableTokenData(
40 value: unknown
41): value is Pick<AuthConfig, 'token' | 'refreshToken'> {
42 if (!value || typeof value !== 'object') {
43 return false;
44 }
45
46 const authConfig = value as AuthConfig;
47
48 return (
49 (typeof authConfig.token === 'string' && authConfig.token.length > 0) ||
50 (typeof authConfig.refreshToken === 'string' &&
51 authConfig.refreshToken.length > 0)
52 );
53}
54
55function getLikelyAutoCredStorage(configDir: string): CredStorage {
56 try {

Callers 2

cli-config.test.tsFile · 0.90
getLikelyAutoCredStorageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected