@squiz/dxp-cli-next 5.29.1-develop.1 → 5.29.1

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.
@@ -23,7 +23,7 @@ export declare const BaseLayoutDefinition: z.ZodObject<{
23
23
  zones: z.ZodRecord<z.ZodString, z.ZodObject<{
24
24
  displayName: z.ZodString;
25
25
  description: z.ZodString;
26
- minNodes: z.ZodNumber;
26
+ minNodes: z.ZodDefault<z.ZodNumber>;
27
27
  maxNodes: z.ZodOptional<z.ZodNumber>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  description: string;
@@ -33,7 +33,7 @@ export declare const BaseLayoutDefinition: z.ZodObject<{
33
33
  }, {
34
34
  description: string;
35
35
  displayName: string;
36
- minNodes: number;
36
+ minNodes?: number | undefined;
37
37
  maxNodes?: number | undefined;
38
38
  }>>;
39
39
  /**
@@ -76,7 +76,7 @@ export declare const BaseLayoutDefinition: z.ZodObject<{
76
76
  zones: Record<string, {
77
77
  description: string;
78
78
  displayName: string;
79
- minNodes: number;
79
+ minNodes?: number | undefined;
80
80
  maxNodes?: number | undefined;
81
81
  }>;
82
82
  options?: Record<string, {
@@ -107,7 +107,7 @@ export declare const InputLayoutDefinition: z.ZodObject<z.objectUtil.extendShape
107
107
  zones: z.ZodRecord<z.ZodString, z.ZodObject<{
108
108
  displayName: z.ZodString;
109
109
  description: z.ZodString;
110
- minNodes: z.ZodNumber;
110
+ minNodes: z.ZodDefault<z.ZodNumber>;
111
111
  maxNodes: z.ZodOptional<z.ZodNumber>;
112
112
  }, "strip", z.ZodTypeAny, {
113
113
  description: string;
@@ -117,7 +117,7 @@ export declare const InputLayoutDefinition: z.ZodObject<z.objectUtil.extendShape
117
117
  }, {
118
118
  description: string;
119
119
  displayName: string;
120
- minNodes: number;
120
+ minNodes?: number | undefined;
121
121
  maxNodes?: number | undefined;
122
122
  }>>;
123
123
  /**
@@ -164,7 +164,7 @@ export declare const InputLayoutDefinition: z.ZodObject<z.objectUtil.extendShape
164
164
  zones: Record<string, {
165
165
  description: string;
166
166
  displayName: string;
167
- minNodes: number;
167
+ minNodes?: number | undefined;
168
168
  maxNodes?: number | undefined;
169
169
  }>;
170
170
  options?: Record<string, {
@@ -195,7 +195,7 @@ export declare const LayoutDefinition: z.ZodObject<z.objectUtil.extendShape<{
195
195
  zones: z.ZodRecord<z.ZodString, z.ZodObject<{
196
196
  displayName: z.ZodString;
197
197
  description: z.ZodString;
198
- minNodes: z.ZodNumber;
198
+ minNodes: z.ZodDefault<z.ZodNumber>;
199
199
  maxNodes: z.ZodOptional<z.ZodNumber>;
200
200
  }, "strip", z.ZodTypeAny, {
201
201
  description: string;
@@ -205,7 +205,7 @@ export declare const LayoutDefinition: z.ZodObject<z.objectUtil.extendShape<{
205
205
  }, {
206
206
  description: string;
207
207
  displayName: string;
208
- minNodes: number;
208
+ minNodes?: number | undefined;
209
209
  maxNodes?: number | undefined;
210
210
  }>>;
211
211
  /**
@@ -251,7 +251,7 @@ export declare const LayoutDefinition: z.ZodObject<z.objectUtil.extendShape<{
251
251
  zones: Record<string, {
252
252
  description: string;
253
253
  displayName: string;
254
- minNodes: number;
254
+ minNodes?: number | undefined;
255
255
  maxNodes?: number | undefined;
256
256
  }>;
257
257
  template: string;
@@ -117,7 +117,7 @@ exports.BaseLayoutDefinition = zod_1.z.object({
117
117
  zones: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
118
118
  displayName: zod_1.z.string(),
119
119
  description: zod_1.z.string(),
120
- minNodes: zod_1.z.number().min(0),
120
+ minNodes: zod_1.z.number().min(0).default(0),
121
121
  maxNodes: zod_1.z.number().min(1).optional(),
122
122
  })),
123
123
  /**
@@ -420,3 +420,19 @@ entry: template.hbs
420
420
  });
421
421
  }));
422
422
  });
423
+ describe('LayoutDefinitionParse', () => {
424
+ it('should allow zone.minNodes to be undefined', () => {
425
+ const layoutDefinition = definitions_1.BaseLayoutDefinition.parse({
426
+ name: 'test-layout',
427
+ displayName: 'Test Layout',
428
+ description: 'A test layout',
429
+ zones: {
430
+ main: {
431
+ displayName: 'Main Zone',
432
+ description: 'Main content area',
433
+ },
434
+ },
435
+ });
436
+ expect(layoutDefinition.zones.main.minNodes).toBe(0);
437
+ });
438
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "5.29.1-develop.1",
3
+ "version": "5.29.1",
4
4
  "repository": {
5
5
  "url": "https://gitlab.squiz.net/dxp/dxp-cli-next"
6
6
  },