@xbrowser/cli 1.22.0 → 1.23.1

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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZTHE5RBZ.js";
4
4
 
5
5
  // src/human-interaction.ts
6
- import { execSync } from "child_process";
6
+ import { execFile } from "child_process";
7
7
 
8
8
  // src/screencast.ts
9
9
  var ScreencastCapturer = class {
@@ -278,11 +278,6 @@ var WebhookNotifier = class {
278
278
  }
279
279
  };
280
280
 
281
- // src/utils/shell-escape.ts
282
- function shellEscape(value) {
283
- return `'${value.replace(/'/g, "'\\''")}'`;
284
- }
285
-
286
281
  // src/human-interaction.ts
287
282
  var HumanInteractionManager = class {
288
283
  wsServer;
@@ -311,8 +306,10 @@ var HumanInteractionManager = class {
311
306
  tryAutoOpen(previewUrl) {
312
307
  if (!this.autoOpen) return;
313
308
  try {
314
- const cmd = process.platform === "darwin" ? "open" : process.platform === "linux" ? "xdg-open" : "start";
315
- execSync(`${cmd} ${shellEscape(previewUrl)}`, { stdio: "ignore" });
309
+ const opener = process.platform === "darwin" ? "open" : process.platform === "linux" ? "xdg-open" : "cmd";
310
+ const args = process.platform === "win32" ? ["/c", "start", "", previewUrl] : [previewUrl];
311
+ execFile(opener, args, { timeout: 1e4 }, () => {
312
+ });
316
313
  } catch {
317
314
  }
318
315
  }