mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
Merge remote-tracking branch 'origin/main' into feat/mcp
# Conflicts: # app/package.json # bun.lock
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[](https://npmjs.org/package/bknd)
|
||||
|
||||

|
||||

|
||||
|
||||
<p align="center" width="100%">
|
||||
<a href="https://stackblitz.com/github/bknd-io/bknd-examples?hideExplorer=1&embed=1&view=preview&startScript=example-admin-rich&initialPath=%2Fdata%2Fschema" target="_blank">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"bin": "./dist/cli/index.js",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"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": {
|
||||
@@ -64,7 +64,8 @@
|
||||
"hono": "4.8.3",
|
||||
"json-schema-library": "10.0.0-rc7",
|
||||
"json-schema-to-ts": "^3.1.1",
|
||||
"kysely": "^0.27.6",
|
||||
"jsonv-ts": "0.3.2",
|
||||
"kysely": "0.27.6",
|
||||
"lodash-es": "^4.17.21",
|
||||
"oauth4webapi": "^2.11.1",
|
||||
"object-path-immutable": "^4.1.2",
|
||||
@@ -100,7 +101,7 @@
|
||||
"dotenv": "^16.4.7",
|
||||
"jotai": "^2.12.2",
|
||||
"jsdom": "^26.0.0",
|
||||
"jsonv-ts": "link:jsonv-ts",
|
||||
"jsonv-ts": "^0.3.2",
|
||||
"kysely-d1": "^0.3.0",
|
||||
"kysely-generic-sqlite": "^1.2.1",
|
||||
"libsql-stateless-easy": "^1.8.0",
|
||||
|
||||
@@ -68,7 +68,7 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
|
||||
}
|
||||
|
||||
protected uploadFile(
|
||||
body: File | Blob | ReadableStream,
|
||||
body: File | Blob | ReadableStream | Buffer<ArrayBufferLike>,
|
||||
opts?: {
|
||||
filename?: string;
|
||||
path?: TInput;
|
||||
@@ -110,7 +110,7 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
|
||||
}
|
||||
|
||||
async upload(
|
||||
item: Request | Response | string | File | Blob | ReadableStream,
|
||||
item: Request | Response | string | File | Blob | ReadableStream | Buffer<ArrayBufferLike>,
|
||||
opts: {
|
||||
filename?: string;
|
||||
_init?: Omit<RequestInit, "body">;
|
||||
@@ -148,7 +148,7 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
|
||||
entity: string,
|
||||
id: PrimaryFieldType,
|
||||
field: string,
|
||||
item: Request | Response | string | File | ReadableStream,
|
||||
item: Request | Response | string | File | ReadableStream | Buffer<ArrayBufferLike>,
|
||||
opts?: {
|
||||
_init?: Omit<RequestInit, "body">;
|
||||
fetcher?: typeof fetch;
|
||||
|
||||
@@ -183,13 +183,13 @@ export class StorageS3Adapter extends StorageAdapter {
|
||||
method: "GET",
|
||||
headers: pickHeaders2(headers, [
|
||||
"if-none-match",
|
||||
"accept-encoding",
|
||||
//"accept-encoding", (causes 403 on r2)
|
||||
"accept",
|
||||
"if-modified-since",
|
||||
]),
|
||||
});
|
||||
|
||||
// Response has to be copied, because of middlewares that might set headers
|
||||
// response has to be copied, because of middlewares that might set headers
|
||||
return new Response(res.body, {
|
||||
status: res.status,
|
||||
statusText: res.statusText,
|
||||
|
||||
@@ -94,8 +94,8 @@ export const TriggerNode = (props: NodeProps<Node<TAppFlowTriggerSchema & { labe
|
||||
control={control}
|
||||
/>
|
||||
</div>
|
||||
{data.type === "manual" && <Manual />}
|
||||
{data.type === "http" && (
|
||||
{data?.type === "manual" && <Manual />}
|
||||
{data?.type === "http" && (
|
||||
<Http form={{ watch, register, setValue, getValues, control }} />
|
||||
)}
|
||||
</form>
|
||||
|
||||
8
bun.lock
8
bun.lock
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"app": {
|
||||
"name": "bknd",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"bin": "./dist/cli/index.js",
|
||||
"dependencies": {
|
||||
"@cfworker/json-schema": "^4.1.1",
|
||||
@@ -35,7 +35,8 @@
|
||||
"hono": "4.8.3",
|
||||
"json-schema-library": "10.0.0-rc7",
|
||||
"json-schema-to-ts": "^3.1.1",
|
||||
"kysely": "^0.27.6",
|
||||
"jsonv-ts": "0.3.2",
|
||||
"kysely": "0.27.6",
|
||||
"lodash-es": "^4.17.21",
|
||||
"oauth4webapi": "^2.11.1",
|
||||
"object-path-immutable": "^4.1.2",
|
||||
@@ -71,7 +72,6 @@
|
||||
"dotenv": "^16.4.7",
|
||||
"jotai": "^2.12.2",
|
||||
"jsdom": "^26.0.0",
|
||||
"jsonv-ts": "^0.5.1",
|
||||
"kysely-d1": "^0.3.0",
|
||||
"kysely-generic-sqlite": "^1.2.1",
|
||||
"libsql-stateless-easy": "^1.8.0",
|
||||
@@ -2511,7 +2511,7 @@
|
||||
|
||||
"jsonpointer": ["jsonpointer@5.0.1", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="],
|
||||
|
||||
"jsonv-ts": ["jsonv-ts@0.5.1", "", { "optionalDependencies": { "hono": "*" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-9PoYn7rfk67q5aeDQLPcGUHJ1YWS/f4BPPsWY0HOna6hVKDbgRP+kem9lSvmf8IfQCpq363xVmR/g49MEMGOdQ=="],
|
||||
"jsonv-ts": ["jsonv-ts@0.3.2", "", { "optionalDependencies": { "hono": "*" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-wGKLo0naUzgOCa2BgtlKZlF47po7hPjGXqDZK2lOoJ/4sE1lb4fMvf0YJrRghqfwg9QNtWz01xALr+F0QECYag=="],
|
||||
|
||||
"jsonwebtoken": ["jsonwebtoken@9.0.2", "", { "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ=="],
|
||||
|
||||
|
||||
BIN
docs/public/assets/poster.png
Normal file
BIN
docs/public/assets/poster.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
@@ -1,6 +1,6 @@
|
||||
import type { AstroBkndConfig } from "bknd/adapter/astro";
|
||||
import { registerLocalMediaAdapter } from "bknd/adapter/node";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { boolean, em, entity, text } from "bknd";
|
||||
import { secureRandomString } from "bknd/utils";
|
||||
|
||||
// since we're running in node, we can register the local media adapter
|
||||
@@ -16,7 +16,7 @@ const schema = em({
|
||||
|
||||
// register your schema to get automatic type completion
|
||||
type Database = (typeof schema)["DB"];
|
||||
declare module "bknd/core" {
|
||||
declare module "bknd" {
|
||||
interface DB extends Database {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextjsBkndConfig } from "bknd/adapter/nextjs";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { boolean, em, entity, text } from "bknd";
|
||||
import { registerLocalMediaAdapter } from "bknd/adapter/node";
|
||||
import { secureRandomString } from "bknd/utils";
|
||||
|
||||
@@ -22,7 +22,7 @@ const schema = em({
|
||||
|
||||
// register your schema to get automatic type completion
|
||||
type Database = (typeof schema)["DB"];
|
||||
declare module "bknd/core" {
|
||||
declare module "bknd" {
|
||||
interface DB extends Database {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { App } from "bknd";
|
||||
import { serve } from "bknd/adapter/vite";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { App, boolean, em, entity, text } from "bknd";
|
||||
import { secureRandomString } from "bknd/utils";
|
||||
|
||||
export default serve({
|
||||
@@ -8,23 +7,23 @@ export default serve({
|
||||
data: em({
|
||||
todos: entity("todos", {
|
||||
title: text(),
|
||||
done: boolean()
|
||||
})
|
||||
done: boolean(),
|
||||
}),
|
||||
}).toJSON(),
|
||||
auth: {
|
||||
enabled: true,
|
||||
jwt: {
|
||||
secret: secureRandomString(64)
|
||||
}
|
||||
}
|
||||
secret: secureRandomString(64),
|
||||
},
|
||||
},
|
||||
},
|
||||
options: {
|
||||
seed: async (ctx) => {
|
||||
await ctx.em.mutator("todos" as any).insertMany([
|
||||
{ title: "Learn bknd", done: true },
|
||||
{ title: "Build something cool", done: false }
|
||||
{ title: "Build something cool", done: false },
|
||||
]);
|
||||
}
|
||||
},
|
||||
},
|
||||
// here we can hook into the app lifecycle events ...
|
||||
beforeBuild: async (app) => {
|
||||
@@ -34,10 +33,10 @@ export default serve({
|
||||
// ... to create an initial user
|
||||
await app.module.auth.createUser({
|
||||
email: "ds@bknd.io",
|
||||
password: "12345678"
|
||||
password: "12345678",
|
||||
});
|
||||
},
|
||||
"sync"
|
||||
"sync",
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { registerLocalMediaAdapter } from "bknd/adapter/node";
|
||||
import type { ReactRouterBkndConfig } from "bknd/adapter/react-router";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { boolean, em, entity, text } from "bknd";
|
||||
import { secureRandomString } from "bknd/utils";
|
||||
|
||||
// since we're running in node, we can register the local media adapter
|
||||
@@ -15,7 +15,7 @@ const schema = em({
|
||||
|
||||
// register your schema to get automatic type completion
|
||||
type Database = (typeof schema)["DB"];
|
||||
declare module "bknd/core" {
|
||||
declare module "bknd" {
|
||||
interface DB extends Database {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { lazy, Suspense, useEffect, useState } from "react";
|
||||
import { App } from "bknd";
|
||||
import { checksum } from "bknd/utils";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { App, boolean, em, entity, text } from "bknd";
|
||||
import { SQLocalConnection } from "@bknd/sqlocal";
|
||||
import { Route, Router, Switch } from "wouter";
|
||||
import IndexPage from "~/routes/_index";
|
||||
@@ -68,7 +67,7 @@ const schema = em({
|
||||
|
||||
// register your schema to get automatic type completion
|
||||
type Database = (typeof schema)["DB"];
|
||||
declare module "bknd/core" {
|
||||
declare module "bknd" {
|
||||
interface DB extends Database {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { registerLocalMediaAdapter } from "bknd/adapter/node";
|
||||
import type { BkndConfig } from "bknd/adapter";
|
||||
import { boolean, em, entity, text } from "bknd/data";
|
||||
import { boolean, em, entity, text } from "bknd";
|
||||
import { secureRandomString } from "bknd/utils";
|
||||
|
||||
// since we're running in node, we can register the local media adapter
|
||||
@@ -15,7 +15,7 @@ const schema = em({
|
||||
|
||||
// register your schema to get automatic type completion
|
||||
type Database = (typeof schema)["DB"];
|
||||
declare module "bknd/core" {
|
||||
declare module "bknd" {
|
||||
interface DB extends Database {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user