Files
webstudio/packages/cli/package.json
Oleg Isonen 16fa5ab0e3 feat: Basic authentication (#5779)
Closes https://github.com/webstudio-is/webstudio/issues/3991


Adds HTTP Basic Authentication support for published pages and
project-level `.wsauth` rules.

This introduces a new `@webstudio-is/wsauth` package that owns the
generic authentication format logic: parsing, validation, serialization,
route matching, resource generation, and request authentication. The
current supported method is `basic`, with the package structured so
additional auth methods can be added later.

Builder changes include:
- Page Settings now has an `Authentication` section for per-page Basic
Auth credentials.
- Project Settings now has an `Authentication` section for editing
`.wsauth` route rules.
- Page Settings was split into section-specific files with focused
tests.
- Auth UI shows Pro badges/info tooltips but remains editable.
- Publishing to custom domains is blocked on plans without `allowAuth`
when either page auth or project auth is configured.
- ProBadge now renders as a real pricing link and uses improved text
alignment.

Build/publish changes include:
- CLI prebuild generates and merges `.wsauth` entries.
- Published app templates enforce auth for HTML/XML routes.
- Generated auth resources are shared between build output and runtime.
2026-05-27 18:42:08 +02:00

96 lines
2.8 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"
},
"imports": {
"#cli": {
"webstudio": "./src/cli.ts",
"default": "./lib/cli.js"
}
},
"files": [
"lib/*",
"templates/*",
"bin.js",
"!*.{test,stories}.*"
],
"scripts": {
"typecheck": "tsgo --noEmit",
"build": "rm -rf lib && vite build",
"test": "vitest run"
},
"license": "AGPL-3.0-or-later",
"engines": {
"node": ">=22"
},
"dependencies": {
"@clack/prompts": "^0.10.0",
"@emotion/hash": "^0.9.2",
"@trpc/client": "^10.45.2",
"@webstudio-is/project-migrations": "workspace:*",
"@webstudio-is/trpc-interface": "workspace:*",
"acorn": "^8.14.1",
"acorn-walk": "^8.3.4",
"change-case": "^5.4.4",
"deepmerge": "^4.3.1",
"env-paths": "^3.0.0",
"nanoid": "^5.1.5",
"p-limit": "^6.2.0",
"parse5": "7.3.0",
"picocolors": "^1.1.1",
"reserved-identifiers": "^1.0.0",
"tinyexec": "^0.3.2",
"warn-once": "^0.1.1",
"yargs": "^17.7.2",
"zod": "^3.24.2"
},
"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",
"@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",
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.25",
"@types/yargs": "^17.0.33",
"@vercel/react-router": "^1.1.0",
"@vitejs/plugin-react": "^4.4.1",
"@webstudio-is/css-engine": "workspace:*",
"@webstudio-is/http-client": "workspace:*",
"@webstudio-is/image": "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/tsconfig": "workspace:*",
"@webstudio-is/wsauth": "workspace:*",
"h3": "^1.15.1",
"ipx": "^3.0.3",
"isbot": "^5.1.25",
"prettier": "3.5.3",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.5.3",
"ts-expect": "^1.3.0",
"vike": "^0.4.229",
"vite": "^6.3.4",
"vitest": "^3.1.2",
"wrangler": "^3.63.2"
}
}