mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
83af6b8530
Introduces showcase/shell/src/lib/runtime-config.ts (server-only — imports next/cache and is read at request time by the root layout) plus runtime-config.client.ts (reads window.__SHOWCASE_CONFIG__ injected by the layout). Shell's RuntimeConfig contains baseUrl and posthogHost. getRuntimeConfigEdge() provides the Edge-runtime variant for middleware (skips unstable_noStore). Adds vitest config + dev deps to package.json and red-green tests for both modules. Tests verify env-vs-fallback precedence, trailing-slash stripping, no-module-load-freeze (live process.env reads per call), and the Edge wrapper's noStore-skip behavior. Refs plan-B §B7.
45 lines
1.5 KiB
JSON
45 lines
1.5 KiB
JSON
{
|
|
"name": "@copilotkit/showcase-shell",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "tsx ../scripts/generate-registry.ts && tsx ../scripts/bundle-demo-content.ts && tsx ../scripts/bundle-starter-content.ts && tsx ../scripts/generate-search-index.ts && npx -y concurrently -k -n bundle,next \"tsx ../scripts/bundle-demo-content.ts --watch\" \"next dev\"",
|
|
"build": "tsx ../scripts/generate-registry.ts && tsx ../scripts/bundle-demo-content.ts && tsx ../scripts/bundle-starter-content.ts && tsx ../scripts/generate-search-index.ts && next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@copilotkit/react-core": "latest",
|
|
"@copilotkitnext/agent": "next",
|
|
"@copilotkitnext/react": "next",
|
|
"@copilotkitnext/runtime": "next",
|
|
"gray-matter": "^4.0.3",
|
|
"highlight.js": "^11.11.1",
|
|
"hono": "^4.6.0",
|
|
"next": "^15.5.15",
|
|
"next-mdx-remote": "^5.0.0",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"react-markdown": "^9.0.0",
|
|
"react-syntax-highlighter": "^15.6.0",
|
|
"rehype-highlight": "^7.0.2",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-gfm": "^4.0.0",
|
|
"yaml": "^2.7.0"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4.0.0",
|
|
"@types/node": "^22.0.0",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-syntax-highlighter": "^15.5.0",
|
|
"jsdom": "^29.0.2",
|
|
"postcss": "^8.5.0",
|
|
"tailwindcss": "^4.0.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|