diff --git a/app/package.json b/app/package.json index b441f57..fc458c8 100644 --- a/app/package.json +++ b/app/package.json @@ -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": { diff --git a/app/src/core/object/schema/index.ts b/app/src/core/object/schema/index.ts index 97f8066..5ebb6b6 100644 --- a/app/src/core/object/schema/index.ts +++ b/app/src/core/object/schema/index.ts @@ -27,7 +27,7 @@ export type ParseOptions = { clone?: boolean; }; -const cloneSchema = (schema: S): S => { +export const cloneSchema = (schema: S): S => { const json = schema.toJSON(); return s.fromSchema(json) as S; }; diff --git a/examples/cloudflare-worker/src/index.ts b/examples/cloudflare-worker/src/index.ts index 5435b30..cae6a1b 100644 --- a/examples/cloudflare-worker/src/index.ts +++ b/examples/cloudflare-worker/src/index.ts @@ -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 }); - }); - }, });