From 060df210f97baa48211065870751c55a26732e97 Mon Sep 17 00:00:00 2001 From: dswbx Date: Fri, 21 Feb 2025 08:14:22 +0100 Subject: [PATCH] fix Api import in App --- README.md | 8 ++++---- app/package.json | 4 ++-- app/src/App.ts | 2 +- app/tsconfig.build.json | 4 ++++ app/tsconfig.json | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 app/tsconfig.build.json diff --git a/README.md b/README.md index fb5e81f..e2add07 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,10 @@ bknd simplifies app development by providing a fully functional backend for data > and therefore full backward compatibility is not guaranteed before reaching v1.0.0. ## Size -![gzipped size of bknd](https://img.badgesize.io/https://unpkg.com/bknd@0.8.0/dist/index.js?compression=gzip&label=bknd) -![gzipped size of bknd/client](https://img.badgesize.io/https://unpkg.com/bknd@0.8.0/dist/ui/client/index.js?compression=gzip&label=bknd/client) -![gzipped size of bknd/elements](https://img.badgesize.io/https://unpkg.com/bknd@0.8.0/dist/ui/elements/index.js?compression=gzip&label=bknd/elements) -![gzipped size of bknd/ui](https://img.badgesize.io/https://unpkg.com/bknd@0.8.0/dist/ui/index.js?compression=gzip&label=bknd/ui) +![gzipped size of bknd](https://img.badgesize.io/https://unpkg.com/bknd@0.7.1/dist/index.js?compression=gzip&label=bknd) +![gzipped size of bknd/client](https://img.badgesize.io/https://unpkg.com/bknd@0.7.1/dist/ui/client/index.js?compression=gzip&label=bknd/client) +![gzipped size of bknd/elements](https://img.badgesize.io/https://unpkg.com/bknd@0.7.1/dist/ui/elements/index.js?compression=gzip&label=bknd/elements) +![gzipped size of bknd/ui](https://img.badgesize.io/https://unpkg.com/bknd@0.7.1/dist/ui/index.js?compression=gzip&label=bknd/ui) The size on npm is misleading, as the `bknd` package includes the backend, the ui components as well as the whole backend bundled into the cli including static assets. diff --git a/app/package.json b/app/package.json index 791ea86..235f5ed 100644 --- a/app/package.json +++ b/app/package.json @@ -22,9 +22,9 @@ "build:cli": "bun build src/cli/index.ts --target node --outdir dist/cli --minify", "build:static": "vite build", "watch": "bun run build.ts --types --watch", - "types": "bun tsc --noEmit", + "types": "bun tsc -p tsconfig.build.json --noEmit", "clean:types": "find ./dist -name '*.d.ts' -delete && rm -f ./dist/tsconfig.tsbuildinfo", - "build:types": "tsc --emitDeclarationOnly && tsc-alias", + "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly && tsc-alias", "updater": "bun x npm-check-updates -ui", "cli": "LOCAL=1 bun src/cli/index.ts", "prepublishOnly": "bun run types && bun run test && bun run build:all && cp ../README.md ./", diff --git a/app/src/App.ts b/app/src/App.ts index 06917d0..868b11a 100644 --- a/app/src/App.ts +++ b/app/src/App.ts @@ -1,5 +1,5 @@ +import { Api, type ApiOptions } from "Api"; import type { CreateUserPayload } from "auth/AppAuth"; -import { Api, type ApiOptions } from "bknd/client"; import { $console } from "core"; import { Event } from "core/events"; import { Connection, type LibSqlCredentials, LibsqlConnection } from "data"; diff --git a/app/tsconfig.build.json b/app/tsconfig.build.json new file mode 100644 index 0000000..5f1c8af --- /dev/null +++ b/app/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["./src/**/*.ts", "./src/**/*.tsx"] +} diff --git a/app/tsconfig.json b/app/tsconfig.json index 8be6838..52a41a4 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -33,6 +33,6 @@ "bknd": ["./src/*"] } }, - "include": ["./src/**/*.ts", "./src/**/*.tsx"], + "include": ["./src/**/*.ts", "./src/**/*.tsx", "vite.dev.ts", "build.ts"], "exclude": ["node_modules", "dist", "dist/types", "**/*.d.ts"] } \ No newline at end of file