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
fix: github action for http-api & the api
Andras Bacsai7d86b0fe219b
diff --git a/.github/workflows/http-api.yml b/.github/workflows/http-api.ymlindex 74ddb3e1b3..5bd515415c 100644--- a/.github/workflows/http-api.yml+++ b/.github/workflows/http-api.yml@@ -1,4 +1,4 @@-name: Design System Publish+name: HTTP API Publishon:push:paths:diff --git a/packages/http-api/package.json b/packages/http-api/package.jsonindex 2e2fa66088..23a3f6eeab 100644--- a/packages/http-api/package.json+++ b/packages/http-api/package.json@@ -1,6 +1,6 @@{"name": "@webstudio-is/http-api",- "version": "0.0.1",+ "version": "0.0.2","description": "Webstudio HTTP API","author": "Webstudio <[email protected]>","homepage": "https://webstudio.is",diff --git a/packages/http-api/src/index.ts b/packages/http-api/src/index.tsindex 3093ca45ed..e9e4befb22 100644--- a/packages/http-api/src/index.ts+++ b/packages/http-api/src/index.ts@@ -2,7 +2,6 @@ import isoMorphicFetch from "isomorphic-fetch";import type { Includes, Project } from "./index.d";const protocol = process.env.NODE_ENV === "production" ? "https" : "http";-const fetch = async (url: string, options?: any) => {const response = await isoMorphicFetch(url, options);const contentType = response.headers.get("content-type");@@ -13,11 +12,15 @@ const fetch = async (url: string, options?: any) => {}};-const loadProjectFromRest = async (- host: string,- projectId: string,- include: Includes<boolean> = { tree: true, props: true, breakpoints: true }-): Promise<Project> => {+const loadProjectFromRest = async ({+ projectId,+ host = process.env.DESIGNER_HOST || "localhost:3000",+ include = { tree: true, props: true, breakpoints: true },+}: {+ projectId: string;+ host?: string;+ include?: Includes<boolean>;+}): Promise<Project> => {const domain = `${protocol}://${host}`;const [tree, props, breakpoints] = await Promise.all([include.tree && fetch(`${domain}/rest/tree/${projectId}`),