refactor(opencode): roll out serviceUse proxy across 14 services + tests (#28576)
This commit is contained in:
3
packages/opencode/src/env/index.ts
vendored
3
packages/opencode/src/env/index.ts
vendored
@@ -1,4 +1,5 @@
|
||||
import { Context, Effect, Layer } from "effect"
|
||||
import { serviceUse } from "@/effect/service-use"
|
||||
import { InstanceState } from "@/effect/instance-state"
|
||||
|
||||
type State = Record<string, string | undefined>
|
||||
@@ -12,6 +13,8 @@ export interface Interface {
|
||||
|
||||
export class Service extends Context.Service<Service, Interface>()("@opencode/Env") {}
|
||||
|
||||
export const use = serviceUse(Service)
|
||||
|
||||
export const layer = Layer.effect(
|
||||
Service,
|
||||
Effect.gen(function* () {
|
||||
|
||||
Reference in New Issue
Block a user