(
input: ConnectionValueInput,
)
| 2599 | // pasted `value`/`values` are used directly; `from` origins resolve through |
| 2600 | // their provider. Single-secret sugar lands on the `token` variable. |
| 2601 | const resolveInFlightValues = ( |
| 2602 | input: ConnectionValueInput, |
| 2603 | ): Effect.Effect<Record<string, string | null>, StorageFailure> => |
| 2604 | Effect.gen(function* () { |
| 2605 | const out: Record<string, string | null> = {}; |
| 2606 | for (const { variable, origin } of normalizeConnectionInputs(input)) { |
| 2607 | if ("value" in origin) { |
| 2608 | out[variable] = origin.value; |
| 2609 | continue; |
| 2610 | } |
| 2611 | const provider = credentialProviders.get(String(origin.from.provider)); |
| 2612 | if (!provider) { |
| 2613 | return yield* new StorageError({ |
| 2614 | message: `Credential provider "${origin.from.provider}" is not registered.`, |
| 2615 | cause: undefined, |
| 2616 | }); |
| 2617 | } |
| 2618 | out[variable] = yield* provider.get(origin.from.id); |
| 2619 | } |
| 2620 | return out; |
| 2621 | }); |
| 2622 | |
| 2623 | const connectionCheckHealth = ( |
| 2624 | ref: ConnectionRef, |
no test coverage detected