Commit Graph
454 Commits
Author SHA1 Message Date
Oleg Isonen 878d6f1de1 feat: Add asset folders to asset manager and improve asset manager UX (#5892)
Closes https://github.com/webstudio-is/webstudio/issues/5877
Closes https://github.com/webstudio-is/webstudio/issues/4775


- Organize assets into nested folders.
- Navigate folders with breadcrumbs and Back controls.
- Select and manage multiple assets and folders at once.
- Drag, copy, cut, paste, duplicate, move, and delete items.
- Use context menus and familiar keyboard shortcuts for common actions.
- Search and sort assets and folders, with folders grouped first.
- Upload files directly into the active folder.
- Manage folder placement from asset and folder settings.
- Automate asset and folder management through MCP.
2026-07-17 23:39:14 +02:00
Oleg IsonenandClaude Fable 5 071a4d9a85 feat: MCP update 3 (#5864)
## Summary

This update adds new MCP and CLI capabilities for project auditing,
structured data, project-specific agent instructions, focused project
search, safer bulk editing, image descriptions, font discovery, visual
verification, and external registry inspection.

## New Capabilities

### Audit projects

- Run a single `audit` command across accessibility, SEO, security,
assets, styles, and performance.
- Limit an audit to selected scopes, pages, or severity levels.
- Receive stable findings with locations and suggested fixes.
- Run rendered audits across desktop, mobile, and Builder breakpoint
widths.
- Detect horizontal overflow, broken images, oversized images, eager
below-fold images, render-blocking resources, and legacy font formats.
- Identify unused assets, tokens, CSS variables, local styles, and
breakpoints.
- Identify duplicate token declarations.
- Detect accessibility issues involving names, labels, headings,
landmarks, IDs, keyboard focus, ARIA, iframes, and autoplaying media.
- Detect SEO issues involving titles, descriptions, language, social
images, and structured data.
- Detect unsafe new-tab links and write resources exposed during page
rendering.

### Search an entire project

- Search project text, labels, props, resources, assets, and styles
through `search-project`.
- Find relevant records without downloading and reparsing the full
project snapshot.
- Scope searches to the relevant project-data areas.

### Add validated JSON-LD

- Add structured data with a dedicated JSON-LD component.
- Place JSON-LD inside the page Head Slot.
- Edit JSON in a purpose-built code editor.
- Prevent structurally invalid JSON-LD from being saved.
- Validate Schema.org types, properties, and values.
- Find invalid, missing, unknown, deprecated, or incompatible structured
data through the SEO audit.
- Let agents discover the correct JSON-LD workflow without using page
custom metadata or a generic HTML embed.

### Configure project-specific agent instructions

- Add AI-agent instructions from the new **Agents** section in Project
Settings.
- Synchronize those instructions into a managed root `AGENTS.md`.
- Update or remove the managed file automatically during project sync.
- Protect existing user-owned `AGENTS.md` files from being overwritten.
- Share the instructions with authenticated CLI and MCP agents.
- Keep agent instructions out of publicly readable production bundles.

### Generate and manage image descriptions

- Audit image assets for missing descriptions.
- Let a vision-capable agent inspect each image in its rendered context.
- Save generated descriptions to multiple image assets in one operation.
- Mark images as intentionally decorative.
- Reuse the saved asset description wherever the image is used.
- Re-run the audit to verify that missing-description findings are
resolved.

### Perform bounded bulk replacements

- Replace matching literal text across selected pages with
`replace-text`.
- Replace matching fixed prop text with `replace-prop-text`.
- Replace matching resource names or URLs with `replace-resource-text`.
- Restrict replacements by page, instance, prop, resource, field, match
mode, and maximum change count.
- Leave dynamic expressions unchanged.

### Inspect element ancestry

- Return an element’s direct parent in instance listings.
- Request the complete ancestor chain when inspecting an element.
- Understand tree placement without rebuilding the instance hierarchy
from raw project data.

### Discover available fonts

- List uploaded font families through `list-fonts`.
- Discover available system font stacks.
- Inspect font family, style, weight, format, and associated asset
information before applying typography.

### Inspect external component registries

- Inspect a local or remote shadcn-style registry item.
- Read its description, files, dependencies, targets, and documentation.
- Receive an explicit Webstudio compatibility report.
- Inspect registry metadata without installing or executing external
code.

### Capture generated project routes directly

- Run `webstudio screenshot --path /route` against the configured
project.
- Generate a temporary production-style preview automatically.
- Capture the requested route.
- Stop the temporary preview after capture.
- Avoid manually building and starting a preview for a single
screenshot.

### Assert visual changes

- Add expected text to screenshot comparisons.
- Set maximum pixel mismatch limits.
- Set minimum or maximum changed-region counts.
- Assert whether overall brightness or a color channel moved in the
expected direction.
- Use these assertions as pass/fail evidence for visual changes.

### Require compatible CLI versions

- Send the project-bundle contract version with CLI synchronization
requests.
- Stop incompatible CLI versions before they receive incomplete project
data.
- Tell users exactly how to update the CLI or run the latest version
once.
- Prevent older clients from silently dropping project settings.

## Upgrade Note

This branch introduces a new synchronized project-bundle contract. Older
CLI versions must update before synchronizing against the new API.

```sh
npm install -g webstudio@latest
```

Or run the latest version once:

```sh
npx webstudio@latest <command>
```

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 11:27:58 +02:00
Oleg Isonen d291e4b671 feat: Builder api runtime contracts guardrails for MCP (#5857)
This PR expands Webstudio MCP and CLI into a more complete agent
authoring interface. Agents can discover project capabilities, edit real
Webstudio content, use data/resources, verify visual output, and report
useful issues when workflows fail.

## MCP User Capabilities

- Create, update, duplicate, reorder, and delete pages.
- Create pages from templates and manage reusable page templates.
- Inspect project pages, instances, props, styles, assets, variables,
resources, and metadata.
- Insert Webstudio components and authored JSX fragments into pages.
- Edit text, props, styles, breakpoints, design tokens, and CSS
variables.
- Update page metadata, SEO fields, redirects, marketplace metadata, and
project settings.
- Create and use static data variables.
- Create and use dynamic resources fetched over HTTP.
- Use REST, GraphQL, and built-in system resources in authored pages.
- Bind data variables and resources to visible page content.
- Create resource-backed pages such as sitemap XML, structured SEO data,
and API-driven content sections.
- Preview current project state without requiring a publish step.
- Capture screenshots for visual verification.
- Verify responsive designs across desktop, tablet, and mobile
breakpoints.
- Use screenshot diff and OCR-style checks to inspect rendered output.
- Reset and refresh local MCP project state when needed.
- Discover available CLI/MCP commands from generated manuals.
- Use clearer examples for resources, data variables, JSX authoring,
previewing, and visual checks.
- Read marketplace product metadata without requiring a full project
snapshot.
- Get safer guidance when using low-level patch tools.
- Get a ready-to-copy Discord report template when MCP/CLI behavior is
confusing or broken.
2026-07-10 02:13:22 +02:00
Oleg Isonen 1ddf6b02c9 feat: API and CLI for everything (#5838)
Closes #5287
2026-07-01 01:20:50 +02:00
Oleg Isonen 82c3d83fd1 fix: optimize CLI import for large data amount (#5831)
## Summary

- Add CLI project import support from synced `.webstudio/data.json` into
another project via a destination share link.
- Move project bundle import/export contract into
`@webstudio-is/protocol`, including bundle versioning, staged upload
constants, schema validation, and fixture coverage.
- Upload project bundle data through staged TUS upload before calling
the import RPC to avoid request body limits.
- Upload referenced assets as binary files through the existing asset
upload route before importing asset rows.
- Add `--skip-assets` and `--ignore-version-check` import options.
- Add retry handling for transient missing imported asset files by
re-uploading only the reported missing assets.
- Share missing-asset import error formatting/parsing through protocol
to avoid duplicated string contracts.
- Preserve browser asset upload behavior while adding API upload
support.
- Normalize schema naming across the branch to lower-case names without
`Schema` suffix.
2026-06-23 18:50:01 +02:00
Oleg Isonen 7046cdcee9 fix: Product async checkout (#5747) 2026-05-02 12:21:24 +02:00
Oleg Isonen d8157f3cb6 chore: seats management (#5707) 2026-04-19 12:35:47 +02:00
Oleg Isonen 4748fa5f1e fix: restore short --variable label in CSS value input (#5694)
## Problem

Commit cc20991b accidentally changed `itemToString` for `var` type
values to use `toValue(item)`, which produces `var(--variable,
fallback)` instead of the intended short `--variable` label.

This meant the CSS value input (when unfocused, and in the autocomplete
dropdown) showed the full `var(--variable, fallback)` string, which is
too long for small inputs and not how it previously displayed.

## Fix

- Restored `itemToString` to return `--${item.value}` for var types
(short label)
- Updated the `onFocus` handler to explicitly call `toValue(value)` for
var types, so the full `var(--variable, fallback)` is shown when the
user focuses the input to edit it
2026-04-13 20:07:14 +02:00
Oleg Isonen b8a194c011 feat: Workspaces (#5641) 2026-04-08 21:58:20 +02:00
Oleg Isonen 1412d868ba chore: make migrations idempotent (#5476)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-12-04 12:28:57 +01:00
Oleg Isonen 2f393f5efe fix: Fix more sql tests (#5474)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-12-03 22:38:40 +01:00
Oleg Isonen b7356e0c37 feat: List view and sorting of projects in dashboard (#5467)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-12-03 21:14:07 +01:00
Bogdan ChadkinandOleg Isonen 801181c8b6 feat: add project tags in dashboard (#5399)
Ref https://github.com/webstudio-is/webstudio/issues/860





https://github.com/user-attachments/assets/a85b525a-d43b-4361-aa5f-f2158b3c0211

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-11-07 11:33:05 +01:00
Bogdan Chadkin 76c436ca1e feat: allow changing asset name (#5367)
Ref https://github.com/webstudio-is/webstudio/issues/3262
https://github.com/webstudio-is/webstudio/issues/3272

This solves a couple of issues.

1. Gives a user ability to change name of uploaded asset.
2. strips internal suffix from filenames in UI

<img width="626" height="541" alt="magic_1"
src="https://github.com/user-attachments/assets/f9c91ac8-cc67-4905-9e86-bf0cbbeae14a"
/>
2025-08-10 20:19:15 +02:00
Bogdan ChadkinandOleg Isonen 5632a40940 feat: allow restore from published backup (#5320)
Ref https://github.com/webstudio-is/webstudio/issues/5276

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-07-11 19:05:31 +02:00
Bogdan Chadkin 395a6b9e72 refactor: move embed template into ai (#5148)
To not bloat cli and remove embed template together with legacy ai
eventually.
2025-04-21 12:47:51 +07:00
Bogdan Chadkin 5b3144d656 refactor: bump zod (#5035)
All three have minor feature updates

- zod
- zod-validation-error
- zod-to-json-schema
2025-03-25 00:17:05 +07:00
Bogdan Chadkin 5c3a6e5fcd refactor: restrict publish count per account (#5030) 2025-03-22 19:29:22 +07:00
Bogdan Chadkin 4f026a0acf refactor: bump CLI dependencies (#4728)
All minor

- https://github.com/bombshell-dev/clack/releases - configurable key
bindings
- https://github.com/sindresorhus/p-limit/releases/tag/v5.0.0 - node
bump
- https://github.com/sindresorhus/p-limit/releases/tag/v6.0.0 - better
scheduling
- https://github.com/inikulin/parse5/releases/tag/v7.2.0 - search
element support
- https://github.com/ai/nanoid/releases/tag/5.0.9 - security fix
- https://github.com/alexeyraspopov/picocolors/releases/tag/v1.1.1 -
bundlers support
2025-01-07 16:32:42 +07:00
Bogdan Chadkin 425788f545 build: upgrade dev dependencies (#4658)
- storybook
- eslint
- types/node
- type-fest
- esbuild
2024-12-27 02:11:48 +07:00
Ivan Starkov c265185c5a feat: Add "can publish" to content editors (#4530)
## Description

ref #3994

<img width="409" alt="image"
src="https://github.com/user-attachments/assets/fb00f25b-cf29-4374-8d7d-39fcec26eb9c">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-12-07 12:52:41 +03:00
Bogdan Chadkin 260c903045 build: bump typescript (#4471)
Upgraded typescript to 5.7, removed it from packages to reuse from root
instead and fixed a couple of changes.
2024-11-26 11:59:07 +07:00
Bogdan Chadkin 6123a8ca74 build: upgrade devtools (#4455)
- storybook
- vitest
- eslint
- typefest
- types/node
- vike
- tsx
- pnpm
2024-11-21 21:06:22 +07:00
Bogdan Chadkin d1a8fddb02 build: bring back nanoid to prisma (#4426)
Nanoid was used in very old migrations. Forgot we need to run them all
when setup new db.

Also bumped nanoid version to the latest.
2024-11-15 23:11:54 +07:00
Bogdan Chadkin 898728150f refactor: replace execa with tinyexec (#4400)
No dependencies, windows support, not trying to recreate shell.
2024-11-11 16:20:00 +04:00
Bogdan Chadkin d61945402c build: upgrade to typescript 5.6 (#4345)
Only some apis added to types.
2024-10-28 12:17:43 +03:00
Bogdan Chadkin f48bfa4542 build: drop prisma build (#4346)
This shaves a few seconds from all GitHub actions
2024-10-26 19:09:13 +03:00
Ivan Starkov 6ba6fc5ce8 feat: Preview by publishing to subdomain only aka staging (#4143)
## Description

closes #2644

- [x] - Merge this https://github.com/webstudio-is/webstudio/pull/4156
into this PR

- If the user has no custom domains:
  - [x] Checkbox for Pro users is not shown.
  - [x] Checkbox for Free users is shown but disabled (Tooltip enabled).

- If the user has custom domains:
  - No Pro:
    - [x] Checkboxes are shown disabled with Tooltips.
  - Pro:
    - Users can select any checkbox (no Tooltips).

- Current indexing logic:
- If a user has custom domain(s), upon publishing, the `*.wstd.io`
domain will receive the meta tag:
    ```html
    <meta name="robots" content="noindex, nofollow">
    ```

- [x] - Fix example.com in tests (NEXT PR #4156) 
- [ ] - saas cleanup should be changed (we need to preserve latest build
by domain now) (NEXT PR)
- [x] - Disable Publish Button if no checkboxes are selected

- "With the Pro, you’ll gain the ability to publish to each domain
independently!"
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/105577e5-318f-4146-a3eb-38c2117f6f79">

## Steps for reproduction

### Non Pro

- Login as a new non Pro User `pass:vaska@pupkin.ru`
- Create a new Project, Click Publish. Expect Disabled Checkbox with
Tolltip is visible. Publish is Enabled.
<img width="445" alt="image"
src="https://github.com/user-attachments/assets/e48654af-1969-4f96-b048-a3fa72303b8f">
- Publish, check it published.
- Add custom domain, Publish, check both are published.

### Pro

- Login as a Pro User `pass`
- Open new Project. Expect No checkbox. One wstd domain.
<img width="351" alt="image"
src="https://github.com/user-attachments/assets/c62f9ae5-669a-46ad-a2f2-32ba333068f9">
- Publish. Expect it published.
- Add domain. See checkboxes visible after domain activated.
- Publish. Expect both published.
- Uncheck checkboxes, see publish button disabled. See it has tooltip.



## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-09-25 10:24:23 +03:00
Bogdan Chadkin 6e424c9a3f build: upgrade to storybook 8.3 (#4154)
The new version significantly reduced install size and got rid from a
lot of dependencies including codemod stuff.

See https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md#830
2024-09-24 11:41:14 +02:00
Ivan Starkov 3434322cb0 chore: new Domain publish prepare steps (#4125)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-09-19 09:50:29 +03:00
Oleg Isonen 58c15dea36 chore: always use error, not e (#4016)
## Description

This has always been our convention, I have a feeling our linter used to
check this. Now its also important so that AI doesn't give you wrong
suggestions.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-27 18:13:20 +02:00
Oleg Isonen 60f1781139 chore: make Schema suffix consistent (#4002)
## Description

we decided to stick for now with zod schema naming without suffix. This
makes it consistent.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-23 14:22:16 +02:00
Ivan Starkov 46fc5d8f8c chore: Add timezone (#3913)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-10 01:21:18 +03:00
Oleg Isonen ee7987e134 fix: free up the wstd subdomain after project was deleted (#3869)
## Description

Closes https://github.com/webstudio-is/webstudio/issues/3861

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-07 14:17:48 +02:00
Bogdan Chadkin 097d2922c3 build: remove unused eslint suppressions (#3876)
Looks like we forgot to enable the flag
2024-08-04 23:37:59 +02:00
Bogdan Chadkin fa2acd0cd6 refactor: fix create production build migration (#3847)
Fixed only in local db and forgot to backport this to migration.
2024-08-01 16:48:06 +02:00
Bogdan Chadkin f1fef772bf refactor: create production build with sql function (#3843)
Moved sql for cloning build with production deployment into sql
function. Now all clone build logic is removed from codebase.
2024-08-01 10:27:00 +02:00
Bogdan Chadkin c9815875b9 fix: clone projects with preview images properly (#3825)
Fixes https://github.com/webstudio-is/webstudio/issues/3823

This fixes the issue with preview images set before assets are copied to
the new project.
2024-07-30 13:28:59 +02:00
Ivan Starkov 52c9de70ee fix: Prisma generation (#3820)
## Description

`cp` is a hell command
it works differently depending on does destination folder exists

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-30 09:37:23 +03:00
Ivan Starkov 8be665e68d experimental: SSG download support (#3783)
## Description

See corresponding [SaaS
PR](https://github.com/webstudio-is/webstudio-saas/pull/311) too

## Steps for reproduction

Click Publish/Export

<img width="363" alt="image"
src="https://github.com/user-attachments/assets/fbc1f4e5-3a2c-4bb9-9242-025196f991bc">


Deploy zip to netlify
<img width="1710" alt="image"
src="https://github.com/user-attachments/assets/daca4ead-6272-4729-8e82-0986301e5c8b">


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-30 08:57:33 +03:00
Bogdan Chadkin 6c4b5f5e0e refactor: move project cloning into sql function (#3790)
Our project cloning does a lot of roundtrips to database and got
fragmented across 3 packages. The logic is too complicated to represent
with postgrest.

Here written single sql function which is invoked safely with postgrest
rpc.
2024-07-26 12:33:06 +02:00
Ivan Starkov 2114168044 chore: Improve prisma and api debugability (#3784)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-24 20:19:39 +03:00
Bogdan Chadkin a58f2eff04 build: run all tests and typechecks in CI (#3661)
Here improved our checks. No longet rely on "checks" script but run
"test" and "typescript" scripts from each package in monorepo.

Would also make each package less boilerplaty.
2024-07-02 18:21:05 +03:00
Ivan Starkov 4d0574d573 build: Update typescript (#3637)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-28 11:46:13 +03:00
Bogdan Chadkin 9998f1633f build: replace dotenv with node env loader (#3500)
Refs
- https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath
-
https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs

Here switched from dotenv to node env loader.
Solves both command line and runtime cases.
The only issue is inability to specify --env-file with NODE_OPTIONS.

Also fixed dev migrations by optionally loading .env.development
2024-06-05 18:26:35 +03:00
Bogdan Chadkin df192e1c44 build: bump tsx and relax esbuild (#3489)
Upgraded both tsx and esbuild to the latest version and removed override
for esbuild. As a result we have 5 duplicates of esbuild but they will
go away with time.
2024-06-04 15:00:08 +03:00
Ivan Starkov 2e235bf215 fix: Permission error when opening marketplace projects (marketplace projects need to add any view permission link) (#3460)
## Description

- [x] - Todo cursor and other styles issues

ref #3446

We now display the marketplace project link only if it has a shared link
with view permission. If there is no shared link, we show disabled
buttons with a tooltip.

<img width="564" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f1d98c9b-22a5-4706-b9f5-e2749c07f6e7">

<img width="732" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/02848dc7-ef99-4a4a-91a6-9e6d2d41ed7f">


## Steps for reproduction

Open marketplace, see one has link the other is not

<img width="300" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/90b2f352-305b-415a-86c5-056280e17000">

Check that link is working in incognito


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-06-01 09:34:24 +03:00
Bogdan Chadkin 0883212cdb refactor: drop --force flag from migrations (#3447) 2024-05-29 23:39:14 +03:00
Ivan Starkov 2e236917a7 build: Add devcontainer (#3429)
## Description

Allow development in devcontainers, simplifies initial setup

Open project in vscode (and accept open in devcontainer) or in
codespaces, wait setup to complete

run
```
pnpm dev
```

<img width="436" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f03fdc99-5c46-4de5-be9c-2bb9420afc99">





## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-05-28 14:15:55 +03:00
Bogdan Chadkin fc47db5f80 build: upgrade to prettier 3.2.5 (#3394)
- https://prettier.io/blog/2023/11/13/3.1.0
- https://prettier.io/blog/2024/01/12/3.2.0
2024-05-22 14:55:55 +03:00