diff --git a/bun.lockb b/bun.lockb index 298ad38..bcebcce 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/server/src/trpc/TRPCContext.ts b/packages/server/src/trpc/TRPCContext.ts index a365754..ca0a55b 100644 --- a/packages/server/src/trpc/TRPCContext.ts +++ b/packages/server/src/trpc/TRPCContext.ts @@ -1,5 +1,4 @@ -import type { Effect, Runtime } from "effect" -import type { RuntimeFiber } from "effect/Fiber" +import type { Effect } from "effect" import type { Request } from "express" import type { Services } from "../Services" @@ -7,7 +6,7 @@ import type { Services } from "../Services" export interface TRPCContext { req: Request run: ( - self: Effect.Effect, - options?: Runtime.RunForkOptions, - ) => RuntimeFiber + effect: Effect.Effect, + options?: { readonly signal?: AbortSignal } + ) => Promise } diff --git a/packages/server/src/trpc/TRPCContextCreator.ts b/packages/server/src/trpc/TRPCContextCreator.ts index 04ad735..5dd7fe4 100644 --- a/packages/server/src/trpc/TRPCContextCreator.ts +++ b/packages/server/src/trpc/TRPCContextCreator.ts @@ -14,7 +14,7 @@ export class TRPCContextCreator extends Context.Tag("TRPCContextCreator")().pipe( - Effect.map(Runtime.runFork) + Effect.map(Runtime.runPromise) ) return ({ req }) => ({