executable-stories-formatters 0.10.0 → 0.11.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
@@ -1,5 +1,5 @@
1
- import { C as CIInfo, T as TestRunResult, a as TestCaseResult, S as StoryStep, D as DocEntry, b as TestStatus$1, N as NormalizedTicket, A as Attachment, c as DocPhase, O as OtelSpan, d as StepResult, e as CIProvider, R as RawStatus, f as RawAttachment, g as RawRun, h as RawCIInfo, i as adaptJestRun, j as adaptPlaywrightRun, k as adaptVitestRun } from './index-CbWFyoTx.cjs';
2
- export { l as CIInfo, m as CoverageSummary, J as JestAdapterOptions, n as JestAggregatedResult, o as JestFileResult, p as JestTestResult, q as OtelAttributeValue, P as PlaywrightAdapterOptions, r as PlaywrightAnnotation, s as PlaywrightAttachment, t as PlaywrightError, u as PlaywrightLocation, v as PlaywrightStatus, w as PlaywrightTestCase, x as PlaywrightTestResult, y as RawStepEvent, z as RawTestCase, B as STORY_META_KEY, E as StepKeyword, F as StepMode, G as StoryFileReport, H as StoryMeta, I as TestCaseAttempt, K as TestCaseEvidence, V as VitestAdapterOptions, L as VitestSerializedError, M as VitestState, Q as VitestTestCase, U as VitestTestModule, W as VitestTestResult, X as toCIInfo, Y as toRawCIInfo } from './index-CbWFyoTx.cjs';
1
+ import { C as CIInfo, T as TestRunResult, a as TestCaseResult, S as StoryStep, D as DocEntry, b as TestStatus$1, N as NormalizedTicket, A as Attachment, c as DocPhase, O as OtelSpan, d as StepResult, e as CIProvider, R as RawStatus, f as RawAttachment, g as RawRun, h as RawCIInfo, i as adaptJestRun, j as adaptPlaywrightRun, k as adaptVitestRun } from './index-DF16Xl5i.cjs';
2
+ export { l as CIInfo, m as CoverageSummary, J as JestAdapterOptions, n as JestAggregatedResult, o as JestFileResult, p as JestTestResult, q as OtelAttributeValue, P as PlaywrightAdapterOptions, r as PlaywrightAnnotation, s as PlaywrightAttachment, t as PlaywrightError, u as PlaywrightLocation, v as PlaywrightStatus, w as PlaywrightTestCase, x as PlaywrightTestResult, y as RawStepEvent, z as RawTestCase, B as STORY_META_KEY, E as StepKeyword, F as StepMode, G as StoryFileReport, H as StoryMeta, I as TestCaseAttempt, K as TestCaseEvidence, V as VitestAdapterOptions, L as VitestSerializedError, M as VitestState, Q as VitestTestCase, U as VitestTestModule, W as VitestTestResult, X as toCIInfo, Y as toRawCIInfo } from './index-DF16Xl5i.cjs';
3
3
 
4
4
  /**
5
5
  * Notification types for webhook integrations (Slack, Teams).
@@ -150,13 +150,19 @@ interface CanonicalizeOptions {
150
150
  };
151
151
  }
152
152
  /** Output format for report generation */
153
- type OutputFormat = "astro" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "scenario-index-json" | "story-report-json";
153
+ type OutputFormat = "astro" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json";
154
154
  /** Sort order for test cases in reports (deterministic for diff-friendly output) */
155
155
  type SortTestCasesMode = "id" | "source" | "none";
156
156
  /** Output mode for report routing */
157
157
  type OutputMode = "aggregated" | "colocated";
158
- /** Colocated output style */
159
- type ColocatedStyle = "mirrored" | "adjacent";
158
+ /**
159
+ * Colocated output style:
160
+ * - `mirrored` — preserve the source directory tree under outputDir (default)
161
+ * - `adjacent` — write next to each source file (ignores outputDir)
162
+ * - `flat` — one page per file directly under outputDir, named by its clean
163
+ * stem (e.g. `convert-currency.md`); best for a browsable docs nav
164
+ */
165
+ type ColocatedStyle = "mirrored" | "adjacent" | "flat";
160
166
  /** Output rule for routing reports based on source file patterns */
