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

Function clearUserInfo

packages/cli/src/auth/user.ts:106–115  ·  view source on GitHub ↗
(path = credentialPath())

Source from the content-addressed store, hash-verified

104 * no-op when there is nothing to clear.
105 */
106export async function clearUserInfo(path = credentialPath()): Promise<void> {
107 const { credentials, source } = await readStore(path);
108 if (source === "absent" || !credentials.user) return;
109 delete credentials.user;
110 if (!credentials.api_key && !credentials.oauth && !hasPreservedUnknownData(credentials)) {
111 await deleteStore(path);
112 return;
113 }
114 await writeStore(credentials, path);
115}

Callers 3

user.test.tsFile · 0.85
persistUserInfoFunction · 0.85
clearUserInfoBestEffortFunction · 0.85

Calls 5

credentialPathFunction · 0.85
readStoreFunction · 0.85
hasPreservedUnknownDataFunction · 0.85
deleteStoreFunction · 0.85
writeStoreFunction · 0.85

Tested by

no test coverage detected