refactor(core): separate out location node functionality and integrate into v2 (#34119)

This commit is contained in:
James Long 2026-06-26 22:46:07 -04:00 committed by GitHub
commit ecdfff5a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 1450 additions and 1196 deletions

View file

@ -1,10 +1,13 @@
export * as SystemContextBuiltIns from "./builtins"
import { makeLocationNode } from "../effect/node"
import { DateTime, Effect, Layer, Schema } from "effect"
import { Location } from "../location"
import { SystemContext } from "./index"
import { InstructionContext } from "../instruction-context"
import { SystemContextRegistry } from "./registry"
import { FSUtil } from "../fs-util"
import { Global } from "../global"
const builtIns = Layer.effectDiscard(
Effect.gen(function* () {
@ -45,3 +48,9 @@ export const layer = Layer.mergeAll(builtIns, InstructionContext.layer).pipe(
)
export const locationLayer = layer
export const node = makeLocationNode({
name: "system-context-builtins",
layer,
deps: [Location.node, SystemContextRegistry.node, InstructionContext.node, FSUtil.node, Global.node],
})

View file

@ -2,6 +2,7 @@ export * as SystemContextRegistry from "./registry"
import { Context, Effect, Layer, Ref, Scope } from "effect"
import { SystemContext } from "./index"
import { makeLocationNode } from "../effect/node"
export interface Entry {
readonly key: SystemContext.Key
@ -44,3 +45,5 @@ export const layer = Layer.effect(
})
}),
)
export const node = makeLocationNode({ service: Service, layer, deps: [] })