refactor(instance): retire WithInstance adapter (#27782)

This commit is contained in:
Shoubhit Dash
2026-05-16 01:30:07 +05:30
committed by GitHub
parent 48122b31cc
commit 65f96a5851
10 changed files with 186 additions and 205 deletions

View File

@@ -1,12 +0,0 @@
import { AppRuntime } from "@/effect/app-runtime"
import type { InstanceContext } from "./instance-context"
import { InstanceStore } from "./instance-store"
export async function provide<R>(input: { directory: string; fn: (ctx: InstanceContext) => R }): Promise<R> {
const ctx = await AppRuntime.runPromise(
InstanceStore.Service.use((store) => store.load({ directory: input.directory })),
)
return input.fn(ctx)
}
export * as WithInstance from "./with-instance"