@bugbug-io/cli 14.7.0 → 14.8.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.
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
waitForSuiteRun,
|
|
63
63
|
waitForTestRun,
|
|
64
64
|
writeReportXml
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-THKXEYLX.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-JYXOTJV6.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-JYXOTJV6.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-HRSH6OZ5.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]="809b0c55-999e-5bb6-a08b-81bba34a0dc9")}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.8.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) => {
|
|
@@ -58262,7 +58270,7 @@ var readEnvFiles2 = (cwd) => {
|
|
|
58262
58270
|
var buildUserAgent2 = (clientType, version) => `BugBug ${clientType.toUpperCase()} ${version}`;
|
|
58263
58271
|
var package_default2 = {
|
|
58264
58272
|
name: "@bugbug-io/core",
|
|
58265
|
-
version: "14.
|
|
58273
|
+
version: "14.8.0",
|
|
58266
58274
|
private: true,
|
|
58267
58275
|
type: "module",
|
|
58268
58276
|
main: "dist/index.js",
|
|
@@ -64895,6 +64903,7 @@ export {
|
|
|
64895
64903
|
closeSentry,
|
|
64896
64904
|
getCliConfig,
|
|
64897
64905
|
resolveOutputMode,
|
|
64906
|
+
isCiMode,
|
|
64898
64907
|
analytics,
|
|
64899
64908
|
EXIT_GENERAL_ERROR,
|
|
64900
64909
|
EXIT_USAGE_ERROR,
|
|
@@ -64958,5 +64967,5 @@ export {
|
|
|
64958
64967
|
formatErrorMessage,
|
|
64959
64968
|
showError
|
|
64960
64969
|
};
|
|
64961
|
-
//# sourceMappingURL=chunk-
|
|
64962
|
-
//# debugId=
|
|
64970
|
+
//# sourceMappingURL=chunk-THKXEYLX.js.map
|
|
64971
|
+
//# debugId=809b0c55-999e-5bb6-a08b-81bba34a0dc9
|
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]="03b125b9-8603-59a2-ae27-037a7a852604")}catch(e){}}();
|
|
4
4
|
import { createRequire as __nodeCreateRequire } from 'node:module';
|
|
5
5
|
const require = __nodeCreateRequire(import.meta.url);
|
|
6
6
|
import {
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
importTest,
|
|
37
37
|
initProject,
|
|
38
38
|
initSentry,
|
|
39
|
+
isCiMode,
|
|
39
40
|
isCompletedStatus,
|
|
40
41
|
listProfiles,
|
|
41
42
|
listSuites,
|
|
@@ -55,7 +56,7 @@ import {
|
|
|
55
56
|
waitForSuiteRun,
|
|
56
57
|
waitForTestRun,
|
|
57
58
|
writeReportXml
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-THKXEYLX.js";
|
|
59
60
|
import "./chunk-XLIBEETK.js";
|
|
60
61
|
import "./chunk-3PJ4ZE2N.js";
|
|
61
62
|
import {
|
|
@@ -4009,6 +4010,18 @@ var registerShorthandCommands = (program3) => {
|
|
|
4009
4010
|
};
|
|
4010
4011
|
|
|
4011
4012
|
// src/utils/command.ts
|
|
4013
|
+
var TRACKED_COMMANDS = {
|
|
4014
|
+
"bugbug tests run": "testId",
|
|
4015
|
+
"bugbug tests export": "testId",
|
|
4016
|
+
"bugbug tests import": void 0,
|
|
4017
|
+
"bugbug suites run": "suiteId",
|
|
4018
|
+
"bugbug run test": "testId",
|
|
4019
|
+
"bugbug run suite": "suiteId",
|
|
4020
|
+
"bugbug export test": "testId",
|
|
4021
|
+
"bugbug import test": void 0,
|
|
4022
|
+
"bugbug plugin": "agent",
|
|
4023
|
+
"bugbug mcp": "agent"
|
|
4024
|
+
};
|
|
4012
4025
|
var getFullCommandPath = (command) => {
|
|
4013
4026
|
const names = [command.name()];
|
|
4014
4027
|
let current = command.parent;
|
|
@@ -4018,6 +4031,20 @@ var getFullCommandPath = (command) => {
|
|
|
4018
4031
|
}
|
|
4019
4032
|
return names.join(" ");
|
|
4020
4033
|
};
|
|
4034
|
+
var getCommandAnalyticsData = (command) => {
|
|
4035
|
+
if (isCiMode()) return void 0;
|
|
4036
|
+
const commandPath = getFullCommandPath(command);
|
|
4037
|
+
if (!(commandPath in TRACKED_COMMANDS)) return void 0;
|
|
4038
|
+
const data = { command: commandPath };
|
|
4039
|
+
const resourceKey = TRACKED_COMMANDS[commandPath];
|
|
4040
|
+
if (resourceKey === "agent") {
|
|
4041
|
+
data.agent = command.opts().agent;
|
|
4042
|
+
} else if (resourceKey) {
|
|
4043
|
+
const [resourceId] = command.args;
|
|
4044
|
+
data[resourceKey] = resourceId;
|
|
4045
|
+
}
|
|
4046
|
+
return data;
|
|
4047
|
+
};
|
|
4021
4048
|
|
|
4022
4049
|
// src/utils/prompt.ts
|
|
4023
4050
|
import { createInterface } from "readline";
|
|
@@ -4188,11 +4215,6 @@ var handleFatalError = async (error) => {
|
|
|
4188
4215
|
};
|
|
4189
4216
|
process.on("uncaughtException", handleFatalError);
|
|
4190
4217
|
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
4218
|
var version = getVersion();
|
|
4197
4219
|
var program2 = new Command();
|
|
4198
4220
|
program2.name("bugbug").description(`BugBug CLI ${version}`).version(version).showSuggestionAfterError().option("-t, --token <token>", "API token for BugBug (overrides config)").option(
|
|
@@ -4209,11 +4231,8 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
4209
4231
|
setSentryTag("Command", parent);
|
|
4210
4232
|
}
|
|
4211
4233
|
addBreadcrumb(`Run "${fullCommand}" command`, "Command");
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
command: fullCommand
|
|
4215
|
-
});
|
|
4216
|
-
}
|
|
4234
|
+
const eventData = getCommandAnalyticsData(actionCommand);
|
|
4235
|
+
if (eventData) analytics.trackEvent("cli_command_used", eventData);
|
|
4217
4236
|
});
|
|
4218
4237
|
registerTestsCommand(program2);
|
|
4219
4238
|
registerTestRunsCommand(program2);
|
|
@@ -4235,7 +4254,7 @@ program2.exitOverride();
|
|
|
4235
4254
|
});
|
|
4236
4255
|
analytics.trackEvent("cli_session_started");
|
|
4237
4256
|
if (startupMode.type === "commandline" && await shouldRedirectUnauthenticatedCommandToInit(process.argv, hasUsableSession)) {
|
|
4238
|
-
const { startNavigator } = await import("./app-
|
|
4257
|
+
const { startNavigator } = await import("./app-HRSH6OZ5.js");
|
|
4239
4258
|
await startNavigator({
|
|
4240
4259
|
initialRoute: "/init",
|
|
4241
4260
|
initialRouteState: {
|
|
@@ -4247,7 +4266,7 @@ program2.exitOverride();
|
|
|
4247
4266
|
return;
|
|
4248
4267
|
}
|
|
4249
4268
|
if (startupMode.type === "navigator") {
|
|
4250
|
-
const { startNavigator } = await import("./app-
|
|
4269
|
+
const { startNavigator } = await import("./app-HRSH6OZ5.js");
|
|
4251
4270
|
await startNavigator({
|
|
4252
4271
|
initialRoute: startupMode.route,
|
|
4253
4272
|
token: config.token,
|
|
@@ -4284,4 +4303,4 @@ program2.exitOverride();
|
|
|
4284
4303
|
}
|
|
4285
4304
|
})();
|
|
4286
4305
|
//# sourceMappingURL=index.js.map
|
|
4287
|
-
//# debugId=
|
|
4306
|
+
//# debugId=03b125b9-8603-59a2-ae27-037a7a852604
|