This commit is contained in:
dswbx
2025-06-09 20:27:02 +02:00
parent 15af9f5261
commit 12c955155d
3 changed files with 3 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
"type": "module",
"sideEffects": false,
"bin": "./dist/cli/index.js",
"version": "0.14.0-rc.0",
"version": "0.14.0-rc.2",
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
"homepage": "https://bknd.io",
"repository": {

View File

@@ -27,7 +27,7 @@ export type ParseOptions = {
clone?: boolean;
};
const cloneSchema = <S extends s.TSchema>(schema: S): S => {
export const cloneSchema = <S extends s.TSchema>(schema: S): S => {
const json = schema.toJSON();
return s.fromSchema(json) as S;
};

View File

@@ -1,15 +1,8 @@
import { type D1Connection, serve } from "bknd/adapter/cloudflare";
import { serve } from "bknd/adapter/cloudflare";
export default serve({
mode: "warm",
d1: {
session: true,
},
onBuilt: async (app) => {
app.modules.server.get("/custom", async (c) => {
const conn = c.var.app.em.connection as D1Connection;
const res = await conn.client.prepare("select * from __bknd limit 1").all();
return c.json({ hello: "world", res });
});
},
});