executable-stories-react 0.1.16 → 0.2.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.
package/dist/parse.cjs CHANGED
@@ -35,7 +35,7 @@ var err = (error) => ({ ok: false, error });
35
35
  // src/schema/story-report.schema.ts
36
36
  var import_zod = require("zod");
37
37
 
38
- // ../executable-stories-formatters/schemas/story-report-v1.json
38
+ // ../executable-stories-core/schemas/story-report-v1.json
39
39
  var story_report_v1_default = {
40
40
  $schema: "https://json-schema.org/draft/2020-12/schema",
41
41
  $id: "https://executable-stories.dev/schemas/story-report-v1.schema.json",
@@ -98,25 +98,61 @@ var story_report_v1_default = {
98
98
  },
99
99
  features: {
100
100
  type: "array",
101
- items: { $ref: "#/$defs/Feature" },
101
+ items: {
102
+ $ref: "#/$defs/Feature"
103
+ },
102
104
  description: "Features grouped by sourceFile, sorted by title."
103
105
  }
104
106
  },
105
- required: ["schemaVersion", "runId", "startedAtMs", "finishedAtMs", "durationMs", "projectRoot", "summary", "features"],
107
+ required: [
108
+ "schemaVersion",
109
+ "runId",
110
+ "startedAtMs",
111
+ "finishedAtMs",
112
+ "durationMs",
113
+ "projectRoot",
114
+ "summary",
115
+ "features"
116
+ ],
106
117
  additionalProperties: false
107
118
  },
108
119
  Summary: {
109
120
  type: "object",
110
121
  description: "Counts by status. Sums equal 'total'.",
111
122
  properties: {
112
- total: { type: "integer", minimum: 0 },
113
- passed: { type: "integer", minimum: 0 },
114
- failed: { type: "integer", minimum: 0 },
115
- skipped: { type: "integer", minimum: 0 },
116
- pending: { type: "integer", minimum: 0 },
117
- durationMs: { type: "number", minimum: 0 }
123
+ total: {
124
+ type: "integer",
125
+ minimum: 0
126
+ },
127
+ passed: {
128
+ type: "integer",
129
+ minimum: 0
130
+ },
131
+ failed: {
132
+ type: "integer",
133
+ minimum: 0
134
+ },
135
+ skipped: {
136
+ type: "integer",
137
+ minimum: 0
138
+ },
139
+ pending: {
140
+ type: "integer",
141
+ minimum: 0
142
+ },
143
+ durationMs: {
144
+ type: "number",
145
+ minimum: 0
146
+ }
118
147
  },
119
- required: ["total", "passed", "failed", "skipped", "pending", "durationMs"],
148
+ required: [
149
+ "total",
150
+ "passed",
151
+ "failed",
152
+ "skipped",
153
+ "pending",
154
+ "durationMs"
155
+ ],
120
156
  additionalProperties: false
121
157
  },
122
158
  Feature: {
@@ -138,14 +174,24 @@ var story_report_v1_default = {
138
174
  minLength: 1,
139
175
  description: "Source path, relative to projectRoot when possible."
140
176
  },
141
- summary: { $ref: "#/$defs/Summary" },
177
+ summary: {
178
+ $ref: "#/$defs/Summary"
179
+ },
142
180
  scenarios: {
143
181
  type: "array",
144
- items: { $ref: "#/$defs/Scenario" },
182
+ items: {
183
+ $ref: "#/$defs/Scenario"
184
+ },
145
185
  description: "Scenarios in this feature, in declaration order."
146
186
  }
147
187
  },
148
- required: ["id", "title", "sourceFile", "summary", "scenarios"],
188
+ required: [
189
+ "id",
190
+ "title",
191
+ "sourceFile",
192
+ "summary",
193
+ "scenarios"
194
+ ],
149
195
  additionalProperties: false
150
196
  },
