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

Function listConnections

packages/arctic/src/auth/index.ts:101–113  ·  view source on GitHub ↗
(provider: string)

Source from the content-addressed store, hash-verified

99 }
100
101 export async function listConnections(provider: string): Promise<Array<{ key: string; connection?: string; info: Info }>> {
102 const auth = await all()
103 const connections: Array<{ key: string; connection?: string; info: Info }> = []
104
105 for (const [key, info] of Object.entries(auth)) {
106 const parsed = parseKey(key)
107 if (parsed.provider === provider) {
108 connections.push({ key, connection: parsed.connection, info })
109 }
110 }
111
112 return connections
113 }
114
115 export function validateConnectionName(name: string): string | undefined {
116 if (!name || name.length === 0) return "Connection name is required"

Callers

nothing calls this directly

Calls 3

parseKeyFunction · 0.85
pushMethod · 0.80
allFunction · 0.70

Tested by

no test coverage detected