executable-stories-formatters 0.7.0 → 0.7.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.
@@ -39,52 +39,62 @@ type DocEntry = {
39
39
  kind: "note";
40
40
  text: string;
41
41
  phase: DocPhase;
42
+ children?: DocEntry[];
42
43
  } | {
43
44
  kind: "tag";
44
45
  names: string[];
45
46
  phase: DocPhase;
47
+ children?: DocEntry[];
46
48
  } | {
47
49
  kind: "kv";
48
50
  label: string;
49
51
  value: unknown;
50
52
  phase: DocPhase;
53
+ children?: DocEntry[];
51
54
  } | {
52
55
  kind: "code";
53
56
  label: string;
54
57
  content: string;
55
58
  lang?: string;
56
59
  phase: DocPhase;
60
+ children?: DocEntry[];
57
61
  } | {
58
62
  kind: "table";
59
63
  label: string;
60
64
  columns: string[];
61
65
  rows: string[][];
62
66
  phase: DocPhase;
67
+ children?: DocEntry[];
63
68
  } | {
64
69
  kind: "link";
65
70
  label: string;
66
71
  url: string;
67
72
  phase: DocPhase;
73
+ children?: DocEntry[];
68
74
  } | {
69
75
  kind: "section";
70
76
  title: string;
71
77
  markdown: string;
72
78
  phase: DocPhase;
79
+ children?: DocEntry[];
73
80
  } | {
74
81
  kind: "mermaid";
75
82
  code: string;
76
83
  title?: string;
77
84
  phase: DocPhase;
85
+ children?: DocEntry[];
78
86
  } | {
79
87
  kind: "screenshot";
80
88
  path: string;
81
89
  alt?: string;
82
90
  phase: DocPhase;
91
+ children?: DocEntry[];
83
92
  } | {
84
93
  kind: "custom";
85
94
  type: string;
86
95
  data: unknown;
87
96
  phase: DocPhase;
97
+ children?: DocEntry[];
88
98
  };
89
99
  /**
90
100
  * A single step in a scenario with its documentation entries.
@@ -105,6 +115,13 @@ interface StoryStep {
105
115
  /** Whether this step wrapped a function body (step.fn / step.step) vs a text marker */
106
116
  wrapped?: boolean;
107
117
  }
118
+ /** A ticket reference with an optional direct URL */
119
+ interface NormalizedTicket {
120
+ /** Ticket identifier (e.g., "JIRA-123", "PAY-1042") */
121
+ id: string;
122
+ /** Direct URL to the ticket (overrides ticketUrlTemplate) */
123
+ url?: string;
124
+ }
108
125
  /**
109
126
  * Metadata for a complete scenario, attached to test metadata.
110
127
  * Used by reporters to generate documentation.
@@ -117,7 +134,7 @@ interface StoryMeta {
117
134
  /** Tags for filtering and categorization */
118
135
  tags?: string[];
119
136
  /** Ticket/issue references (normalized to array) */
120
- tickets?: string[];
137
+ tickets?: NormalizedTicket[];
121
138
  /** User-defined metadata */
122
139
  meta?: Record<string, unknown>;
123
140
  /** Parent describe/suite names for hierarchical grouping */
