@bugbug-io/cli 14.4.3 → 14.5.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-H5R2GMRL.js";
65
+ } from "./chunk-2ZIWRWZK.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-UUXFK5JW.js.map
11133
+ //# sourceMappingURL=NavigatorApp-76WOOBZX.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-UUXFK5JW.js")
15
+ import("./NavigatorApp-76WOOBZX.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-MSVLIJL3.js.map
30
+ //# sourceMappingURL=app-SJH7MMH6.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]="dc8a69a7-6baa-5132-bf11-2057ae61bff0")}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]="11f5fc11-595f-51d4-8e05-bca1f6eb53a0")}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.4.3",
8933
+ version: "14.5.0",
8934
8934
  private: true,
8935
8935
  type: "module",
8936
8936
  main: "dist/index.js",
@@ -48402,6 +48402,44 @@ var analytics = {
48402
48402
  }
48403
48403
  };
48404
48404
 
48405
+ // src/utils/exit.ts
48406
+ var EXIT_OK = 0;
48407
+ var EXIT_GENERAL_ERROR = 1;
48408
+ var EXIT_FAILED = 2;
48409
+ var EXIT_STOPPED = 3;
48410
+ var EXIT_AUTH_ERROR = 1;
48411
+ var EXIT_USAGE_ERROR = 64;
48412
+ var exitCodeForStatus = (status) => {
48413
+ switch (status) {
48414
+ case "passed":
48415
+ return EXIT_OK;
48416
+ case "failed":
48417
+ return EXIT_FAILED;
48418
+ case "stopped":
48419
+ return EXIT_STOPPED;
48420
+ default:
48421
+ return EXIT_GENERAL_ERROR;
48422
+ }
48423
+ };
48424
+ var emitError = (mode, envelope) => {
48425
+ if (mode === "json") {
48426
+ process.stderr.write(`${JSON.stringify(envelope, null, 2)}
48427
+ `);
48428
+ return;
48429
+ }
48430
+ process.stderr.write(`Error: ${envelope.error}
48431
+ `);
48432
+ };
48433
+ var exitWith = (code) => {
48434
+ try {
48435
+ process.exit(code);
48436
+ } catch (err) {
48437
+ process.exitCode = code;
48438
+ throw err;
48439
+ }
48440
+ return void 0;
48441
+ };
48442
+
48405
48443
  // ../sdk/dist/index.js
48406
48444
  import { createRequire as createRequire2 } from "module";
48407
48445
  import { existsSync as existsSync32, readFileSync as readFileSync32 } from "fs";
