@bugbug-io/cli 14.23.0 → 14.24.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/README.md CHANGED
@@ -133,6 +133,7 @@ bugbug testruns show <runId> # Show the result of a test run
133
133
  bugbug testruns logs <runId> # Get logs for a test run
134
134
  bugbug testruns stop <runId> # Stop a running test run
135
135
  bugbug testruns report <runId> -o out.xml # Get the JUnit XML report
136
+ bugbug testruns report <runId> --format wcag -o wcag.json # Get the WCAG accessibility report (JSON, paid plans)
136
137
  bugbug testruns tags set <runId> --tag flaky
137
138
  bugbug testruns tags set <runId> # Clear directly assigned run tags
138
139
  bugbug testruns notes set <runId> "Retried successfully"
@@ -159,6 +160,7 @@ bugbug suites tags set <suiteId> # Clear suite tags
159
160
  bugbug suiteruns show <runId> # Show the result of a suite run (--compact: failed tests only)
160
161
  bugbug suiteruns stop <runId> # Stop a running suite run
161
162
  bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
163
+ bugbug suiteruns report <runId> --format wcag -o wcag.json # Get the WCAG accessibility report (JSON, paid plans)
162
164
  bugbug suiteruns tags set <runId> --tag nightly
163
165
  bugbug suiteruns tags set <runId> # Clear directly assigned run tags
164
166
  bugbug suiteruns notes set <runId> "Nightly follow-up"
@@ -63,7 +63,7 @@ import {
63
63
  waitForSuiteRun,
64
64
  waitForTestRun,
65
65
  writeReportXml
66
- } from "./chunk-7A5MMA6E.js";
66
+ } from "./chunk-L2VO75HR.js";
67
67
  import "./chunk-XLIBEETK.js";
68
68
  import "./chunk-3PJ4ZE2N.js";
69
69
  import {
@@ -11128,5 +11128,5 @@ react-router/dist/development/index.mjs:
11128
11128
  * @license MIT
11129
11129
  *)
11130
11130
  */
11131
- //# sourceMappingURL=NavigatorApp-XA7Y3JQT.js.map
11131
+ //# sourceMappingURL=NavigatorApp-BKK2ZHVH.js.map
11132
11132
  //# debugId=d5dac43b-3da2-532b-8e28-f4983f3e8003
@@ -12,7 +12,7 @@ var startNavigator = async (opts = {}) => {
12
12
  const [{ render }, React, { NavigatorApp }] = await Promise.all([
13
13
  import("./render-CSMURV5U.js"),
14
14
  importReact(),
15
- import("./NavigatorApp-XA7Y3JQT.js")
15
+ import("./NavigatorApp-BKK2ZHVH.js")
16
16
  ]);
17
17
  const element = React.createElement(
18
18
  NavigatorApp,
@@ -27,5 +27,5 @@ var startNavigator = async (opts = {}) => {
27
27
  export {
28
28
  startNavigator
29
29
  };
30
- //# sourceMappingURL=app-Z53CNV24.js.map
30
+ //# sourceMappingURL=app-QCSG3LKK.js.map
31
31
  //# debugId=cecc8c80-302a-54e0-a1fb-74d6bb70c0a1
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="43cabc91-a3ee-589b-bcb7-031836276340")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="69817c13-d103-5dfa-a514-ca9aa93e4361")}catch(e){}}();
3
3
  import { createRequire as __nodeCreateRequire } from 'node:module';
4
4
  const require = __nodeCreateRequire(import.meta.url);
