Commit Graph
9 Commits
Author SHA1 Message Date
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
Bogdan Chadkin ca85eddd2d refactor: add animation package (#4745)
Just an empty one
2025-01-16 13:29:21 +07:00
Bogdan Chadkin f887b97587 refactor: remove legacy n8n handler (#3844)
Here testing new context.getDefaultActionResource in saas which replaces
form-handlers package.
2024-08-01 19:21:50 +02:00
Bogdan Chadkin 2518719ba9 refactor: merge tsconfig from CLI templates (#3774)
Here changed tsconfig copying logic to merge instead of override. This
simplifies alternative frameworks support.
2024-07-22 13:49:10 +02:00
Bogdan Chadkin 3ba82579bc refactor: simplify placeholders in CLI templates (#3663)
Here improved replacing placeholders in our templates. Before used some
relative path to stubs. Now use explicitly named placeholders like
`__CLIENT__`, `__SERVER__`, `__CSS__` and `__SITEMAP__`.

This will give more flexibility when support other frameworks, for
example vike.
2024-07-03 20:01:50 +03:00
Bogdan Chadkin fde5e8a6f1 build: run webstudio cli without rebuilding (#3513)
Finally figured out how to leverage node conditions to run webstudio cli
in fixtures without rebuilding it on every change.

Import conditions is another thing which allows
to constrain not exposed modules but internal ones.

Now to run cli locally it should be have this env
which is basically same we do with vite.
Works for both import and export conditions.

```
NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio
```
2024-06-07 13:51:34 +03:00
Ivan Starkov ef81ccfafd fix: Resolve issue with script tag compilation in self-hosted Project Settings (#3483)
## Description

Corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/298
(Must be renamed to "release.staging" on release to allow testing)

closes #3378 

## Steps for reproduction

See fixtures now have working scripts.
Publish see saas supports script and language
https://rewrites.staging.webstudio.is/builder/f30da574-8022-433e-9a15-050792747b6f
.

## 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-05 09:53:43 +03:00
Ivan Starkov 50be0047a1 feat: Add system.origin (#3254)
## Description

review per commit.

- Add system.url.origin to the props, rename publishedUrl ->
publishedOrigin
- Add system.url.origin to the published sites

Example on published site
https://saas-sitemapxml-x1g2n.wstd.work/

Example on builder
<img width="342" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bea3c9b4-c7dc-4936-a56a-fa33327ab6d0">

We use because as of now system is not available on canvas
<img width="448" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2eaa02b0-7566-492b-b98e-7af8a4f636e0">


## 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-04-30 08:59:28 +03:00
Bogdan Chadkin 86e747e09d fix: update package.json dependencies with cli (#3073)
Here improved CLI build command to upgrade dependencies in user
package.json whenever we change them in template.

For our own dependencies added "internal" template with `workspace:*`
2024-03-30 23:29:50 +07:00