151
197
  Scenario: {
@@ -157,346 +203,777 @@ var story_report_v1_default = {
157
203
  minLength: 1,
158
204
  description: "Stable identifier: '<feature.id>--<slug-of-title>'. Suitable for use as a deep-link anchor."
159
205
  },
160
- title: { type: "string", minLength: 1 },
161
- status: { $ref: "#/$defs/TestStatus" },
162
- durationMs: { type: "number", minimum: 0 },
206
+ title: {
207
+ type: "string",
208
+ minLength: 1
209
+ },
210
+ status: {
211
+ $ref: "#/$defs/TestStatus"
212
+ },
213
+ durationMs: {
214
+ type: "number",
215
+ minimum: 0
216
+ },
163
217
  tags: {
164
218
  type: "array",
165
- items: { type: "string" },
219
+ items: {
220
+ type: "string"
221
+ },
166
222
  description: "Normalized tags, deduplicated, lowercased."
167
223
  },
168
224
  tickets: {
169
225
  type: "array",
170
- items: { $ref: "#/$defs/Ticket" }
226
+ items: {
227
+ $ref: "#/$defs/Ticket"
228
+ }
171
229
  },
172
230
  covers: {
173
231
  type: "array",
174
- items: { type: "string" },
232
+ items: {
233
+ type: "string"
234
+ },
175
235
  description: "Product-code paths/globs this scenario exercises."
176
236
  },
177
- sourceLine: { type: "integer", minimum: 1 },
178
- errorMessage: { type: "string" },
179
- errorStack: { type: "string" },
180
- retry: { type: "integer", minimum: 0 },
181
- retries: { type: "integer", minimum: 0 },
237
+ sourceLine: {
238
+ type: "integer",
239
+ minimum: 1
240
+ },
241
+ errorMessage: {
242
+ type: "string"
243
+ },
244
+ errorStack: {
245
+ type: "string"
246
+ },
247
+ retry: {
248
+ type: "integer",
249
+ minimum: 0
250
+ },
251
+ retries: {
252
+ type: "integer",
253
+ minimum: 0
254
+ },
182
255
  docEntries: {
183
256
  type: "array",
184
- items: { $ref: "#/$defs/DocEntry" },
257
+ items: {
258
+ $ref: "#/$defs/DocEntry"
259
+ },
185
260
  description: "Story-level doc entries (rendered before steps)."
186
261
  },
187
262
  steps: {
188
263
  type: "array",
189
- items: { $ref: "#/$defs/Step" }
264
+ items: {
265
+ $ref: "#/$defs/Step"
266
+ }
190
267
  },
191
268
  attachments: {
192
269
  type: "array",
193
- items: { $ref: "#/$defs/Attachment" }
270
+ items: {
271
+ $ref: "#/$defs/Attachment"
272
+ }
273
+ },
274
+ otelSpans: {
275
+ type: "array",
276
+ items: {
277
+ $ref: "#/$defs/OtelSpan"
278
+ }
194
279
  }
195
280
  },
196
- required: ["id", "title", "status", "durationMs", "tags", "retry", "retries", "docEntries", "steps", "attachments"],
281
+ required: [
282
+ "id",
283
+ "title",
284
+ "status",
285
+ "durationMs",
286
+ "tags",
287
+ "retry",
288
+ "retries",
289
+ "docEntries",
290
+ "steps",
291
+ "attachments"
292
+ ],
197
293
  additionalProperties: false
198
294
  },
199
295
  Step: {
200
296
  type: "object",
201
297
  description: "A single BDD step.",
202
298
  properties: {
203
- id: { type: "string", minLength: 1 },
204
- index: { type: "integer", minimum: 0 },
205
- keyword: { $ref: "#/$defs/StepKeyword" },
206
- text: { type: "string" },
207
- status: { $ref: "#/$defs/TestStatus" },
208
- durationMs: { type: "number", minimum: 0 },
209
- errorMessage: { type: "string" },
210
- mode: { $ref: "#/$defs/StepMode" },
299
+ id: {
300
+ type: "string",
301
+ minLength: 1
302
+ },
303
+ index: {
304
+ type: "integer",
305
+ minimum: 0
306
+ },
307
+ keyword: {
308
+ $ref: "#/$defs/StepKeyword"
309
+ },
310
+ text: {
311
+ type: "string"
312
+ },
313
+ status: {
314
+ $ref: "#/$defs/TestStatus"
315
+ },
316
+ durationMs: {
317
+ type: "number",
318
+ minimum: 0
319
+ },
320
+ errorMessage: {
321
+ type: "string"
322
+ },
323
+ mode: {
324
+ $ref: "#/$defs/StepMode"
325
+ },
211
326
  docEntries: {
212
327
  type: "array",
213
- items: { $ref: "#/$defs/DocEntry" },
328
+ items: {
329
+ $ref: "#/$defs/DocEntry"
330
+ },
214
331
  description: "Doc entries attached to this step."
215
332
  }
216
333
  },
217
- required: ["id", "index", "keyword", "text", "status", "durationMs", "docEntries"],
334
+ required: [
335
+ "id",
336
+ "index",
337
+ "keyword",
338
+ "text",
339
+ "status",
340
+ "durationMs",
341
+ "docEntries"
342
+ ],
218
343
  additionalProperties: false
219
344
  },
