import { InstanceRuntime } from "../project/instance-runtime" import { context } from "../project/instance-context" export async function bootstrap(directory: string, cb: () => Promise) { const ctx = await InstanceRuntime.load({ directory }) try { return await context.provide(ctx, cb) } finally { await InstanceRuntime.disposeInstance(ctx) } }