(input?: { password?: string; username?: string })
| 44 | const it = testEffect(Layer.mergeAll(testStateLayer, fsUtilLayer, RuntimeFlags.layer())) |
| 45 | |
| 46 | function authConfigLayer(input?: { password?: string; username?: string }) { |
| 47 | return ServerAuth.Config.configLayer({ |
| 48 | password: input?.password === undefined ? Option.none() : Option.some(input.password), |
| 49 | username: input?.username ?? "opencode", |
| 50 | }) |
| 51 | } |
| 52 | |
| 53 | function restoreEnv(key: string, value: string | undefined) { |
| 54 | if (value === undefined) { |