220
345
  StepKeyword: {
221
346
  type: "string",
222
- enum: ["Given", "When", "Then", "And", "But"]
347
+ enum: [
348
+ "Given",
349
+ "When",
350
+ "Then",
351
+ "And",
352
+ "But"
353
+ ]
223
354
  },
224
355
  StepMode: {
225
356
  type: "string",
226
- enum: ["normal", "skip", "only", "todo", "fails", "concurrent"]
357
+ enum: [
358
+ "normal",
359
+ "skip",
360
+ "only",
361
+ "todo",
362
+ "fails",
363
+ "concurrent"
364
+ ]
227
365
  },
228
366
  TestStatus: {
229
367
  type: "string",
230
- enum: ["passed", "failed", "skipped", "pending"]
368
+ enum: [
369
+ "passed",
370
+ "failed",
371
+ "skipped",
372
+ "pending"
373
+ ]
231
374
  },
232
375
  Ticket: {
233
376
  type: "object",
234
377
  properties: {
235
- id: { type: "string", minLength: 1 },
236
- url: { type: "string" }
378
+ id: {
379
+ type: "string",
380
+ minLength: 1
381
+ },
382
+ url: {
383
+ type: "string"
384
+ }
237
385
  },
238
- required: ["id"],
386
+ required: [
387
+ "id"
388
+ ],
239
389
  additionalProperties: false
240
390
  },
241
391
  Attachment: {
242
392
  type: "object",
243
393
  properties: {
244
- name: { type: "string" },
245
- mediaType: { type: "string", minLength: 1 },
246
- body: { type: "string" },
394
+ name: {
395
+ type: "string"
396
+ },
397
+ mediaType: {
398
+ type: "string",
399
+ minLength: 1
400
+ },
401
+ body: {
402
+ type: "string"
403
+ },
247
404
  contentEncoding: {
248
405
  type: "string",
249
- enum: ["BASE64", "IDENTITY"]
406
+ enum: [
407
+ "BASE64",
408
+ "IDENTITY"
409
+ ]
250
410
  }
251
411
  },
252
- required: ["name", "mediaType", "body", "contentEncoding"],
412
+ required: [
413
+ "name",
414
+ "mediaType",
415
+ "body",
416
+ "contentEncoding"
417
+ ],
253
418
  additionalProperties: false
254
419
  },
255
420
  CIInfo: {
256
421
  type: "object",
257
422
  properties: {
258
- name: { type: "string" },
259
- url: { type: "string" },
260
- buildNumber: { type: "string" },
261
- branch: { type: "string" },
262
- commitSha: { type: "string" },
263
- prNumber: { type: "string" }
423
+ name: {
424
+ type: "string"
425
+ },
426
+ url: {
427
+ type: "string"
428
+ },
429
+ buildNumber: {
430
+ type: "string"
431
+ },
432
+ branch: {
433
+ type: "string"
434
+ },
435
+ commitSha: {
436
+ type: "string"
437
+ },
438
+ prNumber: {
439
+ type: "string"
440
+ }
264
441
  },
265
- required: ["name"],
442
+ required: [
443
+ "name"
444
+ ],
266
445
  additionalProperties: false
267
446
  },
268
447
  CoverageSummary: {
269
448
  type: "object",
270
449
  properties: {
271
- linesPct: { type: "number", minimum: 0, maximum: 100 },
272
- branchesPct: { type: "number", minimum: 0, maximum: 100 },
273
- functionsPct: { type: "number", minimum: 0, maximum: 100 },
274
- statementsPct: { type: "number", minimum: 0, maximum: 100 }
450
+ linesPct: {
451
+ type: "number",
452
+ minimum: 0,
453
+ maximum: 100
454
+ },
455
+ branchesPct: {
456
+ type: "number",
457
+ minimum: 0,
458
+ maximum: 100
459
+ },
460
+ functionsPct: {
461
+ type: "number",
462
+ minimum: 0,
463
+ maximum: 100
464
+ },
465
+ statementsPct: {
466
+ type: "number",
467
+ minimum: 0,
468
+ maximum: 100
469
+ }
275
470
  },
276
471
  additionalProperties: false
277
472
  },
