@webstudio-is/sdk 0.133.0 → 0.135.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 +3 -2
- package/lib/types/schema/pages.d.ts +23 -15
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -70,7 +70,7 @@ var commonPageFields = {
|
|
|
70
70
|
).optional()
|
|
71
71
|
}),
|
|
72
72
|
rootInstanceId: z2.string(),
|
|
73
|
-
|
|
73
|
+
pathParamsDataSourceId: z2.optional(z2.string())
|
|
74
74
|
};
|
|
75
75
|
var HomePagePath = z2.string().refine((path) => path === "", "Home page path must be empty");
|
|
76
76
|
var HomePage = z2.object({
|
|
@@ -112,7 +112,8 @@ var ProjectNewRedirectPath = PagePath.or(
|
|
|
112
112
|
);
|
|
113
113
|
var PageRedirect = z2.object({
|
|
114
114
|
old: PagePath,
|
|
115
|
-
new: ProjectNewRedirectPath
|
|
115
|
+
new: ProjectNewRedirectPath,
|
|
116
|
+
status: z2.enum(["301", "302"]).optional()
|
|
116
117
|
});
|
|
117
118
|
var CompilerSettings = z2.object({
|
|
118
119
|
// All fields are optional to ensure consistency and allow for the addition of new fields without requiring migration
|
|
@@ -70,7 +70,7 @@ declare const Page: z.ZodObject<{
|
|
|
70
70
|
}[] | undefined;
|
|
71
71
|
}>;
|
|
72
72
|
rootInstanceId: z.ZodString;
|
|
73
|
-
|
|
73
|
+
pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
75
|
path: string;
|
|
76
76
|
name: string;
|
|
@@ -90,7 +90,7 @@ declare const Page: z.ZodObject<{
|
|
|
90
90
|
id: string;
|
|
91
91
|
title: string;
|
|
92
92
|
rootInstanceId: string;
|
|
93
|
-
|
|
93
|
+
pathParamsDataSourceId?: string | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
path: string;
|
|
96
96
|
name: string;
|
|
@@ -110,7 +110,7 @@ declare const Page: z.ZodObject<{
|
|
|
110
110
|
id: string;
|
|
111
111
|
title: string;
|
|
112
112
|
rootInstanceId: string;
|
|
113
|
-
|
|
113
|
+
pathParamsDataSourceId?: string | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
declare const ProjectMeta: z.ZodObject<{
|
|
116
116
|
siteName: z.ZodOptional<z.ZodString>;
|
|
@@ -130,12 +130,15 @@ export declare const ProjectNewRedirectPath: z.ZodUnion<[z.ZodEffects<z.ZodEffec
|
|
|
130
130
|
export declare const PageRedirect: z.ZodObject<{
|
|
131
131
|
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>;
|
|
132
132
|
new: z.ZodUnion<[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>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
133
|
+
status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
|
|
133
134
|
}, "strip", z.ZodTypeAny, {
|
|
134
135
|
old: string;
|
|
135
136
|
new: string;
|
|
137
|
+
status?: "301" | "302" | undefined;
|
|
136
138
|
}, {
|
|
137
139
|
old: string;
|
|
138
140
|
new: string;
|
|
141
|
+
status?: "301" | "302" | undefined;
|
|
139
142
|
}>;
|
|
140
143
|
export type PageRedirect = z.infer<typeof PageRedirect>;
|
|
141
144
|
export declare const CompilerSettings: z.ZodObject<{
|
|
@@ -171,12 +174,15 @@ export declare const Pages: z.ZodObject<{
|
|
|
171
174
|
redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
175
|
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>;
|
|
173
176
|
new: z.ZodUnion<[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>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
177
|
+
status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
|
|
174
178
|
}, "strip", z.ZodTypeAny, {
|
|
175
179
|
old: string;
|
|
176
180
|
new: string;
|
|
181
|
+
status?: "301" | "302" | undefined;
|
|
177
182
|
}, {
|
|
178
183
|
old: string;
|
|
179
184
|
new: string;
|
|
185
|
+
status?: "301" | "302" | undefined;
|
|
180
186
|
}>, "many">>;
|
|
181
187
|
homePage: z.ZodObject<{
|
|
182
188
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -227,7 +233,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
227
233
|
}[] | undefined;
|
|
228
234
|
}>;
|
|
229
235
|
rootInstanceId: z.ZodString;
|
|
230
|
-
|
|
236
|
+
pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
|
|
231
237
|
}, "strip", z.ZodTypeAny, {
|
|
232
238
|
path: string;
|
|
233
239
|
name: string;
|
|
@@ -247,7 +253,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
247
253
|
id: string;
|
|
248
254
|
title: string;
|
|
249
255
|
rootInstanceId: string;
|
|
250
|
-
|
|
256
|
+
pathParamsDataSourceId?: string | undefined;
|
|
251
257
|
}, {
|
|
252
258
|
path: string;
|
|
253
259
|
name: string;
|
|
@@ -267,7 +273,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
267
273
|
id: string;
|
|
268
274
|
title: string;
|
|
269
275
|
rootInstanceId: string;
|
|
270
|
-
|
|
276
|
+
pathParamsDataSourceId?: string | undefined;
|
|
271
277
|
}>;
|
|
272
278
|
pages: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
273
279
|
path: 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>;
|
|
@@ -318,7 +324,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
318
324
|
}[] | undefined;
|
|
319
325
|
}>;
|
|
320
326
|
rootInstanceId: z.ZodString;
|
|
321
|
-
|
|
327
|
+
pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
|
|
322
328
|
}, "strip", z.ZodTypeAny, {
|
|
323
329
|
path: string;
|
|
324
330
|
name: string;
|
|
@@ -338,7 +344,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
338
344
|
id: string;
|
|
339
345
|
title: string;
|
|
340
346
|
rootInstanceId: string;
|
|
341
|
-
|
|
347
|
+
pathParamsDataSourceId?: string | undefined;
|
|
342
348
|
}, {
|
|
343
349
|
path: string;
|
|
344
350
|
name: string;
|
|
@@ -358,7 +364,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
358
364
|
id: string;
|
|
359
365
|
title: string;
|
|
360
366
|
rootInstanceId: string;
|
|
361
|
-
|
|
367
|
+
pathParamsDataSourceId?: string | undefined;
|
|
362
368
|
}>, "many">, {
|
|
363
369
|
path: string;
|
|
364
370
|
name: string;
|
|
@@ -378,7 +384,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
378
384
|
id: string;
|
|
379
385
|
title: string;
|
|
380
386
|
rootInstanceId: string;
|
|
381
|
-
|
|
387
|
+
pathParamsDataSourceId?: string | undefined;
|
|
382
388
|
}[], {
|
|
383
389
|
path: string;
|
|
384
390
|
name: string;
|
|
@@ -398,7 +404,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
398
404
|
id: string;
|
|
399
405
|
title: string;
|
|
400
406
|
rootInstanceId: string;
|
|
401
|
-
|
|
407
|
+
pathParamsDataSourceId?: string | undefined;
|
|
402
408
|
}[]>;
|
|
403
409
|
folders: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
404
410
|
id: z.ZodString;
|
|
@@ -446,7 +452,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
446
452
|
id: string;
|
|
447
453
|
title: string;
|
|
448
454
|
rootInstanceId: string;
|
|
449
|
-
|
|
455
|
+
pathParamsDataSourceId?: string | undefined;
|
|
450
456
|
};
|
|
451
457
|
pages: {
|
|
452
458
|
path: string;
|
|
@@ -467,7 +473,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
467
473
|
id: string;
|
|
468
474
|
title: string;
|
|
469
475
|
rootInstanceId: string;
|
|
470
|
-
|
|
476
|
+
pathParamsDataSourceId?: string | undefined;
|
|
471
477
|
}[];
|
|
472
478
|
folders: {
|
|
473
479
|
name: string;
|
|
@@ -486,6 +492,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
486
492
|
redirects?: {
|
|
487
493
|
old: string;
|
|
488
494
|
new: string;
|
|
495
|
+
status?: "301" | "302" | undefined;
|
|
489
496
|
}[] | undefined;
|
|
490
497
|
}, {
|
|
491
498
|
homePage: {
|
|
@@ -507,7 +514,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
507
514
|
id: string;
|
|
508
515
|
title: string;
|
|
509
516
|
rootInstanceId: string;
|
|
510
|
-
|
|
517
|
+
pathParamsDataSourceId?: string | undefined;
|
|
511
518
|
};
|
|
512
519
|
pages: {
|
|
513
520
|
path: string;
|
|
@@ -528,7 +535,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
528
535
|
id: string;
|
|
529
536
|
title: string;
|
|
530
537
|
rootInstanceId: string;
|
|
531
|
-
|
|
538
|
+
pathParamsDataSourceId?: string | undefined;
|
|
532
539
|
}[];
|
|
533
540
|
folders: {
|
|
534
541
|
name: string;
|
|
@@ -547,6 +554,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
547
554
|
redirects?: {
|
|
548
555
|
old: string;
|
|
549
556
|
new: string;
|
|
557
|
+
status?: "301" | "302" | undefined;
|
|
550
558
|
}[] | undefined;
|
|
551
559
|
}>;
|
|
552
560
|
export type Pages = z.infer<typeof Pages>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.135.0",
|
|
4
4
|
"description": "Webstudio project data schema",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"zod": "^3.21.4",
|
|
22
|
-
"@webstudio-is/css-engine": "0.
|
|
23
|
-
"@webstudio-is/fonts": "0.
|
|
22
|
+
"@webstudio-is/css-engine": "0.135.0",
|
|
23
|
+
"@webstudio-is/fonts": "0.135.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@jest/globals": "^29.7.0",
|
|
27
|
-
"@webstudio-is/
|
|
28
|
-
"@webstudio-is/
|
|
27
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
28
|
+
"@webstudio-is/jest-config": "1.0.7"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"typecheck": "tsc",
|