Commit Graph
5224 Commits
Author SHA1 Message Date
Bogdan Chadkin fd19a3fac2 feat: switch CLI to jsx component generator (#2330)
Now CLI can produce more or less readable jsx components instead of data
and blackbox renderer.

Some generated code is no longer used and removed.
2023-09-21 17:35:54 +04:00
Ivan Starkov 5518303c74 fix: Resolve inconsistencies between database and session (#2350)
## Description

This PR addresses an issue where inconsistencies between the database
and session were causing crashes on every page of the application.

## 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
2023-09-21 15:05:12 +03:00
Bogdan Chadkin ada5d24193 perf: generate only preset styles used in the project (#2333)
Fix https://github.com/webstudio-is/webstudio/issues/2256

Here filtered out unused meta for css generation
so we get smaller .css files in production.
2023-09-21 14:58:50 +04:00
Ivan Starkov c293e1bcb1 feat: Use pgbouncer for prisma client (#2176)
## Description

Add pgbouncer
- [x] - Checked that on supabase connections goes through pgbouncer

closes https://github.com/webstudio-is/webstudio-builder/issues/1878

Tested using following k6
```js
import encoding from 'k6/encoding'
import http from 'k6/http'
import { check } from 'k6'

export const options = {
  vus: 100,
  duration: '20s',
}

export default function () {
  const res = http.get("https://webstudio-builder-git-bgbouncer-webstudio-is.vercel.app/builder/cddc1d44-af37-4cb6-a430-d300cf6f932d?authToken=1cdc6026-dd5b-4624-b89b-9bd45e9bcc3d&mode=preview", {
  "headers": {
    "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "en-US,en;q=0.9",
    "cache-control": "max-age=0",
    "sec-ch-prefers-color-scheme": "dark",
    "sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "sec-fetch-dest": "document",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1"
  },
});

  // Verify response (checking the echoed data from the httpbin.org basic auth test API endpoint)
  check(res, {
    'status is 200': (r) => r.status === 200,
    'has data': (r) => r.body.includes("rootInstanceId"),    
  })
}
```

Increased pg_bouncer max_client_conn from 100 to 400 based on results


## 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-builder/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
2023-09-21 13:40:05 +03:00
Ivan Starkov dfab713c2a fix: Metadata lost on published sites (#2349)
## Description

v2 remix meta has changed behaviour from object to array.

## Steps for reproduction

See fixtures

## 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
2023-09-21 13:39:35 +03:00
Bogdan Chadkin fb5414f93d build: use webstudio export condition for tools (#2347)
This fixes the issue with eventsource-parser package having source
export condition with different setup.

Now everywhere "webstudio" is used to reference our sources.
2023-09-20 22:14:34 +04:00
Ivan Starkov 03b03ecd26 fix: Allow client-only embeds to avoid hydration errors (#2348)
## Description

Some scripts cause hydration errors on execution and must be executed
only after hydration
https://discord.com/channels/955905230107738152/1136275535572516986

After release this
https://apps.webstudio.is/builder/12c30bde-73af-40f0-8fcf-bc3581f06fac?authToken=6c442116-66ce-4a45-8471-db1e9a667069&mode=preview
should work well after publish


## 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
2023-09-20 20:22:35 +03:00
Ivan Starkov 4ff194d8b3 style: Change label at delete project dialog (#2342)
## Description

closes #2335


## 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
2023-09-20 19:30:26 +03:00
Bogdan Chadkin 853dff3a5e fix: fix props meta generation (#2344)
- fixed incorrect jsdoc parsing in accordion collapsible
- fixed form default props by inlining destructuring
2023-09-20 18:41:57 +04:00
Ivan Starkov 1e8866f80d fix: Project not opening on outdated browsers (#2343)
## Description

closes #2239

:has selector was used for optimisation purposes only 

No we leave optimisation only if selector is supported, and use body
element if not.

## 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
2023-09-20 17:34:09 +03:00
Bogdan Chadkin 2fab05137f fix: prevent error when insert components (#2345)
This fixes the issue with computing data sources logic.
insertTemplateData first calls propsStore.set and then
dataSourceStore.set which triggers computing 2 times and first time prop
refers to not existing data source.

Here fixed by setting data sources first and then props.
2023-09-20 18:27:34 +04:00
Ivan Starkov 3fa4afa269 ci: Semantic pull request titles (#2339)
## Description


![image](https://github.com/webstudio-is/webstudio/assets/5077042/153ccdcf-d459-49f0-b880-4f85ea23b030)

## Steps for reproduction

Change title of this PR to be non semantic see comment.

## 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
doff
2023-09-19 18:25:06 +03:00
Ivan Starkov fffc332076 [Misc] Npm Libraries Update 0.100.0 (#2338)
## Description

Npm Libraries Update 0.100.0

## 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
0.100.0
2023-09-19 15:14:10 +03:00
Ivan Starkov c3e3db09a6 [Refactor] Replace Node eval Hack with Dynamic Import (#2337)
## Description

Use dynamic import instead of `node --eval`
`pathToFileURL` is used in import to support windows

## 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
2023-09-19 14:49:14 +03:00
Oleg Isonen 20572ead86 Preview on canvas when style panel select value is highlighted (#2328)
https://github.com/webstudio-is/webstudio/issues/2324



https://github.com/webstudio-is/webstudio/assets/52824/7489689f-92bb-4cd5-888b-748bcae2369c



## Description

With this PR all select controls get a preivew when user hovers with the
mouse or uses arrow keys.
We use select control in:
- position
- blend mode
- font-weight
- background size
- many others

In many cases preview won't be visible because cursor doesn't change
unless you actually have mouse over that element

## Steps for reproduction

1. hover over position value
2. when mouse out preview should be gone
3. arrow keys do the same
4. if value wasn't applied and select box closed - preview should reset

## Code Review

- [ ] hi @TrySound , 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
2023-09-18 21:36:36 +02:00
Ivan Starkov e558a3b481 [Test] Add CI CLI Tests for Windows, Linux, and macOS (#2332)
## Description

The idea is to execute link, sync, build in the existing fixture on
linux, mac, windows and then check with
`git diff` about any changes. If changes exists then something has
broken.

## 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
2023-09-18 17:46:01 +03:00
Ivan Starkov 262328694d Fix Dashboard Failure Due to Tooltip (#2331)
## Description

Now works

<img width="524" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7e5acfb3-3f3d-497f-86ee-b86a5aa47af0">

## 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
2023-09-18 14:55:49 +03:00
Ivan Starkov b538b74ef2 Enable CLI Usage in CI Environment (#2321)
## Description

- Allow overriding default templates with custom external or internal
ones.
- Ensure exact dependencies, e.g., workspace:* instead of workspace:^,
to address beta release issues.
- Enable passing buildId, authToken, and origin via flags during sync.
- Rename "host" to "origin" in the CLI.

Most code is custom template.

- [x] - Tested at SaaS

## 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
2023-09-18 14:54:14 +03:00
Bogdan Chadkin c62b1a2b20 Add form fixture (#2329)
Forms have special behavior so here added fixture to test what is
generated for them.

Found default forms would fail on submit.
2023-09-18 11:45:25 +04:00
Bogdan Chadkin 2b52c53cbf Generate stories with new jsx component generator (#2322)
Here added "sdk-cli" package with "generate-stories" command which looks
for metas and generate stories from each one with template. This give us
more insight how component would look like on published sites.

Also removed old stories and added custom id support into embed template
to make stories ids stable.

Can be tested in local storybook
2023-09-17 17:59:54 +04:00
Bogdan Chadkin 72c6b286ac Fix remix watcher (#2327)
Need to use slightly different glob for watching packages. `**` means
anything between slashes and `**.js` in the end looks like `**/.js`
2023-09-17 16:50:17 +04:00
Oleg Isonen 622b77b9b4 Fix font item cursor (#2326)
## Description

Currently it was showing text cursor in font manager font item

## Steps for reproduction

1. open font manager
2. hover font item
3. cursor should be default, not text

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## 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
2023-09-17 12:23:12 +02:00
GoharAkramandBogdan Chadkin 84df46f465 Update README.md (#2320)
Changes that I made:
1. Updated "workspace project" to "Cloud"
2. Edited for typos
3. Added vercel main link
4. Added line in second last section saying that we will have more
deployment targets in future.

## 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.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2023-09-17 14:28:43 +05:00
Bogdan Chadkin 1c7df48925 Pregenerate forms properties (#2323)
Here decoupled actions from props data in runtime by generating prepared
forms data. It will let us get rid of props after migrating to jsx
generator.
2023-09-17 12:15:56 +04:00
markxtang 49f8358bae Update figma-design-tokens.json (#2272)
Added color tokens for "link" and "link-visited"

## 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.example`
and the `builder/env-check.js` if mandatory
2023-09-16 17:43:30 +02:00
Bogdan Chadkin 706a590c2b Use new data sources in jsx component generator (#2318)
Here reused new data sources generator to produce
hurman readable page components and leverage builtin React.useState
instead of nanostores.
2023-09-16 14:31:13 +04:00
Bogdan Chadkin 75f72eeccf Drop legacy data sources from builder (#2319)
Here removed all left usages of previous data sources implementation and
removed no longer used expression utilities.
2023-09-16 14:17:10 +04:00
Bogdan Chadkin 8f00d5af2e Generate human readable data sources and actions (#2312)
Scope utility give us a way to generate more readable data sources and
actions. Here variables, expressions and actions are output into the
same map.

In the future same utility can be used to produce framework specific
stores like React.useState.

See fixtures for example.
2023-09-14 20:13:36 +04:00
Ivan Starkov 98c2226a8e Use eval to parse shared consts during prebuild, add windows support (#2315)
## Description

Read constants.mjs during prebuild step and use that constants. (need
for saas and other templates)

Fixes windows version of cli. Now everything works on windows platform
too.
Changes:
using `execa` instead of `exec`
using `import { fileURLToPath } from "node:url";` instead of
url.pathname
do not using `join` for import generation


<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/761cd741-d609-48ef-a54a-027fe3f0d49f">
<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/52c9f2d7-4389-4bb6-8fa7-5329a4b6d9c8">
<img width="972" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/cb5d2c1d-34d9-412d-942e-c78276c9dd6c">


## 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
2023-09-14 10:15:57 +03:00
Bogdan Chadkin f15ea30ae1 Add jsx component generator (#2291)
Here added jsx component generator. It allows us to have less tree
traversing and more clear output for debugging.

For now data sources are managed the old way with stores. In the future
we can switch to react `useState`.

In the future will be integrated into stories generator and cli
2023-09-14 00:02:58 +04:00
Bogdan Chadkin 0784f0465d Replace sharp with image-size (#2303)
Sharp is image processing library. Though we use it only to detect
format and size of images. Proocessing is done on build step or on
request by vercel or cloudflare.

Here I replaced sharp with smaller and simpler alternative designed
specifically for format and size detection. Potentially this library can
be used for uploading in worker.

https://github.com/image-size/image-size

```diff
du -ckd1 node_modules
- 680068
+ 659988
Packages
- 1983
+ 1962
```
2023-09-13 19:09:11 +04:00
Ivan Starkov 7343a7fc57 Remove templates and build:templates (#2308)
## Description

Merge after release

## 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
2023-09-13 17:29:37 +03:00
Ivan Starkov 015bc46732 Add beta publish (#2311)
## Description

Publish npm to `xxx` tag every time you add Label `publish:xxx` to your
PR
To republish remove label and add again.


<img width="387" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/45defb60-b710-4966-a171-7f5389cdea50">

If we would need to republish on every commit since published we would
need to use `contains(github.event.pull_request.labels.*.name,
'publish:')` check


## 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
2023-09-13 16:36:51 +03:00
Oleg Isonen 1f2570ab72 Add video to the readme (#2313)
Add video to the readme
2023-09-13 13:15:28 +02:00
Ivan Starkov 145f1c0b69 NPM Update 0.99.0 (#2310)
## Description

packages update

## 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
2023-09-13 09:08:36 +03:00
Ivan Starkov d21c93d79b Fix image loader warning in cli (#2309)
## Description

Remove warning


![image](https://github.com/webstudio-is/webstudio/assets/5077042/f0994436-c2a3-4dc7-8e96-600d1aa74928)

## 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
2023-09-12 20:04:06 +03:00
Jaya Krishna Namburu 1c3e085ad8 Fix folder name prompt in the cli init flow (#2306)
## Description

Removed a default `folderName` prompt that is not needed. We need to
check for folder name only when the config is missing.

## Code Review

- [ ] hi @kof, I need you to do
 - detailed review (read every line)

- [ ] hi @istarkov , I need you to do
 - detailed review (read every line)
2023-09-12 17:32:54 +02:00
Oleg Isonen c5493c557d Add a link to CLI docs in the export dialog (#2305)
## Description

Added a link to the CLI docs
<img width="361" alt="Screenshot 2023-09-12 at 16 49 15"
src="https://github.com/webstudio-is/webstudio/assets/52824/1d12e25f-a523-46e4-9887-54c274216ec5">
2023-09-12 17:24:13 +02:00
Bogdan Chadkin f67b0bd9b0 Expose form state change with action (#2295)
Internal data sources updates complicate code generation Here changed
forms too expose onStateChange action instead of implicit data source
update.

Added migration to add the action to every existing form. Tested locally
both new and migrated forms.
2023-09-12 17:33:50 +04:00
Bogdan Chadkin 36f7714df8 Release 0.98 (#2304) 2023-09-12 15:29:54 +04:00
Oleg Isonen 1d48b5ba61 Improved CLI wording based on user testing (#2300) 2023-09-12 12:39:16 +02:00
Bogdan Chadkin 3bc2adf616 Limit images formats to upload (#2302)
Cloudflare supports only jpeg, png, gif, webp and svg as input. We
should forbid any other format.
2023-09-12 14:35:34 +04:00
Ivan Starkov d41534552c Add raw image upload support to the cli (#2301)
## Description

Using format=raw at the prebuild

## 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
2023-09-12 13:24:37 +03:00
Ivan Starkov 7835607f4e Add vercelignore to templates (#2299)
## Description

This avoid uploading builds/caches etc onto vercel

## 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
2023-09-12 07:59:35 +03:00
Ivan Starkov a46367357c 0.97.0 release (#2298)
## Description

0.97.0 release

## 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
2023-09-11 21:21:55 +03:00
Ivan Starkov 53c97d8d18 Vercel image optimisation support (#2297)
## Description

CLI support of vercel image optimisation


## 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
2023-09-11 21:03:02 +03:00
Ivan Starkov 4b1ed5fc73 Make route-templates typeable (#2296)
## Description

Now route-templates is normal ts file. And can be typechecked

## 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
2023-09-11 18:53:11 +03:00
Bogdan Chadkin 4c7cb84629 Release 0.96 (#2293) 0.96.0 2023-09-09 21:14:37 +04:00
Bogdan Chadkin 7d37d4ad9a Bundle cli packages (#2292)
Here changed build command to bundle all cli packages so we would not
need to resolve .js extensions in es modules. This will fix ubuntu,
windows and node 20 usages.
2023-09-09 20:42:34 +04:00
Jaya Krishna Namburu 0de3bca350 Escape special characters in route names in cli projects (#2288) 2023-09-09 16:03:11 +05:30