Commit Graph
58 Commits
Author SHA1 Message Date
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 f48bfa4542 build: drop prisma build (#4346)
This shaves a few seconds from all GitHub actions
2024-10-26 19:09:13 +03: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 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
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 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
Bogdan Chadkin eb2e397d0a build: drop eslint-plugin-import (#3333)
Turns out no-internal-imports did not forbid anything out of the box but
requires specifying specific folders to forbid. This does not scale well
and this rule mostly harms because requires either excluding each
package with submodules or suppressing it with comment.
2024-05-09 18:53:35 +04:00
Ivan Starkov fd9bf61940 build: Simplify development by fixing dev mode image behavior, fix migrate cli (#3310)
## Description

- Remove vite overlay Error about image not exists in dev mode
(replacing 500 on
404)
- Add prisma package directory as cwd to all prisma commands





## 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-06 14:30:57 +03:00
Ivan Starkov f2ce532dcb build: Migrate (#3266)
# Migrate

This workflow is triggered only on pushes to the `main`, `*.staging` or
`migrate` branches.
For `*.staging` and `migrate` it specifically checks if the commit
message starts with `::migrate::`,
indicating a migration-related change.

### Example usage:

Execute a commit with a migration flag using:
```
git commit --allow-empty -m "::migrate::test description"
```

### Note:
This setup is a temporary measure. The intention is to transition to a
fully automated publish and release process via GitHub Actions in the
future.

## PS

Show amount of pending migrations so you know do you need to apply it on
staging

<img width="419" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/0dfaeae5-bb65-4a65-bb6a-29be20d92a7a">
2024-05-01 16:20:11 +03:00
Bogdan Chadkin d27a874eca build: fix prisma migrations (#3237)
Fixed the command in migrations cli
2024-04-26 19:36:39 +04:00
Oleg Isonen cd0174807d chore: use console.info instead of console.log (#3049)
## Description

We allow console.info (btw we should also allow warn/error/info), we
only disallow console.log in the linter because that's what we use for
debugging.

## Steps for reproduction

1. click button
2. expect xyz

## 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
2024-03-24 12:52:46 +01:00
Ikko Eltociear Ashimine 4ca0ded92b docs: fix typo in migrations-cli/README.md (#2678)
Reseting -> Resetting
2023-12-15 00:59:14 +07:00
Bogdan Chadkin 5115875087 refactor: replace inquirer with prompts for migrations (#2432)
Replaced old version of inquirer with prompts package we already use in
cli.

Also fixed running migrations by letting prisma lazily load .env
2023-10-09 12:26:50 +04:00
Oleg Isonen 11e078b78f Update links after renaming the repository (#2214) 2023-08-30 12:09:03 +02:00
Bogdan Chadkin 85f205a619 Rewrite migrations with zx like api (#2085)
The new execa version added support for zx like api. It's much smaller
and does not pollute globals.
2023-08-10 14:40:03 +04:00
Bogdan Chadkin 5be5abf8b3 Replace minimist with parseArgs (#1868)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1191
2023-06-28 23:22:33 +03:00
Oleg IsonenandIvan Starkov 3b0aba880e Breakpoints stage 3 (#1413)
## Description

1. Input instead of a slider

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

- [ ] hi @istarkov  , I need you to do
  - conceptual review (architecture, feature-correctness)
  - 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

---------

Co-authored-by: Ivan Starkov <istarkov@gmail.com>
2023-04-12 16:22:08 +04:00
Oleg Isonen 1f2475b9f4 consistent error naming in catch 2023-02-24 09:16:31 +00:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00
Ivan Starkov b17b22276d Add status field to assets table (#711)
## Description

I need this filed in the following PR, to count assets before upload.
And restrict the total number of assets per project.

## Steps for reproduction

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)

## Before requesting a review

- [x] 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
2022-12-28 00:02:53 +03:00
Bogdan Chadkin ac03e0b3b1 Fix esm in prisma migrations (#505)
Missed __dirname while migrating to esm. Works locally.
2022-11-23 20:59:53 +03:00
Bogdan Chadkin ad04473f26 Migrate packages to native ESM (#493)
Our designer bundle heavily bloated with not analyzable commonjs
generated by typescript.

The biggest problem comes from bundled icons library which esbuild
cannot tree shake because of cjs.

Another issue is broken code splitting. Packages in one piece are appear
in chunks and always loaded even with dynamic import and React.lazy.

To solve this I migrated each package to native node es modules.
Storybook and jest work almost without changes. Though it's not possible
to run remix in esm project (while still esm packages can be bundled for
ssr). And as a result designer jest failed because of cjs tests requires
from esm packages. As a solution I generated additional commonjs
artifacts in lib/cjs.

du -ck public/build
2336
1736
2022-11-23 10:12:58 +03:00
Roman Pominov 57762cdea1 edit troubleshooting 2022-09-15 20:57:58 +03:00
Roman Pominov ad370bcdb3 update troublechooting 2022-09-15 18:07:45 +03:00
Roman Pominov 4bfb0032b1 update troubleshooting 2022-09-15 18:00:52 +03:00
Roman Pominov b7914b96c4 add timeout to other migrations 2022-09-15 17:56:38 +03:00
Roman Pominov 1f66d29db7 add trobleshooting guide 2022-09-15 17:54:16 +03:00
Roman Pominov 4d4b5f9451 fix error processing 2022-09-15 17:25:49 +03:00
Roman Pominov bbc74f93d8 ensure schema.prisma is in sync with db before creating a data migration 2022-09-13 12:23:04 +03:00
Roman Pominov 2bf66710c1 minor fixes 2022-09-13 11:42:03 +03:00
Oleg Isonen ccd77ed372 migration to asset.meta 2022-09-12 15:23:58 +02:00
Roman Pominov 766dafb744 fix 2022-09-12 10:44:30 +03:00
Roman Pominov 66e43922cc wrap main into try..catch 2022-09-12 10:10:38 +03:00
Roman PominovandOleg Isonen faee50c0e9 Update packages/prisma-client/migrations-cli/README.md
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2022-09-12 09:56:04 +03:00
Roman Pominov 4e4cfb20c3 fix 2022-09-08 15:34:49 +03:00
Roman Pominov 4960e19606 new reset implementation that doesn't require changing privilages in order to work 2022-09-08 15:27:19 +03:00
Roman Pominov 37413e377b skip-confirmation -> force 2022-09-08 13:50:06 +03:00
Roman Pominov 2d7bc834e3 allow reset w/o --dev & minor changes 2022-09-08 13:47:41 +03:00
Roman Pominov d01940e6a2 minor fixes 2022-09-08 12:54:00 +03:00
Roman Pominov 38481c995c use-cases 2022-09-08 12:48:17 +03:00
Roman Pominov f5e6be6caa dont format table 2022-09-08 11:57:15 +03:00
Roman Pominov 42e1d919a4 comparison to prisma 2022-09-08 11:50:17 +03:00
Roman Pominov 066b846161 clarify lockfile 2022-09-08 11:15:28 +03:00
Roman Pominov caed790b1f use inquirer 2022-09-08 11:15:28 +03:00
Roman Pominov 0979c02b39 add migrate script in root & --skip-confirmation 2022-09-08 11:15:28 +03:00
Roman Pominov d29330622d no confirmation when applying migr. in production 2022-09-08 11:15:28 +03:00
Roman Pominov 77fd22e205 fix import 2022-09-08 11:15:28 +03:00
Roman Pominov c43f925d31 CliError -> UserError 2022-09-08 11:15:28 +03:00