chore: effect pattern lint infrastructure (#35210)

This commit is contained in:
Kit Langton
2026-07-03 13:58:26 -04:00
committed by GitHub
parent 1b88ff8d53
commit 1401901529
70 changed files with 524 additions and 234 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
export * as Database from "./database"
import { EffectDrizzleSqlite } from "@opencode-ai/effect-drizzle-sqlite"
import { layer as sqliteLayer } from "#sqlite"
import { layer } from "#sqlite"
import { Context, Effect, Layer } from "effect"
import { Global } from "../global"
import { Flag } from "../flag/flag"
@@ -19,7 +19,7 @@ export interface Interface {
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/storage/Database") {}
const layer = Layer.effect(
const databaseLayer = Layer.effect(
Service,
Effect.gen(function* () {
const db = yield* makeDatabase
@@ -37,7 +37,7 @@ const layer = Layer.effect(
)
export function layerFromPath(filename: string) {
return layer.pipe(Layer.provide(sqliteLayer({ filename })))
return databaseLayer.pipe(Layer.provide(layer({ filename })))
}
export function path() {