peachsim 0.1.754 → 0.1.756

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 (83) hide show
  1. package/cli/app-config.ts +4 -29
  2. package/cli/commands/daemon.ts +117 -116
  3. package/cli/commands/install-desktop.ts +13 -8
  4. package/cli/desktop-companion.ts +9 -2
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/agent-identity.cjs +1 -1
  8. package/dist-lib/agent-sessions.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -1
  10. package/dist-lib/auth/shared-session.cjs +8 -5
  11. package/dist-lib/backend-origin.cjs +1 -1
  12. package/dist-lib/beta.cjs +1 -1
  13. package/dist-lib/beta.mjs +1 -1
  14. package/dist-lib/bridge-constants.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.mjs +1 -1
  17. package/dist-lib/bridge-contract.cjs +1 -1
  18. package/dist-lib/bridge-contract.mjs +1 -1
  19. package/dist-lib/capture-contract.cjs +1 -1
  20. package/dist-lib/capture-contract.mjs +1 -1
  21. package/dist-lib/cli-constants.cjs +1 -1
  22. package/dist-lib/cloud-contract.cjs +1 -1
  23. package/dist-lib/cloud-contract.mjs +1 -1
  24. package/dist-lib/cloud-test-args.cjs +1 -1
  25. package/dist-lib/cloud-test-args.mjs +1 -1
  26. package/dist-lib/cloud.cjs +1 -1
  27. package/dist-lib/cloud.mjs +1 -1
  28. package/dist-lib/config.cjs +88 -1
  29. package/dist-lib/detox/index.cjs +1 -1
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/home-paths.cjs +2 -23
  32. package/dist-lib/host/bridge-host.cjs +54 -38
  33. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +13 -5
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +2551 -2220
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +914 -584
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/plist.cjs +1 -1
  54. package/dist-lib/plist.mjs +1 -1
  55. package/dist-lib/profiles.cjs +1 -1
  56. package/dist-lib/public-brand.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.mjs +1 -1
  59. package/dist-lib/render-mode.cjs +1 -1
  60. package/dist-lib/scripts/dev-server-scanner.cjs +4 -4
  61. package/dist-lib/sdk.cjs +1 -1
  62. package/dist-lib/sdk.mjs +1 -1
  63. package/dist-lib/skills.cjs +137 -107
  64. package/dist-lib/swift-compile.cjs +6 -2
  65. package/dist-lib/swift-compile.mjs +6 -2
  66. package/dist-lib/swift-package.cjs +1 -1
  67. package/dist-lib/swift-package.mjs +1 -1
  68. package/dist-lib/swift-submit.cjs +1 -1
  69. package/dist-lib/swift-submit.mjs +1 -1
  70. package/dist-lib/swift-toolchain.cjs +1 -1
  71. package/dist-lib/swift.cjs +1 -1
  72. package/dist-lib/vite-swift.cjs +6 -2
  73. package/dist-lib/vite.cjs +10 -4
  74. package/package.json +1 -1
  75. package/src/auth/shared-session.ts +9 -4
  76. package/src/config.ts +92 -0
  77. package/src/configured-bundle-producer.ts +110 -0
  78. package/src/desktop-host-delivery.ts +82 -19
  79. package/src/home-paths.ts +5 -22
  80. package/src/host/agent-host.ts +4 -1
  81. package/src/host/replacement-module-handler.ts +8 -2
  82. package/src/metro-plugin.ts +27 -0
  83. package/src/swift-compile.ts +4 -0
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.754 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -19326,7 +19326,40 @@ var init_backend_origin = __esm({
19326
19326
  }
19327
19327
  });
19328
19328
 
19329
+ // ../contrast-runtime-delivery/src/version.ts
19330
+ function isValidRuntimeVersion(value) {
19331
+ return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
19332
+ }
19333
+ var init_version = __esm({
19334
+ "../contrast-runtime-delivery/src/version.ts"() {
19335
+ "use strict";
19336
+ }
19337
+ });
19338
+
19339
+ // src/is-record.ts
19340
+ function isRecord(value) {
19341
+ return typeof value === "object" && value !== null && !Array.isArray(value);
19342
+ }
19343
+ var init_is_record = __esm({
19344
+ "src/is-record.ts"() {
19345
+ "use strict";
19346
+ }
19347
+ });
19348
+
19329
19349
  // src/config.ts
19350
+ function isPeachConfig(value) {
19351
+ if (!isRecord(value)) return false;
19352
+ return (value.runtimeVersion === void 0 || typeof value.runtimeVersion === "string" && value.runtimeVersion === value.runtimeVersion.trim() && isValidRuntimeVersion(value.runtimeVersion)) && [
19353
+ "modules",
19354
+ "turboModules",
19355
+ "nativeModules",
19356
+ "nativeViews",
19357
+ "env",
19358
+ "network",
19359
+ "settings",
19360
+ "initialState"
19361
+ ].every((key) => value[key] === void 0 || isRecord(value[key]));
19362
+ }
19330
19363
  function hasOwnKeys(value) {
19331
19364
  return !!value && Object.keys(value).length > 0;
19332
19365
  }
@@ -19371,6 +19404,8 @@ var PEACH_CONFIG_QUERY_PARAM;
19371
19404
  var init_config = __esm({
19372
19405
  "src/config.ts"() {
19373
19406
  "use strict";
19407
+ init_version();
19408
+ init_is_record();
19374
19409
  PEACH_CONFIG_QUERY_PARAM = "peachConfig";
19375
19410
  }
19376
19411
  });
@@ -19691,7 +19726,7 @@ var init_plist = __esm({
19691
19726
  });
19692
19727
 
19693
19728
  // src/settings-bundle.ts