@@ -425,4 +442,4 @@ interface PlaywrightAdapterOptions {
425
442
  */
426
443
  declare function adaptPlaywrightRun(testResults: Array<[PlaywrightTestCase, PlaywrightTestResult]>, options?: PlaywrightAdapterOptions): RawRun;
427
444
 
428
- export { type VitestSerializedError as A, type VitestState as B, type CIInfo as C, type DocEntry as D, type VitestTestCase as E, type VitestTestModule as F, type VitestTestResult as G, toCIInfo as H, toRawCIInfo as I, type JestAdapterOptions as J, type OtelSpan as O, type PlaywrightAdapterOptions as P, type RawStatus as R, type StoryMeta as S, type VitestAdapterOptions as V, type StoryStep as a, type CIProvider as b, type RawAttachment as c, type RawRun as d, type RawCIInfo as e, adaptJestRun as f, adaptPlaywrightRun as g, adaptVitestRun as h, type DocPhase as i, type JestAggregatedResult as j, type JestFileResult as k, type JestTestResult as l, type OtelAttributeValue as m, type PlaywrightAnnotation as n, type PlaywrightAttachment as o, type PlaywrightError as p, type PlaywrightLocation as q, type PlaywrightStatus as r, type PlaywrightTestCase as s, type PlaywrightTestResult as t, type RawStepEvent as u, type RawTestCase as v, STORY_META_KEY as w, type StepKeyword as x, type StepMode as y, type StoryFileReport as z };
445
+ export { type VitestSerializedError as A, type VitestState as B, type CIInfo as C, type DocEntry as D, type VitestTestCase as E, type VitestTestModule as F, type VitestTestResult as G, toCIInfo as H, toRawCIInfo as I, type JestAdapterOptions as J, type NormalizedTicket as N, type OtelSpan as O, type PlaywrightAdapterOptions as P, type RawStatus as R, type StoryMeta as S, type VitestAdapterOptions as V, type StoryStep as a, type CIProvider as b, type RawAttachment as c, type RawRun as d, type RawCIInfo as e, adaptJestRun as f, adaptPlaywrightRun as g, adaptVitestRun as h, type DocPhase as i, type JestAggregatedResult as j, type JestFileResult as k, type JestTestResult as l, type OtelAttributeValue as m, type PlaywrightAnnotation as n, type PlaywrightAttachment as o, type PlaywrightError as p, type PlaywrightLocation as q, type PlaywrightStatus as r, type PlaywrightTestCase as s, type PlaywrightTestResult as t, type RawStepEvent as u, type RawTestCase as v, STORY_META_KEY as w, type StepKeyword as x, type StepMode as y, type StoryFileReport as z };
@@ -39,52 +39,62 @@ type DocEntry = {
39
39
  kind: "note";
40
40
  text: string;
41
41
  phase: DocPhase;
42
+ children?: DocEntry[];
42
43
  } | {
43
44
  kind: "tag";
44
45
  names: string[];
45
46
  phase: DocPhase;
47
+ children?: DocEntry[];
46
48
  } | {
47
49
  kind: "kv";
48
50
  label: string;
49
51
  value: unknown;
50
52
  phase: DocPhase;
53
+ children?: DocEntry[];
51
54
  } | {
52
55
  kind: "code";
53
56
  label: string;
54
57
  content: string;
55
58
  lang?: string;
56
59
  phase: DocPhase;
60
+ children?: DocEntry[];
57
61
  } | {
58
62
  kind: "table";
59
63
  label: string;
60
64
  columns: string[];
61
65
  rows: string[][];
62
66
  phase: DocPhase;
67
+ children?: DocEntry[];
63
68
  } | {
64
69
  kind: "link";
65
70
  label: string;
66
71
  url: string;
67
72
  phase: DocPhase;
73
+ children?: DocEntry[];
68
74
  } | {
69
75
  kind: "section";
70
76
  title: string;
71
77
  markdown: string;
72
78
  phase: DocPhase;
79
+ children?: DocEntry[];
73
80
  } | {
74
81
  kind: "mermaid";
75
82
  code: string;
76
83
  title?: string;
77
84
  phase: DocPhase;
85
+ children?: DocEntry[];
78
86
  } | {
79
87
  kind: "screenshot";
80
88
  path: string;
81
89
  alt?: string;
82
90
  phase: DocPhase;
91
+ children?: DocEntry[];
83
92
  } | {
84
93
  kind: "custom";
85
94
  type: string;
86
95
  data: unknown;
87
96
  phase: DocPhase;
97
+ children?: DocEntry[];
88
98
  };
89
99
  /**
90
100
  * A single step in a scenario with its documentation entries.
@@ -105,6 +115,13 @@ interface StoryStep {
105
115
  /** Whether this step wrapped a function body (step.fn / step.step) vs a text marker */
106
116
  wrapped?: boolean;
107
117
  }
