executable-stories-formatters 1.14.0 → 1.16.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/index.d.cts CHANGED
@@ -308,6 +308,10 @@ interface FormatterOptions {
308
308
  mermaidEnabled?: boolean;
309
309
  /** Days before the report shows a stale warning. 0 disables. Default: 7 */
310
310
  staleAfterDays?: number;
311
+ /** Show the Share button in the interactive report header. Default: false. */
312
+ share?: boolean;
313
+ /** Command the share dialog shows. Default: `npx executable-stories share <output-dir>`. */
314
+ shareCommand?: string;
311
315
  };
312
316
  /**
313
317
  * Run history store (see loadHistory/updateHistory). When set, the HTML
@@ -479,6 +483,8 @@ interface ResolvedFormatterOptions {
479
483
  syntaxHighlighting: boolean;
480
484
  mermaidEnabled: boolean;
481
485
  staleAfterDays: number;
486
+ share: boolean;
487
+ shareCommand: string | undefined;
482
488
  };
483
489
  historyStore: HistoryStore | undefined;
484
490
  junit: {
@@ -2801,6 +2807,8 @@ interface CheckArgs {
2801
2807
  testCases: TestCaseResult[];
2802
2808
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
2803
2809
  baseline?: Map<string, TestStatus>;
2810
+ /** Per-scenario time budget. Scenarios above it are named (see {@link CheckSlow}). */
2811
+ maxDurationMs?: number;
2804
2812
  format: "text" | "json";
2805
2813
  }
2806
2814
  type CheckDeps = Record<string, never>;
@@ -2839,6 +2847,17 @@ interface CheckTurnedOff {
2839
2847
  status: "skipped" | "pending";
2840
2848
  tickets: string[];
2841
2849
  }
