Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Merge branch main into 54-multi-page-sites-and-routing
Andras Bacsaid27faf2a8e66
diff --cc apps/designer/app/routes/designer/$id.tsxindex 75a4119232,5c28bb95fa..57f74f9981--- a/apps/designer/app/routes/designer/$id.tsx+++ b/apps/designer/app/routes/designer/$id.tsx@@@ -1,9 -1,10 +1,9 @@@import { useLoaderData } from "@remix-run/react";import { LoaderFunction } from "@remix-run/node";import { Designer, links } from "~/designer";- import { db } from "@webstudio-is/project";+ import { db } from "@webstudio-is/project/index.server";import type { Project } from "@webstudio-is/project";import config from "~/config";-import env from "~/env.server";import { ErrorMessage } from "~/shared/error";import { action, useAction } from "./_assets";diff --cc apps/designer/app/routes/rest/patch.tsindex 9f5803104e,d11b8acd59..e6b459f28f--- a/apps/designer/app/routes/rest/patch.ts+++ b/apps/designer/app/routes/rest/patch.ts@@@ -1,7 -1,8 +1,8 @@@import { type ActionFunction } from "@remix-run/node";- import { type Build, db } from "@webstudio-is/project";++import { type Build } from "@webstudio-is/project";+ import { db } from "@webstudio-is/project/index.server";import { type SyncItem } from "immerhin";import { type Tree } from "@webstudio-is/react-sdk";-import { type Project } from "@webstudio-is/prisma-client";const updaters = {root: db.tree.patchRoot,diff --cc apps/designer/app/shared/db/canvas.server.tsindex 936e6dff5a,7c556c8c3c..635b4683dd--- a/apps/designer/app/shared/db/canvas.server.ts+++ b/apps/designer/app/shared/db/canvas.server.ts@@@ -1,7 -1,7 +1,8 @@@import { type Data } from "@webstudio-is/react-sdk";- import { db } from "@webstudio-is/project";+import type { Project, Build } from "@webstudio-is/project";+ import { db } from "@webstudio-is/project/index.server";-import type { Project } from "@webstudio-is/project";-export type CanvasData = Data & { project: Project };+++export type CanvasData = Data & { buildId: Build["id"] };export type ErrorData = {errors: string;diff --cc packages/project/src/db/project.tsindex c3ff60836e,e95eef15f2..b1c963fd8a--- a/packages/project/src/db/project.ts+++ b/packages/project/src/db/project.ts@@@ -6,17 -7,16 +6,17 @@@ importPrisma,Project as BaseProject,} from "@webstudio-is/prisma-client";- import { formatAsset } from "@webstudio-is/asset-uploader";+import type { Asset } from "@webstudio-is/asset-uploader";+ import { formatAsset } from "@webstudio-is/asset-uploader/index.server";import * as db from "./index";-import type { Project } from "../index";-const TreeHistorySchema = z.array(z.string());++export type Project = Omit<BaseProject, "assets"> & {+ assets?: Array<Asset>;+};const parseProject = (project: BaseProject): Project => {- const prodTreeIdHistory = JSON.parse(project.prodTreeIdHistory);return {...project,- prodTreeIdHistory: TreeHistorySchema.parse(prodTreeIdHistory),assets: project?.assets?.map(formatAsset),};};