Convert LoadInput.init to Effect + extract InstanceBootstrap as a Service (#25376)

This commit is contained in:
Kit Langton
2026-05-02 00:02:52 -04:00
committed by GitHub
parent 1571933096
commit f33aec1139
21 changed files with 223 additions and 153 deletions

View File

@@ -1,11 +1,9 @@
import { AppRuntime } from "@/effect/app-runtime"
import { InstanceBootstrap } from "../project/bootstrap"
import { Instance } from "../project/instance"
export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
return Instance.provide({
directory,
init: () => AppRuntime.runPromise(InstanceBootstrap),
fn: async () => {
try {
const result = await cb()