36 Commits
Author SHA1 Message Date
Bogdan Chadkin 02534730de feat: support resources in schema and compiler (#2698)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added new schema type "Resources" to contain configuration of
requests to services. Their first use case is referencing from variable
to store loaded data.

For now added only client side generation. Later add support for server
code generation as part of remix loaders.
2023-12-16 15:44:49 +07:00
Ivan Starkov 3eba3e1ede feat: Sitemap endpoint support (#2565)
## Description

Need to merge, before proceed with sitemap generation. Will ruin all
fixtures tests after merge

## 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-11-05 17:45:27 +02: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 ee0e0f7e7a Drop prisma from cli (#2241)
Here moved types and utilities from project-build to sdk package. This
removed huge prisma from cli.

```
du -ck node_modules
137460
72464
```
2023-09-04 12:43:56 +04:00
Jaya Krishna Namburu 6777d1a551 Sync project data to the local config file using cli's sync command (#2033)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1825

## Description

PR adds the `sync` command to the `cli`. This can run in two modes.

```sh
webstudio sync <projectId>
```

which will create a new project folder and loads the build data into
`<project>/webstudio.json` file.

```sh
webstudio sync
```

This mode is to sync the existing project with the latest build data.

## Code Review

- [x] 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

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")
2023-08-08 10:43:50 +02:00
Bogdan Chadkin 06a311c877 Use native node fetch (#1875)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1191

- dropped undici (installed one)
- dropped isomorphic-fetch
- dropped node-fetch
2023-06-29 10:09:51 +03:00
Bogdan Chadkin 58f3b3f3d5 Cleanup project package (#1358)
Here removed from project package everything not related to project
mannagement.

- project no longer depends on sdk
- style updates types moved to builder
- CanvasData no longer necessary, Data from react-sdk is same
2023-04-04 00:11:37 +07:00
Ivan Starkov 119f1cf78c Unify and simplify fetch and errors for endpoints and packages used in SaaS (#930)
## Description

Unify and simplify fetch and errors for endpoints and packages used in
SaaS
ref #928

## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-02 22:40:00 +03:00
Bogdan Chadkin 752768abbc Use explicit imports from @jest/globals (#645)
pnpm prevents access to jest and @types/jest from packages so we need to
explicitly install it. Though @types/jest is not officially maintained
and often late for months with new major which bloats node_modules with
two versions of jest transitives.

Here is alternative way to use official types. The only downside is
complains these types has less descriptions.
2022-12-16 16:35:22 +03:00
Andras Bacsai 13e2e6bf56 remove error 2022-11-23 15:17:24 +01:00
Andras Bacsai 91239ef9d0 no need to double check string 2022-11-23 15:11:55 +01:00
Andras Bacsai dae9e6de38 fix: type + tests 2022-11-23 15:00:39 +01:00
Andras Bacsai e12b3c0753 fix: type CanvasData 2022-11-23 14:50:38 +01:00
Andras Bacsai cefd76d9b7 fix issues 2022-11-22 14:25:09 +01:00
Andras Bacsai d8e264d136 fix: types 2022-11-22 11:08:10 +01:00
Andras Bacsai 81ee438a81 fix projects endpoint 2022-11-22 10:39:23 +01:00
Andras Bacsai 4dfe5d1b84 fix: tests + types 2022-11-22 10:29:38 +01:00
Andras Bacsai 6cf7c35439 simplify http-client & single rest endpoint for publishing 2022-11-22 10:12:43 +01:00
Andras Bacsai aa3aea369e fix: type errors 2022-11-21 21:27:51 +01:00
Andras Bacsai c9ebf4c01a fix: add page meta to published sites 2022-11-21 14:06:39 +01:00
Andras Bacsai 03583078cb feat: redesigner loadProject + add new rest api for CSS 2022-11-21 11:00:03 +01:00
Andras Bacsai 1048ab3aa9 fix issues 2022-11-17 10:57:49 +01:00
Andras BacsaiandOleg Isonen 0f02661976 Update packages/http-client/src/index.ts
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2022-11-17 10:55:58 +01:00
Andras Bacsai 89aad1c74d fix checks 2022-11-16 11:16:43 +01:00
Andras Bacsai bb669d3abe feat: able to query pages with loadProject 2022-11-16 10:48:21 +01:00
Andras Bacsai fb30ed034e fixes 2022-09-28 13:09:07 +02:00
Andras Bacsai 01d1d9451e fix: tests 2022-09-28 12:10:18 +02:00
Andras Bacsai cb137e6a49 fix: process is not defined in worker, so url is defined in a different way 2022-09-28 12:07:33 +02:00
Andras Bacsai 5ca48aef58 fix: use isomorphic fetch for worker, node & browser 2022-09-27 14:27:09 +02:00
Andras Bacsai 6bd52dc72f fix: imports/exports 2022-09-13 13:49:32 +02:00
Andras Bacsai fdd8b8bd51 fix export 2022-09-13 09:00:50 +02:00
Andras Bacsai 568d5eddc8 fix: polyfill fetch 2022-09-12 11:41:03 +02:00
Andras Bacsai 12ae85b5c1 fix: types & export fn name 2022-09-12 11:27:28 +02:00
Andras Bacsai 8264864a03 fix: no any type 2022-09-12 10:24:05 +02:00
Andras Bacsai 963f3ab650 test: Add tests 2022-09-12 10:11:19 +02:00
Andras Bacsai 2eb9781776 fix: rename http-api to http-client 2022-08-23 15:28:06 +02:00