diff --git a/AGENTS.md b/AGENTS.md index e89a3116..25d961c8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -75,7 +75,8 @@ tsconfig.base.json # shared compilerOptions + @vp-* path aliases (${ them as `"catalog:"`. Add new shared deps there. There must be exactly one copy of `vue`, `vitepress` and `@voidzero-dev/vitepress-theme` (`pnpm dedupe --check` runs in CI). - One `pnpm-lock.yaml` at the root; never edit it by hand. -- Each app keeps its own `vercel.json` (redirects, headers, `Accept: text/markdown` rewrite) — Vercel projects +- Each app keeps its own `vercel.json` (redirects, headers) and `middleware.ts` (Vercel Routing Middleware for + `Accept: text/markdown` negotiation; the two copies must stay identical) — Vercel projects point at `apps/docs` and `apps/developer-docs` as Root Directory. - Header buttons come from `themeConfig.nav` items flagged `planeButton: "primary" | "secondary"`. diff --git a/apps/developer-docs/AGENTS.md b/apps/developer-docs/AGENTS.md index 1115e776..a1fe2a2c 100644 --- a/apps/developer-docs/AGENTS.md +++ b/apps/developer-docs/AGENTS.md @@ -26,7 +26,8 @@ pnpm --filter developer-docs check:types - **`docs/api-reference/`** — REST API endpoint docs (180+ endpoints across 30+ resource categories) - **`docs/self-hosting/`** — Deployment and configuration guides - **`docs/dev-tools/`** — Webhooks, OAuth apps, agents, MCP server docs -- **`vercel.json`** — cleanUrls, headers, redirects, `Accept: text/markdown` rewrite (per-app Vercel project) +- **`vercel.json`** — cleanUrls, headers, redirects (per-app Vercel project) +- **`middleware.ts`** — Vercel Routing Middleware: `Accept: text/markdown` → `/path.md` with `Vary: Accept` (mirror of `apps/docs/middleware.ts`) - Shared visual identity (header, layout, tokens, `Card`/`CardGroup`/`Tags`, Copy page menu, cookie consent) lives in `packages/theme` — never fork it here. diff --git a/apps/developer-docs/docs/.vitepress/config.mts b/apps/developer-docs/docs/.vitepress/config.mts index 5a74acc0..d5510d6e 100644 --- a/apps/developer-docs/docs/.vitepress/config.mts +++ b/apps/developer-docs/docs/.vitepress/config.mts @@ -67,7 +67,7 @@ export default extendConfig( details: "This documentation covers self-hosting (Docker, Kubernetes, and more), the REST API reference for projects, work items, cycles, modules, states, pages, and more, plus developer tools including OAuth apps, webhooks, agents, and the MCP server.", // Per-page .md versions are already emitted by buildEnd() for the - // `Accept: text/markdown` rewrite in vercel.json, so the plugin only + // `Accept: text/markdown` negotiation in middleware.ts, so the plugin only // owns llms.txt / llms-full.txt. generateLLMFriendlyDocsForEachPage: false, // Don't inject invisible LLM-hint markup into rendered pages. @@ -96,7 +96,7 @@ export default extendConfig( }, }, buildEnd(siteConfig) { - // Copy source .md files into dist/ for Accept: text/markdown negotiation. + // Copy source .md files into dist/ for Accept: text/markdown negotiation (see middleware.ts). const srcDir = siteConfig.srcDir; const outDir = siteConfig.outDir; diff --git a/apps/developer-docs/middleware.ts b/apps/developer-docs/middleware.ts new file mode 100644 index 00000000..339d685f --- /dev/null +++ b/apps/developer-docs/middleware.ts @@ -0,0 +1,59 @@ +/** + * Vercel Routing Middleware for developers.plane.so — markdown content negotiation. + * + * Requests that prefer `text/markdown` over `text/html` are rewritten to the page's + * markdown source (`/foo` → `/foo.md`, `/` → `/index.md`); buildEnd() in + * docs/.vitepress/config.mts copies those files into dist/. Every other request + * falls through to the HTML page. Both variants carry `Vary: Accept` so + * downstream caches keep them apart (https://acceptmarkdown.com). + * + * This lives in middleware rather than a `rewrites` entry in vercel.json + * because vercel.json rewrites are only evaluated after the filesystem: with + * cleanUrls the static foo.html always matched first, so the rewrite never + * ran and agents got HTML. Middleware runs before the filesystem and before + * the CDN cache, and the rewritten path gives the markdown variant its own + * cache key. + * + * Mirror of apps/docs/middleware.ts — keep the two in sync. + */ +import { next, rewrite } from "@vercel/functions"; +import Negotiator from "negotiator"; + +export const config = { + // Page URLs only. Skip the Vite asset dir and known static-file extensions + // (.md, sitemap.xml, llms.txt, images, fonts, ...). Listed + // explicitly instead of "contains a dot" because some page slugs contain + // version numbers. + matcher: [ + "/((?!assets/|.*\\.(?:md|html|xml|txt|json|js|mjs|css|map|png|jpe?g|gif|svg|webp|avif|ico|woff2?|ttf|otf|pdf|zip)$).*)", + ], +}; + +const VARY_ACCEPT = { Vary: "Accept" }; +const HTML = "text/html; charset=utf-8"; +const MARKDOWN = "text/markdown; charset=utf-8"; +const REPRESENTATIONS = [HTML, MARKDOWN]; + +function prefersMarkdown(accept: string | null): boolean { + try { + const negotiator = new Negotiator({ headers: { accept: accept ?? undefined } }); + const explicitlyAcceptsMarkdown = negotiator + .mediaTypes() + .some((mediaType) => mediaType.toLowerCase() === "text/markdown"); + return explicitlyAcceptsMarkdown && negotiator.mediaType(REPRESENTATIONS) === MARKDOWN; + } catch { + // Fall back to HTML when the header cannot be parsed. + return false; + } +} + +export default function middleware(request: Request): Response { + if (!prefersMarkdown(request.headers.get("accept"))) { + return next({ headers: VARY_ACCEPT }); + } + + const url = new URL(request.url); + const path = url.pathname.replace(/\/+$/, ""); + url.pathname = path === "" ? "/index.md" : `${path}.md`; + return rewrite(url, { headers: VARY_ACCEPT }); +} diff --git a/apps/developer-docs/package.json b/apps/developer-docs/package.json index 107b7167..cd059330 100644 --- a/apps/developer-docs/package.json +++ b/apps/developer-docs/package.json @@ -24,9 +24,12 @@ "check:types": "tsc --noEmit -p tsconfig.json" }, "dependencies": { - "@plane/docs-theme": "workspace:*" + "@plane/docs-theme": "workspace:*", + "@vercel/functions": "catalog:", + "negotiator": "catalog:" }, "devDependencies": { + "@types/negotiator": "catalog:", "@types/node": "catalog:", "@voidzero-dev/vitepress-theme": "catalog:", "mermaid": "catalog:", diff --git a/apps/developer-docs/tsconfig.json b/apps/developer-docs/tsconfig.json index a4c03058..97f898d2 100644 --- a/apps/developer-docs/tsconfig.json +++ b/apps/developer-docs/tsconfig.json @@ -1,5 +1,10 @@ { "extends": "../../tsconfig.base.json", - "include": ["docs/.vitepress/**/*.ts", "docs/.vitepress/**/*.mts", "docs/.vitepress/**/*.vue"], + "include": [ + "middleware.ts", + "docs/.vitepress/**/*.ts", + "docs/.vitepress/**/*.mts", + "docs/.vitepress/**/*.vue" + ], "exclude": ["docs/.vitepress/cache", "docs/.vitepress/dist", "docs/.vitepress/.temp"] } diff --git a/apps/developer-docs/vercel.json b/apps/developer-docs/vercel.json index 1f764538..5249212a 100644 --- a/apps/developer-docs/vercel.json +++ b/apps/developer-docs/vercel.json @@ -120,12 +120,5 @@ "source": "/dev-tools/mcp-server-claude-code", "destination": "/dev-tools/mcp-server#claude-code" } - ], - "rewrites": [ - { - "source": "/:path*", - "has": [{ "type": "header", "key": "accept", "value": ".*text/markdown.*" }], - "destination": "/:path*.md" - } ] } diff --git a/apps/docs/AGENTS.md b/apps/docs/AGENTS.md index 69e70c14..4277ba50 100644 --- a/apps/docs/AGENTS.md +++ b/apps/docs/AGENTS.md @@ -36,7 +36,8 @@ docs/ ai/ # Plane AI features support/ # Keyboard shortcuts, get help templates/ # Page, project, work-item templates -vercel.json # cleanUrls, headers, redirects, Accept: text/markdown rewrite +vercel.json # cleanUrls, headers, redirects +middleware.ts # Vercel Routing Middleware: Accept: text/markdown → /path.md (+ Vary: Accept) ``` ## Content conventions diff --git a/apps/docs/docs/.vitepress/config.ts b/apps/docs/docs/.vitepress/config.ts index ebeae667..57b39f68 100644 --- a/apps/docs/docs/.vitepress/config.ts +++ b/apps/docs/docs/.vitepress/config.ts @@ -56,7 +56,7 @@ const config = defineConfig({ details: "This documentation covers workspaces, projects, work items, cycles, modules, pages and wikis, integrations, importers, automations, and Plane AI.", // Per-page .md versions are already emitted by buildEnd() for the - // `Accept: text/markdown` rewrite in vercel.json, so the plugin only + // `Accept: text/markdown` negotiation in middleware.ts, so the plugin only // owns llms.txt / llms-full.txt. generateLLMFriendlyDocsForEachPage: false, // Don't inject invisible LLM-hint markup into rendered pages. @@ -73,7 +73,7 @@ const config = defineConfig({ }, buildEnd(siteConfig) { - // Copy source .md files into dist/ for Accept: text/markdown negotiation. + // Copy source .md files into dist/ for Accept: text/markdown negotiation (see middleware.ts). const srcDir = siteConfig.srcDir; const outDir = siteConfig.outDir; diff --git a/apps/docs/middleware.ts b/apps/docs/middleware.ts new file mode 100644 index 00000000..5342b459 --- /dev/null +++ b/apps/docs/middleware.ts @@ -0,0 +1,59 @@ +/** + * Vercel Routing Middleware for docs.plane.so — markdown content negotiation. + * + * Requests that prefer `text/markdown` over `text/html` are rewritten to the page's + * markdown source (`/foo` → `/foo.md`, `/` → `/index.md`); buildEnd() in + * docs/.vitepress/config.ts copies those files into dist/. Every other request + * falls through to the HTML page. Both variants carry `Vary: Accept` so + * downstream caches keep them apart (https://acceptmarkdown.com). + * + * This lives in middleware rather than a `rewrites` entry in vercel.json + * because vercel.json rewrites are only evaluated after the filesystem: with + * cleanUrls the static foo.html always matched first, so the rewrite never + * ran and agents got HTML. Middleware runs before the filesystem and before + * the CDN cache, and the rewritten path gives the markdown variant its own + * cache key. + * + * Mirror of apps/developer-docs/middleware.ts — keep the two in sync. + */ +import { next, rewrite } from "@vercel/functions"; +import Negotiator from "negotiator"; + +export const config = { + // Page URLs only. Skip the Vite asset dir and known static-file extensions + // (.md, sitemap.xml, llms.txt, images, fonts, ...). Listed + // explicitly instead of "contains a dot" because some page slugs contain + // version numbers. + matcher: [ + "/((?!assets/|.*\\.(?:md|html|xml|txt|json|js|mjs|css|map|png|jpe?g|gif|svg|webp|avif|ico|woff2?|ttf|otf|pdf|zip)$).*)", + ], +}; + +const VARY_ACCEPT = { Vary: "Accept" }; +const HTML = "text/html; charset=utf-8"; +const MARKDOWN = "text/markdown; charset=utf-8"; +const REPRESENTATIONS = [HTML, MARKDOWN]; + +function prefersMarkdown(accept: string | null): boolean { + try { + const negotiator = new Negotiator({ headers: { accept: accept ?? undefined } }); + const explicitlyAcceptsMarkdown = negotiator + .mediaTypes() + .some((mediaType) => mediaType.toLowerCase() === "text/markdown"); + return explicitlyAcceptsMarkdown && negotiator.mediaType(REPRESENTATIONS) === MARKDOWN; + } catch { + // Fall back to HTML when the header cannot be parsed. + return false; + } +} + +export default function middleware(request: Request): Response { + if (!prefersMarkdown(request.headers.get("accept"))) { + return next({ headers: VARY_ACCEPT }); + } + + const url = new URL(request.url); + const path = url.pathname.replace(/\/+$/, ""); + url.pathname = path === "" ? "/index.md" : `${path}.md`; + return rewrite(url, { headers: VARY_ACCEPT }); +} diff --git a/apps/docs/package.json b/apps/docs/package.json index 2d53a020..e594650b 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -19,9 +19,12 @@ "check:types": "tsc --noEmit -p tsconfig.json" }, "dependencies": { - "@plane/docs-theme": "workspace:*" + "@plane/docs-theme": "workspace:*", + "@vercel/functions": "catalog:", + "negotiator": "catalog:" }, "devDependencies": { + "@types/negotiator": "catalog:", "@types/node": "catalog:", "@voidzero-dev/vitepress-theme": "catalog:", "typescript": "catalog:", diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index a4c03058..97f898d2 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -1,5 +1,10 @@ { "extends": "../../tsconfig.base.json", - "include": ["docs/.vitepress/**/*.ts", "docs/.vitepress/**/*.mts", "docs/.vitepress/**/*.vue"], + "include": [ + "middleware.ts", + "docs/.vitepress/**/*.ts", + "docs/.vitepress/**/*.mts", + "docs/.vitepress/**/*.vue" + ], "exclude": ["docs/.vitepress/cache", "docs/.vitepress/dist", "docs/.vitepress/.temp"] } diff --git a/apps/docs/vercel.json b/apps/docs/vercel.json index b8862aae..d4de28fa 100644 --- a/apps/docs/vercel.json +++ b/apps/docs/vercel.json @@ -305,12 +305,5 @@ "source": "/core-concepts/pages/nested-pages", "destination": "/pages/nested-pages" } - ], - "rewrites": [ - { - "source": "/:path*", - "has": [{ "type": "header", "key": "accept", "value": ".*text/markdown.*" }], - "destination": "/:path*.md" - } ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d67e796..71a0effb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,9 +6,15 @@ settings: catalogs: default: + '@types/negotiator': + specifier: ^0.6.5 + version: 0.6.5 '@types/node': specifier: ^25.9.5 version: 25.9.5 + '@vercel/functions': + specifier: ^3.9.5 + version: 3.9.5 '@voidzero-dev/vitepress-theme': specifier: ^4.8.4 version: 4.8.4 @@ -21,6 +27,9 @@ catalogs: mermaid: specifier: ^11.15.0 version: 11.16.1 + negotiator: + specifier: ^1.1.0 + version: 1.1.0 typescript: specifier: ^6.0.3 version: 6.0.3 @@ -69,7 +78,16 @@ importers: '@plane/docs-theme': specifier: workspace:* version: link:../../packages/theme + '@vercel/functions': + specifier: 'catalog:' + version: 3.9.5 + negotiator: + specifier: 'catalog:' + version: 1.1.0 devDependencies: + '@types/negotiator': + specifier: 'catalog:' + version: 0.6.5 '@types/node': specifier: 'catalog:' version: 25.9.5 @@ -103,7 +121,16 @@ importers: '@plane/docs-theme': specifier: workspace:* version: link:../../packages/theme + '@vercel/functions': + specifier: 'catalog:' + version: 3.9.5 + negotiator: + specifier: 'catalog:' + version: 1.1.0 devDependencies: + '@types/negotiator': + specifier: 'catalog:' + version: 0.6.5 '@types/node': specifier: 'catalog:' version: 25.9.5 @@ -948,6 +975,9 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + '@types/negotiator@0.6.5': + resolution: {integrity: sha512-MPOlB48mfWhoUlynY0ga7CFsXIPcH6vGPkjzXMn2p+4PH1QUyn2KPtw0hrLLmO6SaX4zse3X6h2x/083vveAlA==} + '@types/node@25.9.5': resolution: {integrity: sha512-OScDchr2fwuUmWdf4kZ9h7PcJiYDVInhJizG/biAq3cAvqwYktuy/TYGGdZNMtNTFUP7rnb0NU4TUdm82kt4Rg==} @@ -967,6 +997,29 @@ packages: '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} + '@vercel/cli-config@0.2.4': + resolution: {integrity: sha512-kZ5SojbrV06GHoU6QIWGwDXLov+s9rWZ7QqdqKfJfBGCNUieGfgaCjeeenNy8Y+QC0bwC0dZ2B4l5Hvdmrgpdw==} + + '@vercel/cli-exec@1.0.1': + resolution: {integrity: sha512-g9XerViJ/paZujufXYcu5XYI2vU2rtB4sgdpjUHde5RnOkdmpu0ngH46LCFGHoPXO/C+qDPSczIHIRN+8Q2YKQ==} + engines: {node: '>= 18'} + + '@vercel/functions@3.9.5': + resolution: {integrity: sha512-EUfqlb7AzoEh7URlMNAO4jbJiLWz9grDBHvfjKTDvEP9c8y3DqX3SWPvfaQkUjtkm3b83flhaUUMuewdHa+qmw==} + engines: {node: '>= 20'} + peerDependencies: + '@aws-sdk/credential-provider-web-identity': '*' + ws: '>=8' + peerDependenciesMeta: + '@aws-sdk/credential-provider-web-identity': + optional: true + ws: + optional: true + + '@vercel/oidc@3.8.5': + resolution: {integrity: sha512-RwXYtnt6za+5UO4IaLywN/6B95AlLqynPRUWRJxeJ/qufwkcLUbZNUxYtzT0uMpuraWhlNcGqPNGkTnZr4BGBw==} + engines: {node: '>= 20'} + '@vitejs/plugin-vue@6.0.8': resolution: {integrity: sha512-0ZjgOg7oO6farnNGup7yvoM/YXZV84OZxHAwtflItNa/6zzQyVb5LNxyea3FEKEX2XlagIKzrlH7wwxkKgtiew==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1137,12 +1190,20 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} + cose-base@1.0.3: resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} cose-base@2.2.0: resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -1381,6 +1442,10 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -1416,6 +1481,10 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -1438,6 +1507,10 @@ packages: html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -1464,10 +1537,20 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + jose@5.10.0: + resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} + js-yaml@3.15.0: resolution: {integrity: sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==} hasBin: true @@ -1621,6 +1704,9 @@ packages: medium-zoom@1.1.0: resolution: {integrity: sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==} + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + mermaid@11.16.1: resolution: {integrity: sha512-TQsq6u22fAn3rek5VOubrhKPo1g5hwC3FXUN9hiyupTckcYiGuuKGkNQrKYwGJkXUxZdojwRG46gsSCFZMDp4g==} @@ -1694,6 +1780,10 @@ packages: resolution: {integrity: sha512-H/E3J6t+DQs/F2YgfDhxUVZz/dF8JXPPKTLHL/yHCcLZLtCXJDUaqvhJXQwqOVBvbyNn4T0WjLpIHd7PAw7fBA==} hasBin: true + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} @@ -1709,18 +1799,34 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + non-layered-tidy-tree-layout@2.0.2: resolution: {integrity: sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==} + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + oniguruma-parser@0.12.2: resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} oniguruma-to-es@4.3.6: resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} + os-paths@4.4.0: + resolution: {integrity: sha512-wrAwOeXp1RRMFfQY8Sy7VaGVmPocaLwSFOYCGKSyo8qmJ+/yaafCl5BCA1IQZWqFSRBrKDYFeR9d/VyQzfH/jg==} + engines: {node: '>= 6.0'} + oxfmt@0.36.0: resolution: {integrity: sha512-/ejJ+KoSW6J9bcNT9a9UtJSJNWhJ3yOLSBLbkoFHJs/8CZjmaZVZAJe4YgO1KMJlKpNQasrn/G9JQUEZI3p0EQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1732,6 +1838,10 @@ packages: path-data-parser@0.1.0: resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} @@ -1821,9 +1931,20 @@ packages: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + shiki@3.23.0: resolution: {integrity: sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==} + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -1849,6 +1970,10 @@ packages: resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} engines: {node: '>=0.10.0'} + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + stylis@4.4.0: resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} @@ -2029,10 +2154,23 @@ packages: typescript: optional: true + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + xdg-app-paths@5.5.1: + resolution: {integrity: sha512-hI3flOB4PLZIy5prbtTpirobtPE2ZtZ52szO+2mM9Efp6ErM398La+C1lIpNWDfNoQk+6Lsi6nMcCwVB7pxeMQ==} + engines: {node: '>= 6.0'} + + xdg-portable@7.3.0: + resolution: {integrity: sha512-sqMMuL1rc0FmMBOzCpd0yuy9trqF2yTTVe+E9ogwCSWQCdDEtQUwrZPT6AxqtsFGRNxycgncbP/xmOOSPw5ZUw==} + engines: {node: '>= 6.0'} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -2045,6 +2183,9 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} + zod@4.1.11: + resolution: {integrity: sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -2655,6 +2796,8 @@ snapshots: '@types/ms@2.1.0': {} + '@types/negotiator@0.6.5': {} + '@types/node@25.9.5': dependencies: undici-types: 7.24.6 @@ -2673,6 +2816,25 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) + '@vercel/cli-config@0.2.4': + dependencies: + xdg-app-paths: 5.5.1 + zod: 4.1.11 + + '@vercel/cli-exec@1.0.1': + dependencies: + execa: 5.1.1 + + '@vercel/functions@3.9.5': + dependencies: + '@vercel/oidc': 3.8.5 + + '@vercel/oidc@3.8.5': + dependencies: + '@vercel/cli-config': 0.2.4 + '@vercel/cli-exec': 1.0.1 + jose: 5.10.0 + '@vitejs/plugin-vue@6.0.8(vite@6.4.3(@types/node@25.9.5)(jiti@2.6.1)(lightningcss@1.31.1))(vue@3.5.41(typescript@6.0.3))': dependencies: '@rolldown/pluginutils': 1.0.1 @@ -2854,6 +3016,8 @@ snapshots: commander@8.3.0: {} + content-type@2.1.0: {} + cose-base@1.0.3: dependencies: layout-base: 1.0.2 @@ -2862,6 +3026,12 @@ snapshots: dependencies: layout-base: 2.0.1 + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + cssesc@3.0.0: {} csstype@3.2.3: {} @@ -3127,6 +3297,18 @@ snapshots: estree-walker@2.0.2: {} + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -3152,6 +3334,8 @@ snapshots: get-caller-file@2.0.5: {} + get-stream@6.0.1: {} + graceful-fs@4.2.11: {} gray-matter@4.0.3: @@ -3185,6 +3369,8 @@ snapshots: html-void-elements@3.0.0: {} + human-signals@2.1.0: {} + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -3201,8 +3387,14 @@ snapshots: is-plain-obj@4.1.0: {} + is-stream@2.0.1: {} + + isexe@2.0.0: {} + jiti@2.6.1: {} + jose@5.10.0: {} + js-yaml@3.15.0: dependencies: argparse: 1.0.10 @@ -3365,6 +3557,8 @@ snapshots: medium-zoom@1.1.0: {} + merge-stream@2.0.0: {} + mermaid@11.16.1: dependencies: '@braintree/sanitize-url': 7.1.2 @@ -3533,6 +3727,8 @@ snapshots: dependencies: yargs: 17.7.2 + mimic-fn@2.1.0: {} + minimatch@10.2.5: dependencies: brace-expansion: 5.0.6 @@ -3543,11 +3739,23 @@ snapshots: nanoid@3.3.18: {} + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + non-layered-tidy-tree-layout@2.0.2: optional: true + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + ohash@2.0.11: {} + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + oniguruma-parser@0.12.2: {} oniguruma-to-es@4.3.6: @@ -3556,6 +3764,8 @@ snapshots: regex: 6.1.0 regex-recursion: 6.0.2 + os-paths@4.4.0: {} + oxfmt@0.36.0: dependencies: tinypool: 2.1.0 @@ -3584,6 +3794,8 @@ snapshots: path-data-parser@0.1.0: {} + path-key@3.1.1: {} + path-to-regexp@6.3.0: {} perfect-debounce@2.1.0: {} @@ -3726,6 +3938,12 @@ snapshots: extend-shallow: 2.0.1 kind-of: 6.0.3 + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + shiki@3.23.0: dependencies: '@shikijs/core': 3.23.0 @@ -3737,6 +3955,8 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 + signal-exit@3.0.7: {} + source-map-js@1.2.1: {} space-separated-tokens@2.0.2: {} @@ -3760,6 +3980,8 @@ snapshots: strip-bom-string@1.0.0: {} + strip-final-newline@2.0.0: {} + stylis@4.4.0: {} tabbable@6.5.0: {} @@ -3962,12 +4184,25 @@ snapshots: optionalDependencies: typescript: 6.0.3 + which@2.0.2: + dependencies: + isexe: 2.0.0 + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + xdg-app-paths@5.5.1: + dependencies: + os-paths: 4.4.0 + xdg-portable: 7.3.0 + + xdg-portable@7.3.0: + dependencies: + os-paths: 4.4.0 + y18n@5.0.8: {} yargs-parser@21.1.1: {} @@ -3982,4 +4217,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 + zod@4.1.11: {} + zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9f6d2b28..2bd5c384 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,10 +12,13 @@ packages: # would break the theme). catalog: "@types/node": ^25.9.5 + "@types/negotiator": ^0.6.5 + "@vercel/functions": ^3.9.5 "@voidzero-dev/vitepress-theme": ^4.8.4 lucide-vue-next: ^0.577.0 medium-zoom: ^1.1.0 mermaid: ^11.15.0 + negotiator: ^1.1.0 typescript: ^6.0.3 vitepress: 2.0.0-alpha.16 vitepress-plugin-llms: ^1.13.1