@webstudio-is/sdk 0.202.0 → 0.204.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 +10 -5
- package/lib/types/schema/deployment.d.ts +4 -4
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -88,7 +88,10 @@ var HomePage = z2.object({
|
|
|
88
88
|
...commonPageFields,
|
|
89
89
|
path: HomePagePath
|
|
90
90
|
});
|
|
91
|
-
var PagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine(
|
|
91
|
+
var PagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine(
|
|
92
|
+
(path) => path === "" || path.startsWith("/"),
|
|
93
|
+
"Must start with a / or a full URL e.g. https://website.org"
|
|
94
|
+
).refine((path) => path.endsWith("/") === false, "Can't end with a /").refine((path) => path.includes("//") === false, "Can't contain repeating /").refine(
|
|
92
95
|
(path) => /^[-_a-z0-9*:?\\/.]*$/.test(path),
|
|
93
96
|
"Only a-z, 0-9, -, _, /, :, ?, . and * are allowed"
|
|
94
97
|
).refine(
|
|
@@ -430,8 +433,7 @@ var Templates = z11.enum([
|
|
|
430
433
|
"vanilla",
|
|
431
434
|
"docker",
|
|
432
435
|
"vercel",
|
|
433
|
-
"netlify
|
|
434
|
-
"netlify-edge-functions",
|
|
436
|
+
"netlify",
|
|
435
437
|
"ssg",
|
|
436
438
|
"ssg-netlify",
|
|
437
439
|
"ssg-vercel"
|
|
@@ -967,7 +969,10 @@ var parseComponentName = (componentName) => {
|
|
|
967
969
|
};
|
|
968
970
|
|
|
969
971
|
// src/expression.ts
|
|
970
|
-
import {
|
|
972
|
+
import {
|
|
973
|
+
parse,
|
|
974
|
+
parseExpressionAt
|
|
975
|
+
} from "acorn";
|
|
971
976
|
import { simple } from "acorn-walk";
|
|
972
977
|
var lintExpression = ({
|
|
973
978
|
expression,
|
|
@@ -996,7 +1001,7 @@ var lintExpression = ({
|
|
|
996
1001
|
return diagnostics;
|
|
997
1002
|
}
|
|
998
1003
|
try {
|
|
999
|
-
const root =
|
|
1004
|
+
const root = parse(`(${expression})`, {
|
|
1000
1005
|
ecmaVersion: "latest",
|
|
1001
1006
|
// support parsing import to forbid explicitly
|
|
1002
1007
|
sourceType: "module"
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const Templates: z.ZodEnum<["vanilla", "docker", "vercel", "netlify
|
|
2
|
+
export declare const Templates: z.ZodEnum<["vanilla", "docker", "vercel", "netlify", "ssg", "ssg-netlify", "ssg-vercel"]>;
|
|
3
3
|
export type Templates = z.infer<typeof Templates>;
|
|
4
4
|
export declare const Deployment: z.ZodUnion<[z.ZodObject<{
|
|
5
5
|
destination: z.ZodLiteral<"static">;
|
|
6
6
|
name: z.ZodString;
|
|
7
7
|
assetsDomain: z.ZodString;
|
|
8
|
-
templates: z.ZodArray<z.ZodEnum<["vanilla", "docker", "vercel", "netlify
|
|
8
|
+
templates: z.ZodArray<z.ZodEnum<["vanilla", "docker", "vercel", "netlify", "ssg", "ssg-netlify", "ssg-vercel"]>, "many">;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
name: string;
|
|
11
11
|
destination: "static";
|
|
12
12
|
assetsDomain: string;
|
|
13
|
-
templates: ("vanilla" | "docker" | "vercel" | "netlify
|
|
13
|
+
templates: ("vanilla" | "docker" | "vercel" | "netlify" | "ssg" | "ssg-netlify" | "ssg-vercel")[];
|
|
14
14
|
}, {
|
|
15
15
|
name: string;
|
|
16
16
|
destination: "static";
|
|
17
17
|
assetsDomain: string;
|
|
18
|
-
templates: ("vanilla" | "docker" | "vercel" | "netlify
|
|
18
|
+
templates: ("vanilla" | "docker" | "vercel" | "netlify" | "ssg" | "ssg-netlify" | "ssg-vercel")[];
|
|
19
19
|
}>, z.ZodObject<{
|
|
20
20
|
destination: z.ZodOptional<z.ZodLiteral<"saas">>;
|
|
21
21
|
domains: z.ZodArray<z.ZodString, "many">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.204.0",
|
|
4
4
|
"description": "Webstudio project data schema",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"reserved-identifiers": "^1.0.0",
|
|
40
40
|
"type-fest": "^4.32.0",
|
|
41
41
|
"zod": "^3.22.4",
|
|
42
|
-
"@webstudio-is/css-engine": "0.
|
|
43
|
-
"@webstudio-is/
|
|
44
|
-
"@webstudio-is/
|
|
42
|
+
"@webstudio-is/css-engine": "0.204.0",
|
|
43
|
+
"@webstudio-is/fonts": "0.204.0",
|
|
44
|
+
"@webstudio-is/icons": "0.204.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"html-tags": "^4.0.0",
|
|
48
|
-
"vitest": "^3.0.
|
|
48
|
+
"vitest": "^3.0.4",
|
|
49
|
+
"@webstudio-is/template": "0.204.0",
|
|
49
50
|
"@webstudio-is/css-data": "0.0.0",
|
|
50
|
-
"@webstudio-is/tsconfig": "1.0.7"
|
|
51
|
-
"@webstudio-is/template": "0.202.0"
|
|
51
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"typecheck": "tsc",
|