MCPcopy
hub / github.com/anomalyco/opencode / resetDatabase

Function resetDatabase

packages/opencode/test/fixture/db.ts:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { disposeAllInstances } from "./fixture"
4
5export async function resetDatabase() {
6 await disposeAllInstances().catch(() => undefined)
7 const dbPath = Database.path()
8 await rm(dbPath, { force: true }).catch(() => undefined)
9 await rm(`${dbPath}-wal`, { force: true }).catch(() => undefined)
10 await rm(`${dbPath}-shm`, { force: true }).catch(() => undefined)
11}

Calls 3

disposeAllInstancesFunction · 0.90
pathMethod · 0.80
rmFunction · 0.50

Tested by 1

resetStateFunction · 0.72