MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / loadCredentials

Function loadCredentials

apps/cli/src/lib/storage/credentials.ts:43–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43export async function loadCredentials(): Promise<Credentials | null> {
44 try {
45 const data = await fs.readFile(CREDENTIALS_FILE, "utf-8")
46 return JSON.parse(data) as Credentials
47 } catch (error) {
48 if ((error as NodeJS.ErrnoException).code === "ENOENT") {
49 return null
50 }
51 throw error
52 }
53}
54
55export async function clearToken(): Promise<void> {
56 try {

Callers 2

statusFunction · 0.85

Calls 2

parseMethod · 0.80
readFileMethod · 0.45

Tested by

no test coverage detected