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.
## 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
Here upgraded storybook with reresolved transitive dependencies. Removed
babel/types override, will eventually let us deduplicate a lot of
dependencies.
## Description
closes#3504
Reflow caused by Style element rerender sometimes cause focus lose.
It can be or chrome issue or Mutattion observer used in radix focus
scope.
## 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
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.
Monorepo setup for storybook is very complicated, it has two major
problems
- it is very annoying to look for any link in commit status
- hard to upgrade comparing with single project setup
Here merged all storybooks into one in the root.
## 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
## Description
Vite uses `webstudio` exports see resolve.conditions
## 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
Ref https://github.com/webstudio-is/webstudio/issues/3284
Bumped remix to 2.9.1 and fixed remix version in cli templates to avoid
accidental install of higher remix version and conflicting with
specified versions.
## Description
Use canary react
## 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
With new remix setup we may finally not need hoisted linker which makes
pnpm very buggy.
Here added all missing dependencies to package.json and removed node
linker from .npmrc.
## Description
Deployed tags:
<img width="1376" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7e7dd235-7e98-4ab7-9a28-e9d027fd0dbf">
## 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
There is no use for us from turbo. Pnpm does the same as runner. Caching
we still were not able to setup. Builds are superfast anyway. Checks are
actually faster since github tuned their actions.
## Description
Fully based on this guide
https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/
## 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
dev, build and dts are not necessary in not published packages and can
be removed. Builder vite setup is able to access webstudio export
conditions. Only prisma client need to be built before builder.
This will reduce CI time which runs build many times in various
workflows.
Bumped remix to v2 everywhere in CLI, fixtures and builder. Caught a lot
of type stuff. Runtime seem to work without changes. Removed
@vercel/remix and had to upgrade `remix-auth` packages.
Unable to test netlify and vercel from monorepo and need to have sdk
remix with updated remix. So will test after packages release.
## 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: istarkov <istarkov@gmail.com>
- esbuild
- jest
- eslint
- eslint-typescript
Also removed "jest" binary from packages and use the one installed in
the root
and deduplicated all deps (got a little messy recently).
## Description
This PR integrates a rate-limiting mechanism into the app using Vercel's
edge-layer middleware in combination with the Hono framework. This
middleware is written in JS with full JSDoc TypeScript typings.
### Architecture & Strategy
Vercel Middleware: Serves as the front-line defense, running at the edge
for optimal performance.
Hono Framework: For granular control, we utilize Hono middlewares for
applying or skipping rate limits.
Additionally, non-expensive routes benefit from an ephemeral cache to
further optimize performance
### Current Limitations
Due to a dependency on CommonJS, we cannot use TypeScript fully.
Consequently, session configurations are not yet shared across multiple
files. All utility functions are present in a single file for the time
being.
### Logic Breakdown
- Assets: Rate limiting skipped.
- Service Calls: Rate limiting skipped.
- /rest/ai/* Endpoint: Rate limit of 20 requests per 5 minutes,
identified by userId or IP.
- Unauthorized Users: Rate limit of 5 requests per 5 seconds, based
solely on IP.
- Authorized Users: Rate limit of 20 requests per 5 seconds, based on
userId.
### Next Steps
Plan to migrate to ESM for enabling TypeScript support for better
maintainability.
Use multiple regional KV
### Debug endpoint.
[Rate limit debug
endpoint](https://webstudio-builder-kscynssns-webstudio-is.vercel.app/rate-limit-debug)
## 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
Moved links resolve into props normalizing which is called for whole
project before rendering converting page prop into string.
Remix links now check only if provided path matches any page. Ideally it
should be handled with navigation api to remove all complexity from
links components.
This will let us stop rendering props and assets data in generated
pages.
Also fixed links with hashes.
## 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
## Description
Do not run dev inside `./fixtures` folder
## 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
Seems like we no longer need commonjs in most packages. Only prisma
cannot be bundled on server because has binary.
Now new package setup is easier and require only esbuild instead of
custom solution.
Cli install size
```diff
du -ck node_modules
- 35516
+ 33192
```
Before we run two configurations of typescript on CI. Though this leads
to very long checks. Here I enabled "typecheck" script to generate dummy
.d.ts files to enable additional checks.
```diff
pnpm run -r typecheck (serial)
- 239.13s
+ 262.94s
pnpm turbo run size-test build checks dts --force (parallel locally)
- 2m30.609s
+ 1m47.622s
- pnpm turbo run size-test build checks dts --force (Ci)
- 6m 5s
+ pnpm turbo run size-test build checks --force (Ci)
+ 3m 22s
```
Here added support for callbacks or event handlers on components which
basically can do only assignment to variables for now with extended
(with assignment operator) syntax of expressions.
## Description
Closes#1806
Most changes in this PR is ability to test it locally with saas
described here
https://dev.to/istarkov/local-development-with-public-and-private-monorepos-3554
Documentation how to test saas is added to SaaS
`action` and `method` now available for adding
`hidden inputs` are now cleared by prefix from formData (to not send ws
inputs anywhere)
`action` and `method` are now read at server using `getFormProperties`
## Steps for reproduction
Create form, add action and method, see form has hidden inputs
<img width="273" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/3f50dc14-9779-4da1-9bcf-730ad377c72f">
## Code Review
- [x] hi @kof, I need you to do
- conceptual review (architecture, feature-correctness)
- [x] hi @TrySound , I need you to do
- 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