@webstudio-is/sdk 0.225.0 → 0.226.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 +8 -13
- package/lib/types/schema/pages.d.ts +3 -3
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -136,19 +136,14 @@ var ProjectMeta = z2.object({
|
|
|
136
136
|
faviconAssetId: z2.string().optional(),
|
|
137
137
|
code: z2.string().optional()
|
|
138
138
|
});
|
|
139
|
-
var ProjectNewRedirectPath =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} catch {
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
}, "Must be a valid URL")
|
|
151
|
-
);
|
|
139
|
+
var ProjectNewRedirectPath = z2.string().refine((data) => {
|
|
140
|
+
try {
|
|
141
|
+
new URL(data, "http://url.com");
|
|
142
|
+
return true;
|
|
143
|
+
} catch {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
}, "Must be a valid URL");
|
|
152
147
|
var PageRedirect = z2.object({
|
|
153
148
|
old: OldPagePath,
|
|
154
149
|
new: ProjectNewRedirectPath,
|
|
@@ -172,10 +172,10 @@ declare const ProjectMeta: z.ZodObject<{
|
|
|
172
172
|
faviconAssetId?: string | undefined;
|
|
173
173
|
}>;
|
|
174
174
|
export type ProjectMeta = z.infer<typeof ProjectMeta>;
|
|
175
|
-
export declare const ProjectNewRedirectPath: z.
|
|
175
|
+
export declare const ProjectNewRedirectPath: z.ZodEffects<z.ZodString, string, string>;
|
|
176
176
|
export declare const PageRedirect: z.ZodObject<{
|
|
177
177
|
old: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
178
|
-
new: z.
|
|
178
|
+
new: z.ZodEffects<z.ZodString, string, string>;
|
|
179
179
|
status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
|
|
180
180
|
}, "strip", z.ZodTypeAny, {
|
|
181
181
|
old: string;
|
|
@@ -222,7 +222,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
222
222
|
}>>;
|
|
223
223
|
redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
224
|
old: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
225
|
-
new: z.
|
|
225
|
+
new: z.ZodEffects<z.ZodString, string, string>;
|
|
226
226
|
status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
|
|
227
227
|
}, "strip", z.ZodTypeAny, {
|
|
228
228
|
old: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.226.0",
|
|
4
4
|
"description": "Webstudio project data schema",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"reserved-identifiers": "^1.0.0",
|
|
41
41
|
"type-fest": "^4.37.0",
|
|
42
42
|
"zod": "^3.24.2",
|
|
43
|
-
"@webstudio-is/css-engine": "0.
|
|
44
|
-
"@webstudio-is/
|
|
45
|
-
"@webstudio-is/
|
|
43
|
+
"@webstudio-is/css-engine": "0.226.0",
|
|
44
|
+
"@webstudio-is/icons": "0.226.0",
|
|
45
|
+
"@webstudio-is/fonts": "0.226.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"html-tags": "^4.0.0",
|
|
49
49
|
"vitest": "^3.1.2",
|
|
50
50
|
"@webstudio-is/css-data": "0.0.0",
|
|
51
|
-
"@webstudio-is/
|
|
52
|
-
"@webstudio-is/
|
|
51
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
52
|
+
"@webstudio-is/template": "0.226.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"typecheck": "tsc",
|