@swmansion/argent 0.28.1-next.25 → 0.28.1-next.26

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.
@@ -121538,9 +121538,10 @@ async function bootElectronApp(options) {
121538
121538
  }
121539
121539
  const onSpawnError = (err, reject) => {
121540
121540
  const codeSuffix = err.code ? ` (${err.code})` : "";
121541
+ const installHint = launcher.command === "electron" && err.code === "ENOENT" ? ` Make sure 'electron' is installed (npm i electron in the app dir, or globally) and on PATH.` : "";
121541
121542
  reject(
121542
121543
  new FailureError(
121543
- `Electron boot: failed to launch ${launcher.command}${codeSuffix}: ${err.message}. Make sure 'electron' is installed (npm i electron in the app dir, or globally) and on PATH.`,
121544
+ `Electron boot: failed to launch ${launcher.command}${codeSuffix}: ${err.message}.${installHint}`,
121544
121545
  {
121545
121546
  error_code: FAILURE_CODES.CHROMIUM_ELECTRON_SPAWN_FAILED,
121546
121547
  failure_stage: "electron_spawn_error",
@@ -121561,18 +121562,21 @@ async function bootElectronApp(options) {
121561
121562
  };
121562
121563
  child.once("error", spawnErrorListener);
121563
121564
  if (!child.pid) {
121564
- child.removeListener("error", spawnErrorListener);
121565
- spawnErrorReject = null;
121566
- throw new FailureError(
121567
- `Electron boot: spawn returned without a pid (binary: ${launcher.command}).`,
121568
- {
121569
- error_code: FAILURE_CODES.CHROMIUM_ELECTRON_SPAWN_FAILED,
121570
- failure_stage: "electron_spawn_no_pid",
121571
- failure_area: "tool_server",
121572
- error_kind: "subprocess",
121573
- failure_command: "electron"
121574
- }
121575
- );
121565
+ return Promise.race([
121566
+ spawnError,
121567
+ sleepUnref(1e3).then(() => {
121568
+ throw new FailureError(
121569
+ `Electron boot: spawn returned without a pid (binary: ${launcher.command}).`,
121570
+ {
121571
+ error_code: FAILURE_CODES.CHROMIUM_ELECTRON_SPAWN_FAILED,
121572
+ failure_stage: "electron_spawn_no_pid",
121573
+ failure_area: "tool_server",
121574
+ error_kind: "subprocess",
121575
+ failure_command: "electron"
121576
+ }
121577
+ );
121578
+ })
121579
+ ]);
121576
121580
  }
121577
121581
  child.stderr?.on("data", (chunk) => {
121578
121582
  process.stderr.write(`[chromium-cdp-${port}] ${chunk}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.28.1-next.25",
3
+ "version": "0.28.1-next.26",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator and Android Emulator control",
6
6
  "license": "Apache-2.0",