mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 16:31:50 +00:00
.
This commit is contained in:
parent
f9a633bd0b
commit
b75f831eaa
2 changed files with 1 additions and 32 deletions
|
|
@ -44,7 +44,6 @@ import { ConfigSkills } from "./skills"
|
|||
import { ConfigVariable } from "./variable"
|
||||
import { Npm } from "@/npm"
|
||||
import { ShellToolID } from "@/tool/shell/id"
|
||||
import { makeRuntime } from "@/effect/run-service"
|
||||
|
||||
const log = Log.create({ service: "config" })
|
||||
|
||||
|
|
@ -802,33 +801,3 @@ export const defaultLayer = layer.pipe(
|
|||
Layer.provide(Account.defaultLayer),
|
||||
Layer.provide(Npm.defaultLayer),
|
||||
)
|
||||
|
||||
const { runPromise } = makeRuntime(Service, defaultLayer)
|
||||
|
||||
export async function get() {
|
||||
return runPromise((svc) => svc.get())
|
||||
}
|
||||
|
||||
export async function getGlobal() {
|
||||
return runPromise((svc) => svc.getGlobal())
|
||||
}
|
||||
|
||||
export async function update(...args: Parameters<Interface["update"]>) {
|
||||
return runPromise((svc) => svc.update(...args))
|
||||
}
|
||||
|
||||
export async function updateGlobal(...args: Parameters<Interface["updateGlobal"]>) {
|
||||
return runPromise((svc) => svc.updateGlobal(...args))
|
||||
}
|
||||
|
||||
export async function invalidate(...args: Parameters<Interface["invalidate"]>) {
|
||||
return runPromise((svc) => svc.invalidate(...args))
|
||||
}
|
||||
|
||||
export async function directories() {
|
||||
return runPromise((svc) => svc.directories())
|
||||
}
|
||||
|
||||
export async function waitForDependencies() {
|
||||
return runPromise((svc) => svc.waitForDependencies())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1568,7 +1568,7 @@ test("permission config preserves shell and legacy bash order", async () => {
|
|||
await Instance.provide({
|
||||
directory: tmp.path,
|
||||
fn: async () => {
|
||||
const config = await Config.get()
|
||||
const config = await load()
|
||||
expect(Object.keys(config.permission!)).toEqual(["shell", "bash"])
|
||||
expect(config.permission).toEqual({
|
||||
shell: "deny",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue