summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-06-03 14:28:50 -0400
committerDax Raad <[email protected]>2025-06-03 14:28:50 -0400
commit9ad0477af6c388a2d58b9f8ebcdf94346493cdb5 (patch)
treed1ec6c852fc8f1b711c2ec31e7ad1aaa3ea50f0e
parentc5eafd5722123b35cf3d995551395b23bb69e907 (diff)
downloadopencode-9ad0477af6c388a2d58b9f8ebcdf94346493cdb5.tar.gz
opencode-9ad0477af6c388a2d58b9f8ebcdf94346493cdb5.zip
change file name again
-rw-r--r--packages/opencode/src/app/app.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/opencode/src/app/app.ts b/packages/opencode/src/app/app.ts
index 652dc0339..d41256e6c 100644
--- a/packages/opencode/src/app/app.ts
+++ b/packages/opencode/src/app/app.ts
@@ -27,13 +27,15 @@ export namespace App {
const ctx = Context.create<Awaited<ReturnType<typeof create>>>("app")
+ const APP_JSON = "app.json"
+
async function create(input: { cwd: string; version: string }) {
const git = await Filesystem.findUp(".git", input.cwd).then((x) =>
x ? path.dirname(x) : undefined,
)
const data = path.join(Global.data(), git ?? "global")
- const stateFile = Bun.file(path.join(data, "state.json"))
+ const stateFile = Bun.file(path.join(data, APP_JSON))
const state = (await stateFile.json().catch(() => ({}))) as {
initialized: number
version: string
@@ -113,7 +115,7 @@ export namespace App {
const { info, version } = ctx.use()
info.time.initialized = Date.now()
await Bun.write(
- path.join(info.path.data, "state.json"),
+ path.join(info.path.data, APP_JSON),
JSON.stringify({
version,
initialized: Date.now(),