executable-stories-formatters 1.16.1 → 1.17.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/README.md +36 -0
- package/dist/cli.js +269 -56
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +196 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +201 -54
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -199,7 +199,7 @@ declare class ConfluenceFormatter {
|
|
|
199
199
|
*/
|
|
200
200
|
|
|
201
201
|
/** Output format for report generation */
|
|
202
|
-
type OutputFormat = "agent-text" | "astro-markdown" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json" | "traceability-matrix" | "traceability-csv";
|
|
202
|
+
type OutputFormat = "agent-text" | "astro-markdown" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "span-graph" | "story-report-json" | "traceability-matrix" | "traceability-csv";
|
|
203
203
|
/**
|
|
204
204
|
* Format names accepted as INPUT. Adds `"astro"` as a deprecated alias for
|
|
205
205
|
* `"astro-markdown"` — it is normalised (with a warning) wherever formats enter
|
|
@@ -345,6 +345,8 @@ interface FormatterOptions {
|
|
|
345
345
|
markdown?: MarkdownFormatterOptions;
|
|
346
346
|
/** Astro/Starlight specific options */
|
|
347
347
|
astro?: AstroFormatterOptions$1;
|
|
348
|
+
/** Span-graph specific options */
|
|
349
|
+
spanGraph?: SpanGraphFormatterOptions;
|
|
348
350
|
/** Confluence/ADF specific options */
|
|
349
351
|
confluence?: ConfluenceFormatterOptions;
|
|
350
352
|
/** History tracking options */
|
|
@@ -369,7 +371,7 @@ interface FormatterOptions {
|
|
|
369
371
|
/** Generic webhook configurations */
|
|
370
372
|
webhooks?: GenericWebhookNotifierOptions[];
|
|
371
373
|
};
|
|
372
|
-
/** Asset bundling mode. "none" = no asset copying, "copy" = copy referenced assets next to
|
|
374
|
+
/** Asset bundling mode. "none" = no asset copying, "copy" = copy referenced assets next to the report (html and markdown). Default: "none" */
|
|
373
375
|
assetMode?: "none" | "copy";
|
|
374
376
|
/** When true, warn on missing assets instead of throwing. Default: false */
|
|
375
377
|
allowMissingAssets?: boolean;
|
|
@@ -379,6 +381,15 @@ interface FormatterOptions {
|
|
|
379
381
|
writeFile?: WriteFile;
|
|
380
382
|
}
|
|
381
383
|
/** Markdown formatter options (extended for feature parity) */
|
|
384
|
+
interface SpanGraphFormatterOptions {
|
|
385
|
+
/** Heading for the page. Default: "Architecture, as it ran" */
|
|
386
|
+
title?: string;
|
|
387
|
+
/** Scenario ids from a behavioural diff, which colour the changed components. */
|
|
388
|
+
delta?: {
|
|
389
|
+
added: string[];
|
|
390
|
+
changed: string[];
|
|
391
|
+
};
|
|
392
|
+
}
|
|
382
393
|
interface MarkdownFormatterOptions {
|
|
383
394
|
/** Report title. Default: "User Stories" */
|
|
384
395
|
title?: string;
|
|
@@ -412,6 +423,8 @@ interface MarkdownFormatterOptions {
|
|
|
412
423
|
includeSourceLinks?: boolean;
|
|
413
424
|
/** Custom renderers for doc entries */
|
|
414
425
|
customRenderers?: MarkdownRenderers;
|
|
426
|
+
/** Keep local screenshot/video paths, for markdown posted with `gh ... --attach`. Default: false */
|
|
427
|
+
attachImages?: boolean;
|
|
415
428
|
/** Emit a stable per-scenario anchor for deep-linking. Returns the id, or undefined to skip. */
|
|
416
429
|
scenarioAnchor?: (tc: TestCaseResult) => string | undefined;
|
|
417
430
|
/** Render a badge line under a scenario heading (e.g. a what's-changed marker). Undefined to skip. */
|
|
@@ -508,7 +521,9 @@ interface ResolvedFormatterOptions {
|
|
|
508
521
|
traceUrlTemplate?: string;
|
|
509
522
|
includeSourceLinks: boolean;
|
|
510
523
|
customRenderers?: MarkdownRenderers;
|
|
524
|
+
attachImages: boolean;
|
|
511
525
|
};
|
|
526
|
+
spanGraph: SpanGraphFormatterOptions;
|
|
512
527
|
confluence: {
|
|
513
528
|
title: string;
|
|
514
529
|
includeStatusIcons: boolean;
|
|
@@ -2046,6 +2061,14 @@ interface MarkdownOptions {
|
|
|
2046
2061
|
includeSourceLinks?: boolean;
|
|
2047
2062
|
/** Custom renderers for doc entries */
|
|
2048
2063
|
customRenderers?: MarkdownRenderers;
|
|
2064
|
+
/**
|
|
2065
|
+
* Write a local screenshot/video path as an ordinary markdown reference
|
|
2066
|
+
* instead of the "unavailable" line. Only for markdown handed to
|
|
2067
|
+
* `gh pr comment|create|edit --attach <path>` (GitHub CLI 2.99+), which
|
|
2068
|
+
* uploads the file and rewrites the reference. Anywhere else the reference
|
|
2069
|
+
* is dead, which is why this is off by default. Default: false
|
|
2070
|
+
*/
|
|
2071
|
+
attachImages?: boolean;
|
|
2049
2072
|
/**
|
|
2050
2073
|
* Emit a stable in-page anchor before each scenario heading, so external tools
|
|
2051
2074
|
* can deep-link to a scenario by fragment. Given a test case, return the anchor
|
|
@@ -3107,6 +3130,12 @@ declare class ReportGenerator {
|
|
|
3107
3130
|
* @returns Map of output format to generated file paths
|
|
3108
3131
|
*/
|
|
3109
3132
|
generate(run: TestRunResult, options?: GenerateOptions): Promise<GenerateResult>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Copy every local asset these markdown reports reference into an assets
|
|
3135
|
+
* directory and rewrite the refs. The destination is computed per report
|
|
3136
|
+
* because colocated output writes one per source file.
|
|
3137
|
+
*/
|
|
3138
|
+
private bundleMarkdownAssets;
|
|
3110
3139
|
/**
|
|
3111
3140
|
* Whether any output is colocated — the global mode, or any per-rule mode.
|
|
3112
3141
|
* A colocated rule under a global aggregated mode still writes per-file
|
package/dist/index.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ declare class ConfluenceFormatter {
|
|
|
199
199
|
*/
|
|
200
200
|
|
|
201
201
|
/** Output format for report generation */
|
|
202
|
-
type OutputFormat = "agent-text" | "astro-markdown" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json" | "traceability-matrix" | "traceability-csv";
|
|
202
|
+
type OutputFormat = "agent-text" | "astro-markdown" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "span-graph" | "story-report-json" | "traceability-matrix" | "traceability-csv";
|
|
203
203
|
/**
|
|
204
204
|
* Format names accepted as INPUT. Adds `"astro"` as a deprecated alias for
|
|
205
205
|
* `"astro-markdown"` — it is normalised (with a warning) wherever formats enter
|
|
@@ -345,6 +345,8 @@ interface FormatterOptions {
|
|
|
345
345
|
markdown?: MarkdownFormatterOptions;
|
|
346
346
|
/** Astro/Starlight specific options */
|
|
347
347
|
astro?: AstroFormatterOptions$1;
|
|
348
|
+
/** Span-graph specific options */
|
|
349
|
+
spanGraph?: SpanGraphFormatterOptions;
|
|
348
350
|
/** Confluence/ADF specific options */
|
|
349
351
|
confluence?: ConfluenceFormatterOptions;
|
|
350
352
|
/** History tracking options */
|
|
@@ -369,7 +371,7 @@ interface FormatterOptions {
|
|
|
369
371
|
/** Generic webhook configurations */
|
|
370
372
|
webhooks?: GenericWebhookNotifierOptions[];
|
|
371
373
|
};
|
|
372
|
-
/** Asset bundling mode. "none" = no asset copying, "copy" = copy referenced assets next to
|
|
374
|
+
/** Asset bundling mode. "none" = no asset copying, "copy" = copy referenced assets next to the report (html and markdown). Default: "none" */
|
|
373
375
|
assetMode?: "none" | "copy";
|
|
374
376
|
/** When true, warn on missing assets instead of throwing. Default: false */
|
|
375
377
|
allowMissingAssets?: boolean;
|
|
@@ -379,6 +381,15 @@ interface FormatterOptions {
|
|
|
379
381
|
writeFile?: WriteFile;
|
|
380
382
|
}
|
|
381
383
|
/** Markdown formatter options (extended for feature parity) */
|
|
384
|
+
interface SpanGraphFormatterOptions {
|
|
385
|
+
/** Heading for the page. Default: "Architecture, as it ran" */
|
|
386
|
+
title?: string;
|
|
387
|
+
/** Scenario ids from a behavioural diff, which colour the changed components. */
|
|
388
|
+
delta?: {
|
|
389
|
+
added: string[];
|
|
390
|
+
changed: string[];
|
|
391
|
+
};
|
|
392
|
+
}
|
|
382
393
|
interface MarkdownFormatterOptions {
|
|
383
394
|
/** Report title. Default: "User Stories" */
|
|
384
395
|
title?: string;
|
|
@@ -412,6 +423,8 @@ interface MarkdownFormatterOptions {
|
|
|
412
423
|
includeSourceLinks?: boolean;
|
|
413
424
|
/** Custom renderers for doc entries */
|
|
414
425
|
customRenderers?: MarkdownRenderers;
|
|
426
|
+
/** Keep local screenshot/video paths, for markdown posted with `gh ... --attach`. Default: false */
|
|
427
|
+
attachImages?: boolean;
|
|
415
428
|
/** Emit a stable per-scenario anchor for deep-linking. Returns the id, or undefined to skip. */
|
|
416
429
|
scenarioAnchor?: (tc: TestCaseResult) => string | undefined;
|
|
417
430
|
/** Render a badge line under a scenario heading (e.g. a what's-changed marker). Undefined to skip. */
|
|
@@ -508,7 +521,9 @@ interface ResolvedFormatterOptions {
|
|
|
508
521
|
traceUrlTemplate?: string;
|
|
509
522
|
includeSourceLinks: boolean;
|
|
510
523
|
customRenderers?: MarkdownRenderers;
|
|
524
|
+
attachImages: boolean;
|
|
511
525
|
};
|
|
526
|
+
spanGraph: SpanGraphFormatterOptions;
|
|
512
527
|
confluence: {
|
|
513
528
|
title: string;
|
|
514
529
|
includeStatusIcons: boolean;
|
|
@@ -2046,6 +2061,14 @@ interface MarkdownOptions {
|
|
|
2046
2061
|
includeSourceLinks?: boolean;
|
|
2047
2062
|
/** Custom renderers for doc entries */
|
|
2048
2063
|
customRenderers?: MarkdownRenderers;
|
|
2064
|
+
/**
|
|
2065
|
+
* Write a local screenshot/video path as an ordinary markdown reference
|
|
2066
|
+
* instead of the "unavailable" line. Only for markdown handed to
|
|
2067
|
+
* `gh pr comment|create|edit --attach <path>` (GitHub CLI 2.99+), which
|
|
2068
|
+
* uploads the file and rewrites the reference. Anywhere else the reference
|
|
2069
|
+
* is dead, which is why this is off by default. Default: false
|
|
2070
|
+
*/
|
|
2071
|
+
attachImages?: boolean;
|
|
2049
2072
|
/**
|
|
2050
2073
|
* Emit a stable in-page anchor before each scenario heading, so external tools
|
|
2051
2074
|
* can deep-link to a scenario by fragment. Given a test case, return the anchor
|
|
@@ -3107,6 +3130,12 @@ declare class ReportGenerator {
|
|
|
3107
3130
|
* @returns Map of output format to generated file paths
|
|
3108
3131
|
*/
|
|
3109
3132
|
generate(run: TestRunResult, options?: GenerateOptions): Promise<GenerateResult>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Copy every local asset these markdown reports reference into an assets
|
|
3135
|
+
* directory and rewrite the refs. The destination is computed per report
|
|
3136
|
+
* because colocated output writes one per source file.
|
|
3137
|
+
*/
|
|
3138
|
+
private bundleMarkdownAssets;
|
|
3110
3139
|
/**
|
|
3111
3140
|
* Whether any output is colocated — the global mode, or any per-rule mode.
|
|
3112
3141
|
* A colocated rule under a global aggregated mode still writes per-file
|