MCPcopy Create free account
hub / github.com/arctic-cli/interface / readLocalAuth

Function readLocalAuth

packages/arctic/src/auth/index.ts:140–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 async function readLocalAuth(): Promise<Record<string, Info>> {
141 const file = Bun.file(filepath)
142 const data = await file.json().catch(() => ({}) as Record<string, unknown>)
143 return Object.entries(data).reduce(
144 (acc, [key, value]) => {
145 const parsed = Info.safeParse(value)
146 if (!parsed.success) return acc
147 acc[key] = parsed.data
148 return acc
149 },
150 {} as Record<string, Info>,
151 )
152 }
153
154 export async function get(providerID: string) {
155 const auth = await all()

Callers 3

allFunction · 0.85
setFunction · 0.85
removeFunction · 0.85

Calls 1

jsonMethod · 0.65

Tested by

no test coverage detected