@code-pushup/models 0.50.0 → 0.51.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
@@ -155,9 +155,27 @@ function hasNonZeroWeightedRef(refs) {
155
155
  return refs.reduce((acc, { weight }) => weight + acc, 0) !== 0;
156
156
  }
157
157
 
158
- // packages/models/src/lib/audit.ts
158
+ // packages/models/src/lib/source.ts
159
159
  import { z as z2 } from "zod";
160
- var auditSchema = z2.object({
160
+ var sourceFileLocationSchema = z2.object(
161
+ {
162
+ file: filePathSchema.describe("Relative path to source file in Git repo"),
163
+ position: z2.object(
164
+ {
165
+ startLine: positiveIntSchema.describe("Start line"),
166
+ startColumn: positiveIntSchema.describe("Start column").optional(),
167
+ endLine: positiveIntSchema.describe("End line").optional(),
168
+ endColumn: positiveIntSchema.describe("End column").optional()
169
+ },
170
+ { description: "Location in file" }
171
+ ).optional()
172
+ },
173
+ { description: "Source file location" }
174
+ );
175
+
176
+ // packages/models/src/lib/audit.ts
177
+ import { z as z3 } from "zod";
178
+ var auditSchema = z3.object({
161
179
  slug: slugSchema.describe("ID (unique within plugin)")
162
180
  }).merge(
163
181
  metaSchema({
@@ -167,7 +185,7 @@ var auditSchema = z2.object({
167
185
  description: "List of scorable metrics for the given plugin"
168
186
  })
169
187
  );
170
- var pluginAuditsSchema = z2.array(auditSchema, {
188
+ var pluginAuditsSchema = z3.array(auditSchema, {
171
189
  description: "List of audits maintained in a plugin"
172
190
  }).min(1).refine(
173
191
  (auditMetadata) => !getDuplicateSlugsInAudits(auditMetadata),
@@ -186,31 +204,16 @@ function getDuplicateSlugsInAudits(audits) {
186
204
  }
187
205
 
188
206
  // packages/models/src/lib/audit-output.ts
189
- import { z as z5 } from "zod";
207
+ import { z as z6 } from "zod";
190
208
 
191
209
  // packages/models/src/lib/issue.ts
192
- import { z as z3 } from "zod";
193
- var sourceFileLocationSchema = z3.object(
194
- {
195
- file: filePathSchema.describe("Relative path to source file in Git repo"),
196
- position: z3.object(
197
- {
198
- startLine: positiveIntSchema.describe("Start line"),
199
- startColumn: positiveIntSchema.describe("Start column").optional(),
200
- endLine: positiveIntSchema.describe("End line").optional(),
201
- endColumn: positiveIntSchema.describe("End column").optional()
202
- },
203
- { description: "Location in file" }
204
- ).optional()
205
- },
206
- { description: "Source file location" }
207
- );
208
- var issueSeveritySchema = z3.enum(["info", "warning", "error"], {
210
+ import { z as z4 } from "zod";
211
+ var issueSeveritySchema = z4.enum(["info", "warning", "error"], {
209
212
  description: "Severity level"
210
213
  });
211
- var issueSchema = z3.object(
214
+ var issueSchema = z4.object(
212
215
  {
213
- message: z3.string({ description: "Descriptive error message" }).max(MAX_ISSUE_MESSAGE_LENGTH),
216
+ message: z4.string({ description: "Descriptive error message" }).max(MAX_ISSUE_MESSAGE_LENGTH),
214
217
  severity: issueSeveritySchema,
215
218
  source: sourceFileLocationSchema.optional()
216
219
  },
@@ -218,61 +221,61 @@ var issueSchema = z3.object(
218
221
  );
219
222
 
220
223
  // packages/models/src/lib/table.ts
221
- import { z as z4 } from "zod";
222
- var tableAlignmentSchema = z4.enum(["left", "center", "right"], {
224
+ import { z as z5 } from "zod";
225
+ var tableAlignmentSchema = z5.enum(["left", "center", "right"], {
223
226
  description: "Cell alignment"
224
227
  });
225
228
  var tableColumnPrimitiveSchema = tableAlignmentSchema;
226
- var tableColumnObjectSchema = z4.object({
227
- key: z4.string(),
228
- label: z4.string().optional(),
229
+ var tableColumnObjectSchema = z5.object({
230
+ key: z5.string(),
231
+ label: z5.string().optional(),
229
232
  align: tableAlignmentSchema.optional()
230
233
  });
231
- var tableRowObjectSchema = z4.record(tableCellValueSchema, {
234
+ var tableRowObjectSchema = z5.record(tableCellValueSchema, {
232
235
  description: "Object row"
233
236
  });
234
- var tableRowPrimitiveSchema = z4.array(tableCellValueSchema, {
237
+ var tableRowPrimitiveSchema = z5.array(tableCellValueSchema, {
235
238
  description: "Primitive row"
236
239
  });
237
- var tableSharedSchema = z4.object({
238
- title: z4.string().optional().describe("Display title for table")
240
+ var tableSharedSchema = z5.object({
241
+ title: z5.string().optional().describe("Display title for table")
239
242
  });
240
243
  var tablePrimitiveSchema = tableSharedSchema.merge(
241
- z4.object(
244
+ z5.object(
242
245
  {
243
- columns: z4.array(tableAlignmentSchema).optional(),
244
- rows: z4.array(tableRowPrimitiveSchema)
246
+ columns: z5.array(tableAlignmentSchema).optional(),
247
+ rows: z5.array(tableRowPrimitiveSchema)
245
248
  },
246
249
  { description: "Table with primitive rows and optional alignment columns" }
247
250
  )
248
251
  );
249
252
  var tableObjectSchema = tableSharedSchema.merge(
250
- z4.object(
253
+ z5.object(
251
254
  {
252
- columns: z4.union([
253
- z4.array(tableAlignmentSchema),
254
- z4.array(tableColumnObjectSchema)
255
+ columns: z5.union([
256
+ z5.array(tableAlignmentSchema),
257
+ z5.array(tableColumnObjectSchema)
255
258
  ]).optional(),
256
- rows: z4.array(tableRowObjectSchema)
259
+ rows: z5.array(tableRowObjectSchema)
257
260
  },
258
261
  {
259
262
  description: "Table with object rows and optional alignment or object columns"
260
263
  }
261
264
  )
262
265
  );
263
- var tableSchema = (description = "Table information") => z4.union([tablePrimitiveSchema, tableObjectSchema], { description });
266
+ var tableSchema = (description = "Table information") => z5.union([tablePrimitiveSchema, tableObjectSchema], { description });
264
267
 
265
268
  // packages/models/src/lib/audit-output.ts
266
269
  var auditValueSchema = nonnegativeNumberSchema.describe("Raw numeric value");
267
- var auditDisplayValueSchema = z5.string({ description: "Formatted value (e.g. '0.9 s', '2.1 MB')" }).optional();
268
- var auditDetailsSchema = z5.object(
270
+ var auditDisplayValueSchema = z6.string({ description: "Formatted value (e.g. '0.9 s', '2.1 MB')" }).optional();
271
+ var auditDetailsSchema = z6.object(
269
272
  {
270
- issues: z5.array(issueSchema, { description: "List of findings" }).optional(),
273
+ issues: z6.array(issueSchema, { description: "List of findings" }).optional(),
271
274
  table: tableSchema("Table of related findings").optional()
272
275
  },
273
276
  { description: "Detailed information" }
274
277
  );
275
- var auditOutputSchema = z5.object(
278
+ var auditOutputSchema = z6.object(
276
279
  {
277
280
  slug: slugSchema.describe("Reference to audit"),
278
281
  displayValue: auditDisplayValueSchema,
@@ -282,7 +285,7 @@ var auditOutputSchema = z5.object(
282
285
  },
283
286
  { description: "Audit information" }
284
287
  );
285
- var auditOutputsSchema = z5.array(auditOutputSchema, {
288
+ var auditOutputsSchema = z6.array(auditOutputSchema, {
286
289
  description: "List of JSON formatted audit output emitted by the runner process of a plugin"
287
290
  }).refine(
288
291
  (audits) => !getDuplicateSlugsInAudits2(audits),
@@ -299,13 +302,13 @@ function getDuplicateSlugsInAudits2(audits) {
299
302
  }
300
303
 
301
304
  // packages/models/src/lib/category-config.ts
302
- import { z as z6 } from "zod";
305
+ import { z as z7 } from "zod";
303
306
  var categoryRefSchema = weightedRefSchema(
304
307
  "Weighted references to audits and/or groups for the category",
305
308
  "Slug of an audit or group (depending on `type`)"
306
309
  ).merge(
307
- z6.object({
308
- type: z6.enum(["audit", "group"], {
310
+ z7.object({
311
+ type: z7.enum(["audit", "group"], {
309
312
  description: "Discriminant for reference kind, affects where `slug` is looked up"
310
313
  }),
311
314
  plugin: slugSchema.describe(
@@ -326,8 +329,8 @@ var categoryConfigSchema = scorableSchema(
326
329
  description: "Meta info for category"
327
330
  })
328
331
  ).merge(
329
- z6.object({
330
- isBinary: z6.boolean({
332
+ z7.object({
333
+ isBinary: z7.boolean({
331
334
  description: 'Is this a binary category (i.e. only a perfect score considered a "pass")?'
332
335
  }).optional()
333
336
  })
@@ -343,7 +346,7 @@ function getDuplicateRefsInCategoryMetrics(metrics) {
343
346
  metrics.map(({ slug, type, plugin }) => `${type} :: ${plugin} / ${slug}`)
344
347
  );
345
348
  }
346
- var categoriesSchema = z6.array(categoryConfigSchema, {
349
+ var categoriesSchema = z7.array(categoryConfigSchema, {
347
350
  description: "Categorization of individual audits"
348
351
  }).refine(
349
352
  (categoryCfg) => !getDuplicateSlugCategories(categoryCfg),
@@ -362,18 +365,18 @@ function getDuplicateSlugCategories(categories) {
362
365
  }
363
366
 
364
367
  // packages/models/src/lib/commit.ts
365
- import { z as z7 } from "zod";
366
- var commitSchema = z7.object(
368
+ import { z as z8 } from "zod";
369
+ var commitSchema = z8.object(
367
370
  {
368
- hash: z7.string({ description: "Commit SHA (full)" }).regex(
371
+ hash: z8.string({ description: "Commit SHA (full)" }).regex(
369
372
  /^[\da-f]{40}$/,
370
373
  "Commit SHA should be a 40-character hexadecimal string"
371
374
  ),
372
- message: z7.string({ description: "Commit message" }),
373
- date: z7.coerce.date({
375
+ message: z8.string({ description: "Commit message" }),
376
+ date: z8.coerce.date({
374
377
  description: "Date and time when commit was authored"
375
378
  }),
376
- author: z7.string({
379
+ author: z8.string({
377
380
  description: "Commit author name"
378
381
  }).trim()
379
382
  },
@@ -381,22 +384,22 @@ var commitSchema = z7.object(
381
384
  );
382
385
 
383
386
  // packages/models/src/lib/core-config.ts
384
- import { z as z13 } from "zod";
387
+ import { z as z14 } from "zod";
385
388
 
386
389
  // packages/models/src/lib/persist-config.ts
387
- import { z as z8 } from "zod";
388
- var formatSchema = z8.enum(["json", "md"]);
389
- var persistConfigSchema = z8.object({
390
+ import { z as z9 } from "zod";
391
+ var formatSchema = z9.enum(["json", "md"]);
392
+ var persistConfigSchema = z9.object({
390
393
  outputDir: filePathSchema.describe("Artifacts folder").optional(),
391
394
  filename: fileNameSchema.describe("Artifacts file name (without extension)").optional(),
392
- format: z8.array(formatSchema).optional()
395
+ format: z9.array(formatSchema).optional()
393
396
  });
394
397
 
395
398
  // packages/models/src/lib/plugin-config.ts
396
- import { z as z11 } from "zod";
399
+ import { z as z12 } from "zod";
397
400
 
398
401
  // packages/models/src/lib/group.ts
399
- import { z as z9 } from "zod";
402
+ import { z as z10 } from "zod";
400
403
  var groupRefSchema = weightedRefSchema(
401
404
  "Weighted reference to a group",
402
405
  "Reference slug to a group within this plugin (e.g. 'max-lines')"
@@ -413,7 +416,7 @@ var groupSchema = scorableSchema(
413
416
  getDuplicateRefsInGroups,
414
417
  duplicateRefsInGroupsErrorMsg
415
418
  ).merge(groupMetaSchema);
416
- var groupsSchema = z9.array(groupSchema, {
419
+ var groupsSchema = z10.array(groupSchema, {
417
420
  description: "List of groups"
418
421
  }).optional().refine(
419
422
  (groups) => !getDuplicateSlugsInGroups(groups),
@@ -441,14 +444,14 @@ function getDuplicateSlugsInGroups(groups) {
441
444
  }
442
445
 
443
446
  // packages/models/src/lib/runner-config.ts
444
- import { z as z10 } from "zod";
445
- var outputTransformSchema = z10.function().args(z10.unknown()).returns(z10.union([auditOutputsSchema, z10.promise(auditOutputsSchema)]));
446
- var runnerConfigSchema = z10.object(
447
+ import { z as z11 } from "zod";
448
+ var outputTransformSchema = z11.function().args(z11.unknown()).returns(z11.union([auditOutputsSchema, z11.promise(auditOutputsSchema)]));
449
+ var runnerConfigSchema = z11.object(
447
450
  {
448
- command: z10.string({
451
+ command: z11.string({
449
452
  description: "Shell command to execute"
450
453
  }),
451
- args: z10.array(z10.string({ description: "Command arguments" })).optional(),
454
+ args: z11.array(z11.string({ description: "Command arguments" })).optional(),
452
455
  outputFile: filePathSchema.describe("Output path"),
453
456
  outputTransform: outputTransformSchema.optional()
454
457
  },
@@ -456,8 +459,8 @@ var runnerConfigSchema = z10.object(
456
459
  description: "How to execute runner"
457
460
  }
458
461
  );
459
- var onProgressSchema = z10.function().args(z10.unknown()).returns(z10.void());
460
- var runnerFunctionSchema = z10.function().args(onProgressSchema.optional()).returns(z10.union([auditOutputsSchema, z10.promise(auditOutputsSchema)]));
462
+ var onProgressSchema = z11.function().args(z11.unknown()).returns(z11.void());
463
+ var runnerFunctionSchema = z11.function().args(onProgressSchema.optional()).returns(z11.union([auditOutputsSchema, z11.promise(auditOutputsSchema)]));
461
464
 
462
465
  // packages/models/src/lib/plugin-config.ts
463
466
  var pluginMetaSchema = packageVersionSchema().merge(
@@ -468,13 +471,13 @@ var pluginMetaSchema = packageVersionSchema().merge(
468
471
  description: "Plugin metadata"
469
472
  })
470
473
  ).merge(
471
- z11.object({
474
+ z12.object({
472
475
  slug: slugSchema.describe("Unique plugin slug within core config"),
473
476
  icon: materialIconSchema
474
477
  })
475
478
  );
476
- var pluginDataSchema = z11.object({
477
- runner: z11.union([runnerConfigSchema, runnerFunctionSchema]),
479
+ var pluginDataSchema = z12.object({
480
+ runner: z12.union([runnerConfigSchema, runnerFunctionSchema]),
478
481
  audits: pluginAuditsSchema,
479
482
  groups: groupsSchema
480
483
  });
@@ -500,22 +503,22 @@ function getMissingRefsFromGroups(pluginCfg) {
500
503
  }
501
504
 
502
505
  // packages/models/src/lib/upload-config.ts
503
- import { z as z12 } from "zod";
504
- var uploadConfigSchema = z12.object({
506
+ import { z as z13 } from "zod";
507
+ var uploadConfigSchema = z13.object({
505
508
  server: urlSchema.describe("URL of deployed portal API"),
506
- apiKey: z12.string({
509
+ apiKey: z13.string({
507
510
  description: "API key with write access to portal (use `process.env` for security)"
508
511
  }),
509
512
  organization: slugSchema.describe(
510
513
  "Organization slug from Code PushUp portal"
511
514
  ),
512
515
  project: slugSchema.describe("Project slug from Code PushUp portal"),
513
- timeout: z12.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional()
516
+ timeout: z13.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional()
514
517
  });
515
518
 
516
519
  // packages/models/src/lib/core-config.ts
517
- var unrefinedCoreConfigSchema = z13.object({
518
- plugins: z13.array(pluginConfigSchema, {
520
+ var unrefinedCoreConfigSchema = z14.object({
521
+ plugins: z14.array(pluginConfigSchema, {
519
522
  description: "List of plugins to be used (official, community-provided, or custom)"
520
523
  }).min(1),
521
524
  /** portal configuration for persisting results */
@@ -547,7 +550,7 @@ var DEFAULT_PERSIST_FILENAME = "report";
547
550
  var DEFAULT_PERSIST_FORMAT = ["json", "md"];
548
551
 
549
552
  // packages/models/src/lib/report.ts
550
- import { z as z14 } from "zod";
553
+ import { z as z15 } from "zod";
551
554
  var auditReportSchema = auditSchema.merge(auditOutputSchema);
552
555
  var pluginReportSchema = pluginMetaSchema.merge(
553
556
  executionMetaSchema({
@@ -555,9 +558,9 @@ var pluginReportSchema = pluginMetaSchema.merge(
555
558
  descriptionDuration: "Duration of the plugin run in ms"
556
559
  })
557
560
  ).merge(
558
- z14.object({
559
- audits: z14.array(auditReportSchema).min(1),
560
- groups: z14.array(groupSchema).optional()
561
+ z15.object({
562
+ audits: z15.array(auditReportSchema).min(1),
563
+ groups: z15.array(groupSchema).optional()
561
564
  })
562
565
  ).refine(
563
566
  (pluginReport) => !getMissingRefsFromGroups2(pluginReport.audits, pluginReport.groups ?? []),
@@ -591,10 +594,10 @@ var reportSchema = packageVersionSchema({
591
594
  descriptionDuration: "Duration of the collect run in ms"
592
595
  })
593
596
  ).merge(
594
- z14.object(
597
+ z15.object(
595
598
  {
596
- categories: z14.array(categoryConfigSchema),
597
- plugins: z14.array(pluginReportSchema).min(1),
599
+ categories: z15.array(categoryConfigSchema),
600
+ plugins: z15.array(pluginReportSchema).min(1),
598
601
  commit: commitSchema.describe("Git commit for which report was collected").nullable()
599
602
  },
600
603
  { description: "Collect output data" }
@@ -610,40 +613,40 @@ var reportSchema = packageVersionSchema({
610
613
  );
611
614
 
612
615
  // packages/models/src/lib/reports-diff.ts
613
- import { z as z15 } from "zod";
616
+ import { z as z16 } from "zod";
614
617
  function makeComparisonSchema(schema) {
615
618
  const sharedDescription = schema.description || "Result";
616
- return z15.object({
619
+ return z16.object({
617
620
  before: schema.describe(`${sharedDescription} (source commit)`),
618
621
  after: schema.describe(`${sharedDescription} (target commit)`)
619
622
  });
620
623
  }
621
624
  function makeArraysComparisonSchema(diffSchema, resultSchema, description) {
622
- return z15.object(
625
+ return z16.object(
623
626
  {
624
- changed: z15.array(diffSchema),
625
- unchanged: z15.array(resultSchema),
626
- added: z15.array(resultSchema),
627
- removed: z15.array(resultSchema)
627
+ changed: z16.array(diffSchema),
628
+ unchanged: z16.array(resultSchema),
629
+ added: z16.array(resultSchema),
630
+ removed: z16.array(resultSchema)
628
631
  },
629
632
  { description }
630
633
  );
631
634
  }
632
- var scorableMetaSchema = z15.object({
635
+ var scorableMetaSchema = z16.object({
633
636
  slug: slugSchema,
634
637
  title: titleSchema,
635
638
  docsUrl: docsUrlSchema
636
639
  });
637
640
  var scorableWithPluginMetaSchema = scorableMetaSchema.merge(
638
- z15.object({
641
+ z16.object({
639
642
  plugin: pluginMetaSchema.pick({ slug: true, title: true, docsUrl: true }).describe("Plugin which defines it")
640
643
  })
641
644
  );
642
645
  var scorableDiffSchema = scorableMetaSchema.merge(
643
- z15.object({
646
+ z16.object({
644
647
  scores: makeComparisonSchema(scoreSchema).merge(
645
- z15.object({
646
- diff: z15.number().min(-1).max(1).describe("Score change (`scores.after - scores.before`)")
648
+ z16.object({
649
+ diff: z16.number().min(-1).max(1).describe("Score change (`scores.after - scores.before`)")
647
650
  })
648
651
  ).describe("Score comparison")
649
652
  })
@@ -654,10 +657,10 @@ var scorableWithPluginDiffSchema = scorableDiffSchema.merge(
654
657
  var categoryDiffSchema = scorableDiffSchema;
655
658
  var groupDiffSchema = scorableWithPluginDiffSchema;
656
659
  var auditDiffSchema = scorableWithPluginDiffSchema.merge(
657
- z15.object({
660
+ z16.object({
658
661
  values: makeComparisonSchema(auditValueSchema).merge(
659
- z15.object({
660
- diff: z15.number().int().describe("Value change (`values.after - values.before`)")
662
+ z16.object({
663
+ diff: z16.number().int().describe("Value change (`values.after - values.before`)")
661
664
  })
662
665
  ).describe("Audit `value` comparison"),
663
666
  displayValues: makeComparisonSchema(auditDisplayValueSchema).describe(
@@ -666,18 +669,18 @@ var auditDiffSchema = scorableWithPluginDiffSchema.merge(
666
669
  })
667
670
  );
668
671
  var categoryResultSchema = scorableMetaSchema.merge(
669
- z15.object({ score: scoreSchema })
672
+ z16.object({ score: scoreSchema })
670
673
  );
671
674
  var groupResultSchema = scorableWithPluginMetaSchema.merge(
672
- z15.object({ score: scoreSchema })
675
+ z16.object({ score: scoreSchema })
673
676
  );
674
677
  var auditResultSchema = scorableWithPluginMetaSchema.merge(
675
678
  auditOutputSchema.pick({ score: true, value: true, displayValue: true })
676
679
  );
677
- var reportsDiffSchema = z15.object({
680
+ var reportsDiffSchema = z16.object({
678
681
  commits: makeComparisonSchema(commitSchema).nullable().describe("Commits identifying compared reports"),
679
682
  portalUrl: urlSchema.optional().describe("Link to comparison page in Code PushUp portal"),
680
- label: z15.string().optional().describe("Label (e.g. project name)"),
683
+ label: z16.string().optional().describe("Label (e.g. project name)"),
681
684
  categories: makeArraysComparisonSchema(
682
685
  categoryDiffSchema,
683
686
  categoryResultSchema,
@@ -745,6 +748,7 @@ export {
745
748
  reportsDiffSchema,
746
749
  runnerConfigSchema,
747
750
  runnerFunctionSchema,
751
+ sourceFileLocationSchema,
748
752
  tableAlignmentSchema,
749
753
  tableCellValueSchema,
750
754
  tableColumnObjectSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/models",
3
- "version": "0.50.0",
3
+ "version": "0.51.0",
4
4
  "license": "MIT",
5
5
  "description": "Model definitions and validators for the Code PushUp CLI",
6
6
  "dependencies": {
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { type TableCellValue, tableCellValueSchema, } from './lib/implementation/schemas';
2
+ export { type SourceFileLocation, sourceFileLocationSchema, } from './lib/source';
2
3
  export { type Audit, auditSchema } from './lib/audit';
3
4
  export { type AuditDetails, type AuditOutput, type AuditOutputs, auditDetailsSchema, auditOutputSchema, auditOutputsSchema, } from './lib/audit-output';
4
5
  export { type CategoryConfig, type CategoryRef, categoryConfigSchema, categoryRefSchema, } from './lib/category-config';
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ export declare const sourceFileLocationSchema: z.ZodObject<{
3
+ file: z.ZodString;
4
+ position: z.ZodOptional<z.ZodObject<{
5
+ startLine: z.ZodNumber;
6
+ startColumn: z.ZodOptional<z.ZodNumber>;
7
+ endLine: z.ZodOptional<z.ZodNumber>;
8
+ endColumn: z.ZodOptional<z.ZodNumber>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ startLine: number;
11
+ startColumn?: number | undefined;
12
+ endLine?: number | undefined;
13
+ endColumn?: number | undefined;
14
+ }, {
15
+ startLine: number;
16
+ startColumn?: number | undefined;
17
+ endLine?: number | undefined;
18
+ endColumn?: number | undefined;
19
+ }>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ file: string;
22
+ position?: {
23
+ startLine: number;
24
+ startColumn?: number | undefined;
25
+ endLine?: number | undefined;
26
+ endColumn?: number | undefined;
27
+ } | undefined;
28
+ }, {
29
+ file: string;
30
+ position?: {
31
+ startLine: number;
32
+ startColumn?: number | undefined;
33
+ endLine?: number | undefined;
34
+ endColumn?: number | undefined;
35
+ } | undefined;
36
+ }>;
37
+ export type SourceFileLocation = z.infer<typeof sourceFileLocationSchema>;