5
5
  import {
@@ -8930,7 +8930,7 @@ var require_main = __commonJS({
8930
8930
  // ../core/package.json
8931
8931
  var package_default = {
8932
8932
  name: "@bugbug-io/core",
8933
- version: "14.23.0",
8933
+ version: "14.24.0",
8934
8934
  private: true,
8935
8935
  type: "module",
8936
8936
  main: "dist/index.js",
@@ -58369,6 +58369,18 @@ var SuitesModule = class {
58369
58369
  body: data,
58370
58370
  ...options
58371
58371
  });
58372
+ /**
58373
+ * Activate or deactivate a single test within a suite without removing it.
58374
+ * Inactive tests stay in the suite but are skipped by suite runs.
58375
+ *
58376
+ * @throws {NotFoundError} When the suite does not exist or the test is not part of it.
58377
+ * @throws {ValidationError} When deactivating the suite's browser state source test.
58378
+ */
58379
+ setTestActive = async (suiteId, testId, isActive, options = {}) => this.#client.put("/suites/{id}/tests/{test_id}/active/", {
58380
+ pathParams: { id: suiteId, test_id: testId },
58381
+ body: { isActive },
58382
+ ...options
58383
+ });
58372
58384
  /**
58373
58385
  * Delete a suite by ID.
58374
58386
  *
@@ -58538,6 +58550,21 @@ var SuitesModule = class {
58538
58550
  pathParams: { id: runId },
58539
58551
  ...options
58540
58552
  });
58553
+ /**
58554
+ * Download the WCAG accessibility report for a suite run as JSON. It aggregates
58555
+ * all Accessibility check steps executed in the run, grouped by page URL.
58556
+ * A run without accessibility checks returns a report with empty `pages`.
58557
+ * Requires a paid plan and accessibility testing enabled in the project.
58558
+ *
58559
+ * Unlike other API responses, the report keys are snake_case: it is the same
58560
+ * document as the JSON report file downloaded in the BugBug app.
58561
+ *
58562
+ * @returns The parsed WCAG report.
58563
+ */
58564
+ downloadRunWcagReport = async (runId, options = {}) => this.#client.get("/suiteruns/{id}/report/wcag/", {
58565
+ pathParams: { id: runId },
58566
+ ...options
58567
+ });
58541
58568
  /**
58542
58569
  * List artifacts attached to a suite run. The current public API exposes the
58543
58570
  * combined JUnit report artifact here.
@@ -78152,6 +78179,7 @@ var StatusSchema = external_exports.enum([
78152
78179
  "skipped"
78153
78180
  ]);
78154
78181
  var StepTypeSchema = external_exports.enum([
78182
+ "accessibilityCheck",
78155
78183
  "answerPrompt",
78156
78184
  "assert",
78157
78185
  "change",
@@ -78182,7 +78210,7 @@ var StepTypeSchema = external_exports.enum([
78182
78210
  "switchContext",
78183
78211
  "type",
78184
78212
  "uploadFile"
78185
- ]).describe("Available step types: answerPrompt, assert, change, clear, click, dblClick, rightClick, closeTab, dragAndDrop, elementVisualRegression, execute, goto, openInbox, goBack, goForward, hover, ifCondition, mouseDown, mouseMove, mouseUp, newTab, pageVisualRegression, pasteFromClipboard, reloadPage, scroll, select, setLocalVariable, switchContext, type, uploadFile.");
78213
+ ]).describe("Available step types: accessibilityCheck, answerPrompt, assert, change, clear, click, dblClick, rightClick, closeTab, dragAndDrop, elementVisualRegression, execute, goto, openInbox, goBack, goForward, hover, ifCondition, mouseDown, mouseMove, mouseUp, newTab, pageVisualRegression, pasteFromClipboard, reloadPage, scroll, select, setLocalVariable, switchContext, type, uploadFile.");
78186
78214
  var AssertionTypeSchema = external_exports.enum([
78187
78215
  "contain",
78188
78216
  "equal",
@@ -78240,6 +78268,17 @@ var ScrollInsideSchema = external_exports.enum(["window", "element"]).describe("
78240
78268
  var SelectTypeSchema = external_exports.enum(["text", "index", "value"]).describe("How the option should be matched.");
78241
78269
  var ScreenSizeTypeSchema = external_exports.enum(["desktop", "mobile", "custom"]).describe("Screen size preset used when running or recording the test.");
78242
78270
  var TriggeredBySchema = external_exports.enum(["user", "api", "webhook", "scheduler", "github", "cli", "agent"]).describe("Origin that triggered the run.");
78271
+ var ACCESSIBILITY_STANDARDS = ["wcag2a", "wcag2aa", "wcag21aa", "wcag22aa"];
78272
+ var AccessibilityStandardSchema = external_exports.enum(ACCESSIBILITY_STANDARDS).describe("WCAG standard an accessibility check is evaluated against.");
78273
+ var ACCESSIBILITY_DETECT_ISSUES_TYPES = [
78274
+ "critical",
78275
+ "serious",
78276
+ "moderate",
78277
+ "minor"
78278
+ ];
78279
+ var AccessibilityDetectIssuesTypeSchema = external_exports.enum(ACCESSIBILITY_DETECT_ISSUES_TYPES).describe("Lowest accessibility issue impact that fails an accessibility check.");
78280
+ var ACCESSIBILITY_SCOPES = ["page", "element"];
78281
+ var AccessibilityScopeSchema = external_exports.enum(ACCESSIBILITY_SCOPES).describe("Whether an accessibility check scans the whole page or a single element.");
78243
78282
  var SelectorSchema = external_exports.object({
78244
78283
  id: UuidSchema.optional().describe("Selector UUID when persisted by the API."),
78245
78284
  selector: external_exports.string().nullable().describe("Raw xpath or css selector expression used to find an element."),
@@ -78306,6 +78345,8 @@ var STEP_ERROR_CODES = [
78306
78345
  "UNSUPPORTED_BROWSER",
78307
78346
  "DEBUGGER_DETACHED",
78308
78347
  "BLOCKED_BY_BROWSER_POLICY",
78348
+ "BROWSER_STATE_CAPTURE_FAILED",
78349
+ "BROWSER_STATE_RESTORE_FAILED",
78309
78350
  "INVALID_CUSTOM_HEADERS",
78310
78351
  "INVALID_DATA_FORMAT",
78311
78352
  "RUNTIME_ERROR",
@@ -78328,7 +78369,13 @@ var STEP_ERROR_CODES = [
78328
78369
  "EXTENSION_DISCONNECTED_ERROR",
78329
78370
  "TAKING_SCREENSHOT_TIMEOUT",
78330
78371
  "MISSING_STEP_SCREENSHOT",
78331
- "MISSING_ELEMENT_SCREENSHOT"
78372
+ "MISSING_ELEMENT_SCREENSHOT",
78373
+ "TEST_RUN_QUEUE_TIME_EXCEEDED",
78374
+ "HISTORY_ENTRY_DOES_NOT_EXIST",
78375
+ "SELECT_FAILED",
78376
+ "ACCESSIBILITY_CHECK_FAILED",
78377
+ "ACCESSIBILITY_SCAN_ERROR",
78378
+ "EXTENSION_DOES_NOT_RESPONSE_ERROR"
78332
78379
  ];
78333
78380
  var WaitingConditionSchema = external_exports.object({
78334
78381
  type: WaitingConditionTypeSchema,
@@ -78500,8 +78547,10 @@ var SetLocalVariableStepSchema = StepBaseSchema.extend({
78500
78547
  localVariableSource: external_exports.enum(["element", "value", "evaluate"]).describe("Source used to populate the variable.")
78501
78548
  });
78502
78549
  var SwitchContextStepSchema = StepBaseSchema.extend({
78503
- type: external_exports.literal("switchContext").describe("Switch execution context to another browser tab."),
78504
- tabNo: external_exports.number().describe("Tab index to activate.")
78550
+ type: external_exports.literal("switchContext").describe("Switch execution context to another browser tab or into an iframe."),
78551
+ tabNo: external_exports.number().describe("Tab index to activate."),
78552
+ value: external_exports.enum(["topFrame", "iframe"]).describe("Page context: topFrame for the tab document, iframe to enter the frame matched by selectorsPresets."),
78553
+ selectorsPresets: external_exports.array(SelectorsPresetSchema).optional().describe("Selectors of the iframe element. Required when value is iframe.")
78505
78554
  });
78506
78555
  var TypeStepSchema = StepBaseSchema.extend({
78507
78556
  type: external_exports.literal("type").describe("Type text into the targeted element."),
@@ -78536,7 +78585,16 @@ var PageVisualRegressionStepSchema = StepBaseSchema.extend({
78536
78585
  type: external_exports.literal("pageVisualRegression").describe("Perform a visual regression check on the full page."),
78537
78586
  visualRegressionMaxDiff: external_exports.number().nullable().optional().describe("Maximum allowed pixel difference percentage (0\u2013100).")
78538
78587
  });
78588
+ var AccessibilityCheckStepSchema = StepBaseSchema.extend({
78589
+ type: external_exports.literal("accessibilityCheck").describe("Scan the current page or one of its elements for WCAG accessibility issues with axe-core."),
78590
+ accessibilityStandard: AccessibilityStandardSchema.nullable().optional().describe("WCAG standard to check against. Null uses the project default."),
78591
+ accessibilityDetectIssuesType: AccessibilityDetectIssuesTypeSchema.nullable().optional().describe("Lowest issue impact that fails the step. Null uses the project default."),
78592
+ accessibilityIncludeBestPractices: external_exports.boolean().nullable().optional().describe("Also report axe-core best-practice rules that are not part of WCAG."),
78593
+ accessibilityScope: AccessibilityScopeSchema.optional().describe("Scan the whole page (default) or only the element targeted by selectorsPresets, which are required for element."),
78594
+ accessibilityDisabledRules: external_exports.array(external_exports.string()).nullable().optional().describe("axe-core rule IDs skipped by the scan. Null uses the project default.")
78595
+ });
78539
78596
  var allStepsSchemas = [
78597
+ AccessibilityCheckStepSchema,
78540
78598
  AnswerPromptStepSchema,
78541
78599
  AssertStepSchema,
78542
78600
  PasteFromClipboardStepSchema,
@@ -78569,7 +78627,20 @@ var allStepsSchemas = [
78569
78627
  UploadStepSchema
78570
78628
  ];
78571
78629
  var StepSchema = external_exports.discriminatedUnion("type", allStepsSchemas);
78572
- var CREATE_STEP_SCHEMA_OPTIONS = asNonEmptyDiscriminatedOptions(allStepsSchemas.map((schema) => omitStepRuntimeFields(schema)));
78630
+ var CREATE_STEP_SCHEMA_OPTIONS = asNonEmptyDiscriminatedOptions(allStepsSchemas.map((schema) => {
78631
+ const createSchema = omitStepRuntimeFields(schema);
78632
+ if (schema !== AccessibilityCheckStepSchema)
78633
+ return createSchema;
78634
+ return AccessibilityCheckStepSchema.omit({ id: true, originGroupId: true }).superRefine((step, context2) => {
78635
+ if (step.accessibilityScope === "element" && !step.selectorsPresets?.length) {
78636
+ context2.addIssue({
78637
+ code: "custom",
78638
+ path: ["selectorsPresets"],
78639
+ message: "Element accessibility scans require at least one selector preset."
78640
+ });
78641
+ }
78642
+ });
78643
+ }));
78573
78644
  var UPDATE_STEP_SCHEMA_OPTIONS = asNonEmptyDiscriminatedOptions(allStepsSchemas.map((schema) => toStepPatchSchema(schema)));
78574
78645
  var StepCreateSchema = external_exports.discriminatedUnion("type", CREATE_STEP_SCHEMA_OPTIONS);
78575
78646
  var StepUpdateSchema = external_exports.discriminatedUnion("type", UPDATE_STEP_SCHEMA_OPTIONS);
@@ -79311,6 +79382,21 @@ var TestsModule = class {
79311
79382
  pathParams: { id: runId },
79312
79383
  ...options
79313
79384
  });
79385
+ /**
79386
+ * Download the WCAG accessibility report for a test run as JSON. It aggregates
79387
+ * all Accessibility check steps executed in the run, grouped by page URL.
79388
+ * A run without accessibility checks returns a report with empty `pages`.
79389
+ * Requires a paid plan and accessibility testing enabled in the project.
79390
+ *
79391
+ * Unlike other API responses, the report keys are snake_case: it is the same
79392
+ * document as the JSON report file downloaded in the BugBug app.
79393
+ *
79394
+ * @returns The parsed WCAG report.
79395
+ */
79396
+ downloadRunWcagReport = async (runId, options = {}) => this.#client.get("/testruns/{id}/report/wcag/", {
79397
+ pathParams: { id: runId },
79398
+ ...options
79399
+ });
79314
79400
  /**
79315
79401
  * Fetch test-run log output. The server may return either log content
79316
79402
  * inline or a redirect/URL string — both are returned verbatim as text.
@@ -79775,7 +79861,7 @@ var readEnvFiles2 = (cwd) => {
79775
79861
  var buildUserAgent2 = (clientType, version2) => `BugBug ${clientType.toUpperCase()} ${version2}`;
79776
79862
  var package_default2 = {
79777
79863
  name: "@bugbug-io/core",
79778
- version: "14.23.0",
79864
+ version: "14.24.0",
79779
79865
  private: true,
79780
79866
  type: "module",
79781
79867
  main: "dist/index.js",
@@ -81582,6 +81668,7 @@ var setSuiteRunNotes = async (runId, notes) => {
81582
81668
  await getSdk().suites.setRunNotes(runId, notes);
81583
81669
  };
81584
81670
  var getSuiteRunJunitReport = async (runId) => getSdk().suites.downloadRunJunitReport(runId, { timeout: 6e5 });
81671
+ var getSuiteRunWcagReport = async (runId) => getSdk().suites.downloadRunWcagReport(runId, { timeout: 6e5 });
81585
81672
 
81586
81673
  // src/features/suiteRuns/suiteRuns.utils.ts
81587
81674
  var getSuiteRunName = (run) => run.name || run.id;
@@ -81727,6 +81814,7 @@ var setTestRunNotes = async (runId, notes) => {
81727
81814
  await getSdk().tests.setRunNotes(runId, notes);
81728
81815
  };
81729
81816
  var getTestRunJunitReport = async (runId) => getSdk().tests.downloadRunJunitReport(runId, { timeout: 3e5 });
81817
+ var getTestRunWcagReport = async (runId) => getSdk().tests.downloadRunWcagReport(runId, { timeout: 3e5 });
81730
81818
  var listTestRunDebugArtifacts = async (runId) => getSdk().tests.listRunDebugArtifacts(runId);
81731
81819
 
81732
81820
  // src/features/tests/tests.service.ts
@@ -81848,6 +81936,15 @@ var writeReportXml = (xml, output2) => {
81848
81936
  writeFileSync6(outPath, xml, "utf8");
81849
81937
  return { outPath, size: xml.length };
81850
81938
  };
81939
+ var writeReportJson = (report, output2) => {
81940
+ const json2 = `${JSON.stringify(report, null, 2)}
81941
+ `;
81942
+ if (!output2) return { size: json2.length, json: json2 };
81943
+ const outPath = resolve8(userCwd(), output2);
81944
+ mkdirSync3(dirname6(outPath), { recursive: true });
81945
+ writeFileSync6(outPath, json2, "utf8");
81946
+ return { outPath, size: json2.length };
81947
+ };
81851
81948
 
81852
81949
  // src/utils/runReport.ts
81853
81950
  var TITLES = {
@@ -81940,6 +82037,7 @@ export {
81940
82037
  validateReporterOptions,
81941
82038
  defaultJunitReportPath,
81942
82039
  writeReportXml,
82040
+ writeReportJson,
81943
82041
  formatInlineRunReport,
81944
82042
  formatFinalResults,
81945
82043
  getRunErrorMessage,
@@ -81953,6 +82051,7 @@ export {
81953
82051
  setSuiteRunTags,
81954
82052
  setSuiteRunNotes,
81955
82053
  getSuiteRunJunitReport,
82054
+ getSuiteRunWcagReport,
81956
82055
  getSuiteRunName,
81957
82056
  formatSuiteRunSummary,
81958
82057
  listSuites,
@@ -81970,6 +82069,7 @@ export {
81970
82069
  setTestRunTags,
81971
82070
  setTestRunNotes,
81972
82071
  getTestRunJunitReport,
82072
+ getTestRunWcagReport,
81973
82073
  listTestRunDebugArtifacts,
81974
82074
  listTests,
81975
82075
  getTest,
@@ -81984,5 +82084,5 @@ export {
81984
82084
  formatErrorMessage,
81985
82085
  showError
81986
82086
  };
81987
- //# sourceMappingURL=chunk-7A5MMA6E.js.map
81988
- //# debugId=43cabc91-a3ee-589b-bcb7-031836276340
82087
+ //# sourceMappingURL=chunk-L2VO75HR.js.map
82088
+ //# debugId=69817c13-d103-5dfa-a514-ca9aa93e4361
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1e3decec-3b63-5d56-87b7-c4616c30892b")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10ea2e49-8f43-52e0-9def-e5238ca672f2")}catch(e){}}();
4
4
  import { createRequire as __nodeCreateRequire } from 'node:module';
5
5
  const require = __nodeCreateRequire(import.meta.url);
6
6
  import {
@@ -33,10 +33,12 @@ import {
33
33
  getSuiteRun,
34
34
  getSuiteRunJunitReport,
35
35
  getSuiteRunSummary,
36
+ getSuiteRunWcagReport,
36
37
  getTest,
37
38
  getTestRun,
38
39
  getTestRunJunitReport,
39
40
  getTestRunLogs,
41
+ getTestRunWcagReport,
40
42
  getVariablesMap,
41
43
  getVersion,
42
44
  importProject,
@@ -71,8 +73,9 @@ import {
71
73
  validateReporterOptions,
72
74
  waitForSuiteRun,
73
75
  waitForTestRun,
76
+ writeReportJson,
74
77
  writeReportXml
75
- } from "./chunk-7A5MMA6E.js";
78
+ } from "./chunk-L2VO75HR.js";
76
79
  import "./chunk-XLIBEETK.js";
77
80
  import "./chunk-3PJ4ZE2N.js";
78
81
  import {
@@ -3864,6 +3867,7 @@ var registerProjectCommand = (program3) => {
3864
3867
  };
3865
3868
 
3866
3869
  // src/utils/existingRunCommand.ts
3870
+ var RUN_REPORT_FORMATS = ["junit", "wcag"];
3867
3871
  var getExistingRunResultAction = async (runId, opts, adapter) => {
3868
3872
  const mode = resolveOutputMode();
3869
3873
  try {
@@ -3907,9 +3911,36 @@ var stopExistingRunAction = async (runId, adapter) => {
3907
3911
  exitWith(EXIT_GENERAL_ERROR);
3908
3912
  }
3909
3913
  };
3914
+ var writeWcagReport = async (runId, opts, adapter) => {
3915
+ const mode = resolveOutputMode();
3916
+ const report = await adapter.getWcagReport(runId);
3917
+ const result = writeReportJson(report, opts.output);
3918
+ if (mode === "json") {
3919
+ printJson(
3920
+ result.outPath ? { runId, kind: adapter.kind, format: "wcag", outPath: result.outPath, size: result.size } : { runId, kind: adapter.kind, format: "wcag", report }
3921
+ );
3922
+ return;
3923
+ }
3924
+ if (result.outPath) {
3925
+ process.stdout.write(
3926
+ `Saved WCAG report for ${adapter.runLabel} ${runId} to ${result.outPath} (${result.size} chars)
3927
+ `
3928
+ );
3929
+ } else {
3930
+ process.stdout.write(result.json ?? "");
3931
+ }
3932
+ };
3910
3933
  var getExistingRunReportAction = async (runId, opts, adapter) => {
3911
3934
  const mode = resolveOutputMode();
3912
3935
  try {
3936
+ const format = opts.format ?? "junit";
3937
+ if (format === "wcag") {
3938
+ await writeWcagReport(runId, opts, adapter);
3939
+ return;
3940
+ }
3941
+ if (format !== "junit") {
3942
+ throw new Error(`Invalid --format: ${format}. Expected ${RUN_REPORT_FORMATS.join(" or ")}.`);
3943
+ }
3913
3944
  const xml = await adapter.getJunitReport(runId);
3914
3945
  const result = writeReportXml(xml, opts.output);
3915
3946
  if (mode === "json") {
@@ -4029,6 +4060,7 @@ var SUITE_RUN_ACTION_ADAPTER = {
4029
4060
  runLabel: "suite run",
4030
4061
  getRun: getSuiteRun,
4031
4062
  getJunitReport: getSuiteRunJunitReport,
4063
+ getWcagReport: getSuiteRunWcagReport,
4032
4064
  stopRun: stopSuiteRun
4033
4065
  };
4034
4066
  var showCompactSuiteRun = async (runId) => {
@@ -4048,7 +4080,11 @@ var registerSuiteRunShowCommand = (parent, commandName = "show") => parent.comma
4048
4080
  (runId, opts) => opts.compact ? showCompactSuiteRun(runId) : getExistingRunResultAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
4049
4081
  );
4050
4082
  var registerSuiteRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a suite run").action((runId) => stopExistingRunAction(runId, SUITE_RUN_ACTION_ADAPTER));
4051
- var registerSuiteRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML report for a suite run").option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
4083
+ var registerSuiteRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML or WCAG accessibility (JSON) report for a suite run").option(
4084
+ "--format <format>",
4085
+ "Report format: junit (XML) or wcag (WCAG accessibility report as JSON, paid plans)",
4086
+ "junit"
4087
+ ).option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
4052
4088
  (runId, opts) => getExistingRunReportAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
4053
4089
  );
4054
4090
  var registerSuiteRunTagsCommand = (parent, commandName = "tags") => {
@@ -4215,6 +4251,7 @@ var TEST_RUN_ACTION_ADAPTER = {
4215
4251
  runLabel: "test run",
4216
4252
  getRun: getTestRun,
4217
4253
  getJunitReport: getTestRunJunitReport,
4254
+ getWcagReport: getTestRunWcagReport,
4218
4255
  stopRun: stopTestRun
4219
4256
  };
4220
4257
  var registerTestRunLogsCommand = (parent, commandName = "logs") => parent.command(`${commandName} <runId>`).description("Get logs for a test run").action(async (runId) => {
@@ -4239,7 +4276,11 @@ var registerTestRunShowCommand = (parent, commandName = "show") => parent.comman
4239
4276
  (runId, opts) => getExistingRunResultAction(runId, opts, TEST_RUN_ACTION_ADAPTER)
4240
4277
  );
4241
4278
  var registerTestRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a test run").action((runId) => stopExistingRunAction(runId, TEST_RUN_ACTION_ADAPTER));
4242
- var registerTestRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML report for a test run").option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
4279
+ var registerTestRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML or WCAG accessibility (JSON) report for a test run").option(
4280
+ "--format <format>",
4281
+ "Report format: junit (XML) or wcag (WCAG accessibility report as JSON, paid plans)",
4282
+ "junit"
4283
+ ).option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
4243
4284
  (runId, opts) => getExistingRunReportAction(runId, opts, TEST_RUN_ACTION_ADAPTER)
4244
4285
  );
4245
4286
  var registerTestRunTagsCommand = (parent, commandName = "tags") => {
@@ -4785,7 +4826,7 @@ program2.exitOverride();
4785
4826
  });
4786
4827
  analytics.trackEvent("cli_session_started");
4787
4828
  if (startupMode.type === "commandline" && await shouldRedirectUnauthenticatedCommandToInit(process.argv, hasUsableSession)) {
4788
- const { startNavigator } = await import("./app-Z53CNV24.js");
4829
+ const { startNavigator } = await import("./app-QCSG3LKK.js");
4789
4830
  await startNavigator({
4790
4831
  initialRoute: "/init",
4791
4832
  initialRouteState: {
@@ -4797,7 +4838,7 @@ program2.exitOverride();
4797
4838
  return;
4798
4839
  }
4799
4840
  if (startupMode.type === "navigator") {
4800
- const { startNavigator } = await import("./app-Z53CNV24.js");
4841
+ const { startNavigator } = await import("./app-QCSG3LKK.js");
4801
4842
  await startNavigator({
4802
4843
  initialRoute: startupMode.route,
4803
4844
  token: config.token,
@@ -4834,4 +4875,4 @@ program2.exitOverride();
4834
4875
  }
4835
4876
  })();
4836
4877
  //# sourceMappingURL=index.js.map
4837
- //# debugId=1e3decec-3b63-5d56-87b7-c4616c30892b
4878
+ //# debugId=10ea2e49-8f43-52e0-9def-e5238ca672f2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bugbug-io/cli",
3
- "version": "14.23.0",
3
+ "version": "14.24.0",
4
4
  "description": "BugBug CLI for test automation, CI workflows, and AI-agent plugin installation",
5
5
  "type": "module",
6
6
  "bin": {