@code-pushup/models 0.46.0 → 0.48.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/index.js CHANGED
@@ -63,7 +63,7 @@ function missingRefsForCategoriesErrorMsg(categories, plugins) {
63
63
  }
64
64
 
65
65
  // packages/models/src/lib/implementation/schemas.ts
66
- var primitiveValueSchema = z.union([z.string(), z.number()]);
66
+ var tableCellValueSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]).default(null);
67
67
  function executionMetaSchema(options = {
68
68
  descriptionDate: "Execution start date and time",
69
69
  descriptionDuration: "Execution duration in ms"
@@ -228,10 +228,10 @@ var tableColumnObjectSchema = z4.object({
228
228
  label: z4.string().optional(),
229
229
  align: tableAlignmentSchema.optional()
230
230
  });
231
- var tableRowObjectSchema = z4.record(primitiveValueSchema, {
231
+ var tableRowObjectSchema = z4.record(tableCellValueSchema, {
232
232
  description: "Object row"
233
233
  });
234
- var tableRowPrimitiveSchema = z4.array(primitiveValueSchema, {
234
+ var tableRowPrimitiveSchema = z4.array(tableCellValueSchema, {
235
235
  description: "Primitive row"
236
236
  });
237
237
  var tableSharedSchema = z4.object({
@@ -739,12 +739,12 @@ export {
739
739
  pluginConfigSchema,
740
740
  pluginMetaSchema,
741
741
  pluginReportSchema,
742
- primitiveValueSchema,
743
742
  reportSchema,
744
743
  reportsDiffSchema,
745
744
  runnerConfigSchema,
746
745
  runnerFunctionSchema,
747
746
  tableAlignmentSchema,
747
+ tableCellValueSchema,
748
748
  tableColumnObjectSchema,
749
749
  tableColumnPrimitiveSchema,
750
750
  tableRowObjectSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/models",
3
- "version": "0.46.0",
3
+ "version": "0.48.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "zod": "^3.22.1",
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { PrimitiveValue, primitiveValueSchema, } from './lib/implementation/schemas';
1
+ export { TableCellValue, tableCellValueSchema, } from './lib/implementation/schemas';
2
2
  export { Audit, auditSchema } from './lib/audit';
3
3
  export { AuditDetails, AuditOutput, AuditOutputs, auditDetailsSchema, auditOutputSchema, auditOutputsSchema, } from './lib/audit-output';
4
4
  export { CategoryConfig, CategoryRef, categoryConfigSchema, categoryRefSchema, } from './lib/category-config';
@@ -69,13 +69,13 @@ export declare const auditDetailsSchema: z.ZodObject<{
69
69
  title: z.ZodOptional<z.ZodString>;
70
70
  }, {
71
71
  columns: z.ZodOptional<z.ZodArray<z.ZodEnum<["left", "center", "right"]>, "many">>;
72
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, "many">;
72
+ rows: z.ZodArray<z.ZodArray<z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, "many">, "many">;
73
73
  }>, "strip", z.ZodTypeAny, {
74
- rows: (string | number)[][];
74
+ rows: (string | number | boolean | null)[][];
75
75
  title?: string | undefined;
76
76
  columns?: ("left" | "center" | "right")[] | undefined;
77
77
  }, {
78
- rows: (string | number)[][];
78
+ rows: (string | number | boolean | null | undefined)[][];
79
79
  title?: string | undefined;
80
80
  columns?: ("left" | "center" | "right")[] | undefined;
81
81
  }>, z.ZodObject<z.objectUtil.extendShape<{
@@ -94,9 +94,9 @@ export declare const auditDetailsSchema: z.ZodObject<{
94
94
  label?: string | undefined;
95
95
  align?: "left" | "center" | "right" | undefined;
96
96
  }>, "many">]>>;
97
- rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>, "many">;
97
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>, "many">;
98
98
  }>, "strip", z.ZodTypeAny, {
99
- rows: Record<string, string | number>[];
99
+ rows: Record<string, string | number | boolean | null>[];
100
100
  title?: string | undefined;
101
101
  columns?: ("left" | "center" | "right")[] | {
102
102
  key: string;
@@ -104,7 +104,7 @@ export declare const auditDetailsSchema: z.ZodObject<{
104
104
  align?: "left" | "center" | "right" | undefined;
105
105
  }[] | undefined;
106
106
  }, {
107
- rows: Record<string, string | number>[];
107
+ rows: Record<string, string | number | boolean | null | undefined>[];
108
108
  title?: string | undefined;
109
109
  columns?: ("left" | "center" | "right")[] | {
110
110
  key: string;
@@ -127,11 +127,11 @@ export declare const auditDetailsSchema: z.ZodObject<{
127
127
  } | undefined;
128
128
  }[] | undefined;
129
129
  table?: {
130
- rows: (string | number)[][];
130
+ rows: (string | number | boolean | null)[][];
131
131
  title?: string | undefined;
132
132
  columns?: ("left" | "center" | "right")[] | undefined;
133
133
  } | {
134
- rows: Record<string, string | number>[];
134
+ rows: Record<string, string | number | boolean | null>[];
135
135
  title?: string | undefined;
136
136
  columns?: ("left" | "center" | "right")[] | {
137
137
  key: string;
@@ -154,11 +154,11 @@ export declare const auditDetailsSchema: z.ZodObject<{
154
154
  } | undefined;
155
155
  }[] | undefined;
156
156
  table?: {
157
- rows: (string | number)[][];
157
+ rows: (string | number | boolean | null | undefined)[][];
158
158
  title?: string | undefined;
159
159
  columns?: ("left" | "center" | "right")[] | undefined;
160
160
  } | {
161
- rows: Record<string, string | number>[];
161
+ rows: Record<string, string | number | boolean | null | undefined>[];
162
162
  title?: string | undefined;
163
163
  columns?: ("left" | "center" | "right")[] | {
164
164
  key: string;
@@ -241,13 +241,13 @@ export declare const auditOutputSchema: z.ZodObject<{
241
241
  title: z.ZodOptional<z.ZodString>;
242
242
  }, {
243
243
  columns: z.ZodOptional<z.ZodArray<z.ZodEnum<["left", "center", "right"]>, "many">>;
244
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, "many">;
244
+ rows: z.ZodArray<z.ZodArray<z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, "many">, "many">;
245
245
  }>, "strip", z.ZodTypeAny, {
246
- rows: (string | number)[][];
246
+ rows: (string | number | boolean | null)[][];
247
247
  title?: string | undefined;
248
248
  columns?: ("left" | "center" | "right")[] | undefined;
249
249
  }, {
250
- rows: (string | number)[][];
250
+ rows: (string | number | boolean | null | undefined)[][];
251
251
  title?: string | undefined;
252
252
  columns?: ("left" | "center" | "right")[] | undefined;
253
253
  }>, z.ZodObject<z.objectUtil.extendShape<{
@@ -266,9 +266,9 @@ export declare const auditOutputSchema: z.ZodObject<{
266
266
  label?: string | undefined;
267
267
  align?: "left" | "center" | "right" | undefined;
268
268
  }>, "many">]>>;
269
- rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>, "many">;
269
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>, "many">;
270
270
  }>, "strip", z.ZodTypeAny, {
271
- rows: Record<string, string | number>[];
271
+ rows: Record<string, string | number | boolean | null>[];
272
272
  title?: string | undefined;
273
273
  columns?: ("left" | "center" | "right")[] | {
274
274
  key: string;
@@ -276,7 +276,7 @@ export declare const auditOutputSchema: z.ZodObject<{
276
276
  align?: "left" | "center" | "right" | undefined;
277
277
  }[] | undefined;
278
278
  }, {
279
- rows: Record<string, string | number>[];
279
+ rows: Record<string, string | number | boolean | null | undefined>[];
280
280
  title?: string | undefined;
281
281
  columns?: ("left" | "center" | "right")[] | {
282
282
  key: string;
@@ -299,11 +299,11 @@ export declare const auditOutputSchema: z.ZodObject<{
299
299
  } | undefined;
300
300
  }[] | undefined;
301
301
  table?: {
302
- rows: (string | number)[][];
302
+ rows: (string | number | boolean | null)[][];
303
303
  title?: string | undefined;
304
304
  columns?: ("left" | "center" | "right")[] | undefined;
305
305
  } | {
306
- rows: Record<string, string | number>[];
306
+ rows: Record<string, string | number | boolean | null>[];
307
307
  title?: string | undefined;
308
308
  columns?: ("left" | "center" | "right")[] | {
309
309
  key: string;
@@ -326,11 +326,11 @@ export declare const auditOutputSchema: z.ZodObject<{
326
326
  } | undefined;
327
327
  }[] | undefined;
328
328
  table?: {
329
- rows: (string | number)[][];
329
+ rows: (string | number | boolean | null | undefined)[][];
330
330
  title?: string | undefined;
331
331
  columns?: ("left" | "center" | "right")[] | undefined;
332
332
  } | {
333
- rows: Record<string, string | number>[];
333
+ rows: Record<string, string | number | boolean | null | undefined>[];
334
334
  title?: string | undefined;
335
335
  columns?: ("left" | "center" | "right")[] | {
336
336
  key: string;
@@ -359,11 +359,11 @@ export declare const auditOutputSchema: z.ZodObject<{
359
359
  } | undefined;
360
360
  }[] | undefined;
361
361
  table?: {
362
- rows: (string | number)[][];
362
+ rows: (string | number | boolean | null)[][];
363
363
  title?: string | undefined;
364
364
  columns?: ("left" | "center" | "right")[] | undefined;
365
365
  } | {
366
- rows: Record<string, string | number>[];
366
+ rows: Record<string, string | number | boolean | null>[];
367
367
  title?: string | undefined;
368
368
  columns?: ("left" | "center" | "right")[] | {
369
369
  key: string;
@@ -392,11 +392,11 @@ export declare const auditOutputSchema: z.ZodObject<{
392
392
  } | undefined;
393
393
  }[] | undefined;
394
394
  table?: {
395
- rows: (string | number)[][];
395
+ rows: (string | number | boolean | null | undefined)[][];
396
396
  title?: string | undefined;
397
397
  columns?: ("left" | "center" | "right")[] | undefined;
398
398
  } | {
399
- rows: Record<string, string | number>[];
399
+ rows: Record<string, string | number | boolean | null | undefined>[];
400
400
  title?: string | undefined;
401
401
  columns?: ("left" | "center" | "right")[] | {
402
402
  key: string;
@@ -480,13 +480,13 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
480
480
  title: z.ZodOptional<z.ZodString>;
481
481
  }, {
482
482
  columns: z.ZodOptional<z.ZodArray<z.ZodEnum<["left", "center", "right"]>, "many">>;
483
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, "many">;
483
+ rows: z.ZodArray<z.ZodArray<z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, "many">, "many">;
484
484
  }>, "strip", z.ZodTypeAny, {
485
- rows: (string | number)[][];
485
+ rows: (string | number | boolean | null)[][];
486
486
  title?: string | undefined;
487
487
  columns?: ("left" | "center" | "right")[] | undefined;
488
488
  }, {
489
- rows: (string | number)[][];
489
+ rows: (string | number | boolean | null | undefined)[][];
490
490
  title?: string | undefined;
491
491
  columns?: ("left" | "center" | "right")[] | undefined;
492
492
  }>, z.ZodObject<z.objectUtil.extendShape<{
@@ -505,9 +505,9 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
505
505
  label?: string | undefined;
506
506
  align?: "left" | "center" | "right" | undefined;
507
507
  }>, "many">]>>;
508
- rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>, "many">;
508
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>, "many">;
509
509
  }>, "strip", z.ZodTypeAny, {
510
- rows: Record<string, string | number>[];
510
+ rows: Record<string, string | number | boolean | null>[];
511
511
  title?: string | undefined;
512
512
  columns?: ("left" | "center" | "right")[] | {
513
513
  key: string;
@@ -515,7 +515,7 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
515
515
  align?: "left" | "center" | "right" | undefined;
516
516
  }[] | undefined;
517
517
  }, {
518
- rows: Record<string, string | number>[];
518
+ rows: Record<string, string | number | boolean | null | undefined>[];
519
519
  title?: string | undefined;
520
520
  columns?: ("left" | "center" | "right")[] | {
521
521
  key: string;
@@ -538,11 +538,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
538
538
  } | undefined;
539
539
  }[] | undefined;
540
540
  table?: {
541
- rows: (string | number)[][];
541
+ rows: (string | number | boolean | null)[][];
542
542
  title?: string | undefined;
543
543
  columns?: ("left" | "center" | "right")[] | undefined;
544
544
  } | {
545
- rows: Record<string, string | number>[];
545
+ rows: Record<string, string | number | boolean | null>[];
546
546
  title?: string | undefined;
547
547
  columns?: ("left" | "center" | "right")[] | {
548
548
  key: string;
@@ -565,11 +565,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
565
565
  } | undefined;
566
566
  }[] | undefined;
567
567
  table?: {
568
- rows: (string | number)[][];
568
+ rows: (string | number | boolean | null | undefined)[][];
569
569
  title?: string | undefined;
570
570
  columns?: ("left" | "center" | "right")[] | undefined;
571
571
  } | {
572
- rows: Record<string, string | number>[];
572
+ rows: Record<string, string | number | boolean | null | undefined>[];
573
573
  title?: string | undefined;
574
574
  columns?: ("left" | "center" | "right")[] | {
575
575
  key: string;
@@ -598,11 +598,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
598
598
  } | undefined;
599
599
  }[] | undefined;
600
600
  table?: {
601
- rows: (string | number)[][];
601
+ rows: (string | number | boolean | null)[][];
602
602
  title?: string | undefined;
603
603
  columns?: ("left" | "center" | "right")[] | undefined;
604
604
  } | {
605
- rows: Record<string, string | number>[];
605
+ rows: Record<string, string | number | boolean | null>[];
606
606
  title?: string | undefined;
607
607
  columns?: ("left" | "center" | "right")[] | {
608
608
  key: string;
@@ -631,11 +631,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
631
631
  } | undefined;
632
632
  }[] | undefined;
633
633
  table?: {
634
- rows: (string | number)[][];
634
+ rows: (string | number | boolean | null | undefined)[][];
635
635
  title?: string | undefined;
636
636
  columns?: ("left" | "center" | "right")[] | undefined;
637
637
  } | {
638
- rows: Record<string, string | number>[];
638
+ rows: Record<string, string | number | boolean | null | undefined>[];
639
639
  title?: string | undefined;
640
640
  columns?: ("left" | "center" | "right")[] | {
641
641
  key: string;
@@ -664,11 +664,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
664
664
  } | undefined;
665
665
  }[] | undefined;
666
666
  table?: {
667
- rows: (string | number)[][];
667
+ rows: (string | number | boolean | null)[][];
668
668
  title?: string | undefined;
669
669
  columns?: ("left" | "center" | "right")[] | undefined;
670
670
  } | {
671
- rows: Record<string, string | number>[];
671
+ rows: Record<string, string | number | boolean | null>[];
672
672
  title?: string | undefined;
673
673
  columns?: ("left" | "center" | "right")[] | {
674
674
  key: string;
@@ -697,11 +697,11 @@ export declare const auditOutputsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
697
697
  } | undefined;
698
698
  }[] | undefined;
699
699
  table?: {
700
- rows: (string | number)[][];
700
+ rows: (string | number | boolean | null | undefined)[][];
701
701
  title?: string | undefined;
702
702
  columns?: ("left" | "center" | "right")[] | undefined;
703
703
  } | {
704
- rows: Record<string, string | number>[];
704
+ rows: Record<string, string | number | boolean | null | undefined>[];
705
705
  title?: string | undefined;
706
706
  columns?: ("left" | "center" | "right")[] | {
707
707
  key: string;