webstudio 0.132.0 → 0.133.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
@@ -646,7 +646,7 @@ export const user: { email: string | null } | undefined = ${JSON.stringify(
646
646
  )};
647
647
  export const projectId = "${siteData.build.projectId}";
648
648
 
649
- ${generatePageMeta({ scope, page: pageData.page, dataSources })}
649
+ ${generatePageMeta({ globalScope: scope, page: pageData.page, dataSources })}
650
650
 
651
651
  ${pageComponent}
652
652
 
@@ -868,7 +868,7 @@ import makeCLI from "yargs";
868
868
  // package.json
869
869
  var package_default = {
870
870
  name: "webstudio",
871
- version: "0.132.0",
871
+ version: "0.133.0",
872
872
  description: "Webstudio CLI",
873
873
  author: "Webstudio <github@webstudio.is>",
874
874
  homepage: "https://webstudio.is",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.132.0",
3
+ "version": "0.133.0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -28,20 +28,20 @@
28
28
  "title-case": "^4.1.0",
29
29
  "yargs": "^17.7.2",
30
30
  "zod": "^3.21.4",
31
- "@webstudio-is/http-client": "0.132.0",
32
- "@webstudio-is/image": "0.132.0",
33
- "@webstudio-is/react-sdk": "0.132.0",
34
- "@webstudio-is/sdk": "0.132.0",
35
- "@webstudio-is/sdk-components-react": "0.132.0",
36
- "@webstudio-is/sdk-components-react-remix": "0.132.0",
37
- "@webstudio-is/sdk-components-react-radix": "0.132.0"
31
+ "@webstudio-is/http-client": "0.133.0",
32
+ "@webstudio-is/image": "0.133.0",
33
+ "@webstudio-is/react-sdk": "0.133.0",
34
+ "@webstudio-is/sdk-components-react": "0.133.0",
35
+ "@webstudio-is/sdk-components-react-radix": "0.133.0",
36
+ "@webstudio-is/sdk-components-react-remix": "0.133.0",
37
+ "@webstudio-is/sdk": "0.133.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^18.17.1",
41
41
  "@types/prompts": "^2.4.5",
42
42
  "tsx": "^3.12.8",
43
43
  "typescript": "5.2.2",
44
- "@webstudio-is/form-handlers": "0.132.0",
44
+ "@webstudio-is/form-handlers": "0.133.0",
45
45
  "@webstudio-is/tsconfig": "1.0.7"
46
46
  },
47
47
  "scripts": {
@@ -6,6 +6,7 @@ import {
6
6
  type ActionArgs,
7
7
  type LoaderArgs,
8
8
  json,
9
+ redirect,
9
10
  } from "@remix-run/server-runtime";
10
11
  import { useLoaderData } from "@remix-run/react";
11
12
  import type { ProjectMeta } from "@webstudio-is/sdk";
@@ -36,6 +37,14 @@ export const loader = async (arg: LoaderArgs) => {
36
37
  const resources = await loadResources({ params });
37
38
  const pageMeta = getPageMeta({ params, resources });
38
39
 
40
+ if (pageMeta.redirect) {
41
+ const status =
42
+ pageMeta.status === 301 || pageMeta.status === 302
43
+ ? pageMeta.status
44
+ : 302;
45
+ return redirect(pageMeta.redirect, status);
46
+ }
47
+
39
48
  const host =
40
49
  arg.request.headers.get("x-forwarded-host") ||
41
50
  arg.request.headers.get("host") ||
@@ -59,7 +68,10 @@ export const loader = async (arg: LoaderArgs) => {
59
68
  },
60
69
  // No way for current information to change, so add cache for 10 minutes
61
70
  // In case of CRM Data, this should be set to 0
62
- { headers: { "Cache-Control": "public, max-age=600" } }
71
+ {
72
+ status: pageMeta.status,
73
+ headers: { "Cache-Control": "public, max-age=600" },
74
+ }
63
75
  );
64
76
  };
65
77
 
@@ -10,13 +10,13 @@
10
10
  "@remix-run/react": "^1.19.2",
11
11
  "@remix-run/server-runtime": "^1.19.2",
12
12
  "@remix-run/node": "^1.19.2",
13
- "@webstudio-is/react-sdk": "0.132.0",
14
- "@webstudio-is/sdk-components-react-radix": "0.132.0",
15
- "@webstudio-is/sdk-components-react-remix": "0.132.0",
16
- "@webstudio-is/sdk-components-react": "0.132.0",
17
- "@webstudio-is/form-handlers": "0.132.0",
18
- "@webstudio-is/image": "0.132.0",
19
- "@webstudio-is/sdk": "0.132.0",
13
+ "@webstudio-is/react-sdk": "0.133.0",
14
+ "@webstudio-is/sdk-components-react-radix": "0.133.0",
15
+ "@webstudio-is/sdk-components-react-remix": "0.133.0",
16
+ "@webstudio-is/sdk-components-react": "0.133.0",
17
+ "@webstudio-is/form-handlers": "0.133.0",
18
+ "@webstudio-is/image": "0.133.0",
19
+ "@webstudio-is/sdk": "0.133.0",
20
20
  "isbot": "^3.6.8",
21
21
  "react": "^18.2.0",
22
22
  "react-dom": "^18.2.0"