@swmansion/argent 0.16.2-next.0 → 0.16.2-next.10

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
@@ -6306,6 +6306,21 @@ var FAILURE_CODES = {
6306
6306
  NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
6307
6307
  NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
6308
6308
  NATIVE_PROFILER_PERFETTO_READY_EXITED: "NATIVE_PROFILER_PERFETTO_READY_EXITED",
6309
+ // screen-recording-start / screen-recording-stop. One capture path for every
6310
+ // platform (simulator-server's frame stream into ffmpeg), so the stages name
6311
+ // the step that failed rather than the device family.
6312
+ SCREEN_RECORDING_FACTORY_OPTIONS_MISSING: "SCREEN_RECORDING_FACTORY_OPTIONS_MISSING",
6313
+ SCREEN_RECORDING_WRONG_PLATFORM: "SCREEN_RECORDING_WRONG_PLATFORM",
6314
+ SCREEN_RECORDING_ALREADY_ACTIVE: "SCREEN_RECORDING_ALREADY_ACTIVE",
6315
+ SCREEN_RECORDING_NO_ACTIVE_SESSION: "SCREEN_RECORDING_NO_ACTIVE_SESSION",
6316
+ SCREEN_RECORDING_STOP_IN_PROGRESS: "SCREEN_RECORDING_STOP_IN_PROGRESS",
6317
+ SCREEN_RECORDING_START_EXITED: "SCREEN_RECORDING_START_EXITED",
6318
+ SCREEN_RECORDING_START_TIMEOUT: "SCREEN_RECORDING_START_TIMEOUT",
6319
+ SCREEN_RECORDING_PROCESS_ERROR: "SCREEN_RECORDING_PROCESS_ERROR",
6320
+ SCREEN_RECORDING_OUTPUT_MISSING: "SCREEN_RECORDING_OUTPUT_MISSING",
6321
+ SCREEN_RECORDING_SERVER_SHUTTING_DOWN: "SCREEN_RECORDING_SERVER_SHUTTING_DOWN",
6322
+ SCREEN_RECORDING_STREAM_UNAVAILABLE: "SCREEN_RECORDING_STREAM_UNAVAILABLE",
6323
+ SCREEN_RECORDING_FFMPEG_NOT_FOUND: "SCREEN_RECORDING_FFMPEG_NOT_FOUND",
6309
6324
  FLOW_PROJECT_ROOT_REQUIRED: "FLOW_PROJECT_ROOT_REQUIRED",
6310
6325
  FLOW_PROJECT_ROOT_INVALID: "FLOW_PROJECT_ROOT_INVALID",
6311
6326
  FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
@@ -6377,6 +6392,7 @@ var FAILURE_COMMANDS = [
6377
6392
  "android_devtools",
6378
6393
  "ax_service",
6379
6394
  "simulator_server",
6395
+ "ffmpeg",
6380
6396
  "cdp",
6381
6397
  "electron",
6382
6398
  "npm",
@@ -6620,7 +6636,7 @@ var ALLOWED = {
6620
6636
  },
6621
6637
  "toolserver:start": {},
6622
6638
  "toolserver:stop": {
6623
- reason: oneOf(["idle", "signal", "crash"]),
6639
+ reason: oneOf(["idle", "signal", "crash", "deferred"]),
6624
6640
  uptime_ms: DURATION_MS,
6625
6641
  total_tool_calls: COUNT,
6626
6642
  ...FAILURE_SIGNAL,
@@ -7194,6 +7210,11 @@ var FLAG_REGISTRY = [
7194
7210
  {
7195
7211
  name: "tool-server-event-log",
7196
7212
  description: "Write structured tool-server lifecycle events to a JSONL file."
7213
+ },
7214
+ {
7215
+ name: "video-watermark",
7216
+ description: "Overlay the argent corner watermark on recorded screen videos. On by default; turn it off with `argent disable video-watermark`.",
7217
+ defaultEnabled: true
7197
7218
  }
7198
7219
  ];
7199
7220
  function getFlagDefinition(name, registry = FLAG_REGISTRY) {
@@ -7283,7 +7304,7 @@ function isFlagEnabled(name, options = {}) {
7283
7304
  if (Object.hasOwn(projectFlags, name)) return projectFlags[name];
7284
7305
  const globalFlags = readFlags("global", options);
7285
7306
  if (Object.hasOwn(globalFlags, name)) return globalFlags[name];
7286
- return false;
7307
+ return options.default ?? false;
7287
7308
  }
7288
7309
 
7289
7310
  // ../configuration-core/src/paths.ts
@@ -7901,16 +7922,20 @@ function hostPlatformKey() {
7901
7922
  }
7902
7923
  return process.platform;
7903
7924
  }
7925
+ function simulatorServerBinaryName() {
7926
+ return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
7927
+ }
7904
7928
  function platformBinDir() {
7905
7929
  return path9.join(BIN_DIR, hostPlatformKey());
7906
7930
  }
7907
7931
  function simulatorServerBinaryPath() {
7908
- const p = path9.join(platformBinDir(), "simulator-server");
7932
+ const binaryName = simulatorServerBinaryName();
7933
+ const p = path9.join(platformBinDir(), binaryName);
7909
7934
  if (!fs5.existsSync(p)) {
7910
- const flat = path9.join(BIN_DIR, "simulator-server");
7935
+ const flat = path9.join(BIN_DIR, binaryName);
7911
7936
  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
7937
  throw new Error(
7913
- `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64).${migrationHint}`
7938
+ `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
7914
7939
  );
7915
7940
  }
7916
7941
  return p;
@@ -10507,6 +10532,8 @@ function runToggle(argv, command, registry) {
10507
10532
  try {
10508
10533
  if (command === "enable") {
10509
10534
  setFlag(parsed.name, true, parsed.scope);
10535
+ } else if (getFlagDefinition(parsed.name, registry)?.defaultEnabled) {
10536
+ setFlag(parsed.name, false, parsed.scope);
10510
10537
  } else {
10511
10538
  unsetFlag(parsed.name, parsed.scope);
10512
10539
  }
@@ -10551,7 +10578,8 @@ Options:
10551
10578
  return {
10552
10579
  name: def.name,
10553
10580
  description: def.description,
10554
- enabled: eff?.value ?? false,
10581
+ // An unset opt-out flag reads as on (its declared default).
10582
+ enabled: eff?.value ?? def.defaultEnabled ?? false,
10555
10583
  scope: eff?.scope ?? null
10556
10584
  };
10557
10585
  });
@@ -16200,6 +16200,21 @@ var FAILURE_CODES = {
16200
16200
  NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
16201
16201
  NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
16202
16202
  NATIVE_PROFILER_PERFETTO_READY_EXITED: "NATIVE_PROFILER_PERFETTO_READY_EXITED",
16203
+ // screen-recording-start / screen-recording-stop. One capture path for every
16204
+ // platform (simulator-server's frame stream into ffmpeg), so the stages name
16205
+ // the step that failed rather than the device family.
16206
+ SCREEN_RECORDING_FACTORY_OPTIONS_MISSING: "SCREEN_RECORDING_FACTORY_OPTIONS_MISSING",
16207
+ SCREEN_RECORDING_WRONG_PLATFORM: "SCREEN_RECORDING_WRONG_PLATFORM",
16208
+ SCREEN_RECORDING_ALREADY_ACTIVE: "SCREEN_RECORDING_ALREADY_ACTIVE",
16209
+ SCREEN_RECORDING_NO_ACTIVE_SESSION: "SCREEN_RECORDING_NO_ACTIVE_SESSION",
16210
+ SCREEN_RECORDING_STOP_IN_PROGRESS: "SCREEN_RECORDING_STOP_IN_PROGRESS",
16211
+ SCREEN_RECORDING_START_EXITED: "SCREEN_RECORDING_START_EXITED",
16212
+ SCREEN_RECORDING_START_TIMEOUT: "SCREEN_RECORDING_START_TIMEOUT",
16213
+ SCREEN_RECORDING_PROCESS_ERROR: "SCREEN_RECORDING_PROCESS_ERROR",
16214
+ SCREEN_RECORDING_OUTPUT_MISSING: "SCREEN_RECORDING_OUTPUT_MISSING",
16215
+ SCREEN_RECORDING_SERVER_SHUTTING_DOWN: "SCREEN_RECORDING_SERVER_SHUTTING_DOWN",
16216
+ SCREEN_RECORDING_STREAM_UNAVAILABLE: "SCREEN_RECORDING_STREAM_UNAVAILABLE",
16217
+ SCREEN_RECORDING_FFMPEG_NOT_FOUND: "SCREEN_RECORDING_FFMPEG_NOT_FOUND",
16203
16218
  FLOW_PROJECT_ROOT_REQUIRED: "FLOW_PROJECT_ROOT_REQUIRED",
16204
16219
  FLOW_PROJECT_ROOT_INVALID: "FLOW_PROJECT_ROOT_INVALID",
16205
16220
  FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
@@ -16271,6 +16286,7 @@ var FAILURE_COMMANDS = [
16271
16286
  "android_devtools",
16272
16287
  "ax_service",
16273
16288
  "simulator_server",
16289
+ "ffmpeg",
16274
16290
  "cdp",
16275
16291
  "electron",
16276
16292
  "npm",
@@ -16514,7 +16530,7 @@ var ALLOWED = {
16514
16530
  },
16515
16531
  "toolserver:start": {},
16516
16532
  "toolserver:stop": {
16517
- reason: oneOf(["idle", "signal", "crash"]),
16533
+ reason: oneOf(["idle", "signal", "crash", "deferred"]),
16518
16534
  uptime_ms: DURATION_MS,
16519
16535
  total_tool_calls: COUNT,
16520
16536
  ...FAILURE_SIGNAL,
@@ -17458,16 +17474,20 @@ function hostPlatformKey() {
17458
17474
  }
17459
17475
  return process.platform;
17460
17476
  }
17477
+ function simulatorServerBinaryName() {
17478
+ return process.platform === "win32" ? "simulator-server.exe" : "simulator-server";
17479
+ }
17461
17480
  function platformBinDir() {
17462
17481
  return path6.join(BIN_DIR, hostPlatformKey());
17463
17482
  }
17464
17483
  function simulatorServerBinaryPath() {
17465
- const p = path6.join(platformBinDir(), "simulator-server");
17484
+ const binaryName = simulatorServerBinaryName();
17485
+ const p = path6.join(platformBinDir(), binaryName);
17466
17486
  if (!fs4.existsSync(p)) {
17467
- const flat = path6.join(BIN_DIR, "simulator-server");
17487
+ const flat = path6.join(BIN_DIR, binaryName);
17468
17488
  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
17489
  throw new Error(
17470
- `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64).${migrationHint}`
17490
+ `simulator-server binary not found for platform "${hostPlatformKey()}" at ${p}. Supported hosts today: darwin, linux (x86_64 and arm64), win32.${migrationHint}`
17471
17491
  );
17472
17492
  }
17473
17493
  return p;
@@ -17732,6 +17732,21 @@ var FAILURE_CODES = {
17732
17732
  NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
17733
17733
  NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
17734
17734
  NATIVE_PROFILER_PERFETTO_READY_EXITED: "NATIVE_PROFILER_PERFETTO_READY_EXITED",
17735
+ // screen-recording-start / screen-recording-stop. One capture path for every
17736
+ // platform (simulator-server's frame stream into ffmpeg), so the stages name
17737
+ // the step that failed rather than the device family.
17738
+ SCREEN_RECORDING_FACTORY_OPTIONS_MISSING: "SCREEN_RECORDING_FACTORY_OPTIONS_MISSING",
17739
+ SCREEN_RECORDING_WRONG_PLATFORM: "SCREEN_RECORDING_WRONG_PLATFORM",
17740
+ SCREEN_RECORDING_ALREADY_ACTIVE: "SCREEN_RECORDING_ALREADY_ACTIVE",
17741
+ SCREEN_RECORDING_NO_ACTIVE_SESSION: "SCREEN_RECORDING_NO_ACTIVE_SESSION",
17742
+ SCREEN_RECORDING_STOP_IN_PROGRESS: "SCREEN_RECORDING_STOP_IN_PROGRESS",
17743
+ SCREEN_RECORDING_START_EXITED: "SCREEN_RECORDING_START_EXITED",
17744
+ SCREEN_RECORDING_START_TIMEOUT: "SCREEN_RECORDING_START_TIMEOUT",
17745
+ SCREEN_RECORDING_PROCESS_ERROR: "SCREEN_RECORDING_PROCESS_ERROR",
17746
+ SCREEN_RECORDING_OUTPUT_MISSING: "SCREEN_RECORDING_OUTPUT_MISSING",
17747
+ SCREEN_RECORDING_SERVER_SHUTTING_DOWN: "SCREEN_RECORDING_SERVER_SHUTTING_DOWN",
17748
+ SCREEN_RECORDING_STREAM_UNAVAILABLE: "SCREEN_RECORDING_STREAM_UNAVAILABLE",
17749
+ SCREEN_RECORDING_FFMPEG_NOT_FOUND: "SCREEN_RECORDING_FFMPEG_NOT_FOUND",
17735
17750
  FLOW_PROJECT_ROOT_REQUIRED: "FLOW_PROJECT_ROOT_REQUIRED",
17736
17751
  FLOW_PROJECT_ROOT_INVALID: "FLOW_PROJECT_ROOT_INVALID",
17737
17752
  FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
@@ -17803,6 +17818,7 @@ var FAILURE_COMMANDS = [
17803
17818
  "android_devtools",
17804
17819
  "ax_service",
17805
17820
  "simulator_server",
17821
+ "ffmpeg",
17806
17822
  "cdp",
17807
17823
  "electron",
17808
17824
  "npm",
@@ -18067,7 +18083,7 @@ var ALLOWED = {
18067
18083
  },
18068
18084
  "toolserver:start": {},
18069
18085
  "toolserver:stop": {
18070
- reason: oneOf(["idle", "signal", "crash"]),
18086
+ reason: oneOf(["idle", "signal", "crash", "deferred"]),
18071
18087
  uptime_ms: DURATION_MS,
18072
18088
  total_tool_calls: COUNT,
18073
18089
  ...FAILURE_SIGNAL,
@@ -18553,7 +18569,7 @@ function isFlagEnabled(name, options = {}) {
18553
18569
  if (Object.hasOwn(projectFlags, name)) return projectFlags[name];
18554
18570
  const globalFlags = readFlags("global", options);
18555
18571
  if (Object.hasOwn(globalFlags, name)) return globalFlags[name];
18556
- return false;
18572
+ return options.default ?? false;
18557
18573
  }
18558
18574
 
18559
18575
  // ../configuration-core/src/paths.ts