| ... | ... | @@ -5,10 +5,7 @@ import * as Socket from "effect/unstable/socket/Socket"; |
| 5 | 5 | |
| 6 | 6 | import { remoteHttpClientLayer } from "@t3tools/client-runtime/rpc"; |
| 7 | 7 | import { makeRelayClientTracingLayer } from "@t3tools/shared/relayTracing"; |
| 8 | | import { |
| 9 | | PrimaryEnvironmentHttpClient, |
| 10 | | primaryEnvironmentHttpClientLive, |
| 11 | | } from "../environments/primary/httpClient"; |
| 8 | import * as PrimaryEnvironmentHttpClient from "../environments/primary/httpClient"; |
| 12 | 9 | import { primaryEnvironmentHttpLayer } from "../environments/primary/httpLayer"; |
| 13 | 10 | |
| 14 | 11 | import { browserCryptoLayer } from "../cloud/dpop"; |
| ... | ... | @@ -30,11 +27,11 @@ const relayTracingLayer = makeRelayClientTracingLayer(resolveRelayTracingConfig( |
| 30 | 27 | export const remoteHttpRuntime = ManagedRuntime.make(httpClientLayer); |
| 31 | 28 | |
| 32 | 29 | const primaryHttpRuntime = ManagedRuntime.make( |
| 33 | | primaryEnvironmentHttpClientLive.pipe(Layer.provide(primaryEnvironmentHttpLayer)), |
| 30 | PrimaryEnvironmentHttpClient.layer.pipe(Layer.provide(primaryEnvironmentHttpLayer)), |
| 34 | 31 | ); |
| 35 | 32 | |
| 36 | 33 | export type PrimaryHttpEffectRunner = <A, E>( |
| 37 | | effect: Effect.Effect<A, E, PrimaryEnvironmentHttpClient>, |
| 34 | effect: Effect.Effect<A, E, PrimaryEnvironmentHttpClient.PrimaryEnvironmentHttpClient>, |
| 38 | 35 | ) => Promise<A>; |
| 39 | 36 | |
| 40 | 37 | const livePrimaryHttpRunner: PrimaryHttpEffectRunner = (effect) => |
| ... | ... | @@ -42,8 +39,9 @@ const livePrimaryHttpRunner: PrimaryHttpEffectRunner = (effect) => |
| 42 | 39 | |
| 43 | 40 | let primaryHttpRunner = livePrimaryHttpRunner; |
| 44 | 41 | |
| 45 | | export const runPrimaryHttp = <A, E>(effect: Effect.Effect<A, E, PrimaryEnvironmentHttpClient>) => |
| 46 | | primaryHttpRunner(effect); |
| 42 | export const runPrimaryHttp = <A, E>( |
| 43 | effect: Effect.Effect<A, E, PrimaryEnvironmentHttpClient.PrimaryEnvironmentHttpClient>, |
| 44 | ) => primaryHttpRunner(effect); |
| 47 | 45 | |
| 48 | 46 | export function __setPrimaryHttpRunnerForTests(runner?: PrimaryHttpEffectRunner): void { |
| 49 | 47 | primaryHttpRunner = runner ?? livePrimaryHttpRunner; |