From ad0d2e6ff8e6e175cac14776714672471cb14f7b Mon Sep 17 00:00:00 2001 From: dswbx Date: Wed, 6 Aug 2025 08:21:17 +0200 Subject: [PATCH] add jsonv-ts as dependency for type inference, fix media api types (#227) * add jsonv-ts as dependency for type inference, fix media api types * add jsonv-ts as dependency for type inference, fix media api types * add jsonv-ts as dependency for type inference, fix media api types --- app/package.json | 6 +++--- app/src/media/api/MediaApi.ts | 6 +++--- app/src/media/storage/adapters/s3/StorageS3Adapter.ts | 4 ++-- .../flows/components2/nodes/triggers/TriggerNode.tsx | 4 ++-- bun.lock | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/package.json b/app/package.json index aec8170..8ad527a 100644 --- a/app/package.json +++ b/app/package.json @@ -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,6 @@ "dotenv": "^16.4.7", "jotai": "^2.12.2", "jsdom": "^26.0.0", - "jsonv-ts": "^0.3.2", "kysely-d1": "^0.3.0", "kysely-generic-sqlite": "^1.2.1", "libsql-stateless-easy": "^1.8.0", diff --git a/app/src/media/api/MediaApi.ts b/app/src/media/api/MediaApi.ts index 70cf746..db94b03 100644 --- a/app/src/media/api/MediaApi.ts +++ b/app/src/media/api/MediaApi.ts @@ -68,7 +68,7 @@ export class MediaApi extends ModuleApi { } protected uploadFile( - body: File | Blob | ReadableStream, + body: File | Blob | ReadableStream | Buffer, opts?: { filename?: string; path?: TInput; @@ -110,7 +110,7 @@ export class MediaApi extends ModuleApi { } async upload( - item: Request | Response | string | File | Blob | ReadableStream, + item: Request | Response | string | File | Blob | ReadableStream | Buffer, opts: { filename?: string; _init?: Omit; @@ -148,7 +148,7 @@ export class MediaApi extends ModuleApi { entity: string, id: PrimaryFieldType, field: string, - item: Request | Response | string | File | ReadableStream, + item: Request | Response | string | File | ReadableStream | Buffer, opts?: { _init?: Omit; fetcher?: typeof fetch; diff --git a/app/src/media/storage/adapters/s3/StorageS3Adapter.ts b/app/src/media/storage/adapters/s3/StorageS3Adapter.ts index 7f3da6e..bb89265 100644 --- a/app/src/media/storage/adapters/s3/StorageS3Adapter.ts +++ b/app/src/media/storage/adapters/s3/StorageS3Adapter.ts @@ -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, diff --git a/app/src/ui/modules/flows/components2/nodes/triggers/TriggerNode.tsx b/app/src/ui/modules/flows/components2/nodes/triggers/TriggerNode.tsx index 4bce7a7..4edb4a3 100644 --- a/app/src/ui/modules/flows/components2/nodes/triggers/TriggerNode.tsx +++ b/app/src/ui/modules/flows/components2/nodes/triggers/TriggerNode.tsx @@ -94,8 +94,8 @@ export const TriggerNode = (props: NodeProps - {data.type === "manual" && } - {data.type === "http" && ( + {data?.type === "manual" && } + {data?.type === "http" && ( )} diff --git a/bun.lock b/bun.lock index 1bf0fac..11dd60f 100644 --- a/bun.lock +++ b/bun.lock @@ -15,7 +15,7 @@ }, "app": { "name": "bknd", - "version": "0.16.0-rc.0", + "version": "0.16.1-rc.0", "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.3.2", "kysely-d1": "^0.3.0", "kysely-generic-sqlite": "^1.2.1", "libsql-stateless-easy": "^1.8.0",