19694
- function isRecord(value) {
19729
+ function isRecord2(value) {
19695
19730
  return typeof value === "object" && value !== null && !Array.isArray(value);
19696
19731
  }
19697
19732
  function optionalString(value) {
@@ -19820,7 +19855,7 @@ async function parsePlistRecord(path33) {
19820
19855
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
19821
19856
  const source = await (0, import_promises.readFile)(path33, "utf8");
19822
19857
  const parsed = parsePlistSource(source);
19823
- return isRecord(parsed) ? parsed : null;
19858
+ return isRecord2(parsed) ? parsed : null;
19824
19859
  } catch {
19825
19860
  return null;
19826
19861
  }
@@ -19856,7 +19891,7 @@ function normalizeMultiValue(raw2, key, title) {
19856
19891
  };
19857
19892
  }
19858
19893
  async function normalizeSpecifier(raw2, context) {
19859
- if (!isRecord(raw2)) return null;
19894
+ if (!isRecord2(raw2)) return null;
19860
19895
  if (context.budget.specifiers >= MAX_SPECIFIERS) return null;
19861
19896
  const type = requiredString(raw2.Type);
19862
19897
  if (!type) return null;
@@ -20837,7 +20872,6 @@ __export(home_paths_exports, {
20837
20872
  isSootsimDevCheckout: () => isSootsimDevCheckout,
20838
20873
  playwrightCoreDir: () => playwrightCoreDir,
20839
20874
  profilesDir: () => profilesDir,
20840
- readActiveDesktopHost: () => readActiveDesktopHost,
20841
20875
  readActiveRuntime: () => readActiveRuntime,
20842
20876
  readDaemonLockfile: () => readDaemonLockfile,
20843
20877
  readDefaultBox: () => readDefaultBox,
@@ -20854,7 +20888,6 @@ __export(home_paths_exports, {
20854
20888
  runtimeUpgradeNoticePath: () => runtimeUpgradeNoticePath,
20855
20889
  runtimesDir: () => runtimesDir,
20856
20890
  shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
20857
- writeActiveDesktopHost: () => writeActiveDesktopHost,
20858
20891
  writeActiveRuntime: () => writeActiveRuntime,
20859
20892
  writeDaemonLockfile: () => writeDaemonLockfile,
20860
20893
  writeDefaultBox: () => writeDefaultBox,
@@ -20900,28 +20933,11 @@ function activeRuntimeFile() {
20900
20933
  return import_node_path4.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
20901
20934
  }
20902
20935
  function desktopHostsDir() {
20903
- return import_node_path4.default.join(rnxHomeDir(), "desktop");
20936
+ return import_node_path4.default.join(rnxHomeDir(), "desktop", "versions");
20904
20937
  }
20905
20938
  function desktopHostDir(version) {
20906
20939
  return import_node_path4.default.join(desktopHostsDir(), version);
20907
20940
  }
20908
- function readActiveDesktopHost() {
20909
- try {
20910
- const value = import_node_fs3.default.readFileSync(import_node_path4.default.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE), "utf8").trim();
20911
- return value.length > 0 ? value : null;
20912
- } catch {
20913
- return null;
20914
- }
20915
- }
20916
- function writeActiveDesktopHost(version) {
20917
- import_node_fs3.default.mkdirSync(desktopHostsDir(), { recursive: true });
20918
- import_node_fs3.default.writeFileSync(
20919
- import_node_path4.default.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE),
20920
- `${version}
20921
- `,
20922
- "utf8"
20923
- );
20924
- }
20925
20941
  function electronDir() {
20926
20942
  return import_node_path4.default.join(rnxHomeDir(), "electron");
20927
20943
  }
@@ -21473,23 +21489,13 @@ var init_internal_child = __esm({
21473
21489
  }
21474
21490
  });
21475
21491
 
21476
- // src/is-record.ts
21477
- function isRecord2(value) {
21478
- return typeof value === "object" && value !== null && !Array.isArray(value);
21479
- }
21480
- var init_is_record = __esm({
21481
- "src/is-record.ts"() {
21482
- "use strict";
21483
- }
21484
- });
21485
-
21486
21492
  // src/swift-distribution-contract.ts
21487
21493
  function swiftDistributionHost(platform, arch) {
21488
21494
  const host2 = `${platform}-${arch}`;
21489
21495
  return SWIFT_DISTRIBUTION_HOSTS.find((candidate) => candidate === host2) ?? null;
21490
21496
  }
21491
21497
  function parseSwiftDistributionManifest(value) {
21492
- if (!isRecord2(value) || typeof value.id !== "string" || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || !isStrings(value.modules) || !isStrings(value.objects) || !isStrings(value.link) || !isRecord2(value.files) || !Object.values(value.files).every((sha) => typeof sha === "string") || typeof value.host !== "string" || !isStrings(value.plugins)) {
21498
+ if (!isRecord(value) || typeof value.id !== "string" || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || !isStrings(value.modules) || !isStrings(value.objects) || !isStrings(value.link) || !isRecord(value.files) || !Object.values(value.files).every((sha) => typeof sha === "string") || typeof value.host !== "string" || !isStrings(value.plugins)) {
21493
21499
  throw new Error(`invalid Swift distribution ${SWIFT_DISTRIBUTION_MANIFEST}`);
21494
21500
  }
21495
21501
  const host2 = SWIFT_DISTRIBUTION_HOSTS.find((candidate) => candidate === value.host);
@@ -21511,13 +21517,13 @@ function parseSwiftDistributionManifest(value) {
21511
21517
  };
21512
21518
  }
21513
21519
  function parseSwiftDistributionLock(value) {
21514
- if (!isRecord2(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || typeof value.source !== "string" || !isRecord2(value.hosts)) {
21520
+ if (!isRecord(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || typeof value.source !== "string" || !isRecord(value.hosts)) {
21515
21521
  throw new Error("invalid Swift distribution lock");
21516
21522
  }
21517
21523
  const hosts = value.hosts;
21518
21524
  const entry = (host2) => {
21519
21525
  const item = hosts[host2];
21520
- if (!isRecord2(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
21526
+ if (!isRecord(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
21521
21527
  throw new Error(`invalid Swift distribution lock entry for ${host2}`);
21522
21528
  }
21523
21529
  return { sha256: item.sha256, size: item.size };
@@ -23142,7 +23148,11 @@ var init_swift_compile = __esm({
23142
23148
  DatadogCore: [],
23143
23149
  DatadogLogs: ["DatadogCore"],
23144
23150
  DatadogRUM: ["DatadogCore"],
23145
- DatadogTrace: ["DatadogCore"]
23151
+ DatadogTrace: ["DatadogCore"],
23152
+ AppLovinSDK: [],
23153
+ AppsFlyerLib: [],
23154
+ FBSDKCoreKit: [],
23155
+ FBAudienceNetwork: []
23146
23156
  };
23147
23157
  OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
23148
23158
  SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
@@ -23183,9 +23193,6 @@ var init_swift_compile = __esm({
23183
23193
  });
23184
23194
 
23185
23195
  // ../contrast-runtime-delivery/src/product.ts
23186
- function isValidRuntimeVersion(value) {
23187
- return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
23188
- }
23189
23196
  function listInstalledRuntimes(product) {
23190
23197
  try {
23191
23198
  return import_node_fs8.default.readdirSync(product.runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
@@ -23223,6 +23230,7 @@ var init_product = __esm({
23223
23230
  "use strict";
23224
23231
  import_node_fs8 = __toESM(require("node:fs"), 1);
23225
23232
  import_node_path8 = __toESM(require("node:path"), 1);
23233
+ init_version();
23226
23234
  }
23227
23235
  });
23228
23236
 
@@ -27743,9 +27751,9 @@ var init_agent_host = __esm({
27743
27751
  if (sockets.has(sessionId)) {
27744
27752
  return { ok: true, refCount: this.subscriptions.get(sessionId)?.refCount ?? 1 };
27745
27753
  }
27746
- sockets.add(sessionId);
27747
27754
  const existing = this.subscriptions.get(sessionId);
27748
27755
  if (existing) {
27756
+ sockets.add(sessionId);
27749
27757
  existing.refCount++;
27750
27758
  return { ok: true, refCount: existing.refCount };
27751
27759
  }
@@ -27772,6 +27780,7 @@ var init_agent_host = __esm({
27772
27780
  }
27773
27781
  }
27774
27782
  });
27783
+ sockets.add(sessionId);
27775
27784
  this.subscriptions.set(sessionId, { unsubscribe, refCount: 1 });
27776
27785
  return { ok: true, refCount: 1 };
27777
27786
  }
@@ -29195,6 +29204,7 @@ function compileReplacementModule(input) {
29195
29204
  return code.slice(token.start + 1, token.end - 1);
29196
29205
  };
29197
29206
  const bridgeNames = /* @__PURE__ */ new Map();
29207
+ const bareSpecifiers = /* @__PURE__ */ new Set();
29198
29208
  const declarations = [];
29199
29209
  let needsDefaultInterop = false;
29200
29210
  const bridgeFor = (specifier) => {
@@ -29295,6 +29305,7 @@ function compileReplacementModule(input) {
29295
29305
  if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isPeachKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
29296
29306
  throw unsupportedSpecifier(specifier);
29297
29307
  }
29308
+ bareSpecifiers.add(specifier);
29298
29309
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
29299
29310
  const replacement = bindings.map((binding) => {
29300
29311
  if (binding.imported === null) return `const ${binding.local} = ${bridge};`;
@@ -29317,6 +29328,7 @@ function compileReplacementModule(input) {
29317
29328
  const preamble = declarations.join(" ");
29318
29329
  return {
29319
29330
  code: preamble ? `${preamble} ${out}` : out,
29331
+ bareSpecifiers: [...bareSpecifiers],
29320
29332
  sourceMap: { ...sourceMap, sourcesContent: [input.source] }
29321
29333
  };
29322
29334
  }
@@ -29357,7 +29369,7 @@ function sendJavaScript(req, res, source) {
29357
29369
  });
29358
29370
  res.end(req.method === "HEAD" ? void 0 : source);
29359
29371
  }
29360
- function resolveLocalImport(fromFile, specifier) {
29372
+ function resolveReplacementModuleFile(fromFile, specifier) {
29361
29373
  const base = import_node_path23.default.resolve(import_node_path23.default.dirname(fromFile), specifier);
29362
29374
  const candidates = [
29363
29375
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
@@ -29471,7 +29483,10 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
29471
29483
  // so the token, cache key and runtime packages carry over.
29472
29484
  localModuleUrl: (specifier) => {
29473
29485
  const local = new URL(url.href);
29474
- local.searchParams.set("path", resolveLocalImport(targetPath, specifier));
29486
+ local.searchParams.set(
29487
+ "path",
29488
+ resolveReplacementModuleFile(targetPath, specifier)
29489
+ );
29475
29490
  return `${local.pathname}${local.search}`;
29476
29491
  }
29477
29492
  });
@@ -31808,7 +31823,8 @@ async function readOrInferModuleIdentity(bundle, mode, inferModuleIdentity) {
31808
31823
  }
31809
31824
  async function buildRnxCloudArtifact(bundle, options = {}) {
31810
31825
  const mode = options.mode ?? "production";
31811
- const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(bundle);
31826
+ const configured = (0, import_config2.detachPeachBundleConfigFooter)(bundle);
31827
+ const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(configured.source);
31812
31828
  const nativeIdentity = (0, import_native_app_identity.detachNativeAppIdentityFooter)(firebase.source);
31813
31829
  const identity = await readOrInferModuleIdentity(
31814
31830
  nativeIdentity.source,
@@ -31837,7 +31853,7 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
31837
31853
  })
31838
31854
  ]);
31839
31855
  const body = pieces.map((piece) => piece.code).join("\n");
31840
- const code = body + (nativeIdentity.identity ? (0, import_native_app_identity.createNativeAppIdentityFooter)(nativeIdentity.identity) : "") + (firebase.config ? (0, import_native_firebase_metadata.createNativeFirebaseFooter)(firebase.config) : "") + (0, import_metro_production_bundle.createRNXMetroModuleIdentityFooter)({
31856
+ const code = body + (nativeIdentity.identity ? (0, import_native_app_identity.createNativeAppIdentityFooter)(nativeIdentity.identity) : "") + (firebase.config ? (0, import_native_firebase_metadata.createNativeFirebaseFooter)(firebase.config) : "") + (configured.configuredBundle ? (0, import_config2.createPeachBundleConfigFooter)(configured.configuredBundle) : "") + (0, import_metro_production_bundle.createRNXMetroModuleIdentityFooter)({
31841
31857
  version: identity.version,
31842
31858
  identitySource: identity.identitySource,
31843
31859
  modulePaths: identity.modulePaths,
@@ -31900,10 +31916,11 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
31900
31916
  }
31901
31917
  };
31902
31918
  }
31903
- var import_metro_production_bundle, import_native_app_identity, import_native_firebase_metadata, import_terser, MODULE_PATHS_REQUIRED, SOURCE_MAP_REQUIRED, MINIFY_OPTIONS;
31919
+ var import_config2, import_metro_production_bundle, import_native_app_identity, import_native_firebase_metadata, import_terser, MODULE_PATHS_REQUIRED, SOURCE_MAP_REQUIRED, MINIFY_OPTIONS;
31904
31920
  var init_metroCloudArtifact = __esm({
31905
31921
  "../contrast-bundler/src/metroCloudArtifact.ts"() {
31906
31922
  "use strict";
31923
+ import_config2 = require("peachsim/config");
31907
31924
  import_metro_production_bundle = require("peachsim/metro-production-bundle");
31908
31925
  import_native_app_identity = require("peachsim/native-app-identity");
31909
31926
  import_native_firebase_metadata = require("peachsim/native-firebase-metadata");
@@ -33052,7 +33069,7 @@ function parseCloudSession(encoded) {
33052
33069
  } catch {
33053
33070
  throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
33054
33071
  }
33055
- if (!isRecord2(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
33072
+ if (!isRecord(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
33056
33073
  throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
33057
33074
  }
33058
33075
  const apiOrigin = parsed.apiOrigin;
@@ -33061,7 +33078,7 @@ function parseCloudSession(encoded) {
33061
33078
  }
33062
33079
  const platform = parsed.platform === "ios" || parsed.platform === "android" ? parsed.platform : void 0;
33063
33080
  const device = typeof parsed.device === "string" ? parsed.device : void 0;
33064
- const artifact = isRecord2(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
33081
+ const artifact = isRecord(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
33065
33082
  sha256: parsed.artifact.sha256,
33066
33083
  bytes: typeof parsed.artifact.bytes === "number" ? parsed.artifact.bytes : void 0
33067
33084
  } : void 0;
@@ -33217,8 +33234,8 @@ function failureSentence(text) {
33217
33234
  } catch {
33218
33235
  return null;
33219
33236
  }
33220
- if (!isRecord2(parsed)) return null;
33221
- if (isRecord2(parsed.error) && typeof parsed.error.message === "string") {
33237
+ if (!isRecord(parsed)) return null;
33238
+ if (isRecord(parsed.error) && typeof parsed.error.message === "string") {
33222
33239
  const code = typeof parsed.error.code === "string" && parsed.error.code ? ` [${parsed.error.code}]` : "";
33223
33240
  return `${parsed.error.message}${code}`;
33224
33241
  }
@@ -33663,16 +33680,16 @@ async function produceArtifact(bundlePath, maxBytes, command, assetPolicy) {
33663
33680
  };
33664
33681
  }
33665
33682
  function readCreateResponse(value, expectedBytes, expectedSha256) {
33666
- if (!isRecord2(value)) throw new Error("remote simulator create returned invalid JSON");
33683
+ if (!isRecord(value)) throw new Error("remote simulator create returned invalid JSON");
33667
33684
  const artifactId = `sha256:${expectedSha256}`;
33668
- const isExpectedArtifact = (artifact) => isRecord2(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
33685
+ const isExpectedArtifact = (artifact) => isRecord(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
33669
33686
  const boxId = value.boxId;
33670
33687
  const boxToken = value.token;
33671
33688
  const simulator = value.simulator;
33672
- const simId = isRecord2(simulator) ? simulator.simId : null;
33673
- const claim = isRecord2(simulator) ? simulator.claim : null;
33674
- const simulatorToken = isRecord2(simulator) ? simulator.token : null;
33675
- if (typeof boxId !== "string" || !boxId || value.size !== "nano" || typeof boxToken !== "string" || !boxToken || !isExpectedArtifact(value.artifact) || !isRecord2(simulator) || typeof simId !== "string" || !simId || !isExpectedArtifact(simulator.artifact) || !isRecord2(claim) || typeof claim.id !== "string" || !claim.id || typeof claim.expiresAt !== "number" || typeof simulatorToken !== "string" || !simulatorToken) {
33689
+ const simId = isRecord(simulator) ? simulator.simId : null;
33690
+ const claim = isRecord(simulator) ? simulator.claim : null;
33691
+ const simulatorToken = isRecord(simulator) ? simulator.token : null;
33692
+ if (typeof boxId !== "string" || !boxId || value.size !== "nano" || typeof boxToken !== "string" || !boxToken || !isExpectedArtifact(value.artifact) || !isRecord(simulator) || typeof simId !== "string" || !simId || !isExpectedArtifact(simulator.artifact) || !isRecord(claim) || typeof claim.id !== "string" || !claim.id || typeof claim.expiresAt !== "number" || typeof simulatorToken !== "string" || !simulatorToken) {
33676
33693
  throw new Error("remote simulator create returned an invalid receipt");
33677
33694
  }
33678
33695
  return {
@@ -33878,7 +33895,7 @@ var init_cloud_client = __esm({
33878
33895
  } catch {
33879
33896
  throw new Error("remote simulator command returned unreadable JSON");
33880
33897
  }
33881
- if (!isRecord2(parsed) || parsed.id !== body.id) {
33898
+ if (!isRecord(parsed) || parsed.id !== body.id) {
33882
33899
  throw new Error("remote simulator command returned an invalid command receipt");
33883
33900
  }
33884
33901
  if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
@@ -33949,7 +33966,7 @@ var init_cloud_client = __esm({
33949
33966
  } catch {
33950
33967
  throw new Error("box command returned unreadable JSON");
33951
33968
  }
33952
- if (!isRecord2(parsed) || parsed.id !== id) {
33969
+ if (!isRecord(parsed) || parsed.id !== id) {
33953
33970
  throw new Error("box command returned an invalid command receipt");
33954
33971
  }
33955
33972
  if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
@@ -33996,8 +34013,8 @@ async function sendToBox(options) {
33996
34013
  simId: options.simId,
33997
34014
  code: '(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'
33998
34015
  });
33999
- const bundleUrl = isRecord2(captured) ? captured.bundleUrl : null;
34000
- if (!isRecord2(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
34016
+ const bundleUrl = isRecord(captured) ? captured.bundleUrl : null;
34017
+ if (!isRecord(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
34001
34018
  throw new Error(
34002
34019
  "send to box needs a simulator running an app: this one has no bundle loaded"
34003
34020
  );
@@ -34013,7 +34030,7 @@ async function sendToBox(options) {
34013
34030
  const storage = dumped;
34014
34031
  const created = await createCloudBox({
34015
34032
  bundlePath: toRNXProductionBundleUrl(bundleUrl),
34016
- device: options.device ?? cloudDevice(isRecord2(captured.deviceSpec) ? captured.deviceSpec.model : null),
34033
+ device: options.device ?? cloudDevice(isRecord(captured.deviceSpec) ? captured.deviceSpec.model : null),
34017
34034
  authorization: options.authorization,
34018
34035
  accountId: options.accountId,
34019
34036
  apiOrigin: options.apiOrigin,
@@ -37476,8 +37493,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37476
37493
  let config = {};
37477
37494
  const appJsonPath = import_node_path29.default.join(projectRoot, "app.json");
37478
37495
  const appJson = import_node_fs29.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs29.default.readFileSync(appJsonPath, "utf8")) : null;
37479
- const staticExpo = isRecord2(appJson) && (isRecord2(appJson.expo) || [appJson.ios, appJson.android].some(
37480
- (value) => isRecord2(value) && typeof value.googleServicesFile === "string"
37496
+ const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
37497
+ (value) => isRecord(value) && typeof value.googleServicesFile === "string"
37481
37498
  ));
37482
37499
  const dynamicExpo = [
37483
37500
  "app.config.js",
@@ -37488,16 +37505,16 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37488
37505
  if (staticExpo || dynamicExpo) {
37489
37506
  const require5 = (0, import_node_module2.createRequire)(import_node_path29.default.join(projectRoot, "package.json"));
37490
37507
  const configModule = require5("@expo/config");
37491
- if (!isRecord2(configModule) || typeof configModule.getConfig !== "function")
37508
+ if (!isRecord(configModule) || typeof configModule.getConfig !== "function")
37492
37509
  throw new Error("Expo native configuration is unavailable.");
37493
37510
  const resolved = Reflect.apply(configModule.getConfig, configModule, [
37494
37511
  projectRoot,
37495
37512
  { skipSDKVersionRequirement: true }
37496
37513
  ]);
37497
- config = isRecord2(resolved) && isRecord2(resolved.exp) ? resolved.exp : {};
37514
+ config = isRecord(resolved) && isRecord(resolved.exp) ? resolved.exp : {};
37498
37515
  }
37499
37516
  const ios = config.ios;
37500
- if (platforms.includes("ios") && (!isRecord2(ios) || typeof ios.googleServicesFile !== "string")) {
37517
+ if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
37501
37518
  const iosRoot = import_node_path29.default.join(projectRoot, "ios");
37502
37519
  if (import_node_fs29.default.existsSync(iosRoot)) {
37503
37520
  const projects2 = import_node_fs29.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
@@ -37561,14 +37578,14 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37561
37578
  }
37562
37579
  for (const platform of platforms) {
37563
37580
  const native = config[platform];
37564
- if (!isRecord2(native) || typeof native.googleServicesFile !== "string") continue;
37581
+ if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
37565
37582
  try {
37566
37583
  const source = import_node_fs29.default.readFileSync(
37567
37584
  import_node_path29.default.resolve(projectRoot, native.googleServicesFile),
37568
37585
  "utf8"
37569
37586
  );
37570
37587
  const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
37571
- if (!isRecord2(parsed)) throw new Error("Invalid Google services file.");
37588
+ if (!isRecord(parsed)) throw new Error("Invalid Google services file.");
37572
37589
  if (platform === "ios") {
37573
37590
  result[platform] = {
37574
37591
  apiKey: parsed.API_KEY,
@@ -37583,31 +37600,31 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37583
37600
  deepLinkUrlScheme: parsed.REVERSED_CLIENT_ID
37584
37601
  };
37585
37602
  } else {
37586
- const project = isRecord2(parsed.project_info) ? parsed.project_info : {};
37603
+ const project = isRecord(parsed.project_info) ? parsed.project_info : {};
37587
37604
  const clients = Array.isArray(parsed.client) ? parsed.client : [];
37588
37605
  const client = clients.find((value) => {
37589
- if (!isRecord2(value) || !isRecord2(value.client_info)) return false;
37606
+ if (!isRecord(value) || !isRecord(value.client_info)) return false;
37590
37607
  const android = value.client_info.android_client_info;
37591
- return isRecord2(android) && android.package_name === native.package;
37608
+ return isRecord(android) && android.package_name === native.package;
37592
37609
  });
37593
- if (!isRecord2(client) || !isRecord2(client.client_info))
37610
+ if (!isRecord(client) || !isRecord(client.client_info))
37594
37611
  throw new Error("No Google services client matches the Android package.");
37595
37612
  const apiKeys = Array.isArray(client.api_key) ? client.api_key : [];
37596
37613
  const apiKey = apiKeys.find(
37597
- (value) => isRecord2(value) && typeof value.current_key === "string"
37614
+ (value) => isRecord(value) && typeof value.current_key === "string"
37598
37615
  );
37599
37616
  const oauthClients = Array.isArray(client.oauth_client) ? client.oauth_client : [];
37600
37617
  const oauth = oauthClients.find(
37601
- (value) => isRecord2(value) && value.client_type === 3
37618
+ (value) => isRecord(value) && value.client_type === 3
37602
37619
  );
37603
37620
  result[platform] = {
37604
- apiKey: isRecord2(apiKey) ? apiKey.current_key : void 0,
37621
+ apiKey: isRecord(apiKey) ? apiKey.current_key : void 0,
37605
37622
  appId: client.client_info.mobilesdk_app_id,
37606
37623
  projectId: project.project_id,
37607
37624
  databaseURL: project.firebase_url,
37608
37625
  storageBucket: project.storage_bucket,
37609
37626
  messagingSenderId: project.project_number,
37610
- clientId: isRecord2(oauth) ? oauth.client_id : void 0
37627
+ clientId: isRecord(oauth) ? oauth.client_id : void 0
37611
37628
  };
37612
37629
  }
37613
37630
  } catch (error) {
@@ -37848,15 +37865,6 @@ var init_app_project = __esm({
37848
37865
  });
37849
37866
 
37850
37867
  // cli/app-config.ts
37851
- function isOptionalRecord(value) {
37852
- return value === void 0 || value !== null && typeof value === "object" && !Array.isArray(value);
37853
- }
37854
- function isPeachConfig(value) {
37855
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
37856
- const runtimeVersion = Reflect.get(value, "runtimeVersion");
37857
- const network = Reflect.get(value, "network");
37858
- return (runtimeVersion === void 0 || typeof runtimeVersion === "string" && runtimeVersion === runtimeVersion.trim() && isValidRuntimeVersion(runtimeVersion)) && isOptionalRecord(Reflect.get(value, "modules")) && isOptionalRecord(Reflect.get(value, "turboModules")) && isOptionalRecord(Reflect.get(value, "nativeModules")) && isOptionalRecord(Reflect.get(value, "nativeViews")) && isOptionalRecord(Reflect.get(value, "env")) && isOptionalRecord(network) && isOptionalRecord(Reflect.get(value, "settings")) && isOptionalRecord(Reflect.get(value, "initialState"));
37859
- }
37860
37868
  function resolveFileEntries(entries, configDir) {
37861
37869
  if (!entries) return entries;
37862
37870
  return Object.fromEntries(
@@ -37881,6 +37889,9 @@ async function loadRNXAppConfig(project) {
37881
37889
  try {
37882
37890
  const jiti = (0, import_jiti.createJiti)(__sootsim_import_meta_url, {
37883
37891
  interopDefault: true,
37892
+ // metro serializes repeatedly in one process; edits must reload the config.
37893
+ moduleCache: false,
37894
+ tryNative: false,
37884
37895
  alias: {
37885
37896
  [`${rnxPublicBrand.packageName}/config`]: require2.resolve(
37886
37897
  `${rnxPublicBrand.packageName}/config`
@@ -37907,8 +37918,8 @@ var init_app_config = __esm({
37907
37918
  "use strict";
37908
37919
  import_node_module3 = require("node:module");
37909
37920
  import_node_path32 = __toESM(require("node:path"), 1);
37910
- init_src();
37911
37921
  import_jiti = require("jiti");
37922
+ init_config();
37912
37923
  init_public_brand();
37913
37924
  init_app_project();
37914
37925
  require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
@@ -39066,17 +39077,33 @@ var init_bridge_diagnostics = __esm({
39066
39077
  });
39067
39078
 
39068
39079
  // src/desktop-host-delivery.ts
39080
+ function bundleValue(app, key) {
39081
+ const read = (0, import_node_child_process11.spawnSync)(
39082
+ "plutil",
39083
+ ["-extract", key, "raw", "-o", "-", import_node_path34.default.join(app, "Contents/Info.plist")],
39084
+ { encoding: "utf8" }
39085
+ );
39086
+ return read.status === 0 ? read.stdout.trim() : null;
39087
+ }
39088
+ function isNativeHostBundle(app) {
39089
+ return process.platform === "darwin" && bundleValue(app, "CFBundleIdentifier") === HOST_BUNDLE_ID;
39090
+ }
39091
+ function placedHostVersion() {
39092
+ return isNativeHostBundle(MAC_HOST_APP) ? bundleValue(MAC_HOST_APP, "CFBundleVersion") : null;
39093
+ }
39069
39094
  function activeDesktopHostApp() {
39070
- const version = readActiveDesktopHost();
39071
- return version ? import_node_path34.default.join(desktopHostDir(version), "PeachDesktop.app") : null;
39095
+ return placedHostVersion() ? MAC_HOST_APP : null;
39072
39096
  }
39073
- var import_node_path34;
39097
+ var import_node_child_process11, import_node_path34, MAC_HOST_APP, HOST_BUNDLE_ID;
39074
39098
  var init_desktop_host_delivery = __esm({
39075
39099
  "src/desktop-host-delivery.ts"() {
39076
39100
  "use strict";
39101
+ import_node_child_process11 = require("node:child_process");
39077
39102
  import_node_path34 = __toESM(require("node:path"), 1);
39078
39103
  init_src();
39079
39104
  init_home_paths();
39105
+ MAC_HOST_APP = "/Applications/Peach.app";
39106
+ HOST_BUNDLE_ID = "dev.contrast.peach-desktop";
39080
39107
  }
39081
39108
  });
39082
39109
 
@@ -39127,7 +39154,9 @@ function findInstalledMacApp() {
39127
39154
  "/Applications/peach.app",
39128
39155
  (0, import_path5.resolve)(process.env.HOME || "", "Applications/peach.app")
39129
39156
  ];
39130
- const found = candidates.find((candidate) => (0, import_fs6.existsSync)(candidate));
39157
+ const found = candidates.find(
39158
+ (candidate) => (0, import_fs6.existsSync)(candidate) && !isNativeHostBundle(candidate)
39159
+ );
39131
39160
  if (found) {
39132
39161
  return {
39133
39162
  path: found,
@@ -39294,6 +39323,7 @@ async function launchDesktopCompanion(url, install = findDesktopCompanion(), opt
39294
39323
  if (opts.ownerPid && opts.ownerPid > 1) extraArgs.push(`--owner-pid=${opts.ownerPid}`);
39295
39324
  if (install.kind === "mac-app" || install.kind === "native-mac-app") {
39296
39325
  const nativeApp = install.kind === "native-mac-app";
39326
+ if (nativeApp) extraArgs.push("--no-personal-home");
39297
39327
  const openArgs = ["-g", "-a", install.path];
39298
39328
  if (url) openArgs.push(buildMacLaunchUrl(url, opts, nativeApp));
39299
39329
  else if (nativeApp && (opts.profileId || opts.ephemeralProfile || opts.ownerPid || opts.device))
@@ -40576,10 +40606,10 @@ var init_linux_browser_libs_lock = __esm({
40576
40606
 
40577
40607
  // cli/drivers/linux-browser-libs.ts
40578
40608
  function isLockPackage(value) {
40579
- return isRecord2(value) && typeof value.name === "string" && typeof value.version === "string" && typeof value.url === "string" && typeof value.sha256 === "string" && /^[a-f0-9]{64}$/.test(value.sha256) && typeof value.size === "number";
40609
+ return isRecord(value) && typeof value.name === "string" && typeof value.version === "string" && typeof value.url === "string" && typeof value.sha256 === "string" && /^[a-f0-9]{64}$/.test(value.sha256) && typeof value.size === "number";
40580
40610
  }
40581
40611
  function parseLinuxBrowserLibsLock(value) {
40582
- if (!isRecord2(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.suite !== "string" || !isRecord2(value.arches)) {
40612
+ if (!isRecord(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.suite !== "string" || !isRecord(value.arches)) {
40583
40613
  throw new Error("invalid linux browser library lock");
40584
40614
  }
40585
40615
  const { x64, arm64 } = value.arches;
@@ -40592,7 +40622,7 @@ function linuxBrowserLibsKey(id, arch) {
40592
40622
  return `linux-libs/${id}/${arch}.tar.gz`;
40593
40623
  }
40594
40624
  function missingLibraries(executablePath, libraryPath) {
40595
- const ldd = (0, import_node_child_process11.spawnSync)("ldd", [executablePath], {
40625
+ const ldd = (0, import_node_child_process12.spawnSync)("ldd", [executablePath], {
40596
40626
  encoding: "utf8",
40597
40627
  timeout: 3e4,
40598
40628
  env: libraryPath ? {
@@ -40655,11 +40685,11 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
40655
40685
  }
40656
40686
  return { ok: true, libraryPath };
40657
40687
  }
40658
- var import_node_child_process11, import_node_fs33, import_node_path35, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
40688
+ var import_node_child_process12, import_node_fs33, import_node_path35, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
40659
40689
  var init_linux_browser_libs = __esm({
40660
40690
  "cli/drivers/linux-browser-libs.ts"() {
40661
40691
  "use strict";
40662
- import_node_child_process11 = require("node:child_process");
40692
+ import_node_child_process12 = require("node:child_process");
40663
40693
  import_node_fs33 = require("node:fs");
40664
40694
  import_node_path35 = require("node:path");
40665
40695
  init_src();
@@ -40686,7 +40716,7 @@ function resolvePlaywright() {
40686
40716
  const modulePath = requireFromRoot.resolve(spec);
40687
40717
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
40688
40718
  const parsed = JSON.parse((0, import_node_fs34.readFileSync)(packageJsonPath, "utf8"));
40689
- if (!isRecord2(parsed) || typeof parsed.version !== "string") continue;
40719
+ if (!isRecord(parsed) || typeof parsed.version !== "string") continue;
40690
40720
  const corePackagePath = (0, import_node_module6.createRequire)(modulePath).resolve(
40691
40721
  "playwright-core/package.json"
40692
40722
  );
@@ -40735,7 +40765,7 @@ async function provisionPlaywright() {
40735
40765
  }
40736
40766
  function probeBrowser(resolved, env) {
40737
40767
  const self = rnxSelfInvocation();
40738
- const probe2 = (0, import_node_child_process12.spawnSync)(
40768
+ const probe2 = (0, import_node_child_process13.spawnSync)(
40739
40769
  self.executable,
40740
40770
  [...self.prefixArgs, RNX_INTERNAL_COMMAND, RNX_INTERNAL_CHILDREN.playwrightProbe],
40741
40771
  {
@@ -40756,7 +40786,7 @@ function probeBrowser(resolved, env) {
40756
40786
  }
40757
40787
  try {
40758
40788
  const parsed = JSON.parse(probe2.stdout);
40759
- if (!isRecord2(parsed) || typeof parsed.executablePath !== "string" || typeof parsed.exists !== "boolean") {
40789
+ if (!isRecord(parsed) || typeof parsed.executablePath !== "string" || typeof parsed.exists !== "boolean") {
40760
40790
  throw new Error("probe returned an invalid result");
40761
40791
  }
40762
40792
  return {
@@ -40788,7 +40818,7 @@ async function ensurePlaywrightBrowser(resolved, headless, env = process.env) {
40788
40818
  };
40789
40819
  }
40790
40820
  const installer = rnxSelfInvocation();
40791
- const install = (0, import_node_child_process12.spawnSync)(
40821
+ const install = (0, import_node_child_process13.spawnSync)(
40792
40822
  installer.executable,
40793
40823
  [
40794
40824
  ...installer.prefixArgs,
@@ -40830,11 +40860,11 @@ ${detail}` : ""}`
40830
40860
  libraryPath: libraries.libraryPath
40831
40861
  };
40832
40862
  }
40833
- var import_node_child_process12, import_node_fs34, import_node_module6, import_node_path36;
40863
+ var import_node_child_process13, import_node_fs34, import_node_module6, import_node_path36;
40834
40864
  var init_playwright_provisioning = __esm({
40835
40865
  "cli/drivers/playwright-provisioning.ts"() {
40836
40866
  "use strict";
40837
- import_node_child_process12 = require("node:child_process");
40867
+ import_node_child_process13 = require("node:child_process");
40838
40868
  import_node_fs34 = require("node:fs");
40839
40869
  import_node_module6 = require("node:module");
40840
40870
  import_node_path36 = require("node:path");
@@ -41929,7 +41959,7 @@ async function ensureRuntimeForOpen() {
41929
41959
  }
41930
41960
  function spawnSootsim(args) {
41931
41961
  const { executable, prefixArgs } = rnxSelfInvocation();
41932
- return (0, import_node_child_process13.spawn)(executable, [...prefixArgs, ...args], {
41962
+ return (0, import_node_child_process14.spawn)(executable, [...prefixArgs, ...args], {
41933
41963
  detached: true,
41934
41964
  stdio: "ignore",
41935
41965
  env: process.env
@@ -42522,11 +42552,11 @@ async function waitForProcessExit(pid, timeoutMs = 2500) {
42522
42552
  return !isProcessAlive2(pid);
42523
42553
  }
42524
42554
  function isPlaywrightHostProcess(pid) {
42525
- const plain = (0, import_node_child_process13.spawnSync)("ps", ["-o", "command=", "-p", String(pid)], {
42555
+ const plain = (0, import_node_child_process14.spawnSync)("ps", ["-o", "command=", "-p", String(pid)], {
42526
42556
  encoding: "utf8",
42527
42557
  stdio: ["ignore", "pipe", "pipe"]
42528
42558
  });
42529
- const withEnv = (0, import_node_child_process13.spawnSync)("ps", ["eww", "-o", "command=", "-p", String(pid)], {
42559
+ const withEnv = (0, import_node_child_process14.spawnSync)("ps", ["eww", "-o", "command=", "-p", String(pid)], {
42530
42560
  encoding: "utf8",
42531
42561
  stdio: ["ignore", "pipe", "pipe"]
42532
42562
  });
@@ -43500,11 +43530,11 @@ async function runCloseCommand(args, opts = {}) {
43500
43530
  bridge.close();
43501
43531
  }
43502
43532
  }
43503
- var import_node_child_process13, import_node_fs35, import_node_os8, import_node_path37, import_app_catalog_wire, import_devices2, import_ws4, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS;
43533
+ var import_node_child_process14, import_node_fs35, import_node_os8, import_node_path37, import_app_catalog_wire, import_devices2, import_ws4, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS;
43504
43534
  var init_control = __esm({
43505
43535
  "cli/commands/control.ts"() {
43506
43536
  "use strict";
43507
- import_node_child_process13 = require("node:child_process");
43537
+ import_node_child_process14 = require("node:child_process");
43508
43538
  import_node_fs35 = __toESM(require("node:fs"), 1);
43509
43539
  import_node_os8 = __toESM(require("node:os"), 1);
43510
43540
  import_node_path37 = __toESM(require("node:path"), 1);