diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-07 18:33:24 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-07 18:33:24 +0000 |
| commit | 6bfa82de65a96f2587c73c5a9efd41a471fa1674 (patch) | |
| tree | 6b6030b7c186b1c6c816a0ff9ca1a8c23c62adc0 /packages | |
| parent | d83fe4b540c099ad794a4a9cd5242d0622961365 (diff) | |
| download | opencode-6bfa82de65a96f2587c73c5a9efd41a471fa1674.tar.gz opencode-6bfa82de65a96f2587c73c5a9efd41a471fa1674.zip | |
chore: generate
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/account/index.ts | 12 | ||||
| -rw-r--r-- | packages/opencode/test/account/service.test.ts | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/packages/opencode/src/account/index.ts b/packages/opencode/src/account/index.ts index bc2c7a799..37baf34e9 100644 --- a/packages/opencode/src/account/index.ts +++ b/packages/opencode/src/account/index.ts @@ -1,5 +1,11 @@ import { Cache, Clock, Duration, Effect, Layer, Option, Schema, SchemaGetter, ServiceMap } from "effect" -import { FetchHttpClient, HttpClient, HttpClientError, HttpClientRequest, HttpClientResponse } from "effect/unstable/http" +import { + FetchHttpClient, + HttpClient, + HttpClientError, + HttpClientRequest, + HttpClientResponse, +} from "effect/unstable/http" import { makeRuntime } from "@/effect/run-service" import { withTransientReadRetry } from "@/util/effect-http-client" @@ -136,9 +142,7 @@ const isTokenFresh = (tokenExpiry: number | null, now: number) => const mapAccountServiceError = (message = "Account service operation failed") => <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, AccountError, R> => - effect.pipe( - Effect.mapError((cause) => accountErrorFromCause(cause, message)), - ) + effect.pipe(Effect.mapError((cause) => accountErrorFromCause(cause, message))) const accountErrorFromCause = (cause: unknown, message: string): AccountError => { if (cause instanceof AccountServiceError || cause instanceof AccountTransportError) { diff --git a/packages/opencode/test/account/service.test.ts b/packages/opencode/test/account/service.test.ts index 265fdbbe1..28592a098 100644 --- a/packages/opencode/test/account/service.test.ts +++ b/packages/opencode/test/account/service.test.ts @@ -88,7 +88,9 @@ it.live("login normalizes trailing slashes in the provided server URL", () => }), ) - const result = yield* Account.Service.use((s) => s.login("https://one.example.com/")).pipe(Effect.provide(live(client))) + const result = yield* Account.Service.use((s) => s.login("https://one.example.com/")).pipe( + Effect.provide(live(client)), + ) expect(seen).toEqual(["POST https://one.example.com/auth/device/code"]) expect(result.server).toBe("https://one.example.com") |