278
473
  DocPhase: {
279
474
  type: "string",
280
- enum: ["static", "runtime"]
475
+ enum: [
476
+ "static",
477
+ "runtime"
478
+ ]
281
479
  },
282
480
  DocEntry: {
283
481
  oneOf: [
284
- { $ref: "#/$defs/DocNote" },
285
- { $ref: "#/$defs/DocTag" },
286
- { $ref: "#/$defs/DocKv" },
287
- { $ref: "#/$defs/DocCode" },
288
- { $ref: "#/$defs/DocTable" },
289
- { $ref: "#/$defs/DocLink" },
290
- { $ref: "#/$defs/DocSection" },
291
- { $ref: "#/$defs/DocMermaid" },
292
- { $ref: "#/$defs/DocScreenshot" },
293
- { $ref: "#/$defs/DocVideo" },
294
- { $ref: "#/$defs/DocHtml" },
295
- { $ref: "#/$defs/DocCustom" }
482
+ {
483
+ $ref: "#/$defs/DocNote"
484
+ },
485
+ {
486
+ $ref: "#/$defs/DocTag"
487
+ },
488
+ {
489
+ $ref: "#/$defs/DocKv"
490
+ },
491
+ {
492
+ $ref: "#/$defs/DocCode"
493
+ },
494
+ {
495
+ $ref: "#/$defs/DocTable"
496
+ },
497
+ {
498
+ $ref: "#/$defs/DocLink"
499
+ },
500
+ {
501
+ $ref: "#/$defs/DocSection"
502
+ },
503
+ {
504
+ $ref: "#/$defs/DocMermaid"
505
+ },
506
+ {
507
+ $ref: "#/$defs/DocScreenshot"
508
+ },
509
+ {
510
+ $ref: "#/$defs/DocVideo"
511
+ },
512
+ {
513
+ $ref: "#/$defs/DocHtml"
514
+ },
515
+ {
516
+ $ref: "#/$defs/DocCustom"
517
+ }
296
518
  ]
297
519
  },
298
520
  DocNote: {
299
521
  type: "object",
300
522
  properties: {
301
- kind: { const: "note" },
302
- text: { type: "string" },
303
- phase: { $ref: "#/$defs/DocPhase" },
523
+ kind: {
524
+ const: "note"
525
+ },
526
+ text: {
527
+ type: "string"
528
+ },
529
+ phase: {
530
+ $ref: "#/$defs/DocPhase"
531
+ },
304
532
  children: {
305
533
  type: "array",
306
- items: { $ref: "#/$defs/DocEntry" }
534
+ items: {
535
+ $ref: "#/$defs/DocEntry"
536
+ }
307
537
  }
308
538
  },
309
- required: ["kind", "text", "phase"],
539
+ required: [
540
+ "kind",
541
+ "text",
542
+ "phase"
543
+ ],
310
544
  additionalProperties: false
311
545
  },
312
546
  DocTag: {
313
547
  type: "object",
314
548
  properties: {
315
- kind: { const: "tag" },
316
- names: { type: "array", items: { type: "string" } },
317
- phase: { $ref: "#/$defs/DocPhase" },
549
+ kind: {
550
+ const: "tag"
551
+ },
552
+ names: {
553
+ type: "array",
554
+ items: {
555
+ type: "string"
556
+ }
557
+ },
558
+ phase: {
559
+ $ref: "#/$defs/DocPhase"
560
+ },
318
561
  children: {
319
562
  type: "array",
320
- items: { $ref: "#/$defs/DocEntry" }
563
+ items: {
564
+ $ref: "#/$defs/DocEntry"
565
+ }
321
566
  }
322
567
  },
323
- required: ["kind", "names", "phase"],
568
+ required: [
569
+ "kind",
570
+ "names",
571
+ "phase"
572
+ ],
324
573
  additionalProperties: false
325
574
  },
