bitfab-cli 0.2.119 → 0.2.121

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.
Files changed (2) hide show
  1. package/dist/index.js +22 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9711,11 +9711,15 @@ function spawnDetached(command, args) {
9711
9711
  if (process.env.VITEST || process.env.NODE_ENV === "test") {
9712
9712
  throw new Error("spawnDetached called in a test environment without being mocked");
9713
9713
  }
9714
- const child = spawn(command, [...args], { detached: true, stdio: "ignore" });
9715
- child.on("error", () => {
9716
- });
9717
- child.unref();
9718
- return child.pid ?? null;
9714
+ try {
9715
+ const child = spawn(command, [...args], { detached: true, stdio: "ignore" });
9716
+ child.on("error", () => {
9717
+ });
9718
+ child.unref();
9719
+ return child.pid ?? null;
9720
+ } catch {
9721
+ return null;
9722
+ }
9719
9723
  }
9720
9724
  function openChromiumApp(binaryPath, url2, sizeArgs) {
9721
9725
  return spawnDetached(binaryPath, [`--app=${url2}`, ...sizeArgs]);
@@ -9730,17 +9734,8 @@ function openOsDefault(url2) {
9730
9734
  }
9731
9735
  return spawnDetached("xdg-open", [url2]);
9732
9736
  }
9733
- function isCodexOnMacos() {
9734
- if (process.platform !== "darwin") {
9735
- return false;
9736
- }
9737
- return process.env.CODEX_SANDBOX === "seatbelt" || process.env.CODEX_CI === "1" || process.env.CODEX_THREAD_ID != null;
9738
- }
9739
9737
  function shouldDisableChromelessWindows() {
9740
- if (process.env.BITFAB_DISABLE_CHROME_APP_WINDOWS === "1") {
9741
- return true;
9742
- }
9743
- return isCodexOnMacos();
9738
+ return process.env.BITFAB_DISABLE_CHROME_APP_WINDOWS === "1";
9744
9739
  }
9745
9740
  var WINDOW_OPEN_RATE_WINDOW_MS = 3e4;
9746
9741
  var WINDOW_OPEN_RATE_LIMIT = 3;
@@ -9810,7 +9805,12 @@ function openChromelessWindow(url2) {
9810
9805
  if (defaultChromium) {
9811
9806
  const binary = findExistingBinary(defaultChromium.binaryPaths);
9812
9807
  if (binary) {
9813
- return openChromiumApp(binary, url2, sizeArgs);
9808
+ const pid = openChromiumApp(binary, url2, sizeArgs);
9809
+ if (pid !== null) {
9810
+ return pid;
9811
+ }
9812
+ openOsDefault(url2);
9813
+ return null;
9814
9814
  }
9815
9815
  }
9816
9816
  if (defaultId !== null && defaultChromium === null) {
@@ -9820,7 +9820,12 @@ function openChromelessWindow(url2) {
9820
9820
  for (const browser of browsers) {
9821
9821
  const binary = findExistingBinary(browser.binaryPaths);
9822
9822
  if (binary) {
9823
- return openChromiumApp(binary, url2, sizeArgs);
9823
+ const pid = openChromiumApp(binary, url2, sizeArgs);
9824
+ if (pid !== null) {
9825
+ return pid;
9826
+ }
9827
+ openOsDefault(url2);
9828
+ return null;
9824
9829
  }
9825
9830
  }
9826
9831
  openOsDefault(url2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.119",
3
+ "version": "0.2.121",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",