2850
+ /**
2851
+ * A scenario that took longer than the budget. A slow suite is usually two or
2852
+ * three scenarios, and nobody knows which until something names them.
2853
+ */
2854
+ interface CheckSlow {
2855
+ id: string;
2856
+ scenario: string;
2857
+ /** `sourceFile:sourceLine` */
2858
+ location: string;
2859
+ durationMs: number;
2860
+ }
2842
2861
  interface CheckReport {
2843
2862
  summary: {
2844
2863
  total: number;
@@ -2850,6 +2869,10 @@ interface CheckReport {
2850
2869
  failures: CheckFailure[];
2851
2870
  /** Scenarios switched off — named, not just counted (see {@link CheckTurnedOff}). */
2852
2871
  turnedOff: CheckTurnedOff[];
2872
+ /** Scenarios over `--max-duration`, longest first. Empty without a budget. */
2873
+ overBudget: CheckSlow[];
2874
+ /** The budget those scenarios broke, for the message that names it. */
2875
+ maxDurationMs?: number;
2853
2876
  /** Count of scenarios that went passed → failed vs. the baseline. */
2854
2877
  regressed: number;
2855
2878
  /** Count of scenarios that went failed → passed vs. the baseline. */
@@ -2925,6 +2948,22 @@ type GoalDeps = Record<string, never>;
2925
2948
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
2926
2949
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
2927
2950
 
2951
+ /**
2952
+ * CODEOWNERS parsing, so a failing scenario can name the team that fixes it.
2953
+ *
2954
+ * A red run that belongs to everyone belongs to nobody until someone
2955
+ * volunteers. `triage --by-owner` groups the worklist the way the repo already
2956
+ * divides responsibility, using the file every GitHub repo already has.
2957
+ *
2958
+ * Supports the common CODEOWNERS subset — leading `/`, trailing `/`,
2959
+ * `*`, `**`, and bare extension globs. Character classes, `?`, and negation are
2960
+ * not implemented; swap in a gitignore-grade matcher if a repo needs them.
2961
+ */
2962
+ interface CodeownersRule {
2963
+ pattern: string;
2964
+ owners: string[];
2965
+ }
2966
+
2928
2967
  /**
2929
2968
  * `triage` — the discovery-phase worklist for an agent loop.
2930
2969
  *
@@ -2945,6 +2984,8 @@ interface TriageItem {
2945
2984
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
2946
2985
  covers: string[];
2947
2986
  tickets: string[];
2987
+ /** CODEOWNERS entries for the code this scenario covers. Empty = unclaimed. */
2988
+ owners: string[];
2948
2989
  errorMessage?: string;
2949
2990
  /** Passed in the baseline, failing now. Ranked first. */
2950
2991
  regressed: boolean;
@@ -2963,10 +3004,16 @@ interface TriageArgs {
2963
3004
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
2964
3005
  baseline?: Map<string, TestStatus>;
2965
3006
  format: "text" | "json";
3007
+ /** Parsed CODEOWNERS. Without it every item is unowned. */
3008
+ codeowners?: readonly CodeownersRule[];
2966
3009
  }
2967
3010
  type TriageDeps = Record<string, never>;
2968
3011
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
2969
- declare function renderTriage(report: TriageReport, format: "text" | "json"): string;
3012
+ interface RenderTriageOptions {
3013
+ /** Group the text worklist under each CODEOWNERS owner. */
3014
+ byOwner?: boolean;
3015
+ }
3016
+ declare function renderTriage(report: TriageReport, format: "text" | "json", options?: RenderTriageOptions): string;
2970
3017
 
2971
3018
  /**
2972
3019
  * ReportGenerator — turns a canonical TestRunResult into report files.
package/dist/index.d.ts CHANGED
@@ -308,6 +308,10 @@ interface FormatterOptions {
308
308
  mermaidEnabled?: boolean;
309
309
  /** Days before the report shows a stale warning. 0 disables. Default: 7 */
310
310
  staleAfterDays?: number;
311
+ /** Show the Share button in the interactive report header. Default: false. */
312
+ share?: boolean;
313
+ /** Command the share dialog shows. Default: `npx executable-stories share <output-dir>`. */
314
+ shareCommand?: string;
311
315
  };
312
316
  /**
313
317
  * Run history store (see loadHistory/updateHistory). When set, the HTML
@@ -479,6 +483,8 @@ interface ResolvedFormatterOptions {
479
483
  syntaxHighlighting: boolean;
480
484
  mermaidEnabled: boolean;
481
485
  staleAfterDays: number;
486
+ share: boolean;
487
+ shareCommand: string | undefined;
482
488
  };
483
489
  historyStore: HistoryStore | undefined;
484
490
  junit: {
@@ -2801,6 +2807,8 @@ interface CheckArgs {
2801
2807
  testCases: TestCaseResult[];
2802
2808
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
2803
2809
  baseline?: Map<string, TestStatus>;
2810
+ /** Per-scenario time budget. Scenarios above it are named (see {@link CheckSlow}). */
2811
+ maxDurationMs?: number;
2804
2812
  format: "text" | "json";
2805
2813
  }
2806
2814
  type CheckDeps = Record<string, never>;
@@ -2839,6 +2847,17 @@ interface CheckTurnedOff {
2839
2847
  status: "skipped" | "pending";
2840
2848
  tickets: string[];
2841
2849
  }
2850
+ /**
2851
+ * A scenario that took longer than the budget. A slow suite is usually two or
2852
+ * three scenarios, and nobody knows which until something names them.
2853
+ */
2854
+ interface CheckSlow {
2855
+ id: string;
2856
+ scenario: string;
2857
+ /** `sourceFile:sourceLine` */
2858
+ location: string;
2859
+ durationMs: number;
2860
+ }
2842
2861
  interface CheckReport {
2843
2862
  summary: {
2844
2863
  total: number;
@@ -2850,6 +2869,10 @@ interface CheckReport {
2850
2869
  failures: CheckFailure[];
2851
2870
  /** Scenarios switched off — named, not just counted (see {@link CheckTurnedOff}). */
2852
2871
  turnedOff: CheckTurnedOff[];
2872
+ /** Scenarios over `--max-duration`, longest first. Empty without a budget. */
2873
+ overBudget: CheckSlow[];
2874
+ /** The budget those scenarios broke, for the message that names it. */
2875
+ maxDurationMs?: number;
2853
2876
  /** Count of scenarios that went passed → failed vs. the baseline. */
2854
2877
  regressed: number;
2855
2878
  /** Count of scenarios that went failed → passed vs. the baseline. */
@@ -2925,6 +2948,22 @@ type GoalDeps = Record<string, never>;
2925
2948
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
2926
2949
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
2927
2950
 
2951
+ /**
2952
+ * CODEOWNERS parsing, so a failing scenario can name the team that fixes it.
2953
+ *
2954
+ * A red run that belongs to everyone belongs to nobody until someone
2955
+ * volunteers. `triage --by-owner` groups the worklist the way the repo already
2956
+ * divides responsibility, using the file every GitHub repo already has.
2957
+ *
2958
+ * Supports the common CODEOWNERS subset — leading `/`, trailing `/`,
2959
+ * `*`, `**`, and bare extension globs. Character classes, `?`, and negation are
2960
+ * not implemented; swap in a gitignore-grade matcher if a repo needs them.
2961
+ */
2962
+ interface CodeownersRule {
2963
+ pattern: string;
2964
+ owners: string[];
2965
+ }
2966
+
2928
2967
  /**
2929
2968
  * `triage` — the discovery-phase worklist for an agent loop.
2930
2969
  *
@@ -2945,6 +2984,8 @@ interface TriageItem {
2945
2984
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
2946
2985
  covers: string[];
2947
2986
  tickets: string[];
2987
+ /** CODEOWNERS entries for the code this scenario covers. Empty = unclaimed. */
2988
+ owners: string[];
2948
2989
  errorMessage?: string;
2949
2990
  /** Passed in the baseline, failing now. Ranked first. */
2950
2991
  regressed: boolean;
@@ -2963,10 +3004,16 @@ interface TriageArgs {
2963
3004
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
2964
3005
  baseline?: Map<string, TestStatus>;
2965
3006
  format: "text" | "json";
3007
+ /** Parsed CODEOWNERS. Without it every item is unowned. */
3008
+ codeowners?: readonly CodeownersRule[];
2966
3009
  }
2967
3010
  type TriageDeps = Record<string, never>;
2968
3011
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
2969
- declare function renderTriage(report: TriageReport, format: "text" | "json"): string;
3012
+ interface RenderTriageOptions {
3013
+ /** Group the text worklist under each CODEOWNERS owner. */
3014
+ byOwner?: boolean;
3015
+ }
3016
+ declare function renderTriage(report: TriageReport, format: "text" | "json", options?: RenderTriageOptions): string;
2970
3017
 
2971
3018
  /**
2972
3019
  * ReportGenerator — turns a canonical TestRunResult into report files.