326
575
  DocKv: {
327
576
  type: "object",
328
577
  properties: {
329
- kind: { const: "kv" },
330
- label: { type: "string" },
578
+ kind: {
579
+ const: "kv"
580
+ },
581
+ label: {
582
+ type: "string"
583
+ },
331
584
  value: {},
332
- phase: { $ref: "#/$defs/DocPhase" },
585
+ phase: {
586
+ $ref: "#/$defs/DocPhase"
587
+ },
333
588
  children: {
334
589
  type: "array",
335
- items: { $ref: "#/$defs/DocEntry" }
590
+ items: {
591
+ $ref: "#/$defs/DocEntry"
592
+ }
336
593
  }
337
594
  },
338
- required: ["kind", "label", "value", "phase"],
595
+ required: [
596
+ "kind",
597
+ "label",
598
+ "value",
599
+ "phase"
600
+ ],
339
601
  additionalProperties: false
340
602
  },
341
603
  DocCode: {
342
604
  type: "object",
343
605
  properties: {
344
- kind: { const: "code" },
345
- label: { type: "string" },
346
- content: { type: "string" },
347
- lang: { type: "string" },
348
- phase: { $ref: "#/$defs/DocPhase" },
606
+ kind: {
607
+ const: "code"
608
+ },
609
+ label: {
610
+ type: "string"
611
+ },
612
+ content: {
613
+ type: "string"
614
+ },
615
+ lang: {
616
+ type: "string"
617
+ },
618
+ phase: {
619
+ $ref: "#/$defs/DocPhase"
620
+ },
349
621
  children: {
350
622
  type: "array",
351
- items: { $ref: "#/$defs/DocEntry" }
623
+ items: {
624
+ $ref: "#/$defs/DocEntry"
625
+ }
352
626
  }
353
627
  },
354
- required: ["kind", "label", "content", "phase"],
628
+ required: [
629
+ "kind",
630
+ "label",
631
+ "content",
632
+ "phase"
633
+ ],
355
634
  additionalProperties: false
356
635
  },
357
636
  DocTable: {
358
637
  type: "object",
359
638
  properties: {
360
- kind: { const: "table" },
361
- label: { type: "string" },
362
- columns: { type: "array", items: { type: "string" } },
639
+ kind: {
640
+ const: "table"
641
+ },
642
+ label: {
643
+ type: "string"
644
+ },
645
+ columns: {
646
+ type: "array",
647
+ items: {
648
+ type: "string"
649
+ }
650
+ },
363
651
  rows: {
364
652
  type: "array",
365
653
  items: {
366
654
  type: "array",
367
- items: { type: "string" }
655
+ items: {
656
+ type: "string"
657
+ }
368
658
  }
369
659
  },
370
- phase: { $ref: "#/$defs/DocPhase" },
660
+ phase: {
661
+ $ref: "#/$defs/DocPhase"
662
+ },
371
663
  children: {
372
664
  type: "array",
373
- items: { $ref: "#/$defs/DocEntry" }
665
+ items: {
666
+ $ref: "#/$defs/DocEntry"
667
+ }
374
668
  }
375
669
  },
376
- required: ["kind", "label", "columns", "rows", "phase"],
670
+ required: [
671
+ "kind",
672
+ "label",
673
+ "columns",
674
+ "rows",
675
+ "phase"
676
+ ],
377
677
  additionalProperties: false
378
678
  },
379
679
  DocLink: {
380
680
  type: "object",
381
681
  properties: {
382
- kind: { const: "link" },
383
- label: { type: "string" },
384
- url: { type: "string" },
385
- phase: { $ref: "#/$defs/DocPhase" },
682
+ kind: {
683
+ const: "link"
684
+ },
685
+ label: {
686
+ type: "string"
687
+ },
688
+ url: {
689
+ type: "string"
690
+ },
691
+ phase: {
692
+ $ref: "#/$defs/DocPhase"
693
+ },
386
694
  children: {
387
695
  type: "array",
388
- items: { $ref: "#/$defs/DocEntry" }
696
+ items: {
697
+ $ref: "#/$defs/DocEntry"
698
+ }
389
699
  }
390
700
  },
391
- required: ["kind", "label", "url", "phase"],
701
+ required: [
702
+ "kind",
703
+ "label",
704
+ "url",
705
+ "phase"
706
+ ],
392
707
  additionalProperties: false
393
708
  },
