executable-stories-formatters 1.17.1 → 1.19.0
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/cli.js +479 -111
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +25 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +25 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -273,6 +273,21 @@ interface FormatterOptions {
|
|
|
273
273
|
sortTestCases?: SortTestCasesMode;
|
|
274
274
|
/** Output routing configuration */
|
|
275
275
|
output?: OutputConfig;
|
|
276
|
+
/**
|
|
277
|
+
* Link templates that apply to every format that can render a link.
|
|
278
|
+
*
|
|
279
|
+
* One place to say "this is where our tickets live", rather than repeating
|
|
280
|
+
* it per format: markdown, confluence and astro-markdown take these as their
|
|
281
|
+
* default, and the StoryReport (HTML report, Astro pages, story-report-json)
|
|
282
|
+
* resolves ticket URLs from `ticketUrlTemplate`. A per-format option of the
|
|
283
|
+
* same name still wins where one is set.
|
|
284
|
+
*/
|
|
285
|
+
/** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
|
|
286
|
+
permalinkBaseUrl?: string;
|
|
287
|
+
/** URL template for ticket links. `{ticket}` is the id. E.g., "https://jira.example.com/browse/{ticket}" */
|
|
288
|
+
ticketUrlTemplate?: string;
|
|
289
|
+
/** URL template for trace links. `{traceId}` is the trace id. */
|
|
290
|
+
traceUrlTemplate?: string;
|
|
276
291
|
/** Cucumber JSON specific options */
|
|
277
292
|
cucumberJson?: {
|
|
278
293
|
/** Pretty-print JSON output. Default: false */
|
|
@@ -310,6 +325,13 @@ interface FormatterOptions {
|
|
|
310
325
|
staleAfterDays?: number;
|
|
311
326
|
/** Show the Share button in the interactive report header. Default: false. */
|
|
312
327
|
share?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Draw the "Architecture, as it ran" section (the run's span graph) above
|
|
330
|
+
* the features. Default: false. Only an instrumented run has anything to
|
|
331
|
+
* draw, so it is opt-in rather than a section most reports would leave
|
|
332
|
+
* empty. `--html-architecture`.
|
|
333
|
+
*/
|
|
334
|
+
architecture?: boolean;
|
|
313
335
|
/** Command the share dialog shows. Default: `npx executable-stories share <output-dir>`. */
|
|
314
336
|
shareCommand?: string;
|
|
315
337
|
};
|
|
@@ -491,6 +513,9 @@ interface ResolvedFormatterOptions {
|
|
|
491
513
|
toolVersion?: string;
|
|
492
514
|
};
|
|
493
515
|
};
|
|
516
|
+
permalinkBaseUrl: string | undefined;
|
|
517
|
+
ticketUrlTemplate: string | undefined;
|
|
518
|
+
traceUrlTemplate: string | undefined;
|
|
494
519
|
html: {
|
|
495
520
|
title: string;
|
|
496
521
|
syntaxHighlighting: boolean;
|
|
@@ -498,6 +523,7 @@ interface ResolvedFormatterOptions {
|
|
|
498
523
|
staleAfterDays: number;
|
|
499
524
|
share: boolean;
|
|
500
525
|
shareCommand: string | undefined;
|
|
526
|
+
architecture: boolean;
|
|
501
527
|
};
|
|
502
528
|
historyStore: HistoryStore | undefined;
|
|
503
529
|
junit: {
|
|
@@ -1171,6 +1197,13 @@ interface Formatter {
|
|
|
1171
1197
|
}
|
|
1172
1198
|
interface ExecutableStoriesConfig {
|
|
1173
1199
|
formatters?: Record<string, Formatter>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Default values for CLI flags, keyed by flag name without the dashes
|
|
1202
|
+
* (`"html-title": "Checkout"`, `"html-architecture": true`). Anything typed
|
|
1203
|
+
* on the command line wins. Plain data, so a `.json` config carries it too —
|
|
1204
|
+
* which is the only way the non-JS adapters' users can set these at all.
|
|
1205
|
+
*/
|
|
1206
|
+
defaults?: Record<string, string | number | boolean | (string | number)[]>;
|
|
1174
1207
|
/**
|
|
1175
1208
|
* Test-management targets for `coverage` and `sync`. Shape only — credentials
|
|
1176
1209
|
* are read from the environment so this file stays committable.
|
|
@@ -1661,6 +1694,12 @@ declare class CucumberJsonFormatter {
|
|
|
1661
1694
|
interface StoryReportJsonOptions {
|
|
1662
1695
|
/** Pretty-print JSON output with 2-space indent. Default: true. */
|
|
1663
1696
|
pretty?: boolean;
|
|
1697
|
+
/**
|
|
1698
|
+
* URL template for tickets that carry no URL of their own (`{ticket}` is the
|
|
1699
|
+
* id). The same template the HTML report resolves with, so the contract an
|
|
1700
|
+
* agent reads and the page a person opens link a ticket to the same place.
|
|
1701
|
+
*/
|
|
1702
|
+
ticketUrlTemplate?: string;
|
|
1664
1703
|
}
|
|
1665
1704
|
declare class StoryReportJsonFormatter {
|
|
1666
1705
|
private options;
|
package/dist/index.d.ts
CHANGED
|
@@ -273,6 +273,21 @@ interface FormatterOptions {
|
|
|
273
273
|
sortTestCases?: SortTestCasesMode;
|
|
274
274
|
/** Output routing configuration */
|
|
275
275
|
output?: OutputConfig;
|
|
276
|
+
/**
|
|
277
|
+
* Link templates that apply to every format that can render a link.
|
|
278
|
+
*
|
|
279
|
+
* One place to say "this is where our tickets live", rather than repeating
|
|
280
|
+
* it per format: markdown, confluence and astro-markdown take these as their
|
|
281
|
+
* default, and the StoryReport (HTML report, Astro pages, story-report-json)
|
|
282
|
+
* resolves ticket URLs from `ticketUrlTemplate`. A per-format option of the
|
|
283
|
+
* same name still wins where one is set.
|
|
284
|
+
*/
|
|
285
|
+
/** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
|
|
286
|
+
permalinkBaseUrl?: string;
|
|
287
|
+
/** URL template for ticket links. `{ticket}` is the id. E.g., "https://jira.example.com/browse/{ticket}" */
|
|
288
|
+
ticketUrlTemplate?: string;
|
|
289
|
+
/** URL template for trace links. `{traceId}` is the trace id. */
|
|
290
|
+
traceUrlTemplate?: string;
|
|
276
291
|
/** Cucumber JSON specific options */
|
|
277
292
|
cucumberJson?: {
|
|
278
293
|
/** Pretty-print JSON output. Default: false */
|
|
@@ -310,6 +325,13 @@ interface FormatterOptions {
|
|
|
310
325
|
staleAfterDays?: number;
|
|
311
326
|
/** Show the Share button in the interactive report header. Default: false. */
|
|
312
327
|
share?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Draw the "Architecture, as it ran" section (the run's span graph) above
|
|
330
|
+
* the features. Default: false. Only an instrumented run has anything to
|
|
331
|
+
* draw, so it is opt-in rather than a section most reports would leave
|
|
332
|
+
* empty. `--html-architecture`.
|
|
333
|
+
*/
|
|
334
|
+
architecture?: boolean;
|
|
313
335
|
/** Command the share dialog shows. Default: `npx executable-stories share <output-dir>`. */
|
|
314
336
|
shareCommand?: string;
|
|
315
337
|
};
|
|
@@ -491,6 +513,9 @@ interface ResolvedFormatterOptions {
|
|
|
491
513
|
toolVersion?: string;
|
|
492
514
|
};
|
|
493
515
|
};
|
|
516
|
+
permalinkBaseUrl: string | undefined;
|
|
517
|
+
ticketUrlTemplate: string | undefined;
|
|
518
|
+
traceUrlTemplate: string | undefined;
|
|
494
519
|
html: {
|
|
495
520
|
title: string;
|
|
496
521
|
syntaxHighlighting: boolean;
|
|
@@ -498,6 +523,7 @@ interface ResolvedFormatterOptions {
|
|
|
498
523
|
staleAfterDays: number;
|
|
499
524
|
share: boolean;
|
|
500
525
|
shareCommand: string | undefined;
|
|
526
|
+
architecture: boolean;
|
|
501
527
|
};
|
|
502
528
|
historyStore: HistoryStore | undefined;
|
|
503
529
|
junit: {
|
|
@@ -1171,6 +1197,13 @@ interface Formatter {
|
|
|
1171
1197
|
}
|
|
1172
1198
|
interface ExecutableStoriesConfig {
|
|
1173
1199
|
formatters?: Record<string, Formatter>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Default values for CLI flags, keyed by flag name without the dashes
|
|
1202
|
+
* (`"html-title": "Checkout"`, `"html-architecture": true`). Anything typed
|
|
1203
|
+
* on the command line wins. Plain data, so a `.json` config carries it too —
|
|
1204
|
+
* which is the only way the non-JS adapters' users can set these at all.
|
|
1205
|
+
*/
|
|
1206
|
+
defaults?: Record<string, string | number | boolean | (string | number)[]>;
|
|
1174
1207
|
/**
|
|
1175
1208
|
* Test-management targets for `coverage` and `sync`. Shape only — credentials
|
|
1176
1209
|
* are read from the environment so this file stays committable.
|
|
@@ -1661,6 +1694,12 @@ declare class CucumberJsonFormatter {
|
|
|
1661
1694
|
interface StoryReportJsonOptions {
|
|
1662
1695
|
/** Pretty-print JSON output with 2-space indent. Default: true. */
|
|
1663
1696
|
pretty?: boolean;
|
|
1697
|
+
/**
|
|
1698
|
+
* URL template for tickets that carry no URL of their own (`{ticket}` is the
|
|
1699
|
+
* id). The same template the HTML report resolves with, so the contract an
|
|
1700
|
+
* agent reads and the page a person opens link a ticket to the same place.
|
|
1701
|
+
*/
|
|
1702
|
+
ticketUrlTemplate?: string;
|
|
1664
1703
|
}
|
|
1665
1704
|
declare class StoryReportJsonFormatter {
|
|
1666
1705
|
private options;
|