@bugbug-io/cli 14.7.2 → 14.9.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/AGENTS.md
CHANGED
|
@@ -25,7 +25,7 @@ packages/cli/
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Command domains under `src/features/`: `auth`, `init`, `install`, `profiles`,
|
|
28
|
-
`project`, `shorthands`, `suiteRuns`, `suites`, `testRuns`, `tests`, `tui`.
|
|
28
|
+
`project`, `shorthands`, `suiteRuns`, `suites`, `tags`, `testRuns`, `tests`, `tui`.
|
|
29
29
|
|
|
30
30
|
## Architecture
|
|
31
31
|
|
package/README.md
CHANGED
|
@@ -99,9 +99,12 @@ bugbug tests list -s "login" # Filter tests by name
|
|
|
99
99
|
bugbug tests show <testId> # Show test details
|
|
100
100
|
bugbug tests run <testId> # Run a test (waits for completion by default)
|
|
101
101
|
bugbug tests run <testId> --profile "Production"
|
|
102
|
+
bugbug tests run <testId> --tag smoke --tag critical
|
|
102
103
|
bugbug tests run <testId> --variable FOO=bar --variable BAZ=qux
|
|
103
104
|
bugbug tests run <testId> --no-wait # Queue the run and exit immediately
|
|
104
105
|
bugbug tests run <testId> --reporter junit --output-path report.xml
|
|
106
|
+
bugbug tests tags set <testId> --tag smoke # Replace test tags by name
|
|
107
|
+
bugbug tests tags set <testId> # Clear test tags
|
|
105
108
|
bugbug tests export <testId> --format yaml
|
|
106
109
|
bugbug tests export <testId> --format zip -o test.zip
|
|
107
110
|
bugbug tests import test.yaml # Import a test from YAML or ZIP
|
|
@@ -114,6 +117,10 @@ bugbug testruns show <runId> # Show the result of a test run
|
|
|
114
117
|
bugbug testruns logs <runId> # Get logs for a test run
|
|
115
118
|
bugbug testruns stop <runId> # Stop a running test run
|
|
116
119
|
bugbug testruns report <runId> -o out.xml # Get the JUnit XML report
|
|
120
|
+
bugbug testruns tags set <runId> --tag flaky
|
|
121
|
+
bugbug testruns tags set <runId> # Clear directly assigned run tags
|
|
122
|
+
bugbug testruns notes set <runId> "Retried successfully"
|
|
123
|
+
bugbug testruns notes set <runId> # Clear run notes
|
|
117
124
|
```
|
|
118
125
|
|
|
119
126
|
### Suites
|
|
@@ -124,7 +131,10 @@ bugbug suites list -s "checkout" # Filter suites by name
|
|
|
124
131
|
bugbug suites show <suiteId> # Show suite details
|
|
125
132
|
bugbug suites run <suiteId> # Run a suite (waits for completion by default)
|
|
126
133
|
bugbug suites run <suiteId> --profile "Production" --variable FOO=bar
|
|
134
|
+
bugbug suites run <suiteId> --tag smoke
|
|
127
135
|
bugbug suites run <suiteId> --no-wait
|
|
136
|
+
bugbug suites tags set <suiteId> --tag regression
|
|
137
|
+
bugbug suites tags set <suiteId> # Clear suite tags
|
|
128
138
|
```
|
|
129
139
|
|
|
130
140
|
### Suite Runs
|
|
@@ -133,6 +143,10 @@ bugbug suites run <suiteId> --no-wait
|
|
|
133
143
|
bugbug suiteruns show <runId> # Show the result of a suite run
|
|
134
144
|
bugbug suiteruns stop <runId> # Stop a running suite run
|
|
135
145
|
bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
|
|
146
|
+
bugbug suiteruns tags set <runId> --tag nightly
|
|
147
|
+
bugbug suiteruns tags set <runId> # Clear directly assigned run tags
|
|
148
|
+
bugbug suiteruns notes set <runId> "Nightly follow-up"
|
|
149
|
+
bugbug suiteruns notes set <runId> # Clear run notes
|
|
136
150
|
```
|
|
137
151
|
|
|
138
152
|
### Profiles
|
|
@@ -141,6 +155,13 @@ bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
|
|
|
141
155
|
bugbug profiles list # List run profiles
|
|
142
156
|
```
|
|
143
157
|
|
|
158
|
+
### Tags
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
bugbug tags list # List tags in the active project
|
|
162
|
+
bugbug --json tags list # Emit tag details as JSON
|
|
163
|
+
```
|
|
164
|
+
|
|
144
165
|
### AI Clients (plugin: MCP + Skills)
|
|
145
166
|
|
|
146
167
|
```bash
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
waitForSuiteRun,
|
|
63
63
|
waitForTestRun,
|
|
64
64
|
writeReportXml
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-JARYHSX5.js";
|
|
66
66
|
import "./chunk-XLIBEETK.js";
|
|
67
67
|
import "./chunk-3PJ4ZE2N.js";
|
|
68
68
|
import {
|
|
@@ -11130,5 +11130,5 @@ react-router/dist/development/index.mjs:
|
|
|
11130
11130
|
* @license MIT
|
|
11131
11131
|
*)
|
|
11132
11132
|
*/
|
|
11133
|
-
//# sourceMappingURL=NavigatorApp-
|
|
11133
|
+
//# sourceMappingURL=NavigatorApp-ZMOIALFD.js.map
|
|
11134
11134
|
//# debugId=9e90a61c-d567-5034-bd9e-55c33ff018a1
|
|
@@ -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-
|
|
15
|
+
import("./NavigatorApp-ZMOIALFD.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-
|
|
30
|
+
//# sourceMappingURL=app-2MJZFYX4.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]="
|
|
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]="56826397-a861-5f2b-a375-9c6b896e4d9f")}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.
|
|
8933
|
+
version: "14.9.0",
|
|
8934
8934
|
private: true,
|
|
8935
8935
|
type: "module",
|
|
8936
8936
|
main: "dist/index.js",
|
|
@@ -48032,15 +48032,23 @@ var buildUserAgent = (clientType, version) => `BugBug ${clientType.toUpperCase()
|
|
|
48032
48032
|
|
|
48033
48033
|
// ../core/dist/services/telemetry/analytics/analytics.js
|
|
48034
48034
|
var ALLOWED_EVENT_DATA_KEYS = /* @__PURE__ */ new Set([
|
|
48035
|
-
"clientVersion",
|
|
48036
48035
|
"action",
|
|
48036
|
+
"agent",
|
|
48037
|
+
"clientVersion",
|
|
48037
48038
|
"command",
|
|
48038
48039
|
"env",
|
|
48040
|
+
"errorCode",
|
|
48039
48041
|
"outputMode",
|
|
48040
48042
|
"pathname",
|
|
48041
48043
|
"promptName",
|
|
48044
|
+
"runId",
|
|
48045
|
+
"runType",
|
|
48042
48046
|
"startupMode",
|
|
48047
|
+
"stepRunId",
|
|
48043
48048
|
"success",
|
|
48049
|
+
"suiteId",
|
|
48050
|
+
"testId",
|
|
48051
|
+
"testRunId",
|
|
48044
48052
|
"toolName"
|
|
48045
48053
|
]);
|
|
48046
48054
|
var buildTelemetryUrl = (apiUrl) => {
|
|
@@ -57440,6 +57448,7 @@ var SuitesModule = class {
|
|
|
57440
57448
|
timeout,
|
|
57441
57449
|
onProgress,
|
|
57442
57450
|
profileName,
|
|
57451
|
+
tags,
|
|
57443
57452
|
variables,
|
|
57444
57453
|
...runOptions
|
|
57445
57454
|
} = options;
|
|
@@ -57448,6 +57457,7 @@ var SuitesModule = class {
|
|
|
57448
57457
|
body: {
|
|
57449
57458
|
suiteId,
|
|
57450
57459
|
runProfileId,
|
|
57460
|
+
tags,
|
|
57451
57461
|
variables: variables ?? [],
|
|
57452
57462
|
triggeredBy: this.#client.getConfig().triggeredBy
|
|
57453
57463
|
},
|
|
@@ -57471,6 +57481,30 @@ var SuitesModule = class {
|
|
|
57471
57481
|
pathParams: { id: runId },
|
|
57472
57482
|
...options
|
|
57473
57483
|
});
|
|
57484
|
+
/**
|
|
57485
|
+
* Replace tags assigned directly to a suite by tag name.
|
|
57486
|
+
*/
|
|
57487
|
+
setTags = async (suiteId, tags, options = {}) => this.#client.put("/suites/{id}/tags/", {
|
|
57488
|
+
pathParams: { id: suiteId },
|
|
57489
|
+
body: { tags },
|
|
57490
|
+
...options
|
|
57491
|
+
});
|
|
57492
|
+
/**
|
|
57493
|
+
* Replace tags assigned directly to a suite run by tag name. Inherited tags remain unchanged.
|
|
57494
|
+
*/
|
|
57495
|
+
setRunTags = async (runId, tags, options = {}) => this.#client.put("/suiteruns/{id}/tags/", {
|
|
57496
|
+
pathParams: { id: runId },
|
|
57497
|
+
body: { tags },
|
|
57498
|
+
...options
|
|
57499
|
+
});
|
|
57500
|
+
/**
|
|
57501
|
+
* Replace notes on a suite run. Pass null to clear the notes.
|
|
57502
|
+
*/
|
|
57503
|
+
setRunNotes = async (runId, notes, options = {}) => this.#client.patch("/suiteruns/{id}/", {
|
|
57504
|
+
pathParams: { id: runId },
|
|
57505
|
+
body: { notes },
|
|
57506
|
+
...options
|
|
57507
|
+
});
|
|
57474
57508
|
/**
|
|
57475
57509
|
* Get list of suite runs.
|
|
57476
57510
|
*
|
|
@@ -57603,6 +57637,18 @@ var SuitesModule = class {
|
|
|
57603
57637
|
return this.getRun(runId, requestOptions);
|
|
57604
57638
|
};
|
|
57605
57639
|
};
|
|
57640
|
+
var TagsModule = class {
|
|
57641
|
+
#client;
|
|
57642
|
+
constructor(client) {
|
|
57643
|
+
this.#client = client;
|
|
57644
|
+
}
|
|
57645
|
+
/**
|
|
57646
|
+
* Fetch every tag in the active project.
|
|
57647
|
+
*
|
|
57648
|
+
* @returns All project tags with their color and test/suite usage counts.
|
|
57649
|
+
*/
|
|
57650
|
+
getAll = async (options = {}) => this.#client.get("/tags/", options);
|
|
57651
|
+
};
|
|
57606
57652
|
function buildTestImportFormData(payload, fmt2) {
|
|
57607
57653
|
const form = new FormData();
|
|
57608
57654
|
const filename = fmt2 === "yaml" ? "test.yaml" : "test.zip";
|
|
@@ -57727,12 +57773,13 @@ var TestsModule = class {
|
|
|
57727
57773
|
* Run a test by ID
|
|
57728
57774
|
*/
|
|
57729
57775
|
#run = async (testId, options = {}) => {
|
|
57730
|
-
const { profileName, variables, ...requestOptions } = options;
|
|
57776
|
+
const { profileName, tags, variables, ...requestOptions } = options;
|
|
57731
57777
|
const runProfileId = profileName ? await this.#profiles.resolveId(profileName, requestOptions) : void 0;
|
|
57732
57778
|
return this.#client.post("/testruns/", {
|
|
57733
57779
|
body: {
|
|
57734
57780
|
testId,
|
|
57735
57781
|
runProfileId,
|
|
57782
|
+
tags,
|
|
57736
57783
|
variables: variables ?? [],
|
|
57737
57784
|
triggeredBy: this.#client.getConfig().triggeredBy
|
|
57738
57785
|
},
|
|
@@ -57792,6 +57839,30 @@ var TestsModule = class {
|
|
|
57792
57839
|
pathParams: { id: runId },
|
|
57793
57840
|
...options
|
|
57794
57841
|
});
|
|
57842
|
+
/**
|
|
57843
|
+
* Replace tags assigned directly to a test by tag name.
|
|
57844
|
+
*/
|
|
57845
|
+
setTags = async (testId, tags, options = {}) => this.#client.put("/tests/{id}/tags/", {
|
|
57846
|
+
pathParams: { id: testId },
|
|
57847
|
+
body: { tags },
|
|
57848
|
+
...options
|
|
57849
|
+
});
|
|
57850
|
+
/**
|
|
57851
|
+
* Replace tags assigned directly to a test run by tag name. Inherited tags remain unchanged.
|
|
57852
|
+
*/
|
|
57853
|
+
setRunTags = async (runId, tags, options = {}) => this.#client.put("/testruns/{id}/tags/", {
|
|
57854
|
+
pathParams: { id: runId },
|
|
57855
|
+
body: { tags },
|
|
57856
|
+
...options
|
|
57857
|
+
});
|
|
57858
|
+
/**
|
|
57859
|
+
* Replace notes on a test run. Pass null to clear the notes.
|
|
57860
|
+
*/
|
|
57861
|
+
setRunNotes = async (runId, notes, options = {}) => this.#client.patch("/testruns/{id}/", {
|
|
57862
|
+
pathParams: { id: runId },
|
|
57863
|
+
body: { notes },
|
|
57864
|
+
...options
|
|
57865
|
+
});
|
|
57795
57866
|
/**
|
|
57796
57867
|
* Request cancellation of an in-progress test run.
|
|
57797
57868
|
*
|
|
@@ -58262,7 +58333,7 @@ var readEnvFiles2 = (cwd) => {
|
|
|
58262
58333
|
var buildUserAgent2 = (clientType, version) => `BugBug ${clientType.toUpperCase()} ${version}`;
|
|
58263
58334
|
var package_default2 = {
|
|
58264
58335
|
name: "@bugbug-io/core",
|
|
58265
|
-
version: "14.
|
|
58336
|
+
version: "14.9.0",
|
|
58266
58337
|
private: true,
|
|
58267
58338
|
type: "module",
|
|
58268
58339
|
main: "dist/index.js",
|
|
@@ -59477,6 +59548,7 @@ var BugBugSDK = class {
|
|
|
59477
59548
|
#client;
|
|
59478
59549
|
tests;
|
|
59479
59550
|
suites;
|
|
59551
|
+
tags;
|
|
59480
59552
|
profiles;
|
|
59481
59553
|
config;
|
|
59482
59554
|
groups;
|
|
@@ -59496,6 +59568,7 @@ var BugBugSDK = class {
|
|
|
59496
59568
|
this.#client = new BugBugApiClient(config);
|
|
59497
59569
|
this.tests = new TestsModule(this.#client);
|
|
59498
59570
|
this.suites = new SuitesModule(this.#client);
|
|
59571
|
+
this.tags = new TagsModule(this.#client);
|
|
59499
59572
|
this.profiles = new ProfilesModule(this.#client);
|
|
59500
59573
|
this.config = new ConfigModule(this.#client);
|
|
59501
59574
|
this.groups = new GroupsModule(this.#client);
|
|
@@ -64607,6 +64680,12 @@ var stopSuiteRun = async (runId) => {
|
|
|
64607
64680
|
const run = await getSdk().suites.stopRun(runId);
|
|
64608
64681
|
return toRunState(run);
|
|
64609
64682
|
};
|
|
64683
|
+
var setSuiteRunTags = async (runId, tags) => {
|
|
64684
|
+
await getSdk().suites.setRunTags(runId, tags);
|
|
64685
|
+
};
|
|
64686
|
+
var setSuiteRunNotes = async (runId, notes) => {
|
|
64687
|
+
await getSdk().suites.setRunNotes(runId, notes);
|
|
64688
|
+
};
|
|
64610
64689
|
var getSuiteRunJunitReport = async (runId) => getSdk().suites.downloadRunJunitReport(runId, { timeout: 6e5 });
|
|
64611
64690
|
|
|
64612
64691
|
// ../core/dist/utils/variables.js
|
|
@@ -64675,6 +64754,7 @@ var getSuiteDetails = async (suiteId) => {
|
|
|
64675
64754
|
var runSuite = async (suiteId, options = {}) => {
|
|
64676
64755
|
const result = await getSdk().suites.startRun(suiteId, {
|
|
64677
64756
|
profileName: options.profile,
|
|
64757
|
+
tags: options.tags,
|
|
64678
64758
|
variables: toOverrideArray(options.variables)
|
|
64679
64759
|
});
|
|
64680
64760
|
return {
|
|
@@ -64684,6 +64764,9 @@ var runSuite = async (suiteId, options = {}) => {
|
|
|
64684
64764
|
webappUrl: result.webappUrl
|
|
64685
64765
|
};
|
|
64686
64766
|
};
|
|
64767
|
+
var setSuiteTags = async (suiteId, tags) => {
|
|
64768
|
+
await getSdk().suites.setTags(suiteId, tags);
|
|
64769
|
+
};
|
|
64687
64770
|
var waitForSuiteRun = async (runId, intervalMs = 4e3, onStatusChange, timeoutMs) => {
|
|
64688
64771
|
const result = await getSdk().suites.watchRunProgress(
|
|
64689
64772
|
runId,
|
|
@@ -64722,6 +64805,12 @@ var stopTestRun = async (runId) => {
|
|
|
64722
64805
|
const run = await getSdk().tests.stopRun(runId);
|
|
64723
64806
|
return toRunState(run);
|
|
64724
64807
|
};
|
|
64808
|
+
var setTestRunTags = async (runId, tags) => {
|
|
64809
|
+
await getSdk().tests.setRunTags(runId, tags);
|
|
64810
|
+
};
|
|
64811
|
+
var setTestRunNotes = async (runId, notes) => {
|
|
64812
|
+
await getSdk().tests.setRunNotes(runId, notes);
|
|
64813
|
+
};
|
|
64725
64814
|
var getTestRunJunitReport = async (runId) => getSdk().tests.downloadRunJunitReport(runId, { timeout: 3e5 });
|
|
64726
64815
|
var listTestRunDebugArtifacts = async (runId) => getSdk().tests.listRunDebugArtifacts(runId);
|
|
64727
64816
|
|
|
@@ -64767,6 +64856,7 @@ var getTestDetails = async (testId) => {
|
|
|
64767
64856
|
var runTest = async (testId, options = {}) => {
|
|
64768
64857
|
const result = await getSdk().tests.startRun(testId, {
|
|
64769
64858
|
profileName: options.profile,
|
|
64859
|
+
tags: options.tags,
|
|
64770
64860
|
variables: toOverrideArray(options.variables)
|
|
64771
64861
|
});
|
|
64772
64862
|
return {
|
|
@@ -64776,6 +64866,9 @@ var runTest = async (testId, options = {}) => {
|
|
|
64776
64866
|
webappUrl: result.webappUrl
|
|
64777
64867
|
};
|
|
64778
64868
|
};
|
|
64869
|
+
var setTestTags = async (testId, tags) => {
|
|
64870
|
+
await getSdk().tests.setTags(testId, tags);
|
|
64871
|
+
};
|
|
64779
64872
|
var waitForTestRun = async (runId, intervalMs = 4e3, onStatusChange, timeoutMs) => {
|
|
64780
64873
|
const result = await getSdk().tests.watchRunProgress(
|
|
64781
64874
|
runId,
|
|
@@ -64895,6 +64988,7 @@ export {
|
|
|
64895
64988
|
closeSentry,
|
|
64896
64989
|
getCliConfig,
|
|
64897
64990
|
resolveOutputMode,
|
|
64991
|
+
isCiMode,
|
|
64898
64992
|
analytics,
|
|
64899
64993
|
EXIT_GENERAL_ERROR,
|
|
64900
64994
|
EXIT_USAGE_ERROR,
|
|
@@ -64908,6 +65002,7 @@ export {
|
|
|
64908
65002
|
runClientCommand,
|
|
64909
65003
|
openExternalUrl,
|
|
64910
65004
|
formatRunStatus,
|
|
65005
|
+
getSdk,
|
|
64911
65006
|
updateSdkConfig,
|
|
64912
65007
|
login,
|
|
64913
65008
|
logout,
|
|
@@ -64926,24 +65021,29 @@ export {
|
|
|
64926
65021
|
formatInlineRunReport,
|
|
64927
65022
|
formatFinalResults,
|
|
64928
65023
|
getRunErrorMessage,
|
|
65024
|
+
getVariablesMap,
|
|
64929
65025
|
listSuiteRuns,
|
|
64930
65026
|
getSuiteRunDetails,
|
|
64931
65027
|
getSuiteRunTestRuns,
|
|
64932
65028
|
getSuiteRun,
|
|
64933
65029
|
stopSuiteRun,
|
|
65030
|
+
setSuiteRunTags,
|
|
65031
|
+
setSuiteRunNotes,
|
|
64934
65032
|
getSuiteRunJunitReport,
|
|
64935
|
-
getVariablesMap,
|
|
64936
65033
|
listSuites,
|
|
64937
65034
|
getSuite,
|
|
64938
65035
|
loadSuiteTableResources,
|
|
64939
65036
|
getSuiteDetails,
|
|
64940
65037
|
runSuite,
|
|
65038
|
+
setSuiteTags,
|
|
64941
65039
|
waitForSuiteRun,
|
|
64942
65040
|
listTestRuns,
|
|
64943
65041
|
getTestRunDetails,
|
|
64944
65042
|
getTestRunLogs,
|
|
64945
65043
|
getTestRun,
|
|
64946
65044
|
stopTestRun,
|
|
65045
|
+
setTestRunTags,
|
|
65046
|
+
setTestRunNotes,
|
|
64947
65047
|
getTestRunJunitReport,
|
|
64948
65048
|
listTestRunDebugArtifacts,
|
|
64949
65049
|
listTests,
|
|
@@ -64951,6 +65051,7 @@ export {
|
|
|
64951
65051
|
loadTestTableResources,
|
|
64952
65052
|
getTestDetails,
|
|
64953
65053
|
runTest,
|
|
65054
|
+
setTestTags,
|
|
64954
65055
|
waitForTestRun,
|
|
64955
65056
|
detectFormat,
|
|
64956
65057
|
exportTest,
|
|
@@ -64958,5 +65059,5 @@ export {
|
|
|
64958
65059
|
formatErrorMessage,
|
|
64959
65060
|
showError
|
|
64960
65061
|
};
|
|
64961
|
-
//# sourceMappingURL=chunk-
|
|
64962
|
-
//# debugId=
|
|
65062
|
+
//# sourceMappingURL=chunk-JARYHSX5.js.map
|
|
65063
|
+
//# debugId=56826397-a861-5f2b-a375-9c6b896e4d9f
|
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]="
|
|
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]="6f67254d-fe25-50b8-9beb-c00c0a09bd79")}catch(e){}}();
|
|
4
4
|
import { createRequire as __nodeCreateRequire } from 'node:module';
|
|
5
5
|
const require = __nodeCreateRequire(import.meta.url);
|
|
6
6
|
import {
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
formatInlineRunReport,
|
|
24
24
|
getCliConfig,
|
|
25
25
|
getIdentity,
|
|
26
|
+
getSdk,
|
|
26
27
|
getSuite,
|
|
27
28
|
getSuiteRun,
|
|
28
29
|
getSuiteRunJunitReport,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
importTest,
|
|
37
38
|
initProject,
|
|
38
39
|
initSentry,
|
|
40
|
+
isCiMode,
|
|
39
41
|
isCompletedStatus,
|
|
40
42
|
listProfiles,
|
|
41
43
|
listSuites,
|
|
@@ -47,6 +49,12 @@ import {
|
|
|
47
49
|
runSuite,
|
|
48
50
|
runTest,
|
|
49
51
|
setSentryTag,
|
|
52
|
+
setSuiteRunNotes,
|
|
53
|
+
setSuiteRunTags,
|
|
54
|
+
setSuiteTags,
|
|
55
|
+
setTestRunNotes,
|
|
56
|
+
setTestRunTags,
|
|
57
|
+
setTestTags,
|
|
50
58
|
showError,
|
|
51
59
|
startSentrySpan,
|
|
52
60
|
stopSuiteRun,
|
|
@@ -55,7 +63,7 @@ import {
|
|
|
55
63
|
waitForSuiteRun,
|
|
56
64
|
waitForTestRun,
|
|
57
65
|
writeReportXml
|
|
58
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-JARYHSX5.js";
|
|
59
67
|
import "./chunk-XLIBEETK.js";
|
|
60
68
|
import "./chunk-3PJ4ZE2N.js";
|
|
61
69
|
import {
|
|
@@ -3595,31 +3603,9 @@ var getExistingRunReportAction = async (runId, opts, adapter) => {
|
|
|
3595
3603
|
}
|
|
3596
3604
|
};
|
|
3597
3605
|
|
|
3598
|
-
// src/features/suiteRuns/suiteRuns.command.ts
|
|
3599
|
-
var SUITE_RUN_ACTION_ADAPTER = {
|
|
3600
|
-
kind: "suite",
|
|
3601
|
-
runLabel: "suite run",
|
|
3602
|
-
getRun: getSuiteRun,
|
|
3603
|
-
getJunitReport: getSuiteRunJunitReport,
|
|
3604
|
-
stopRun: stopSuiteRun
|
|
3605
|
-
};
|
|
3606
|
-
var registerSuiteRunShowCommand = (parent, commandName = "show") => parent.command(`${commandName} <runId>`).description("Show suite run details").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the suite report").action(
|
|
3607
|
-
(runId, opts) => getExistingRunResultAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
|
|
3608
|
-
);
|
|
3609
|
-
var registerSuiteRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a suite run").action((runId) => stopExistingRunAction(runId, SUITE_RUN_ACTION_ADAPTER));
|
|
3610
|
-
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(
|
|
3611
|
-
(runId, opts) => getExistingRunReportAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
|
|
3612
|
-
);
|
|
3613
|
-
var registerSuiteRunsCommand = (program3) => {
|
|
3614
|
-
const suiteruns = program3.command("suiteruns").description("Suite run commands");
|
|
3615
|
-
registerSuiteRunShowCommand(suiteruns, "show");
|
|
3616
|
-
registerSuiteRunStopCommand(suiteruns, "stop");
|
|
3617
|
-
registerSuiteRunReportCommand(suiteruns, "report");
|
|
3618
|
-
return suiteruns;
|
|
3619
|
-
};
|
|
3620
|
-
|
|
3621
3606
|
// src/utils/runAction.ts
|
|
3622
3607
|
var collectRunVariableOption = (val, prev = []) => prev.concat(val);
|
|
3608
|
+
var collectTagOption = (val, prev = []) => prev.concat(val);
|
|
3623
3609
|
var parseTimeoutMinutes = (value) => {
|
|
3624
3610
|
const minutes = Number(value);
|
|
3625
3611
|
if (!Number.isFinite(minutes) || minutes <= 0) {
|
|
@@ -3647,6 +3633,7 @@ var runResourceAction = async (resourceId, opts, adapter) => {
|
|
|
3647
3633
|
}
|
|
3648
3634
|
const runResult = await adapter.runResource(resourceId, {
|
|
3649
3635
|
profile: opts.profile,
|
|
3636
|
+
tags: opts.tags?.length ? opts.tags : void 0,
|
|
3650
3637
|
variables: Object.keys(variables).length ? variables : void 0
|
|
3651
3638
|
});
|
|
3652
3639
|
if (mode === "plain") {
|
|
@@ -3708,6 +3695,73 @@ var runResourceAction = async (resourceId, opts, adapter) => {
|
|
|
3708
3695
|
}
|
|
3709
3696
|
};
|
|
3710
3697
|
|
|
3698
|
+
// src/features/suiteRuns/suiteRuns.command.ts
|
|
3699
|
+
var SUITE_RUN_ACTION_ADAPTER = {
|
|
3700
|
+
kind: "suite",
|
|
3701
|
+
runLabel: "suite run",
|
|
3702
|
+
getRun: getSuiteRun,
|
|
3703
|
+
getJunitReport: getSuiteRunJunitReport,
|
|
3704
|
+
stopRun: stopSuiteRun
|
|
3705
|
+
};
|
|
3706
|
+
var registerSuiteRunShowCommand = (parent, commandName = "show") => parent.command(`${commandName} <runId>`).description("Show suite run details").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the suite report").action(
|
|
3707
|
+
(runId, opts) => getExistingRunResultAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
|
|
3708
|
+
);
|
|
3709
|
+
var registerSuiteRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a suite run").action((runId) => stopExistingRunAction(runId, SUITE_RUN_ACTION_ADAPTER));
|
|
3710
|
+
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(
|
|
3711
|
+
(runId, opts) => getExistingRunReportAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
|
|
3712
|
+
);
|
|
3713
|
+
var registerSuiteRunTagsCommand = (parent, commandName = "tags") => {
|
|
3714
|
+
const tags = parent.command(commandName).description("Manage suite run tags");
|
|
3715
|
+
tags.command("set <runId>").description("Replace directly assigned suite run tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (runId, opts) => {
|
|
3716
|
+
const mode = resolveOutputMode();
|
|
3717
|
+
const tagNames = opts.tag ?? [];
|
|
3718
|
+
try {
|
|
3719
|
+
await setSuiteRunTags(runId, tagNames);
|
|
3720
|
+
if (mode === "json") {
|
|
3721
|
+
printJson({ runId, tags: tagNames });
|
|
3722
|
+
} else if (mode === "plain") {
|
|
3723
|
+
process.stdout.write(
|
|
3724
|
+
`Set tags for suite run ${runId}: ${tagNames.join(", ") || "(none)"}
|
|
3725
|
+
`
|
|
3726
|
+
);
|
|
3727
|
+
}
|
|
3728
|
+
} catch (err) {
|
|
3729
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
3730
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
3731
|
+
}
|
|
3732
|
+
});
|
|
3733
|
+
return tags;
|
|
3734
|
+
};
|
|
3735
|
+
var registerSuiteRunNotesCommand = (parent, commandName = "notes") => {
|
|
3736
|
+
const notes = parent.command(commandName).description("Manage suite run notes");
|
|
3737
|
+
notes.command("set <runId> [notes]").description("Replace suite run notes. Omit notes to clear them.").action(async (runId, value) => {
|
|
3738
|
+
const mode = resolveOutputMode();
|
|
3739
|
+
const runNotes = value ?? null;
|
|
3740
|
+
try {
|
|
3741
|
+
await setSuiteRunNotes(runId, runNotes);
|
|
3742
|
+
if (mode === "json") {
|
|
3743
|
+
printJson({ runId, notes: runNotes });
|
|
3744
|
+
} else if (mode === "plain") {
|
|
3745
|
+
process.stdout.write(`Set notes for suite run ${runId}: ${runNotes ?? "(none)"}
|
|
3746
|
+
`);
|
|
3747
|
+
}
|
|
3748
|
+
} catch (err) {
|
|
3749
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
3750
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
3751
|
+
}
|
|
3752
|
+
});
|
|
3753
|
+
return notes;
|
|
3754
|
+
};
|
|
3755
|
+
var registerSuiteRunsCommand = (program3) => {
|
|
3756
|
+
const suiteruns = program3.command("suiteruns").description("Suite run commands");
|
|
3757
|
+
registerSuiteRunShowCommand(suiteruns, "show");
|
|
3758
|
+
registerSuiteRunStopCommand(suiteruns, "stop");
|
|
3759
|
+
registerSuiteRunReportCommand(suiteruns, "report");
|
|
3760
|
+
registerSuiteRunTagsCommand(suiteruns, "tags");
|
|
3761
|
+
registerSuiteRunNotesCommand(suiteruns, "notes");
|
|
3762
|
+
return suiteruns;
|
|
3763
|
+
};
|
|
3764
|
+
|
|
3711
3765
|
// src/features/suites/suites.formatters.tsx
|
|
3712
3766
|
var suitesListOutputFormatters = {
|
|
3713
3767
|
toPlain(suites) {
|
|
@@ -3764,7 +3818,7 @@ var registerSuiteShowCommand = (parent, commandName = "show") => parent.command(
|
|
|
3764
3818
|
exitWith(EXIT_GENERAL_ERROR);
|
|
3765
3819
|
}
|
|
3766
3820
|
});
|
|
3767
|
-
var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <suiteId>`).description("Execute a test suite by ID").option("-p, --profile <name>", "Profile name to use").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
|
|
3821
|
+
var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <suiteId>`).description("Execute a test suite by ID").option("-p, --profile <name>", "Profile name to use").option("--tag <name>", "Assign a tag to the run (repeatable)", collectTagOption, []).option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
|
|
3768
3822
|
"--variable <key=value>",
|
|
3769
3823
|
"Override variables (repeatable)",
|
|
3770
3824
|
collectRunVariableOption,
|
|
@@ -3772,7 +3826,7 @@ var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`$
|
|
|
3772
3826
|
).option("--no-wait", "Queue the run and exit without waiting for completion").option("--timeout <minutes>", "Maximum wait time in minutes", parseTimeoutMinutes).action(
|
|
3773
3827
|
(suiteId, opts) => runResourceAction(
|
|
3774
3828
|
suiteId,
|
|
3775
|
-
{ ...opts, variables: opts.variable ?? [] },
|
|
3829
|
+
{ ...opts, tags: opts.tag, variables: opts.variable ?? [] },
|
|
3776
3830
|
{
|
|
3777
3831
|
kind: "suite",
|
|
3778
3832
|
entityLabel: "suite",
|
|
@@ -3783,10 +3837,33 @@ var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`$
|
|
|
3783
3837
|
}
|
|
3784
3838
|
)
|
|
3785
3839
|
);
|
|
3840
|
+
var registerSuiteTagsCommand = (parent, commandName = "tags") => {
|
|
3841
|
+
const tags = parent.command(commandName).description("Manage suite tags");
|
|
3842
|
+
tags.command("set <suiteId>").description("Replace suite tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (suiteId, opts) => {
|
|
3843
|
+
const mode = resolveOutputMode();
|
|
3844
|
+
const tagNames = opts.tag ?? [];
|
|
3845
|
+
try {
|
|
3846
|
+
await setSuiteTags(suiteId, tagNames);
|
|
3847
|
+
if (mode === "json") {
|
|
3848
|
+
printJson({ suiteId, tags: tagNames });
|
|
3849
|
+
} else if (mode === "plain") {
|
|
3850
|
+
process.stdout.write(
|
|
3851
|
+
`Set tags for suite ${suiteId}: ${tagNames.join(", ") || "(none)"}
|
|
3852
|
+
`
|
|
3853
|
+
);
|
|
3854
|
+
}
|
|
3855
|
+
} catch (err) {
|
|
3856
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
3857
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
3858
|
+
}
|
|
3859
|
+
});
|
|
3860
|
+
return tags;
|
|
3861
|
+
};
|
|
3786
3862
|
var registerSuitesCommand = (program3) => {
|
|
3787
3863
|
const suites = program3.command("suites").description("Test suite commands");
|
|
3788
3864
|
registerSuiteShowCommand(suites, "show");
|
|
3789
3865
|
registerSuiteRunCommand(suites, "run");
|
|
3866
|
+
registerSuiteTagsCommand(suites, "tags");
|
|
3790
3867
|
registerSuitesListCommand(suites, "list");
|
|
3791
3868
|
return suites;
|
|
3792
3869
|
};
|
|
@@ -3824,12 +3901,56 @@ var registerTestRunStopCommand = (parent, commandName = "stop") => parent.comman
|
|
|
3824
3901
|
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(
|
|
3825
3902
|
(runId, opts) => getExistingRunReportAction(runId, opts, TEST_RUN_ACTION_ADAPTER)
|
|
3826
3903
|
);
|
|
3904
|
+
var registerTestRunTagsCommand = (parent, commandName = "tags") => {
|
|
3905
|
+
const tags = parent.command(commandName).description("Manage test run tags");
|
|
3906
|
+
tags.command("set <runId>").description("Replace directly assigned test run tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (runId, opts) => {
|
|
3907
|
+
const mode = resolveOutputMode();
|
|
3908
|
+
const tagNames = opts.tag ?? [];
|
|
3909
|
+
try {
|
|
3910
|
+
await setTestRunTags(runId, tagNames);
|
|
3911
|
+
if (mode === "json") {
|
|
3912
|
+
printJson({ runId, tags: tagNames });
|
|
3913
|
+
} else if (mode === "plain") {
|
|
3914
|
+
process.stdout.write(
|
|
3915
|
+
`Set tags for test run ${runId}: ${tagNames.join(", ") || "(none)"}
|
|
3916
|
+
`
|
|
3917
|
+
);
|
|
3918
|
+
}
|
|
3919
|
+
} catch (err) {
|
|
3920
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
3921
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
3922
|
+
}
|
|
3923
|
+
});
|
|
3924
|
+
return tags;
|
|
3925
|
+
};
|
|
3926
|
+
var registerTestRunNotesCommand = (parent, commandName = "notes") => {
|
|
3927
|
+
const notes = parent.command(commandName).description("Manage test run notes");
|
|
3928
|
+
notes.command("set <runId> [notes]").description("Replace test run notes. Omit notes to clear them.").action(async (runId, value) => {
|
|
3929
|
+
const mode = resolveOutputMode();
|
|
3930
|
+
const runNotes = value ?? null;
|
|
3931
|
+
try {
|
|
3932
|
+
await setTestRunNotes(runId, runNotes);
|
|
3933
|
+
if (mode === "json") {
|
|
3934
|
+
printJson({ runId, notes: runNotes });
|
|
3935
|
+
} else if (mode === "plain") {
|
|
3936
|
+
process.stdout.write(`Set notes for test run ${runId}: ${runNotes ?? "(none)"}
|
|
3937
|
+
`);
|
|
3938
|
+
}
|
|
3939
|
+
} catch (err) {
|
|
3940
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
3941
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
3942
|
+
}
|
|
3943
|
+
});
|
|
3944
|
+
return notes;
|
|
3945
|
+
};
|
|
3827
3946
|
var registerTestRunsCommand = (program3) => {
|
|
3828
3947
|
const testruns = program3.command("testruns").description("Test run commands");
|
|
3829
3948
|
registerTestRunShowCommand(testruns, "show");
|
|
3830
3949
|
registerTestRunStopCommand(testruns, "stop");
|
|
3831
3950
|
registerTestRunLogsCommand(testruns, "logs");
|
|
3832
3951
|
registerTestRunReportCommand(testruns, "report");
|
|
3952
|
+
registerTestRunTagsCommand(testruns, "tags");
|
|
3953
|
+
registerTestRunNotesCommand(testruns, "notes");
|
|
3833
3954
|
return testruns;
|
|
3834
3955
|
};
|
|
3835
3956
|
|
|
@@ -3887,7 +4008,7 @@ var registerTestShowCommand = (parent, commandName = "show") => parent.command(`
|
|
|
3887
4008
|
exitWith(EXIT_GENERAL_ERROR);
|
|
3888
4009
|
}
|
|
3889
4010
|
});
|
|
3890
|
-
var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <testId>`).description("Execute a test by ID").option("-p, --profile <name>", "Profile name to use").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
|
|
4011
|
+
var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <testId>`).description("Execute a test by ID").option("-p, --profile <name>", "Profile name to use").option("--tag <name>", "Assign a tag to the run (repeatable)", collectTagOption, []).option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
|
|
3891
4012
|
"--variable <key=value>",
|
|
3892
4013
|
"Override variables (repeatable)",
|
|
3893
4014
|
collectRunVariableOption,
|
|
@@ -3895,7 +4016,7 @@ var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${
|
|
|
3895
4016
|
).option("--no-wait", "Queue the run and exit without waiting for completion").option("--timeout <minutes>", "Maximum wait time in minutes", parseTimeoutMinutes).action(
|
|
3896
4017
|
(testId, opts) => runResourceAction(
|
|
3897
4018
|
testId,
|
|
3898
|
-
{ ...opts, variables: opts.variable ?? [] },
|
|
4019
|
+
{ ...opts, tags: opts.tag, variables: opts.variable ?? [] },
|
|
3899
4020
|
{
|
|
3900
4021
|
kind: "test",
|
|
3901
4022
|
entityLabel: "test",
|
|
@@ -3906,6 +4027,26 @@ var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${
|
|
|
3906
4027
|
}
|
|
3907
4028
|
)
|
|
3908
4029
|
);
|
|
4030
|
+
var registerTestTagsCommand = (parent, commandName = "tags") => {
|
|
4031
|
+
const tags = parent.command(commandName).description("Manage test tags");
|
|
4032
|
+
tags.command("set <testId>").description("Replace test tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (testId, opts) => {
|
|
4033
|
+
const mode = resolveOutputMode();
|
|
4034
|
+
const tagNames = opts.tag ?? [];
|
|
4035
|
+
try {
|
|
4036
|
+
await setTestTags(testId, tagNames);
|
|
4037
|
+
if (mode === "json") {
|
|
4038
|
+
printJson({ testId, tags: tagNames });
|
|
4039
|
+
} else if (mode === "plain") {
|
|
4040
|
+
process.stdout.write(`Set tags for test ${testId}: ${tagNames.join(", ") || "(none)"}
|
|
4041
|
+
`);
|
|
4042
|
+
}
|
|
4043
|
+
} catch (err) {
|
|
4044
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
4045
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
4048
|
+
return tags;
|
|
4049
|
+
};
|
|
3909
4050
|
var registerTestExportCommand = (parent, commandName = "export") => parent.command(`${commandName} <testId>`).description("Export a single test as YAML or ZIP").option("--format <fmt>", "Output format: yaml or zip", "yaml").option("-o, --output <file>", "Output file path (defaults to bugbug-test-<testId>.<fmt>)").action(async (testId, opts) => {
|
|
3910
4051
|
const mode = resolveOutputMode();
|
|
3911
4052
|
try {
|
|
@@ -3955,6 +4096,7 @@ var registerTestsCommand = (program3) => {
|
|
|
3955
4096
|
const tests = program3.command("tests").description("Test commands");
|
|
3956
4097
|
registerTestShowCommand(tests, "show");
|
|
3957
4098
|
registerTestRunCommand(tests, "run");
|
|
4099
|
+
registerTestTagsCommand(tests, "tags");
|
|
3958
4100
|
registerTestsListCommand(tests, "list");
|
|
3959
4101
|
registerTestExportCommand(tests, "export");
|
|
3960
4102
|
registerTestImportCommand(tests, "import");
|
|
@@ -4008,7 +4150,59 @@ var registerShorthandCommands = (program3) => {
|
|
|
4008
4150
|
registerImportShorthand(program3);
|
|
4009
4151
|
};
|
|
4010
4152
|
|
|
4153
|
+
// src/features/tags/tags.formatters.ts
|
|
4154
|
+
var tagsListOutputFormatters = {
|
|
4155
|
+
toPlain(tags) {
|
|
4156
|
+
return renderTable(
|
|
4157
|
+
tags,
|
|
4158
|
+
[
|
|
4159
|
+
{ header: "Id", get: (tag) => tag.id },
|
|
4160
|
+
{ header: "Name", get: (tag) => tag.name },
|
|
4161
|
+
{ header: "Color", get: (tag) => tag.color },
|
|
4162
|
+
{ header: "Tests", get: (tag) => String(tag.testsCount) },
|
|
4163
|
+
{ header: "Suites", get: (tag) => String(tag.suitesCount) }
|
|
4164
|
+
],
|
|
4165
|
+
{ emptyMessage: "No tags found." }
|
|
4166
|
+
);
|
|
4167
|
+
},
|
|
4168
|
+
toJson(tags) {
|
|
4169
|
+
return tags;
|
|
4170
|
+
}
|
|
4171
|
+
};
|
|
4172
|
+
|
|
4173
|
+
// src/features/tags/tags.service.ts
|
|
4174
|
+
var listTags = async () => getSdk().tags.getAll();
|
|
4175
|
+
|
|
4176
|
+
// src/features/tags/tags.command.ts
|
|
4177
|
+
var registerTagsListCommand = (parent) => parent.command("list").description("List tags in the active project").action(async () => {
|
|
4178
|
+
const mode = resolveOutputMode();
|
|
4179
|
+
try {
|
|
4180
|
+
const tags = await listTags();
|
|
4181
|
+
await renderOutput(mode, tags, tagsListOutputFormatters);
|
|
4182
|
+
} catch (err) {
|
|
4183
|
+
emitError(mode, { error: err instanceof Error ? err.message : String(err) });
|
|
4184
|
+
exitWith(EXIT_GENERAL_ERROR);
|
|
4185
|
+
}
|
|
4186
|
+
});
|
|
4187
|
+
var registerTagsCommand = (program3) => {
|
|
4188
|
+
const tags = program3.command("tags").description("Project tag commands");
|
|
4189
|
+
registerTagsListCommand(tags);
|
|
4190
|
+
return tags;
|
|
4191
|
+
};
|
|
4192
|
+
|
|
4011
4193
|
// src/utils/command.ts
|
|
4194
|
+
var TRACKED_COMMANDS = {
|
|
4195
|
+
"bugbug tests run": "testId",
|
|
4196
|
+
"bugbug tests export": "testId",
|
|
4197
|
+
"bugbug tests import": void 0,
|
|
4198
|
+
"bugbug suites run": "suiteId",
|
|
4199
|
+
"bugbug run test": "testId",
|
|
4200
|
+
"bugbug run suite": "suiteId",
|
|
4201
|
+
"bugbug export test": "testId",
|
|
4202
|
+
"bugbug import test": void 0,
|
|
4203
|
+
"bugbug plugin": "agent",
|
|
4204
|
+
"bugbug mcp": "agent"
|
|
4205
|
+
};
|
|
4012
4206
|
var getFullCommandPath = (command) => {
|
|
4013
4207
|
const names = [command.name()];
|
|
4014
4208
|
let current = command.parent;
|
|
@@ -4018,6 +4212,20 @@ var getFullCommandPath = (command) => {
|
|
|
4018
4212
|
}
|
|
4019
4213
|
return names.join(" ");
|
|
4020
4214
|
};
|
|
4215
|
+
var getCommandAnalyticsData = (command) => {
|
|
4216
|
+
if (isCiMode()) return void 0;
|
|
4217
|
+
const commandPath = getFullCommandPath(command);
|
|
4218
|
+
if (!(commandPath in TRACKED_COMMANDS)) return void 0;
|
|
4219
|
+
const data = { command: commandPath };
|
|
4220
|
+
const resourceKey = TRACKED_COMMANDS[commandPath];
|
|
4221
|
+
if (resourceKey === "agent") {
|
|
4222
|
+
data.agent = command.opts().agent;
|
|
4223
|
+
} else if (resourceKey) {
|
|
4224
|
+
const [resourceId] = command.args;
|
|
4225
|
+
data[resourceKey] = resourceId;
|
|
4226
|
+
}
|
|
4227
|
+
return data;
|
|
4228
|
+
};
|
|
4021
4229
|
|
|
4022
4230
|
// src/utils/prompt.ts
|
|
4023
4231
|
import { createInterface } from "readline";
|
|
@@ -4188,11 +4396,6 @@ var handleFatalError = async (error) => {
|
|
|
4188
4396
|
};
|
|
4189
4397
|
process.on("uncaughtException", handleFatalError);
|
|
4190
4398
|
process.on("unhandledRejection", handleFatalError);
|
|
4191
|
-
var isRunCommand = (actionCommand) => {
|
|
4192
|
-
const commandName = actionCommand.name();
|
|
4193
|
-
const parentName = actionCommand.parent?.name();
|
|
4194
|
-
return commandName === "run" && (parentName === "tests" || parentName === "suites") || parentName === "run" && (commandName === "test" || commandName === "suite");
|
|
4195
|
-
};
|
|
4196
4399
|
var version = getVersion();
|
|
4197
4400
|
var program2 = new Command();
|
|
4198
4401
|
program2.name("bugbug").description(`BugBug CLI ${version}`).version(version).showSuggestionAfterError().option("-t, --token <token>", "API token for BugBug (overrides config)").option(
|
|
@@ -4209,16 +4412,14 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
4209
4412
|
setSentryTag("Command", parent);
|
|
4210
4413
|
}
|
|
4211
4414
|
addBreadcrumb(`Run "${fullCommand}" command`, "Command");
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
command: fullCommand
|
|
4215
|
-
});
|
|
4216
|
-
}
|
|
4415
|
+
const eventData = getCommandAnalyticsData(actionCommand);
|
|
4416
|
+
if (eventData) analytics.trackEvent("cli_command_used", eventData);
|
|
4217
4417
|
});
|
|
4218
4418
|
registerTestsCommand(program2);
|
|
4219
4419
|
registerTestRunsCommand(program2);
|
|
4220
4420
|
registerSuitesCommand(program2);
|
|
4221
4421
|
registerSuiteRunsCommand(program2);
|
|
4422
|
+
registerTagsCommand(program2);
|
|
4222
4423
|
registerProfilesCommand(program2);
|
|
4223
4424
|
registerProjectCommand(program2);
|
|
4224
4425
|
registerAuthCommands(program2);
|
|
@@ -4235,7 +4436,7 @@ program2.exitOverride();
|
|
|
4235
4436
|
});
|
|
4236
4437
|
analytics.trackEvent("cli_session_started");
|
|
4237
4438
|
if (startupMode.type === "commandline" && await shouldRedirectUnauthenticatedCommandToInit(process.argv, hasUsableSession)) {
|
|
4238
|
-
const { startNavigator } = await import("./app-
|
|
4439
|
+
const { startNavigator } = await import("./app-2MJZFYX4.js");
|
|
4239
4440
|
await startNavigator({
|
|
4240
4441
|
initialRoute: "/init",
|
|
4241
4442
|
initialRouteState: {
|
|
@@ -4247,7 +4448,7 @@ program2.exitOverride();
|
|
|
4247
4448
|
return;
|
|
4248
4449
|
}
|
|
4249
4450
|
if (startupMode.type === "navigator") {
|
|
4250
|
-
const { startNavigator } = await import("./app-
|
|
4451
|
+
const { startNavigator } = await import("./app-2MJZFYX4.js");
|
|
4251
4452
|
await startNavigator({
|
|
4252
4453
|
initialRoute: startupMode.route,
|
|
4253
4454
|
token: config.token,
|
|
@@ -4284,4 +4485,4 @@ program2.exitOverride();
|
|
|
4284
4485
|
}
|
|
4285
4486
|
})();
|
|
4286
4487
|
//# sourceMappingURL=index.js.map
|
|
4287
|
-
//# debugId=
|
|
4488
|
+
//# debugId=6f67254d-fe25-50b8-9beb-c00c0a09bd79
|