394
709
  DocSection: {
395
710
  type: "object",
396
711
  properties: {
397
- kind: { const: "section" },
398
- title: { type: "string" },
399
- markdown: { type: "string" },
400
- phase: { $ref: "#/$defs/DocPhase" },
712
+ kind: {
713
+ const: "section"
714
+ },
715
+ title: {
716
+ type: "string"
717
+ },
718
+ markdown: {
719
+ type: "string"
720
+ },
721
+ phase: {
722
+ $ref: "#/$defs/DocPhase"
723
+ },
401
724
  children: {
402
725
  type: "array",
403
- items: { $ref: "#/$defs/DocEntry" }
726
+ items: {
727
+ $ref: "#/$defs/DocEntry"
728
+ }
404
729
  }
405
730
  },
406
- required: ["kind", "title", "markdown", "phase"],
731
+ required: [
732
+ "kind",
733
+ "title",
734
+ "markdown",
735
+ "phase"
736
+ ],
407
737
  additionalProperties: false
408
738
  },
409
739
  DocMermaid: {
410
740
  type: "object",
411
741
  properties: {
412
- kind: { const: "mermaid" },
413
- code: { type: "string" },
414
- title: { type: "string" },
415
- phase: { $ref: "#/$defs/DocPhase" },
742
+ kind: {
743
+ const: "mermaid"
744
+ },
745
+ code: {
746
+ type: "string"
747
+ },
748
+ title: {
749
+ type: "string"
750
+ },
751
+ phase: {
752
+ $ref: "#/$defs/DocPhase"
753
+ },
416
754
  children: {
417
755
  type: "array",
418
- items: { $ref: "#/$defs/DocEntry" }
756
+ items: {
757
+ $ref: "#/$defs/DocEntry"
758
+ }
419
759
  }
420
760
  },
421
- required: ["kind", "code", "phase"],
761
+ required: [
762
+ "kind",
763
+ "code",
764
+ "phase"
765
+ ],
422
766
  additionalProperties: false
423
767
  },
424
768
  DocScreenshot: {
425
769
  type: "object",
426
770
  properties: {
427
- kind: { const: "screenshot" },
428
- path: { type: "string" },
429
- alt: { type: "string" },
430
- phase: { $ref: "#/$defs/DocPhase" },
771
+ kind: {
772
+ const: "screenshot"
773
+ },
774
+ path: {
775
+ type: "string"
776
+ },
777
+ alt: {
778
+ type: "string"
779
+ },
780
+ phase: {
781
+ $ref: "#/$defs/DocPhase"
782
+ },
431
783
  children: {
432
784
  type: "array",
433
- items: { $ref: "#/$defs/DocEntry" }
785
+ items: {
786
+ $ref: "#/$defs/DocEntry"
787
+ }
434
788
  }
435
789
  },
436
- required: ["kind", "path", "phase"],
790
+ required: [
791
+ "kind",
792
+ "path",
793
+ "phase"
794
+ ],
437
795
  additionalProperties: false
438
796
  },
439
797
  DocVideo: {
440
798
  type: "object",
441
799
  properties: {
442
- kind: { const: "video" },
443
- path: { type: "string" },
444
- caption: { type: "string" },
445
- poster: { type: "string" },
446
- phase: { $ref: "#/$defs/DocPhase" },
800
+ kind: {
801
+ const: "video"
802
+ },
803
+ path: {
804
+ type: "string"
805
+ },
806
+ caption: {
807
+ type: "string"
808
+ },
809
+ poster: {
810
+ type: "string"
811
+ },
812
+ phase: {
813
+ $ref: "#/$defs/DocPhase"
814
+ },
447
815
  children: {
448
816
  type: "array",
449
- items: { $ref: "#/$defs/DocEntry" }
817
+ items: {
818
+ $ref: "#/$defs/DocEntry"
819
+ }
450
820
  }
451
821
  },
452
- required: ["kind", "path", "phase"],
822
+ required: [
823
+ "kind",
824
+ "path",
825
+ "phase"
826
+ ],
453
827
  additionalProperties: false
454
828
  },
