Merge remote-tracking branch 'origin/release/0.20' into feat/opfs-and-sqlocal

This commit is contained in:
dswbx
2025-12-02 10:31:39 +01:00
87 changed files with 2060 additions and 824 deletions

14
examples/postgres/neon.ts Normal file
View File

@@ -0,0 +1,14 @@
import { serve } from "bknd/adapter/bun";
import { createCustomPostgresConnection } from "bknd";
import { NeonDialect } from "kysely-neon";
const neon = createCustomPostgresConnection("neon", NeonDialect);
export default serve({
connection: neon({
connectionString: process.env.NEON,
}),
// ignore this, it's only required within this repository
// because bknd is installed via "workspace:*"
distPath: "../../app/dist",
});

View File

@@ -0,0 +1,20 @@
{
"name": "postgres",
"version": "0.0.0",
"private": true,
"type": "module",
"dependencies": {
"pg": "^8.14.0",
"postgres": "^3.4.7",
"@xata.io/client": "^0.0.0-next.v93343b9646f57a1e5c51c35eccf0767c2bb80baa",
"@xata.io/kysely": "^0.2.1",
"kysely-neon": "^1.3.0",
"bknd": "file:../app",
"kysely": "0.27.6"
},
"devDependencies": {
"@types/bun": "^1.2.5",
"@types/node": "^22.13.10",
"@types/pg": "^8.11.11"
}
}

View File

@@ -0,0 +1,34 @@
{
"compilerOptions": {
"composite": false,
"module": "ESNext",
"moduleResolution": "bundler",
"allowImportingTsExtensions": false,
"target": "ES2022",
"noImplicitAny": false,
"allowJs": true,
"verbatimModuleSyntax": true,
"declaration": true,
"strict": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"bknd": ["../app/src/index.ts"],
"bknd/*": ["../app/src/*"]
}
},
"include": ["./src/**/*.ts"],
"exclude": ["node_modules"]
}

24
examples/postgres/xata.ts Normal file
View File

@@ -0,0 +1,24 @@
import { serve } from "bknd/adapter/bun";
import { createCustomPostgresConnection } from "bknd";
import { XataDialect } from "@xata.io/kysely";
import { buildClient } from "@xata.io/client";
const client = buildClient();
const xataClient = new client({
databaseURL: process.env.XATA_URL,
apiKey: process.env.XATA_API_KEY,
branch: process.env.XATA_BRANCH,
});
const xata = createCustomPostgresConnection("xata", XataDialect, {
supports: {
batching: false,
},
});
export default serve({
connection: xata(xataClient),
// ignore this, it's only required within this repository
// because bknd is installed via "workspace:*"
distPath: "../../../app/dist",
});