MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / loadPersistedUser

Function loadPersistedUser

packages/cli/src/commands/auth/status.ts:170–177  ·  view source on GitHub ↗

* Load the persisted friendly-display block, but only for file-sourced * credentials. An env credential (`HEYGEN_API_KEY` / `HYPERFRAMES_API_KEY`) * could belong to a different key than the on-disk block, so surfacing * that block would mislabel the active account. A read error is swallowed * —

(credential: ResolvedCredential)

Source from the content-addressed store, hash-verified

168 * — the block is purely cosmetic and must never break `auth status`.
169 */
170async function loadPersistedUser(credential: ResolvedCredential): Promise<StoredUserInfo | null> {
171 if (!isFileSource(credential.source)) return null;
172 try {
173 return await loadUserInfo();
174 } catch {
175 return null;
176 }
177}
178
179function printJsonStatus(s: VerifiedStatus): void {
180 const payload: Record<string, unknown> = {

Callers 1

verifyFunction · 0.85

Calls 2

isFileSourceFunction · 0.85
loadUserInfoFunction · 0.85

Tested by

no test coverage detected