455
829
  DocHtml: {
456
830
  type: "object",
457
831
  properties: {
458
- kind: { const: "html" },
459
- path: { type: "string" },
460
- url: { type: "string" },
461
- content: { type: "string" },
462
- title: { type: "string" },
463
- height: { oneOf: [{ type: "number" }, { type: "string" }] },
464
- phase: { $ref: "#/$defs/DocPhase" },
832
+ kind: {
833
+ const: "html"
834
+ },
835
+ path: {
836
+ type: "string"
837
+ },
838
+ url: {
839
+ type: "string"
840
+ },
841
+ content: {
842
+ type: "string"
843
+ },
844
+ title: {
845
+ type: "string"
846
+ },
847
+ height: {
848
+ oneOf: [
849
+ {
850
+ type: "number"
851
+ },
852
+ {
853
+ type: "string"
854
+ }
855
+ ]
856
+ },
857
+ phase: {
858
+ $ref: "#/$defs/DocPhase"
859
+ },
465
860
  children: {
466
861
  type: "array",
467
- items: { $ref: "#/$defs/DocEntry" }
862
+ items: {
863
+ $ref: "#/$defs/DocEntry"
864
+ }
468
865
  }
469
866
  },
470
- required: ["kind", "phase"],
471
- oneOf: [
472
- { required: ["path"] },
473
- { required: ["url"] },
474
- { required: ["content"] }
867
+ required: [
868
+ "kind",
869
+ "phase"
475
870
  ],
476
- additionalProperties: false
871
+ additionalProperties: false,
872
+ oneOf: [
873
+ {
874
+ required: [
875
+ "path"
876
+ ]
877
+ },
878
+ {
879
+ required: [
880
+ "url"
881
+ ]
882
+ },
883
+ {
884
+ required: [
885
+ "content"
886
+ ]
887
+ }
888
+ ]
477
889
  },
478
890
  DocCustom: {
479
891
  type: "object",
480
892
  properties: {
481
- kind: { const: "custom" },
482
- type: { type: "string", minLength: 1 },
893
+ kind: {
894
+ const: "custom"
895
+ },
896
+ type: {
897
+ type: "string",
898
+ minLength: 1
899
+ },
483
900
  data: {},
484
- phase: { $ref: "#/$defs/DocPhase" },
901
+ phase: {
902
+ $ref: "#/$defs/DocPhase"
903
+ },
485
904
  children: {
486
905
  type: "array",
487
- items: { $ref: "#/$defs/DocEntry" }
906
+ items: {
907
+ $ref: "#/$defs/DocEntry"
908
+ }
909
+ }
910
+ },
911
+ required: [
912
+ "kind",
913
+ "type",
914
+ "data",
915
+ "phase"
916
+ ],
917
+ additionalProperties: false
918
+ },
919
+ OtelSpan: {
920
+ type: "object",
921
+ required: [
922
+ "spanId",
923
+ "name",
924
+ "status"
925
+ ],
926
+ properties: {
927
+ spanId: {
928
+ type: "string"
929
+ },
930
+ parentSpanId: {
931
+ type: "string"
932
+ },
933
+ name: {
934
+ type: "string"
935
+ },
936
+ startTimeMs: {
937
+ type: "number"
938
+ },
939
+ durationMs: {
940
+ type: "number"
941
+ },
942
+ startTimeUnixNano: {
943
+ type: "number"
944
+ },
945
+ endTimeUnixNano: {
946
+ type: "number"
947
+ },
948
+ status: {
949
+ enum: [
950
+ "ok",
951
+ "error",
952
+ "unset"
953
+ ]
954
+ },
955
+ statusMessage: {
956
+ type: "string"
957
+ },
958
+ attributes: {
959
+ type: "object"
488
960
  }
489
961
  },
490
- required: ["kind", "type", "data", "phase"],
491
962
  additionalProperties: false
492
963
  }
493
964
  }
494
965
  };
495
966
 
967
+ // src/schema/version.ts
968
+ var STORY_REPORT_SCHEMA_MAJOR = 1;
969
+
496
970
  // src/schema/story-report.schema.ts
497
- var compiled = import_zod.z.fromJSONSchema(story_report_v1_default);
971
+ var schemaForZod = structuredClone(story_report_v1_default);
972
+ if (schemaForZod.$defs?.DocHtml) {
973
+ delete schemaForZod.$defs.DocHtml.oneOf;
974
+ }
975
+ var compiled = import_zod.z.fromJSONSchema(schemaForZod);
498
976
  var storyReportSchema = compiled;
499
- var STORY_REPORT_SCHEMA_MAJOR = 1;
500
977
 
501
978
  // src/schema/parse.ts
502
979
  function parseStoryReport(input) {