| 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({ |