(
input: ConnectionValueInput,
)
| 4954 | // pasted `value`/`values` are used directly; `from` origins resolve through |
| 4955 | // their provider. Single-secret sugar lands on the `token` variable. |
| 4956 | const resolveInFlightValues = ( |
| 4957 | input: ConnectionValueInput, |
| 4958 | ): Effect.Effect<Record<string, string | null>, StorageFailure> => |
| 4959 | Effect.gen(function* () { |
| 4960 | const out: Record<string, string | null> = {}; |
| 4961 | for (const { variable, origin } of normalizeConnectionInputs(input)) { |
| 4962 | if ("value" in origin) { |
| 4963 | out[variable] = origin.value; |
| 4964 | continue; |
| 4965 | } |
| 4966 | const provider = credentialProviders.get(String(origin.from.provider)); |
| 4967 | if (!provider) { |
| 4968 | return yield* new StorageError({ |
| 4969 | message: `Credential provider "${origin.from.provider}" is not registered.`, |
| 4970 | cause: undefined, |
| 4971 | }); |
| 4972 | } |
| 4973 | out[variable] = yield* provider.get(origin.from.id); |
| 4974 | } |
| 4975 | return out; |
| 4976 | }); |
| 4977 | |
| 4978 | /** Stamp the verdict + which path produced it onto the enclosing health |
| 4979 | * span. Every health outcome is HTTP 200, so WITHOUT these attributes the |
no test coverage detected