fix mcp auth, styling fixes

This commit is contained in:
dswbx
2025-08-30 13:31:48 +02:00
parent fb0dbb9a51
commit 09fdde1c5b
8 changed files with 32 additions and 22 deletions

View File

@@ -65,7 +65,7 @@
"hono": "4.8.3", "hono": "4.8.3",
"json-schema-library": "10.0.0-rc7", "json-schema-library": "10.0.0-rc7",
"json-schema-to-ts": "^3.1.1", "json-schema-to-ts": "^3.1.1",
"jsonv-ts": "^0.8.1", "jsonv-ts": "0.8.2",
"kysely": "0.27.6", "kysely": "0.27.6",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"oauth4webapi": "^2.11.1", "oauth4webapi": "^2.11.1",

View File

@@ -1,13 +1,5 @@
import { import { mark, stripMark, $console, s, objectEach, transformObject, McpServer } from "bknd/utils";
mark, import { DebugLogger } from "core/utils/DebugLogger";
stripMark,
$console,
s,
objectEach,
transformObject,
McpServer,
DebugLogger,
} from "bknd/utils";
import { Guard } from "auth/authorize/Guard"; import { Guard } from "auth/authorize/Guard";
import { env } from "core/env"; import { env } from "core/env";
import { BkndError } from "core/errors"; import { BkndError } from "core/errors";

View File

@@ -20,8 +20,9 @@ const style = {
basicChildStyle: "pl-5 ml-1 border-l border-muted hover:border-primary/20", basicChildStyle: "pl-5 ml-1 border-l border-muted hover:border-primary/20",
container: "ml-[-10px]", container: "ml-[-10px]",
label: "text-primary/90 font-bold font-mono mr-2", label: "text-primary/90 font-bold font-mono mr-2",
stringValue: "text-emerald-600 dark:text-emerald-500 font-mono select-text", stringValue:
numberValue: "text-sky-500 dark:text-sky-400 font-mono", "text-emerald-600 dark:text-emerald-500 font-mono select-text text-wrap whitespace-wrap break-words",
numberValue: "text-sky-500 dark:text-sky-400 font-mono select-text",
nullValue: "text-zinc-400 font-mono", nullValue: "text-zinc-400 font-mono",
undefinedValue: "text-zinc-400 font-mono", undefinedValue: "text-zinc-400 font-mono",
otherValue: "text-zinc-400 font-mono", otherValue: "text-zinc-400 font-mono",

View File

@@ -1,6 +1,6 @@
import { useClickOutside, useHotkeys } from "@mantine/hooks"; import { useClickOutside, useHotkeys } from "@mantine/hooks";
import { IconChevronDown, IconChevronUp } from "@tabler/icons-react"; import { IconChevronDown, IconChevronUp } from "@tabler/icons-react";
import { clampNumber } from "core/utils/numbers"; import { transformObject, clampNumber } from "bknd/utils";
import { throttle } from "lodash-es"; import { throttle } from "lodash-es";
import { ScrollArea } from "radix-ui"; import { ScrollArea } from "radix-ui";
import { import {
@@ -19,9 +19,21 @@ import { appShellStore } from "ui/store";
import { useLocation } from "wouter"; import { useLocation } from "wouter";
export function Root({ children }: { children: React.ReactNode }) { export function Root({ children }: { children: React.ReactNode }) {
const sidebarWidths = appShellStore((store) => store.sidebars);
const style = transformObject(sidebarWidths, (value) => value.width);
return ( return (
<AppShellProvider> <AppShellProvider>
<div id="app-shell" data-shell="root" className="flex flex-1 flex-col select-none h-dvh"> <div
id="app-shell"
data-shell="root"
className="flex flex-1 flex-col select-none h-dvh"
style={Object.fromEntries(
Object.entries(style).map(([key, value]) => [
`--sidebar-width-${key}`,
`${value}px`,
]),
)}
>
{children} {children}
</div> </div>
</AppShellProvider> </AppShellProvider>

View File

@@ -74,7 +74,7 @@
@apply bg-background text-primary overflow-hidden h-dvh w-dvw; @apply bg-background text-primary overflow-hidden h-dvh w-dvw;
::selection { ::selection {
@apply bg-muted; @apply bg-primary/15;
} }
input { input {

View File

@@ -1,7 +1,7 @@
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom/client"; import * as ReactDOM from "react-dom/client";
import Admin from "./Admin"; import Admin from "./Admin";
import "./main.css"; //import "./main.css";
import "./styles.css"; import "./styles.css";
function render() { function render() {

View File

@@ -129,7 +129,7 @@ export function Content() {
return ( return (
<Form <Form
className="flex flex-grow flex-col max-w-screen" className="flex flex-grow flex-col min-w-0 max-w-screen"
key={content.name} key={content.name}
schema={{ schema={{
title: "InputSchema", title: "InputSchema",
@@ -170,7 +170,12 @@ export function Content() {
</AppShell.SectionHeaderTitle> </AppShell.SectionHeaderTitle>
</AppShell.SectionHeader> </AppShell.SectionHeader>
<div className="flex flex-grow flex-row w-vw"> <div className="flex flex-grow flex-row w-vw">
<div className="flex flex-grow flex-col w-full"> <div
className="flex flex-grow flex-col max-w-full"
style={{
width: "calc(100% - var(--sidebar-width-right) - 1px)",
}}
>
<AppShell.Scrollable> <AppShell.Scrollable>
<div key={JSON.stringify(content)} className="flex flex-col py-4 px-5 gap-4"> <div key={JSON.stringify(content)} className="flex flex-col py-4 px-5 gap-4">
<p className="text-primary/80">{content?.description}</p> <p className="text-primary/80">{content?.description}</p>

View File

@@ -15,7 +15,7 @@
}, },
"app": { "app": {
"name": "bknd", "name": "bknd",
"version": "0.16.1", "version": "0.17.0-rc.1",
"bin": "./dist/cli/index.js", "bin": "./dist/cli/index.js",
"dependencies": { "dependencies": {
"@cfworker/json-schema": "^4.1.1", "@cfworker/json-schema": "^4.1.1",
@@ -35,7 +35,7 @@
"hono": "4.8.3", "hono": "4.8.3",
"json-schema-library": "10.0.0-rc7", "json-schema-library": "10.0.0-rc7",
"json-schema-to-ts": "^3.1.1", "json-schema-to-ts": "^3.1.1",
"jsonv-ts": "^0.8.1", "jsonv-ts": "0.8.2",
"kysely": "0.27.6", "kysely": "0.27.6",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"oauth4webapi": "^2.11.1", "oauth4webapi": "^2.11.1",
@@ -2516,7 +2516,7 @@
"jsonpointer": ["jsonpointer@5.0.1", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="], "jsonpointer": ["jsonpointer@5.0.1", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="],
"jsonv-ts": ["jsonv-ts@0.8.1", "", { "optionalDependencies": { "hono": "*" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-kqt1OHZ4WM92PDAxySZeGGzccZr6q5YdKpM8c7QWkwGoaa1azwTG5lV9SN3PT4kVgI0OYFDr3OGkgCszLQ+WPw=="], "jsonv-ts": ["jsonv-ts@0.8.2", "", { "optionalDependencies": { "hono": "*" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-1Z7+maCfoGGqBPu5vN8rU9gIsW7OatYmn+STBTPkybbtNqeMzAoJDDrXHjsZ89x5dPH9W+OgMpNLtN0ouwiMYg=="],
"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=="], "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=="],