Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/host-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@executor-js/vite-plugin": "workspace:*",
"@tailwindcss/vite": "catalog:",
"@tanstack/router-plugin": "^1.167.12",
"@tanstack/virtual-file-routes": "^1.162.0",
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
Expand Down
10 changes: 10 additions & 0 deletions apps/host-cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { tanstackRouter } from "@tanstack/router-plugin/vite";
import { rootRoute } from "@tanstack/virtual-file-routes";
import { consoleRoutes } from "@executor-js/react/console-routes";
import executorVitePlugin from "@executor-js/vite-plugin";

// ---------------------------------------------------------------------------
Expand Down Expand Up @@ -51,6 +53,14 @@ export default defineConfig({
autoCodeSplitting: true,
routesDirectory: fileURLToPath(new URL("./web/routes", import.meta.url)),
generatedRouteTree: fileURLToPath(new URL("./web/routeTree.gen.ts", import.meta.url)),
// The route tree is composed, not hand-mirrored: the shared console
// routes come from @executor-js/react (the package whose shell/pages
// link to them); this app only owns its root (the Cloudflare-Access
// shell). To add app-specific routes, create web/routes/app and mount
// it here with `physical("", "app")` — the directory must exist.
virtualRouteConfig: rootRoute("__root.tsx", [
...consoleRoutes({ dir: "../../../../packages/react/src/routes" }),
]),
}),
...react(),
],
Expand Down
248 changes: 136 additions & 112 deletions apps/host-cloudflare/web/routeTree.gen.ts

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions apps/host-cloudflare/web/routes/secrets.tsx

This file was deleted.

46 changes: 41 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/test-servers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@modelcontextprotocol/sdk": "^1.29.0",
"effect": "catalog:",
"graphql-yoga": "^5.17.0",
"zod": "^4.3.6"
"zod": "4.3.6"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250620.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hosts/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@executor-js/sdk": "workspace:*",
"@modelcontextprotocol/sdk": "^1.12.1",
"effect": "catalog:",
"zod": "^4.3.0"
"zod": "4.3.6"
},
"devDependencies": {
"@effect/vitest": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@executor-js/config": "workspace:*",
"@executor-js/sdk": "workspace:*",
"@modelcontextprotocol/sdk": "^1.29.0",
"zod": "^4.3.6"
"zod": "4.3.6"
},
"devDependencies": {
"@effect/atom-react": "catalog:",
Expand Down
11 changes: 10 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"private": true,
"type": "module",
"exports": {
"./console-routes": {
"types": "./src/console-routes.ts",
"bun": "./src/console-routes.ts",
"default": "./dist/console-routes.js"
},
"./api/oauth-popup": "./src/api/oauth-popup.ts",
"./api/*": "./src/api/*.tsx",
"./plugins/*": "./src/plugins/*.tsx",
Expand All @@ -20,7 +25,8 @@
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsgo --noEmit",
"typecheck:slow": "tsc --noEmit"
"typecheck:slow": "tsc --noEmit",
"build": "tsup"
},
"dependencies": {
"@base-ui/react": "^1.3.0",
Expand All @@ -32,6 +38,7 @@
"@shikijs/langs": "^4.0.2",
"@shikijs/themes": "^4.0.2",
"@tanstack/react-router": "catalog:",
"@tanstack/virtual-file-routes": "^1.162.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
Expand All @@ -55,10 +62,12 @@
},
"devDependencies": {
"@effect/vitest": "catalog:",
"@tanstack/router-cli": "^1.167.17",
"@types/node": "catalog:",
"@types/react": "catalog:",
"hast-util-to-jsx-runtime": "^2.3.6",
"tailwindcss": "catalog:",
"tsup": "^8.5.1",
"typescript": "catalog:",
"vite": "catalog:"
}
Expand Down
24 changes: 24 additions & 0 deletions packages/react/src/console-router.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { createRouter } from "@tanstack/react-router";

import { routeTree } from "./routes/routeTree.gen";

// ---------------------------------------------------------------------------
// The canonical console router TYPE. Nothing imports this module — it exists
// so this package's own typecheck registers the console route tree (generated
// from src/routes by `bun run routes:gen`), which makes every `Link to=` /
// `navigate({ to })` in the shared pages and shell typecheck against the
// console route contract instead of being loose strings. A shared component
// linking to a route that isn't part of the shared console set fails HERE, in
// the package that owns the contract, not at runtime in some app.
//
// Apps are unaffected: each app's own router.tsx registers its real router
// (shared console routes + app-specific extras) for its own typecheck graph.
// ---------------------------------------------------------------------------

export const consoleRouter = createRouter({ routeTree });

declare module "@tanstack/react-router" {
interface Register {
readonly router: typeof consoleRouter;
}
}
Loading
Loading