Files
webstudio/packages/project/package.json
Oleg Isonen 392c9089be fix: content mode permissions (#5795)
**Summary**

Fixes content-mode edit permissions so editor-only users can perform
allowed content workflows without backend “build permission” failures.

**Changes**

- Added shared content-mode permission validation used by backend
authorization.
- Aligned content-mode capabilities around editable props, editable
instances, content roots, pages, assets, and template insertion.
- Allowed content-safe instance/text/page/template/style changes while
keeping design/data/resource changes build-only.
- Updated template insertion to preserve content-safe local styles and
reuse tokens by id.
- Added accessible `SyncStatusDot` for e2e-visible sync state without
replacing the existing sync status UI.
- Added builder e2e setup with Postgres/PostgREST and a first
content-mode browser test:
  - edit existing text as an editor-only user
  - wait for saved state via the sync status dot
  - reload and verify persistence

**Verification**

- `pnpm --filter=@webstudio-is/builder test -- sync-status.test.tsx`
- `pnpm --filter=@webstudio-is/builder typecheck`
- `git diff --check`
- `pnpm e2e:builder`
2026-06-09 01:48:23 +02:00

54 lines
1.5 KiB
JSON

{
"name": "@webstudio-is/project",
"version": "0.0.0",
"description": "Webstudio Project",
"author": "Webstudio <github@webstudio.is>",
"homepage": "https://webstudio.is",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
"test": "vitest run"
},
"dependencies": {
"@trpc/server": "^10.45.2",
"@webstudio-is/asset-uploader": "workspace:*",
"@webstudio-is/authorization-token": "workspace:*",
"@webstudio-is/feature-flags": "workspace:*",
"@webstudio-is/plans": "workspace:*",
"@webstudio-is/postgrest": "workspace:*",
"@webstudio-is/project-build": "workspace:*",
"@webstudio-is/project-migrations": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
"@webstudio-is/trpc-interface": "workspace:*",
"immer": "^10.1.1",
"nanoid": "^5.1.5",
"slugify": "^1.6.6",
"type-fest": "^4.37.0",
"zod": "^3.24.2"
},
"devDependencies": {
"@webstudio-is/tsconfig": "workspace:*",
"msw": "^2.13.2",
"vitest": "^3.1.2"
},
"exports": {
".": {
"webstudio": "./src/index.ts"
},
"./index.server": {
"webstudio": "./src/index.server.ts"
},
"./build-patch-core.server": {
"webstudio": "./src/db/build-patch-core.ts",
"import": "./src/db/build-patch-core.ts"
},
"./content-mode-permissions": {
"webstudio": "./src/content-mode-permissions.ts",
"import": "./src/content-mode-permissions.ts"
}
},
"license": "AGPL-3.0-or-later",
"private": true,
"sideEffects": false
}