| … | … | @@ -41,5 +43,31 @@ export function writeSecretFieldValues( | |
| 50 | + | type SourceControlHostsSettings = Readonly<Record<string, Readonly<Record<string, unknown>>>>; | |
| 51 | + | ||
| 52 | + | /** Replaces each secret provider reference in a credential field with the secret it names. */ | |
| 53 | + | export function resolveSourceControlHostSecrets<R>( | |
This new reusable Effect operation also needs a named Effect.fn boundary rather than a plain function declaration. Please wrap it in Effect.fn("SourceControlHost.resolveSecrets"), preserving the generic R signature and existing behavior. That conversion changes both the declaration and closing delimiter, so it is not a single-hunk inline suggestion.
Posted via Macroscope — Effect Service Conventions
Fixed in 5b4af8790f: now Effect.fn("SourceControlHost.resolveSecrets") with the generic R kept.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
| … | … | @@ -0,0 +1,12 @@ | |
| 9 | + | ): Effect.Effect<string> => | |
| 10 | + | !isSecretReference(value) | |
| 11 | + | ? Effect.succeed(value) | |
| 12 | + | : resolver.read([value]).pipe(Effect.map(([secret]) => secret ?? "")); | |
This reusable effectful helper uses a plain arrow instead of the required named Effect.fn. Please give secret resolution a named tracing boundary.
| 1 | export const resolveSettingsSecret = Effect.fn("SettingsSecrets.resolve")(( |
| 2 | resolver: SecretResolver.SecretResolver["Service"], |
| 3 | value: SettingsSecretValue, |
| 4 | ): Effect.Effect<string> => |
| 5 | !isSecretReference(value) |
| 6 | ? Effect.succeed(value) |
| 7 | : resolver.read([value]).pipe(Effect.map(([secret]) => secret ?? "")), |
| 8 | ); |
Posted via Macroscope — Effect Service Conventions
Fixed in 5b4af8790f: now Effect.fn("SettingsSecrets.resolve").
Sorry, I'm unable to act on this request because you do not have permissions within this repository.