mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
bump rc
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 });
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user