mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
updated version, added discord to docs, fixed import in adapters
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"bin": "./dist/cli/index.js",
|
||||
"version": "0.0.75",
|
||||
"version": "0.0.13",
|
||||
"scripts": {
|
||||
"build:all": "rm -rf dist && bun build:css && bun run build && bun build:vite && bun build:adapters && bun build:cli",
|
||||
"dev": "vite",
|
||||
@@ -14,13 +14,14 @@
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:css": "bun tailwindcss -i ./src/ui/styles.css -o ./dist/styles.css",
|
||||
"watch:css": "bun tailwindcss --watch -i ./src/ui/styles.css -o ./dist/styles.css",
|
||||
"build:vite": "vite build",
|
||||
"build:vite": "NODE_ENV=production vite build",
|
||||
"build:adapters": "bun tsup.adapters.ts --minify",
|
||||
"watch:adapters": "bun tsup.adapters.ts --watch",
|
||||
"updater": "bun x npm-check-updates -ui",
|
||||
"build:cli": "bun build src/cli/index.ts --target node --outdir dist/cli --minify",
|
||||
"cli": "LOCAL=1 bun src/cli/index.ts"
|
||||
},
|
||||
"license": "FSL-1.1-MIT",
|
||||
"dependencies": {
|
||||
"@cfworker/json-schema": "^2.0.1",
|
||||
"@codemirror/lang-html": "^6.4.9",
|
||||
@@ -99,6 +100,9 @@
|
||||
"splitting": false,
|
||||
"loader": {
|
||||
".svg": "dataurl"
|
||||
},
|
||||
"esbuild": {
|
||||
"drop": ["console", "debugger"]
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -167,6 +171,7 @@
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"!dist/*.tsbuildinfo",
|
||||
"!dist/*.map",
|
||||
"!dist/**/*.map",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { App, type CreateAppConfig } from "../../App";
|
||||
import { App, type CreateAppConfig } from "bknd";
|
||||
|
||||
let app: App;
|
||||
export function serve(config: CreateAppConfig) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { serveStatic } from "@hono/node-server/serve-static";
|
||||
import type { BkndConfig } from "bknd";
|
||||
import { App } from "../../App";
|
||||
import { App } from "bknd";
|
||||
|
||||
async function getHtml() {
|
||||
return readFile("index.html", "utf8");
|
||||
|
||||
@@ -45,6 +45,7 @@ export function TemplateMediaComponent() {
|
||||
});
|
||||
|
||||
const { config } = useBknd();
|
||||
const media_enabled = config.media.enabled ?? false;
|
||||
const media_entity = config.media.entity_name ?? "media";
|
||||
const entities = transformObject(config.data.entities ?? {}, (entity, name) =>
|
||||
name !== media_entity ? entity : undefined
|
||||
@@ -69,6 +70,11 @@ export function TemplateMediaComponent() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{!media_enabled && (
|
||||
<div className="px-5 py-4 bg-red-100 text-red-900">
|
||||
Media is not enabled in the configuration. Please enable it to use this template.
|
||||
</div>
|
||||
)}
|
||||
<form onSubmit={handleSubmit(handleCreate)}>
|
||||
<ModalBody>
|
||||
<div className="flex flex-col gap-6">
|
||||
@@ -123,7 +129,7 @@ export function TemplateMediaComponent() {
|
||||
<ModalFooter
|
||||
next={{
|
||||
type: "submit",
|
||||
disabled: !isValid
|
||||
disabled: !isValid || !media_enabled
|
||||
}}
|
||||
prev={{
|
||||
onClick: stepBack
|
||||
|
||||
Reference in New Issue
Block a user