chore: generate
This commit is contained in:
@@ -3,10 +3,7 @@ import { Effect } from "effect"
|
|||||||
import { HttpEffect, HttpMiddleware, HttpServerRequest } from "effect/unstable/http"
|
import { HttpEffect, HttpMiddleware, HttpServerRequest } from "effect/unstable/http"
|
||||||
|
|
||||||
const disposeAfterResponse = new WeakMap<object, InstanceContext>()
|
const disposeAfterResponse = new WeakMap<object, InstanceContext>()
|
||||||
const reloadAfterResponse = new WeakMap<
|
const reloadAfterResponse = new WeakMap<object, InstanceContext & { next: Parameters<typeof Instance.reload>[0] }>()
|
||||||
object,
|
|
||||||
InstanceContext & { next: Parameters<typeof Instance.reload>[0] }
|
|
||||||
>()
|
|
||||||
|
|
||||||
export const markInstanceForDisposal = (ctx: InstanceContext) =>
|
export const markInstanceForDisposal = (ctx: InstanceContext) =>
|
||||||
HttpEffect.appendPreResponseHandler((request, response) =>
|
HttpEffect.appendPreResponseHandler((request, response) =>
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ export const projectHandlers = Layer.unwrap(
|
|||||||
const initGit = Effect.fn("ProjectHttpApi.initGit")(function* () {
|
const initGit = Effect.fn("ProjectHttpApi.initGit")(function* () {
|
||||||
const ctx = yield* InstanceState.context
|
const ctx = yield* InstanceState.context
|
||||||
const next = yield* svc.initGit({ directory: ctx.directory, project: ctx.project })
|
const next = yield* svc.initGit({ directory: ctx.directory, project: ctx.project })
|
||||||
if (next.id === ctx.project.id && next.vcs === ctx.project.vcs && next.worktree === ctx.project.worktree) return next
|
if (next.id === ctx.project.id && next.vcs === ctx.project.vcs && next.worktree === ctx.project.worktree)
|
||||||
|
return next
|
||||||
yield* markInstanceForReload(ctx, {
|
yield* markInstanceForReload(ctx, {
|
||||||
directory: ctx.directory,
|
directory: ctx.directory,
|
||||||
worktree: ctx.directory,
|
worktree: ctx.directory,
|
||||||
|
|||||||
Reference in New Issue
Block a user