(
input: ConnectionValueInput,
)
| 2792 | // pasted `value`/`values` are used directly; `from` origins resolve through |
| 2793 | // their provider. Single-secret sugar lands on the `token` variable. |
| 2794 | const resolveInFlightValues = ( |
| 2795 | input: ConnectionValueInput, |
| 2796 | ): Effect.Effect<Record<string, string | null>, StorageFailure> => |
| 2797 | Effect.gen(function* () { |
| 2798 | const out: Record<string, string | null> = {}; |
| 2799 | for (const { variable, origin } of normalizeConnectionInputs(input)) { |
| 2800 | if ("value" in origin) { |
| 2801 | out[variable] = origin.value; |
| 2802 | continue; |
| 2803 | } |
| 2804 | const provider = credentialProviders.get(String(origin.from.provider)); |
| 2805 | if (!provider) { |
| 2806 | return yield* new StorageError({ |
| 2807 | message: `Credential provider "${origin.from.provider}" is not registered.`, |
| 2808 | cause: undefined, |
| 2809 | }); |
| 2810 | } |
| 2811 | out[variable] = yield* provider.get(origin.from.id); |
| 2812 | } |
| 2813 | return out; |
| 2814 | }); |
| 2815 | |
| 2816 | const connectionCheckHealth = ( |
| 2817 | ref: ConnectionRef, |
no test coverage detected