mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-26 13:07:33 +09:00
Fixes #6440 ## Description Static exports currently omit Text pages such as `/robots.txt`, `/ads.txt`, and `/.well-known/security.txt`. This generates their routes, evaluates content through the existing page-data loader, and uses Vike's native `pageContext.content` to write the exact text at the configured file path. Internal route directories are separate from public URLs so dot-prefixed paths work. No generated writer script, text-page manifest, HTML wrapper, or post-build file rewrite is needed. ## Dependencies - Pin Vike to `0.4.267-commit-feffb0f`: native non-HTML output is published in this commit prerelease but is not yet in stable `0.4.267`. - Use Vite `7.1.12` and the compatible React plugin for SSG. Build through `vike build && vike prerender` so Vike uses its matching Vite dependency. - Update React Router's `vite-node` dependency to `3.2.4` for compatibility with the CLI's Vite 7 test environment. ## Validation - All 1,173 CLI tests pass locally across 72 files, including all 79 prebuild tests for normal HTML, dynamic SSG routes, and React Router builds. - Text export coverage checks exact output for `/robots.txt`, resource-backed `/.well-known/security.txt`, empty text, Unicode, and HTML-like content. - CLI and SSG fixture type checks, lint, and formatting pass locally. - SSG fixtures regenerated; the packaged SSG test passes locally. - All executed GitHub CI checks pass at `201fa971616bb607ca35ee24a970f107eddee754`, including all six browser shards. Shard 4 passed on retry after an MDX template rename timeout. Visual regression is skipped and preview deployment remains gated. - Corrected the existing animation navigation test for fork CI: wait for the rendered component with the public fallback and retain the animation initialization assertion when the private module is present. ## Manual verification 1. Export a static project with Text pages at `/robots.txt` and `/.well-known/security.txt`. 2. Run the generated project's build. 3. Confirm both files under `dist/client` contain exactly the configured text, including resource expressions. 4. Confirm normal pages still render HTML. - [ ] Original author tested the updated export and confirmed it works. - [ ] Preview tested (deployment approval remains gated). --------- Co-authored-by: Sviat Barbutsa <9897782+sviat-barbutsa@users.noreply.github.com> Co-authored-by: Oleg Isonen <oleg008@gmail.com>
137 lines
4.9 KiB
JSON
137 lines
4.9 KiB
JSON
{
|
|
"name": "webstudio",
|
|
"version": "0.0.0-webstudio-version",
|
|
"description": "Webstudio CLI",
|
|
"author": "Webstudio <github@webstudio.is>",
|
|
"homepage": "https://webstudio.is",
|
|
"type": "module",
|
|
"bin": {
|
|
"webstudio-cli": "./bin.js",
|
|
"webstudio": "./bin.js"
|
|
},
|
|
"exports": {
|
|
"./vision": {
|
|
"webstudio": "./src/vision.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"lib/*",
|
|
"templates/*",
|
|
"bin.js",
|
|
"!*.{test,stories}.*"
|
|
],
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"generate-docs": "tsx scripts/generate-docs.ts && oxfmt src/docs.generated.ts",
|
|
"build:content-runtime": "esbuild @webstudio-is/content-engine/runtime --bundle --format=esm --platform=browser --target=es2022 --conditions=webstudio,worker --minify --outfile=lib/content-runtime.js",
|
|
"fixtures:build": "pnpm build:content-runtime",
|
|
"build": "pnpm generate-docs && rm -rf lib && vite build && pnpm build:content-runtime",
|
|
"pretest": "mkdir -p lib && pnpm build:content-runtime",
|
|
"evaluations": "tsx --import ../../scripts/register-react-global.ts --conditions=webstudio evaluations/high-impact/run-local-agent.ts",
|
|
"test": "vitest run",
|
|
"test:ssg-package": "tsx --conditions=webstudio scripts/test-ssg-package.ts",
|
|
"check:published-cli-contract": "tsx --conditions=webstudio scripts/builder-contract-gate.ts",
|
|
"test:release-smoke": "pnpm build && tsx --conditions=webstudio scripts/release-smoke.ts",
|
|
"test:release-smoke:model": "WEBSTUDIO_RELEASE_SMOKE_MODEL_EVAL_REQUIRED=1 pnpm test:release-smoke",
|
|
"test:release-smoke:registry": "tsx --conditions=webstudio scripts/release-smoke.ts"
|
|
},
|
|
"license": "AGPL-3.0-or-later",
|
|
"engines": {
|
|
"node": ">=22.12.0"
|
|
},
|
|
"dependencies": {
|
|
"@clack/prompts": "^0.10.0",
|
|
"@emotion/hash": "^0.9.2",
|
|
"@trpc/client": "^10.45.2",
|
|
"@webstudio-is/http-client": "workspace:*",
|
|
"@webstudio-is/project-migrations": "workspace:*",
|
|
"@webstudio-is/protocol": "workspace:*",
|
|
"@webstudio-is/sync-client": "workspace:*",
|
|
"acorn": "^8.14.1",
|
|
"acorn-jsx": "^5.3.2",
|
|
"acorn-walk": "^8.3.4",
|
|
"change-case": "^5.4.4",
|
|
"chrome-launcher": "^1.2.1",
|
|
"deepmerge": "^4.3.1",
|
|
"decode-named-character-reference": "^1.0.2",
|
|
"detect-port": "^2.1.0",
|
|
"env-paths": "^3.0.0",
|
|
"esbuild": "^0.25.3",
|
|
"execa": "^10.0.1",
|
|
"fast-deep-equal": "^3.1.3",
|
|
"immer": "^10.1.1",
|
|
"p-limit": "^6.2.0",
|
|
"parse5": "7.3.0",
|
|
"path-key": "^4.0.0",
|
|
"picocolors": "^1.1.1",
|
|
"reserved-identifiers": "^1.0.0",
|
|
"semver": "7.7.1",
|
|
"tinyexec": "^0.3.2",
|
|
"tus-js-client": "^4.3.1",
|
|
"warn-once": "^0.1.1",
|
|
"which": "^5.0.0",
|
|
"yargs": "^17.7.2",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/vite-plugin": "^1.1.0",
|
|
"@netlify/vite-plugin-react-router": "^1.0.1",
|
|
"@react-router/dev": "^7.5.3",
|
|
"@react-router/fs-routes": "^7.5.3",
|
|
"@react-router/node": "^7.5.3",
|
|
"@react-router/serve": "^7.5.3",
|
|
"@remix-run/cloudflare": "^2.16.5",
|
|
"@remix-run/cloudflare-pages": "^2.16.5",
|
|
"@remix-run/dev": "^2.16.5",
|
|
"@remix-run/node": "^2.16.5",
|
|
"@remix-run/react": "^2.16.5",
|
|
"@remix-run/server-runtime": "^2.16.5",
|
|
"@shikijs/langs": "4.4.1",
|
|
"@shikijs/themes": "4.4.1",
|
|
"@types/mdast": "^4.0.4",
|
|
"@types/react": "^18.2.70",
|
|
"@types/react-dom": "^18.2.25",
|
|
"@types/semver": "^7.7.0",
|
|
"@types/which": "^3.0.4",
|
|
"@types/yargs": "^17.0.33",
|
|
"@vercel/react-router": "^1.1.0",
|
|
"@vitejs/plugin-react": "^4.7.0",
|
|
"@webstudio-is/css-engine": "workspace:*",
|
|
"@webstudio-is/content-engine": "workspace:*",
|
|
"@webstudio-is/expression": "workspace:*",
|
|
"@webstudio-is/fonts": "workspace:*",
|
|
"@webstudio-is/image": "workspace:*",
|
|
"@webstudio-is/project-build": "workspace:*",
|
|
"@webstudio-is/query-builder": "workspace:*",
|
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
"@webstudio-is/sdk": "workspace:*",
|
|
"@webstudio-is/sdk-components-animation": "workspace:*",
|
|
"@webstudio-is/sdk-components-react": "workspace:*",
|
|
"@webstudio-is/sdk-components-react-radix": "workspace:*",
|
|
"@webstudio-is/sdk-components-react-remix": "workspace:*",
|
|
"@webstudio-is/sdk-components-react-router": "workspace:*",
|
|
"@webstudio-is/sdk-components-registry": "workspace:*",
|
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
"@webstudio-is/vision": "workspace:*",
|
|
"@webstudio-is/wsauth": "workspace:*",
|
|
"h3": "^1.15.1",
|
|
"ipx": "^3.0.3",
|
|
"isbot": "^5.1.25",
|
|
"mdast-util-directive": "^3.1.0",
|
|
"mdast-util-from-markdown": "^2.0.3",
|
|
"mdast-util-to-string": "^4.0.0",
|
|
"micromark-extension-directive": "^4.0.0",
|
|
"oxfmt": "0.58.0",
|
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
"react-router": "^7.5.3",
|
|
"shiki": "4.4.1",
|
|
"ts-expect": "^1.3.0",
|
|
"typescript": "7.0.2",
|
|
"vike": "0.4.267-commit-feffb0f",
|
|
"vite": "7.1.12",
|
|
"vitest": "^3.1.2",
|
|
"wrangler": "4.130.0"
|
|
}
|
|
}
|