118
+ /** A ticket reference with an optional direct URL */
119
+ interface NormalizedTicket {
120
+ /** Ticket identifier (e.g., "JIRA-123", "PAY-1042") */
121
+ id: string;
122
+ /** Direct URL to the ticket (overrides ticketUrlTemplate) */
123
+ url?: string;
124
+ }
108
125
  /**
109
126
  * Metadata for a complete scenario, attached to test metadata.
110
127
  * Used by reporters to generate documentation.
@@ -117,7 +134,7 @@ interface StoryMeta {
117
134
  /** Tags for filtering and categorization */
118
135
  tags?: string[];
119
136
  /** Ticket/issue references (normalized to array) */
120
- tickets?: string[];
137
+ tickets?: NormalizedTicket[];
121
138
  /** User-defined metadata */
122
139
  meta?: Record<string, unknown>;
123
140
  /** Parent describe/suite names for hierarchical grouping */
@@ -425,4 +442,4 @@ interface PlaywrightAdapterOptions {
425
442
  */
426
443
  declare function adaptPlaywrightRun(testResults: Array<[PlaywrightTestCase, PlaywrightTestResult]>, options?: PlaywrightAdapterOptions): RawRun;
427
444
 
428
- export { type VitestSerializedError as A, type VitestState as B, type CIInfo as C, type DocEntry as D, type VitestTestCase as E, type VitestTestModule as F, type VitestTestResult as G, toCIInfo as H, toRawCIInfo as I, type JestAdapterOptions as J, type OtelSpan as O, type PlaywrightAdapterOptions as P, type RawStatus as R, type StoryMeta as S, type VitestAdapterOptions as V, type StoryStep as a, type CIProvider as b, type RawAttachment as c, type RawRun as d, type RawCIInfo as e, adaptJestRun as f, adaptPlaywrightRun as g, adaptVitestRun as h, type DocPhase as i, type JestAggregatedResult as j, type JestFileResult as k, type JestTestResult as l, type OtelAttributeValue as m, type PlaywrightAnnotation as n, type PlaywrightAttachment as o, type PlaywrightError as p, type PlaywrightLocation as q, type PlaywrightStatus as r, type PlaywrightTestCase as s, type PlaywrightTestResult as t, type RawStepEvent as u, type RawTestCase as v, STORY_META_KEY as w, type StepKeyword as x, type StepMode as y, type StoryFileReport as z };
445
+ export { type VitestSerializedError as A, type VitestState as B, type CIInfo as C, type DocEntry as D, type VitestTestCase as E, type VitestTestModule as F, type VitestTestResult as G, toCIInfo as H, toRawCIInfo as I, type JestAdapterOptions as J, type NormalizedTicket as N, type OtelSpan as O, type PlaywrightAdapterOptions as P, type RawStatus as R, type StoryMeta as S, type VitestAdapterOptions as V, type StoryStep as a, type CIProvider as b, type RawAttachment as c, type RawRun as d, type RawCIInfo as e, adaptJestRun as f, adaptPlaywrightRun as g, adaptVitestRun as h, type DocPhase as i, type JestAggregatedResult as j, type JestFileResult as k, type JestTestResult as l, type OtelAttributeValue as m, type PlaywrightAnnotation as n, type PlaywrightAttachment as o, type PlaywrightError as p, type PlaywrightLocation as q, type PlaywrightStatus as r, type PlaywrightTestCase as s, type PlaywrightTestResult as t, type RawStepEvent as u, type RawTestCase as v, STORY_META_KEY as w, type StepKeyword as x, type StepMode as y, type StoryFileReport as z };