(
input: ConnectionValueInput,
)
| 3233 | // pasted `value`/`values` are used directly; `from` origins resolve through |
| 3234 | // their provider. Single-secret sugar lands on the `token` variable. |
| 3235 | const resolveInFlightValues = ( |
| 3236 | input: ConnectionValueInput, |
| 3237 | ): Effect.Effect<Record<string, string | null>, StorageFailure> => |
| 3238 | Effect.gen(function* () { |
| 3239 | const out: Record<string, string | null> = {}; |
| 3240 | for (const { variable, origin } of normalizeConnectionInputs(input)) { |
| 3241 | if ("value" in origin) { |
| 3242 | out[variable] = origin.value; |
| 3243 | continue; |
| 3244 | } |
| 3245 | const provider = credentialProviders.get(String(origin.from.provider)); |
| 3246 | if (!provider) { |
| 3247 | return yield* new StorageError({ |
| 3248 | message: `Credential provider "${origin.from.provider}" is not registered.`, |
| 3249 | cause: undefined, |
| 3250 | }); |
| 3251 | } |
| 3252 | out[variable] = yield* provider.get(origin.from.id); |
| 3253 | } |
| 3254 | return out; |
| 3255 | }); |
| 3256 | |
| 3257 | /** Stamp the verdict + which path produced it onto the enclosing health |
| 3258 | * span. Every health outcome is HTTP 200, so WITHOUT these attributes the |
no test coverage detected