(input: {
authUrl?: string
config?: unknown
remoteConfig?: { url: string; headers?: Record<string, string> }
remote?: unknown
remoteHtml?: string
wellKnown?: unknown
})
| 210 | }) |
| 211 | |
| 212 | const wellKnown = (input: { |
| 213 | authUrl?: string |
| 214 | config?: unknown |
| 215 | remoteConfig?: { url: string; headers?: Record<string, string> } |
| 216 | remote?: unknown |
| 217 | remoteHtml?: string |
| 218 | wellKnown?: unknown |
| 219 | }) => { |
| 220 | const seen: { wellKnown?: string; remote?: string; authorization?: string } = {} |
| 221 | const client = remoteConfigClient({ |
| 222 | seen, |
| 223 | wellKnown: input.wellKnown ?? { |
| 224 | ...(input.config !== undefined ? { config: input.config } : {}), |
| 225 | ...(input.remoteConfig !== undefined ? { remote_config: input.remoteConfig } : {}), |
| 226 | }, |
| 227 | remote: input.remote, |
| 228 | remoteHtml: input.remoteHtml, |
| 229 | }) |
| 230 | return { |
| 231 | seen, |
| 232 | it: configIt({ auth: wellKnownAuth(input.authUrl ?? "https://example.com"), client }), |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | function withProcessEnv<A, E, R>(key: string, value: string | undefined, effect: Effect.Effect<A, E, R>) { |
| 237 | return withProcessEnvs({ [key]: value }, effect) |
no test coverage detected