webstudio 0.173.0 → 0.174.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -701,10 +701,6 @@ Please check webstudio --help for more details`
701
701
  `Project data is missing, please make sure you the project is synced.`
702
702
  );
703
703
  }
704
- const domain = siteData.build.deployment?.projectDomain;
705
- if (domain === void 0) {
706
- throw new Error(`Project domain is missing from the project data`);
707
- }
708
704
  const metas = /* @__PURE__ */ new Map();
709
705
  const componentSources = /* @__PURE__ */ new Map();
710
706
  for (const entry of framework.components) {
@@ -803,6 +799,10 @@ Please check webstudio --help for more details`
803
799
  }
804
800
  const assetsToDownload = [];
805
801
  const appDomain = options.preview ? "wstd.work" : "wstd.io";
802
+ const domain = siteData.build.deployment?.destination === "static" ? siteData.build.deployment?.assetsDomain : siteData.build.deployment?.projectDomain;
803
+ if (domain === void 0) {
804
+ throw new Error(`Project domain is missing from the project data`);
805
+ }
806
806
  const assetBuildUrl = `https://${domain}.${appDomain}/cgi/asset/`;
807
807
  const imageLoader = createImageLoader({
808
808
  imageBaseUrl: assetBuildUrl
@@ -1242,7 +1242,7 @@ import makeCLI from "yargs";
1242
1242
  // package.json
1243
1243
  var package_default = {
1244
1244
  name: "webstudio",
1245
- version: "0.173.0",
1245
+ version: "0.174.0",
1246
1246
  description: "Webstudio CLI",
1247
1247
  author: "Webstudio <github@webstudio.is>",
1248
1248
  homepage: "https://webstudio.is",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.173.0",
3
+ "version": "0.174.0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -37,13 +37,13 @@
37
37
  "strip-indent": "^4.0.0",
38
38
  "yargs": "^17.7.2",
39
39
  "zod": "^3.22.4",
40
- "@webstudio-is/http-client": "0.173.0",
41
- "@webstudio-is/sdk": "0.173.0",
42
- "@webstudio-is/sdk-components-react": "0.173.0",
43
- "@webstudio-is/image": "0.173.0",
44
- "@webstudio-is/react-sdk": "0.173.0",
45
- "@webstudio-is/sdk-components-react-radix": "0.173.0",
46
- "@webstudio-is/sdk-components-react-remix": "0.173.0"
40
+ "@webstudio-is/http-client": "0.174.0",
41
+ "@webstudio-is/image": "0.174.0",
42
+ "@webstudio-is/sdk-components-react": "0.174.0",
43
+ "@webstudio-is/react-sdk": "0.174.0",
44
+ "@webstudio-is/sdk": "0.174.0",
45
+ "@webstudio-is/sdk-components-react-radix": "0.174.0",
46
+ "@webstudio-is/sdk-components-react-remix": "0.174.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@jest/globals": "^29.7.0",
@@ -66,7 +66,7 @@
66
66
  "vike": "^0.4.180",
67
67
  "vite": "^5.3.4",
68
68
  "wrangler": "^3.63.2",
69
- "@webstudio-is/form-handlers": "0.173.0",
69
+ "@webstudio-is/form-handlers": "0.174.0",
70
70
  "@webstudio-is/jest-config": "1.0.7",
71
71
  "@webstudio-is/tsconfig": "1.0.7"
72
72
  },
@@ -263,12 +263,10 @@ export const action = async ({
263
263
  };
264
264
 
265
265
  const resourceName = formData.get(formIdFieldName);
266
-
267
- if (resourceName == null || typeof resourceName !== "string") {
268
- throw new Error("No form id in FormData");
269
- }
270
-
271
- const resource = getResources({ system }).action.get(resourceName);
266
+ const resource =
267
+ typeof resourceName === "string"
268
+ ? getResources({ system }).action.get(resourceName)
269
+ : undefined;
272
270
 
273
271
  const formBotValue = formData.get(formBotFieldName);
274
272
 
@@ -308,7 +306,7 @@ export const action = async ({
308
306
 
309
307
  const result = await n8nHandler({
310
308
  formInfo: {
311
- formId: [projectId, resourceName].join("--"),
309
+ formId: projectId,
312
310
  formData,
313
311
  pageUrl: pageUrl.toString(),
314
312
  toEmail: contactEmail,
@@ -11,13 +11,13 @@
11
11
  "@remix-run/node": "2.10.3",
12
12
  "@remix-run/react": "2.10.3",
13
13
  "@remix-run/server-runtime": "2.10.3",
14
- "@webstudio-is/react-sdk": "0.173.0",
15
- "@webstudio-is/sdk-components-react-radix": "0.173.0",
16
- "@webstudio-is/sdk-components-react-remix": "0.173.0",
17
- "@webstudio-is/sdk-components-react": "0.173.0",
18
- "@webstudio-is/form-handlers": "0.173.0",
19
- "@webstudio-is/image": "0.173.0",
20
- "@webstudio-is/sdk": "0.173.0",
14
+ "@webstudio-is/react-sdk": "0.174.0",
15
+ "@webstudio-is/sdk-components-react-radix": "0.174.0",
16
+ "@webstudio-is/sdk-components-react-remix": "0.174.0",
17
+ "@webstudio-is/sdk-components-react": "0.174.0",
18
+ "@webstudio-is/form-handlers": "0.174.0",
19
+ "@webstudio-is/image": "0.174.0",
20
+ "@webstudio-is/sdk": "0.174.0",
21
21
  "isbot": "^5.1.13",
22
22
  "react": "18.3.0-canary-14898b6a9-20240318",
23
23
  "react-dom": "18.3.0-canary-14898b6a9-20240318"
@@ -9,5 +9,9 @@ export const imageBaseUrl = "/assets/";
9
9
  * @type {import("@webstudio-is/image").ImageLoader}
10
10
  */
11
11
  export const imageLoader = ({ src }) => {
12
+ if (URL.canParse(src)) {
13
+ return src;
14
+ }
15
+
12
16
  return imageBaseUrl + src;
13
17
  };
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
11
- "@webstudio-is/react-sdk": "0.173.0",
12
- "@webstudio-is/sdk-components-react-radix": "0.173.0",
13
- "@webstudio-is/sdk-components-react": "0.173.0",
14
- "@webstudio-is/form-handlers": "0.173.0",
15
- "@webstudio-is/image": "0.173.0",
16
- "@webstudio-is/sdk": "0.173.0",
11
+ "@webstudio-is/react-sdk": "0.174.0",
12
+ "@webstudio-is/sdk-components-react-radix": "0.174.0",
13
+ "@webstudio-is/sdk-components-react": "0.174.0",
14
+ "@webstudio-is/form-handlers": "0.174.0",
15
+ "@webstudio-is/image": "0.174.0",
16
+ "@webstudio-is/sdk": "0.174.0",
17
17
  "react": "18.3.0-canary-14898b6a9-20240318",
18
18
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
19
19
  "vike": "^0.4.180"