161
167
  interface OutputRule {
162
168
  /** Glob pattern to match sourceFile (uses micromatch, forward slashes) */
@@ -706,7 +712,7 @@ interface ReportCoverageSummary {
706
712
  functionsPct?: number;
707
713
  statementsPct?: number;
708
714
  }
709
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocCustom;
715
+ type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocCustom;
710
716
  interface ReportDocNote {
711
717
  kind: "note";
712
718
  text: string;
@@ -770,6 +776,14 @@ interface ReportDocScreenshot {
770
776
  phase: DocPhase;
771
777
  children?: ReportDocEntry[];
772
778
  }
779
+ interface ReportDocVideo {
780
+ kind: "video";
781
+ path: string;
782
+ caption?: string;
783
+ poster?: string;
784
+ phase: DocPhase;
785
+ children?: ReportDocEntry[];
786
+ }
773
787
  interface ReportDocCustom {
774
788
  kind: "custom";
775
789
  type: string;
@@ -1987,13 +2001,27 @@ interface StarlightBadge {
1987
2001
  }
1988
2002
  interface AstroFormatterOptions {
1989
2003
  assetsBaseUrl?: string;
2004
+ /**
2005
+ * Title each page by its own suite/file rather than the configured title.
2006
+ * Set by colocated mode (one page per file) so the docs nav reads with
2007
+ * distinct, meaningful labels.
2008
+ */
2009
+ perFileTitle?: boolean;
1990
2010
  markdown?: Omit<MarkdownOptions, "includeFrontMatter" | "includeSummaryTable" | "includeMetadata" | "stepStyle">;
1991
2011
  }
1992
2012
  declare class AstroFormatter {
1993
2013
  private markdownFormatter;
1994
2014
  private title;
2015
+ private perFileTitle;
1995
2016
  constructor(options?: AstroFormatterOptions);
1996
2017
  format(run: TestRunResult): string;
2018
+ /**
2019
+ * Title for the page. A per-file page (one source file — i.e. colocated mode)
2020
+ * is titled by its suite/describe name, falling back to a humanized filename,
2021
+ * so the docs nav reads "Convert Currency" not "User Stories" six times over.
2022
+ * Multi-file (aggregated) pages keep the configured title.
2023
+ */
2024
+ private deriveTitle;
1997
2025
  private buildFrontmatter;
1998
2026
  static computeBadge(testCases: Pick<TestCaseResult, "status">[]): StarlightBadge;
1999
2027
  }
@@ -3006,6 +3034,92 @@ interface BundleResult {
3006
3034
  */
3007
3035
  declare function bundleAssets(htmlPath: string, options?: BundleOptions): BundleResult;
3008
3036
 
3037
+ interface DeploymentEntry {
3038
+ environment: string;
3039
+ tag?: string;
3040
+ sha?: string;
3041
+ runFile: string;
3042
+ scenarioIds: string[];
3043
+ scenarioStatuses?: Record<string, string>;
3044
+ timestamp: string;
3045
+ summary: {
3046
+ total: number;
3047
+ passed: number;
3048
+ failed: number;
3049
+ skipped: number;
3050
+ pending: number;
3051
+ };
3052
+ }
3053
+ interface DeploymentLedger {
3054
+ deployments: DeploymentEntry[];
3055
+ schemaVersion: 1;
3056
+ }
3057
+
3058
+ interface RecordDeploymentArgs {
3059
+ run: TestRunResult;
3060
+ environment: string;
3061
+ tag?: string;
3062
+ ledgerPath: string;
3063
+ runFilePath: string;
3064
+ }
3065
+ interface RecordDeploymentResult {
3066
+ entry: DeploymentEntry;
3067
+ ledgerPath: string;
3068
+ }
3069
+ declare function recordDeployment(args: RecordDeploymentArgs): RecordDeploymentResult;
3070
+ interface DeploymentStatus {
3071
+ environments: Record<string, {
3072
+ latest: DeploymentEntry;
3073
+ previousDeployment?: DeploymentEntry;
3074
+ }>;
3075
+ ledgerPath: string;
3076
+ }
3077
+ declare function getDeploymentStatus(ledgerPath: string): DeploymentStatus;
3078
+ interface EnvironmentDrift {
3079
+ environmentA: string;
3080
+ environmentB: string;
3081
+ onlyInA: string[];
3082
+ onlyInB: string[];
3083
+ inBoth: string[];
3084
+ statusChanged: Array<{
3085
+ id: string;
3086
+ statusA: string;
3087
+ statusB: string;
3088
+ }>;
3089
+ aEntry: DeploymentEntry;
3090
+ bEntry: DeploymentEntry;
3091
+ }
3092
+ declare function getEnvironmentDrift(ledgerPath: string, envA: string, envB: string): EnvironmentDrift;
3093
+
3094
+ interface ReleaseManifest {
3095
+ schemaVersion: "1.0";
3096
+ generatedAt: string;
3097
+ run: {
3098
+ startedAt: string;
3099
+ finishedAt: string;
3100
+ gitSha?: string;
3101
+ branch?: string;
3102
+ total: number;
3103
+ passed: number;
3104
+ failed: number;
3105
+ skipped: number;
3106
+ pending: number;
3107
+ };
3108
+ testedTogetherHash: string;
3109
+ scenarios: Array<{
3110
+ id: string;
3111
+ title: string;
3112
+ status: string;
3113
+ sourceFile: string;
3114
+ sourceLine: number;
3115
+ tags: string[];
3116
+ }>;
3117
+ }
3118
+ declare class ReleaseManifestFormatter {
3119
+ format(run: TestRunResult): string;
3120
+ }
3121
+ declare function toReleaseManifest(run: TestRunResult): ReleaseManifest;
3122
+
3009
3123
  /**
3010
3124
  * @executable-stories/formatters
3011
3125
  *
@@ -3038,6 +3152,14 @@ interface GenerateCompareResult {
3038
3152
  files: string[];
3039
3153
  diff: RunDiffResult;
3040
3154
  }
3155
+ /**
3156
+ * Join an output name with a format extension, collapsing a stutter when the
3157
+ * chosen name already carries the format's tag. With the default name "index",
3158
+ * `story-report-json` writes `index.story-report.json`; but if the caller names
3159
+ * the file `story-report`, this yields `story-report.json`, not
3160
+ * `story-report.story-report.json`.
3161
+ */
3162
+ declare function joinNameAndExt(name: string, ext: string): string;
3041
3163
  /**
3042
3164
  * High-level report generator that combines multiple formatters.
3043
3165
  *
@@ -3107,4 +3229,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3107
3229
  */
3108
3230
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3109
3231
 
3110
- export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, RawAttachment, RawCIInfo, RawRun, RawStatus, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, CIInfo as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, buildReview, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, getCssOnlyThemes, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, regenerateArtifacts, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toScenarioIndex, toStoryReport, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
3232
+ export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, CIInfo as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, buildReview, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, getCssOnlyThemes, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CIInfo, T as TestRunResult, a as TestCaseResult, S as StoryStep, D as DocEntry, b as TestStatus$1, N as NormalizedTicket, A as Attachment, c as DocPhase, O as OtelSpan, d as StepResult, e as CIProvider, R as RawStatus, f as RawAttachment, g as RawRun, h as RawCIInfo, i as adaptJestRun, j as adaptPlaywrightRun, k as adaptVitestRun } from './index-CbWFyoTx.js';
2
- export { l as CIInfo, m as CoverageSummary, J as JestAdapterOptions, n as JestAggregatedResult, o as JestFileResult, p as JestTestResult, q as OtelAttributeValue, P as PlaywrightAdapterOptions, r as PlaywrightAnnotation, s as PlaywrightAttachment, t as PlaywrightError, u as PlaywrightLocation, v as PlaywrightStatus, w as PlaywrightTestCase, x as PlaywrightTestResult, y as RawStepEvent, z as RawTestCase, B as STORY_META_KEY, E as StepKeyword, F as StepMode, G as StoryFileReport, H as StoryMeta, I as TestCaseAttempt, K as TestCaseEvidence, V as VitestAdapterOptions, L as VitestSerializedError, M as VitestState, Q as VitestTestCase, U as VitestTestModule, W as VitestTestResult, X as toCIInfo, Y as toRawCIInfo } from './index-CbWFyoTx.js';
1
+ import { C as CIInfo, T as TestRunResult, a as TestCaseResult, S as StoryStep, D as DocEntry, b as TestStatus$1, N as NormalizedTicket, A as Attachment, c as DocPhase, O as OtelSpan, d as StepResult, e as CIProvider, R as RawStatus, f as RawAttachment, g as RawRun, h as RawCIInfo, i as adaptJestRun, j as adaptPlaywrightRun, k as adaptVitestRun } from './index-DF16Xl5i.js';
2
+ export { l as CIInfo, m as CoverageSummary, J as JestAdapterOptions, n as JestAggregatedResult, o as JestFileResult, p as JestTestResult, q as OtelAttributeValue, P as PlaywrightAdapterOptions, r as PlaywrightAnnotation, s as PlaywrightAttachment, t as PlaywrightError, u as PlaywrightLocation, v as PlaywrightStatus, w as PlaywrightTestCase, x as PlaywrightTestResult, y as RawStepEvent, z as RawTestCase, B as STORY_META_KEY, E as StepKeyword, F as StepMode, G as StoryFileReport, H as StoryMeta, I as TestCaseAttempt, K as TestCaseEvidence, V as VitestAdapterOptions, L as VitestSerializedError, M as VitestState, Q as VitestTestCase, U as VitestTestModule, W as VitestTestResult, X as toCIInfo, Y as toRawCIInfo } from './index-DF16Xl5i.js';
3
3
 
4
4
  /**
5
5
  * Notification types for webhook integrations (Slack, Teams).
@@ -150,13 +150,19 @@ interface CanonicalizeOptions {
150
150
  };
151
151
  }
152
152
  /** Output format for report generation */
153
- type OutputFormat = "astro" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "scenario-index-json" | "story-report-json";
153
+ type OutputFormat = "astro" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json";
154
154
  /** Sort order for test cases in reports (deterministic for diff-friendly output) */
155
155
  type SortTestCasesMode = "id" | "source" | "none";
156
156
  /** Output mode for report routing */
157
157
  type OutputMode = "aggregated" | "colocated";
158
- /** Colocated output style */
159
- type ColocatedStyle = "mirrored" | "adjacent";
158
+ /**
159
+ * Colocated output style:
160
+ * - `mirrored` — preserve the source directory tree under outputDir (default)
161
+ * - `adjacent` — write next to each source file (ignores outputDir)
162
+ * - `flat` — one page per file directly under outputDir, named by its clean
163
+ * stem (e.g. `convert-currency.md`); best for a browsable docs nav
164
+ */
165
+ type ColocatedStyle = "mirrored" | "adjacent" | "flat";
160
166
  /** Output rule for routing reports based on source file patterns */
161
167
  interface OutputRule {
162
168
  /** Glob pattern to match sourceFile (uses micromatch, forward slashes) */
@@ -706,7 +712,7 @@ interface ReportCoverageSummary {
706
712
  functionsPct?: number;
707
713
  statementsPct?: number;
708
714
  }
709
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocCustom;
715
+ type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocCustom;
710
716
  interface ReportDocNote {
711
717
  kind: "note";
712
718
  text: string;
@@ -770,6 +776,14 @@ interface ReportDocScreenshot {
770
776
  phase: DocPhase;
771
777
  children?: ReportDocEntry[];
772
778
  }
779
+ interface ReportDocVideo {
780
+ kind: "video";
781
+ path: string;
782
+ caption?: string;
783
+ poster?: string;
784
+ phase: DocPhase;
785
+ children?: ReportDocEntry[];
786
+ }
773
787
  interface ReportDocCustom {
774
788
  kind: "custom";
775
789
  type: string;
@@ -1987,13 +2001,27 @@ interface StarlightBadge {
1987
2001
  }
1988
2002
  interface AstroFormatterOptions {
1989
2003
  assetsBaseUrl?: string;
2004
+ /**
2005
+ * Title each page by its own suite/file rather than the configured title.
2006
+ * Set by colocated mode (one page per file) so the docs nav reads with
2007
+ * distinct, meaningful labels.
2008
+ */
2009
+ perFileTitle?: boolean;
1990
2010
  markdown?: Omit<MarkdownOptions, "includeFrontMatter" | "includeSummaryTable" | "includeMetadata" | "stepStyle">;
1991
2011
  }
1992
2012
  declare class AstroFormatter {
1993
2013
  private markdownFormatter;
1994
2014
  private title;
2015
+ private perFileTitle;
1995
2016
  constructor(options?: AstroFormatterOptions);
1996
2017
  format(run: TestRunResult): string;
2018
+ /**
2019
+ * Title for the page. A per-file page (one source file — i.e. colocated mode)
2020
+ * is titled by its suite/describe name, falling back to a humanized filename,
2021
+ * so the docs nav reads "Convert Currency" not "User Stories" six times over.
2022
+ * Multi-file (aggregated) pages keep the configured title.
2023
+ */
2024
+ private deriveTitle;
1997
2025
  private buildFrontmatter;
1998
2026
  static computeBadge(testCases: Pick<TestCaseResult, "status">[]): StarlightBadge;
1999
2027
  }
@@ -3006,6 +3034,92 @@ interface BundleResult {
3006
3034
  */
3007
3035
  declare function bundleAssets(htmlPath: string, options?: BundleOptions): BundleResult;
3008
3036
 
3037
+ interface DeploymentEntry {
3038
+ environment: string;
3039
+ tag?: string;
3040
+ sha?: string;
3041
+ runFile: string;
3042
+ scenarioIds: string[];
3043
+ scenarioStatuses?: Record<string, string>;
3044
+ timestamp: string;
3045
+ summary: {
3046
+ total: number;
3047
+ passed: number;
3048
+ failed: number;
3049
+ skipped: number;
3050
+ pending: number;
3051
+ };
3052
+ }
3053
+ interface DeploymentLedger {
3054
+ deployments: DeploymentEntry[];
3055
+ schemaVersion: 1;
3056
+ }
3057
+
3058
+ interface RecordDeploymentArgs {
3059
+ run: TestRunResult;
3060
+ environment: string;
3061
+ tag?: string;
3062
+ ledgerPath: string;
3063
+ runFilePath: string;
3064
+ }
3065
+ interface RecordDeploymentResult {
3066
+ entry: DeploymentEntry;
3067
+ ledgerPath: string;
3068
+ }
3069
+ declare function recordDeployment(args: RecordDeploymentArgs): RecordDeploymentResult;
3070
+ interface DeploymentStatus {
3071
+ environments: Record<string, {
3072
+ latest: DeploymentEntry;
3073
+ previousDeployment?: DeploymentEntry;
3074
+ }>;
3075
+ ledgerPath: string;
3076
+ }
3077
+ declare function getDeploymentStatus(ledgerPath: string): DeploymentStatus;
3078
+ interface EnvironmentDrift {
3079
+ environmentA: string;
3080
+ environmentB: string;
3081
+ onlyInA: string[];
3082
+ onlyInB: string[];
3083
+ inBoth: string[];
3084
+ statusChanged: Array<{
3085
+ id: string;
3086
+ statusA: string;
3087
+ statusB: string;
3088
+ }>;
3089
+ aEntry: DeploymentEntry;
3090
+ bEntry: DeploymentEntry;
3091
+ }
3092
+ declare function getEnvironmentDrift(ledgerPath: string, envA: string, envB: string): EnvironmentDrift;
3093
+
3094
+ interface ReleaseManifest {
3095
+ schemaVersion: "1.0";
3096
+ generatedAt: string;
3097
+ run: {
3098
+ startedAt: string;
3099
+ finishedAt: string;
3100
+ gitSha?: string;
3101
+ branch?: string;
3102
+ total: number;
3103
+ passed: number;
3104
+ failed: number;
3105
+ skipped: number;
3106
+ pending: number;
3107
+ };
3108
+ testedTogetherHash: string;
3109
+ scenarios: Array<{
3110
+ id: string;
3111
+ title: string;
3112
+ status: string;
3113
+ sourceFile: string;
3114
+ sourceLine: number;
3115
+ tags: string[];
3116
+ }>;
3117
+ }
3118
+ declare class ReleaseManifestFormatter {
3119
+ format(run: TestRunResult): string;
3120
+ }
3121
+ declare function toReleaseManifest(run: TestRunResult): ReleaseManifest;
3122
+
3009
3123
  /**
3010
3124
  * @executable-stories/formatters
3011
3125
  *
@@ -3038,6 +3152,14 @@ interface GenerateCompareResult {
3038
3152
  files: string[];
3039
3153
  diff: RunDiffResult;
3040
3154
  }
3155
+ /**
3156
+ * Join an output name with a format extension, collapsing a stutter when the
3157
+ * chosen name already carries the format's tag. With the default name "index",
3158
+ * `story-report-json` writes `index.story-report.json`; but if the caller names
3159
+ * the file `story-report`, this yields `story-report.json`, not
3160
+ * `story-report.story-report.json`.
3161
+ */
3162
+ declare function joinNameAndExt(name: string, ext: string): string;
3041
3163
  /**
3042
3164
  * High-level report generator that combines multiple formatters.
3043
3165
  *
@@ -3107,4 +3229,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3107
3229
  */
3108
3230
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3109
3231
 
3110
- export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, RawAttachment, RawCIInfo, RawRun, RawStatus, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, CIInfo as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, buildReview, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, getCssOnlyThemes, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, regenerateArtifacts, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toScenarioIndex, toStoryReport, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
3232
+ export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, CIInfo as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, buildReview, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, getCssOnlyThemes, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };