@webstudio-is/sdk 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/index.js CHANGED
@@ -416,10 +416,19 @@ var Styles = z10.map(z10.string(), StyleDecl);
416
416
 
417
417
  // src/schema/deployment.ts
418
418
  import { z as z11 } from "zod";
419
- var Deployment = z11.object({
420
- domains: z11.array(z11.string()),
421
- projectDomain: z11.string()
422
- });
419
+ var Deployment = z11.union([
420
+ z11.object({
421
+ destination: z11.literal("static"),
422
+ name: z11.string(),
423
+ assetsDomain: z11.string(),
424
+ templates: z11.array(z11.string())
425
+ }),
426
+ z11.object({
427
+ destination: z11.literal("saas").optional(),
428
+ domains: z11.array(z11.string()),
429
+ projectDomain: z11.string()
430
+ })
431
+ ]);
423
432
 
424
433
  // src/schema/webstudio.ts
425
434
  import { z as z12 } from "zod";
@@ -1060,7 +1069,7 @@ var replaceFormActionsWithResources = ({
1060
1069
  data.method = prop.value;
1061
1070
  props.delete(prop.id);
1062
1071
  }
1063
- if (prop.name === "action" && prop.type === "string" && instances.get(prop.instanceId)?.component === "Form") {
1072
+ if (prop.name === "action" && prop.type === "string" && prop.value && instances.get(prop.instanceId)?.component === "Form") {
1064
1073
  let data = formProps.get(prop.instanceId);
1065
1074
  if (data === void 0) {
1066
1075
  data = {};
@@ -1,12 +1,30 @@
1
1
  import { z } from "zod";
2
- export declare const Deployment: z.ZodObject<{
2
+ export declare const Deployment: z.ZodUnion<[z.ZodObject<{
3
+ destination: z.ZodLiteral<"static">;
4
+ name: z.ZodString;
5
+ assetsDomain: z.ZodString;
6
+ templates: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name: string;
9
+ destination: "static";
10
+ assetsDomain: string;
11
+ templates: string[];
12
+ }, {
13
+ name: string;
14
+ destination: "static";
15
+ assetsDomain: string;
16
+ templates: string[];
17
+ }>, z.ZodObject<{
18
+ destination: z.ZodOptional<z.ZodLiteral<"saas">>;
3
19
  domains: z.ZodArray<z.ZodString, "many">;
4
20
  projectDomain: z.ZodString;
5
21
  }, "strip", z.ZodTypeAny, {
6
22
  domains: string[];
7
23
  projectDomain: string;
24
+ destination?: "saas" | undefined;
8
25
  }, {
9
26
  domains: string[];
10
27
  projectDomain: string;
11
- }>;
28
+ destination?: "saas" | undefined;
29
+ }>]>;
12
30
  export type Deployment = z.infer<typeof Deployment>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.173.0",
3
+ "version": "0.174.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -26,14 +26,14 @@
26
26
  "acorn-walk": "^8.3.2",
27
27
  "type-fest": "^4.3.1",
28
28
  "zod": "^3.22.4",
29
- "@webstudio-is/fonts": "0.173.0",
30
- "@webstudio-is/css-engine": "0.173.0"
29
+ "@webstudio-is/css-engine": "0.174.0",
30
+ "@webstudio-is/fonts": "0.174.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@jest/globals": "^29.7.0",
34
34
  "strip-indent": "^4.0.0",
35
- "@webstudio-is/tsconfig": "1.0.7",
36
- "@webstudio-is/jest-config": "1.0.7"
35
+ "@webstudio-is/jest-config": "1.0.7",
36
+ "@webstudio-is/tsconfig": "1.0.7"
37
37
  },
38
38
  "scripts": {
39
39
  "typecheck": "tsc",