MCPcopy Create free account
hub / github.com/anomalyco/opencode / resolveConnections

Function resolveConnections

packages/core/src/integration.ts:288–301  ·  view source on GitHub ↗
(entry: Entry | undefined, saved: readonly Credential.Info[])

Source from the content-addressed store, hash-verified

286 })
287
288 const resolveConnections = (entry: Entry | undefined, saved: readonly Credential.Info[]) => {
289 const credentials = saved
290 .map((credential) => ({
291 type: "credential" as const,
292 id: credential.id,
293 label: credential.label,
294 }))
295 .toReversed()
296 const env = (entry?.methods ?? [])
297 .filter((method) => method.type === "env")
298 .flatMap((method) => method.names.filter((name) => process.env[name]))
299 .map((name) => ({ type: "env" as const, name }))
300 return [...credentials, ...env]
301 }
302
303 const project = (entry: Entry, connections: IntegrationConnection.Info[]) =>
304 new Info({

Callers 1

integration.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected