Compare commits

..

2 Commits

Author SHA1 Message Date
octoturge e085d4436a Ignore bun.lock alongside bun.lockb 2026-08-28 18:28:27 +00:00
octoturge 401c65762b Fix bun-types resolution; fix possibly-undefined health-check row
Same bun-types-vs-@types/bun fix as continuum-common. Also fixes a real
noUncheckedIndexedAccess violation in the /health route: db.execute()'s
result is T[], so rows[0] is 'T | undefined', not T — destructuring assumed
it always existed. Verified with a clean 'bunx tsc --noEmit'.
2026-08-28 18:28:06 +00:00
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -1,5 +1,7 @@
node_modules/ node_modules/
dist/ dist/
bun.lockb
bun.lock
.env .env
.env.local .env.local
drizzle/ drizzle/
+1 -1
View File
@@ -26,7 +26,7 @@
}, },
"devDependencies": { "devDependencies": {
"drizzle-kit": "^0.24.2", "drizzle-kit": "^0.24.2",
"@types/bun": "^1.1.10", "bun-types": "^1.1.10",
"typescript": "^5.6.2" "typescript": "^5.6.2"
} }
} }
+2 -2
View File
@@ -14,9 +14,9 @@ const app = new Elysia()
.use(cors()) .use(cors())
.use(swagger({ path: "/docs" })) .use(swagger({ path: "/docs" }))
.get("/health", async () => { .get("/health", async () => {
const [{ ok }] = await db.execute<{ ok: number }>(sql`select 1 as ok`); const rows = await db.execute<{ ok: number }>(sql`select 1 as ok`);
const redisPing = await redis.ping(); const redisPing = await redis.ping();
return { status: "ok", db: ok === 1, redis: redisPing === "PONG" }; return { status: "ok", db: rows[0]?.ok === 1, redis: redisPing === "PONG" };
}) })
.use(authRoutes) .use(authRoutes)
.use(farmRoutes) .use(farmRoutes)