@swmansion/argent 0.16.2-next.0 → 0.16.2-next.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.
@@ -21,11 +21,16 @@ const fs = require("node:fs");
21
21
  const platformKey =
22
22
  process.platform === "linux" && process.arch === "arm64" ? "linux-arm64" : process.platform;
23
23
 
24
- const binary = path.join(__dirname, platformKey, "simulator-server");
24
+ // PE `.exe` on Windows, extensionless ELF/Mach-O elsewhere. Mirrors
25
+ // simulatorServerBinaryName() in @argent/native-devtools-ios; inlined because
26
+ // this file ships verbatim as the npm `bin` entry and can't import.
27
+ const binaryName = process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
28
+
29
+ const binary = path.join(__dirname, platformKey, binaryName);
25
30
  if (!fs.existsSync(binary)) {
26
31
  console.error(
27
32
  `argent-simulator-server: no binary for platform "${platformKey}" at ${binary}.\n` +
28
- `Supported hosts today: darwin, linux (x86_64 and arm64).`
33
+ `Supported hosts today: darwin, linux (x86_64 and arm64), win32.`
29
34
  );
30
35
  process.exit(1);
31
36
  }
package/dist/cli-cmds.mjs CHANGED
@@ -7901,16 +7901,20 @@ function hostPlatformKey() {
7901
7901
  }
7902
7902
  return process.platform;
7903
7903
  }
7904
+ function simulatorServerBinaryName() {
7905
+ return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
7906
+ }
7904
7907
  function platformBinDir() {
7905
7908
  return path9.join(BIN_DIR, hostPlatformKey());
7906
7909
  }
7907
7910
  function simulatorServerBinaryPath() {
7908
- const p = path9.join(platformBinDir(), "simulator-server");
7911
+ const binaryName = simulatorServerBinaryName();
7912
+ const p = path9.join(platformBinDir(), binaryName);
7909
7913
  if (!fs5.existsSync(p)) {
7910
- const flat = path9.join(BIN_DIR, "simulator-server");
7914
+ const flat = path9.join(BIN_DIR, binaryName);
7911
7915
  const migrationHint = fs5.existsSync(flat) ? ` Found a binary at the old flat path ${flat}; move it to ${p} or update ARGENT_SIMULATOR_SERVER_DIR to point at the parent of the platform subdirectory.` : "";
7912
7916
  throw new Error(
7913
- `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64).${migrationHint}`
7917
+ `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
7914
7918
  );
7915
7919
  }
7916
7920
  return p;
@@ -17458,16 +17458,20 @@ function hostPlatformKey() {
17458
17458
  }
17459
17459
  return process.platform;
17460
17460
  }
17461
+ function simulatorServerBinaryName() {
17462
+ return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
17463
+ }
17461
17464
  function platformBinDir() {
17462
17465
  return path6.join(BIN_DIR, hostPlatformKey());
17463
17466
  }
17464
17467
  function simulatorServerBinaryPath() {
17465
- const p = path6.join(platformBinDir(), "simulator-server");
17468
+ const binaryName = simulatorServerBinaryName();
17469
+ const p = path6.join(platformBinDir(), binaryName);
17466
17470
  if (!fs4.existsSync(p)) {
17467
- const flat = path6.join(BIN_DIR, "simulator-server");
17471
+ const flat = path6.join(BIN_DIR, binaryName);
17468
17472
  const migrationHint = fs4.existsSync(flat) ? ` Found a binary at the old flat path ${flat}; move it to ${p} or update ARGENT_SIMULATOR_SERVER_DIR to point at the parent of the platform subdirectory.` : "";
17469
17473
  throw new Error(
17470
- `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64).${migrationHint}`
17474
+ `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
17471
17475
  );
17472
17476
  }
17473
17477
  return p;