@@ -58224,7 +58262,7 @@ var readEnvFiles2 = (cwd) => {
58224
58262
  var buildUserAgent2 = (clientType, version) => `BugBug ${clientType.toUpperCase()} ${version}`;
58225
58263
  var package_default2 = {
58226
58264
  name: "@bugbug-io/core",
58227
- version: "14.4.3",
58265
+ version: "14.5.0",
58228
58266
  private: true,
58229
58267
  type: "module",
58230
58268
  main: "dist/index.js",
@@ -64164,11 +64202,11 @@ Upgrade your plan: ${error3.upgradeUrl}` : headline;
64164
64202
  }
64165
64203
  return lines.join("\n");
64166
64204
  };
64167
- var showError = (message, exitCode = 1) => {
64205
+ var showError = (message, exitCode = EXIT_GENERAL_ERROR) => {
64168
64206
  if (!isInteractive()) {
64169
64207
  process.stderr.write(`Error: ${message}
64170
64208
  `);
64171
- process.exit(exitCode);
64209
+ exitWith(exitCode);
64172
64210
  }
64173
64211
  void renderInteractiveError(message, exitCode);
64174
64212
  };
@@ -64185,42 +64223,10 @@ var renderInteractiveError = async (message, exitCode) => {
64185
64223
  );
64186
64224
  setTimeout(() => {
64187
64225
  unmount();
64188
- process.exit(exitCode);
64226
+ exitWith(exitCode);
64189
64227
  }, 100);
64190
64228
  };
64191
64229
 
64192
- // src/utils/exit.ts
64193
- var EXIT_OK = 0;
64194
- var EXIT_GENERAL_ERROR = 1;
64195
- var EXIT_FAILED = 2;
64196
- var EXIT_STOPPED = 3;
64197
- var EXIT_AUTH_ERROR = 1;
64198
- var EXIT_USAGE_ERROR = 64;
64199
- var exitCodeForStatus = (status) => {
64200
- switch (status) {
64201
- case "passed":
64202
- return EXIT_OK;
64203
- case "failed":
64204
- return EXIT_FAILED;
64205
- case "stopped":
64206
- return EXIT_STOPPED;
64207
- default:
64208
- return EXIT_GENERAL_ERROR;
64209
- }
64210
- };
64211
- var emitError = (mode, envelope) => {
64212
- if (mode === "json") {
64213
- process.stderr.write(`${JSON.stringify(envelope, null, 2)}
64214
- `);
64215
- return;
64216
- }
64217
- process.stderr.write(`Error: ${envelope.error}
64218
- `);
64219
- };
64220
- var exitWith = (code) => {
64221
- process.exit(code);
64222
- };
64223
-
64224
64230
  // src/utils/sdk.ts
64225
64231
  var cached2;
64226
64232
  var createCliSdk = (overrides = {}) => {
@@ -64910,5 +64916,5 @@ export {
64910
64916
  formatErrorMessage,
64911
64917
  showError
64912
64918
  };
64913
- //# sourceMappingURL=chunk-H5R2GMRL.js.map
64914
- //# debugId=dc8a69a7-6baa-5132-bf11-2057ae61bff0
64919
+ //# sourceMappingURL=chunk-2ZIWRWZK.js.map
64920
+ //# debugId=11f5fc11-595f-51d4-8e05-bca1f6eb53a0
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]="544ba384-9e50-5f6e-8092-ee763d03e7a5")}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]="3568797f-f45b-54bd-bfb8-2f70f433660f")}catch(e){}}();
4
4
  import { createRequire as __nodeCreateRequire } from 'node:module';
5
5
  const require = __nodeCreateRequire(import.meta.url);
6
6
  import {
@@ -55,7 +55,7 @@ import {
55
55
  waitForSuiteRun,
56
56
  waitForTestRun,
57
57
  writeReportXml
58
- } from "./chunk-H5R2GMRL.js";
58
+ } from "./chunk-2ZIWRWZK.js";
59
59
  import "./chunk-XLIBEETK.js";
60
60
  import "./chunk-3PJ4ZE2N.js";
61
61
  import {
@@ -4177,18 +4177,17 @@ var getStartupMode = (argv) => {
4177
4177
  };
4178
4178
 
4179
4179
  // src/index.ts
4180
- process.on("uncaughtException", async (err) => {
4181
- captureException(err);
4180
+ var isExitingAfterFatalError = false;
4181
+ var handleFatalError = async (error) => {
4182
+ if (isExitingAfterFatalError) return;
4183
+ isExitingAfterFatalError = true;
4184
+ captureException(error);
4182
4185
  await closeSentry();
4183
- showError(formatErrorMessage(err));
4184
- process.exit(1);
4185
- });
4186
- process.on("unhandledRejection", async (reason) => {
4187
- captureException(reason);
4188
- await closeSentry();
4189
- showError(formatErrorMessage(reason));
4190
- process.exit(1);
4191
- });
4186
+ showError(formatErrorMessage(error));
4187
+ exitWith(EXIT_GENERAL_ERROR);
4188
+ };
4189
+ process.on("uncaughtException", handleFatalError);
4190
+ process.on("unhandledRejection", handleFatalError);
4192
4191
  var isRunCommand = (actionCommand) => {
4193
4192
  const commandName = actionCommand.name();
4194
4193
  const parentName = actionCommand.parent?.name();
@@ -4236,7 +4235,7 @@ program2.exitOverride();
4236
4235
  });
4237
4236
  analytics.trackEvent("cli_session_started");
4238
4237
  if (startupMode.type === "commandline" && await shouldRedirectUnauthenticatedCommandToInit(process.argv, hasUsableSession)) {
4239
- const { startNavigator } = await import("./app-MSVLIJL3.js");
4238
+ const { startNavigator } = await import("./app-SJH7MMH6.js");
4240
4239
  await startNavigator({
4241
4240
  initialRoute: "/init",
4242
4241
  initialRouteState: {
@@ -4248,7 +4247,7 @@ program2.exitOverride();
4248
4247
  return;
4249
4248
  }
4250
4249
  if (startupMode.type === "navigator") {
4251
- const { startNavigator } = await import("./app-MSVLIJL3.js");
4250
+ const { startNavigator } = await import("./app-SJH7MMH6.js");
4252
4251
  await startNavigator({
4253
4252
  initialRoute: startupMode.route,
4254
4253
  token: config.token,
@@ -4276,13 +4275,13 @@ program2.exitOverride();
4276
4275
  } catch (err) {
4277
4276
  analytics.trackEvent("cli_session_ended", { success: false });
4278
4277
  if (err instanceof CommanderError) {
4279
- process.exit(err.exitCode);
4278
+ exitWith(err.exitCode);
4280
4279
  }
4281
4280
  captureException(err);
4282
4281
  await closeSentry();
4283
4282
  showError(formatErrorMessage(err));
4284
- process.exit(1);
4283
+ exitWith(EXIT_GENERAL_ERROR);
4285
4284
  }
4286
4285
  })();
4287
4286
  //# sourceMappingURL=index.js.map
4288
- //# debugId=544ba384-9e50-5f6e-8092-ee763d03e7a5
4287
+ //# debugId=3568797f-f45b-54bd-bfb8-2f70f433660f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bugbug-io/cli",
3
- "version": "14.4.3",
3
+ "version": "14.5.0",
4
4
  "description": "BugBug CLI for test automation, CI workflows, and AI-agent plugin installation",
5
5
  "type": "module",
6
6
  "bin": {