rnxsim 0.1.419 → 0.1.420

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 (59) hide show
  1. package/cli/cloud-client.ts +164 -12
  2. package/cli/cloud-dispatch.ts +7 -2
  3. package/cli/commands/box/checkout-plane.ts +78 -40
  4. package/cli/commands/platform.ts +30 -9
  5. package/cli/outbound-endpoints.ts +6 -0
  6. package/cli/shell-init.ts +1 -1
  7. package/cli/ws-bridge.ts +7 -5
  8. package/dist-lib/agent-daemon-client.cjs +1 -1
  9. package/dist-lib/agent-events.cjs +1 -1
  10. package/dist-lib/agent-identity.cjs +1 -1
  11. package/dist-lib/agent-sessions.cjs +1 -1
  12. package/dist-lib/attached-projects.cjs +1 -1
  13. package/dist-lib/auth/shared-session.cjs +1 -1
  14. package/dist-lib/backend-origin.cjs +1 -1
  15. package/dist-lib/beta.cjs +1 -1
  16. package/dist-lib/beta.mjs +1 -1
  17. package/dist-lib/bridge-constants.cjs +1 -1
  18. package/dist-lib/bridge-contract-input.cjs +1 -1
  19. package/dist-lib/bridge-contract-input.mjs +1 -1
  20. package/dist-lib/bridge-contract.cjs +1 -1
  21. package/dist-lib/bridge-contract.mjs +1 -1
  22. package/dist-lib/capture-contract.cjs +1 -1
  23. package/dist-lib/capture-contract.mjs +1 -1
  24. package/dist-lib/cli-constants.cjs +1 -1
  25. package/dist-lib/cloud-contract.cjs +1 -1
  26. package/dist-lib/cloud-contract.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +6 -4
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +55 -28
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +7 -5
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/menu.cjs +1 -1
  40. package/dist-lib/menu.mjs +1 -1
  41. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  43. package/dist-lib/metro-production-bundle.cjs +1 -1
  44. package/dist-lib/metro-production-bundle.mjs +1 -1
  45. package/dist-lib/metro.cjs +4 -3
  46. package/dist-lib/profiles.cjs +1 -1
  47. package/dist-lib/public-brand.cjs +1 -1
  48. package/dist-lib/react-native-host-modules.cjs +1 -1
  49. package/dist-lib/react-native-host-modules.mjs +1 -1
  50. package/dist-lib/render-mode.cjs +1 -1
  51. package/dist-lib/scripts/dev-server-scanner.cjs +9 -6
  52. package/dist-lib/sdk.cjs +1 -1
  53. package/dist-lib/sdk.mjs +1 -1
  54. package/dist-lib/skills.cjs +64 -34
  55. package/dist-lib/vite.cjs +1 -1
  56. package/package.json +1 -1
  57. package/scripts/dev-server-scanner.ts +9 -5
  58. package/src/dev-bundle-resolution.ts +6 -3
  59. package/src/dev-server-open.ts +3 -2
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -169,12 +169,14 @@ async function probeExpoManifest(normalizedBaseUrl, port) {
169
169
  async (res) => res.ok ? { ok: true, body: await res.text() } : null,
170
170
  () => void 0
171
171
  );
172
+ let probeDeadline;
172
173
  const answered = await Promise.race([
173
174
  pending,
174
- new Promise(
175
- (resolve) => setTimeout(() => resolve("timeout"), MANIFEST_PROBE_TIMEOUT_MS).unref?.()
176
- )
175
+ new Promise((resolve) => {
176
+ probeDeadline = setTimeout(() => resolve("timeout"), MANIFEST_PROBE_TIMEOUT_MS);
177
+ })
177
178
  ]);
179
+ clearTimeout(probeDeadline);
178
180
  if (answered === "timeout" || answered === void 0) return { state: "no-answer" };
179
181
  if (answered === null) return { state: "no-manifest" };
180
182
  body = answered.body;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -539,7 +539,7 @@ async function readAppSettingsBundle(projectRoot) {
539
539
  // scripts/dev-server-scanner.ts
540
540
  init_optional_demo_registry();
541
541
  var EXEC_EXIT_GRACE_MS = 2e3;
542
- function execGuarded(command, timeout, extra = {}) {
542
+ async function execGuarded(command, timeout, extra = {}) {
543
543
  let child;
544
544
  const ran = new Promise((resolve2, reject) => {
545
545
  child = (0, import_child_process.exec)(command, { encoding: "utf8", timeout, ...extra }, (err, stdout) => {
@@ -547,16 +547,20 @@ function execGuarded(command, timeout, extra = {}) {
547
547
  else resolve2({ stdout });
548
548
  });
549
549
  });
550
+ let deadlineTimer;
550
551
  const deadline = new Promise((_resolve, reject) => {
551
- const timer = setTimeout(() => {
552
+ deadlineTimer = setTimeout(() => {
552
553
  child?.kill("SIGKILL");
553
554
  const err = new Error(`\`${command}\` did not exit within ${timeout}ms`);
554
555
  Object.assign(err, { killed: true });
555
556
  reject(err);
556
557
  }, timeout + EXEC_EXIT_GRACE_MS);
557
- timer.unref?.();
558
558
  });
559
- return Promise.race([ran, deadline]);
559
+ try {
560
+ return await Promise.race([ran, deadline]);
561
+ } finally {
562
+ clearTimeout(deadlineTimer);
563
+ }
560
564
  }
561
565
  var TIMEOUT_MS = 250;
562
566
  var MANIFEST_TIMEOUT_MS = 1500;
@@ -622,7 +626,6 @@ function httpGet(hostname, port, path12, method = "GET", timeout = TIMEOUT_MS, h
622
626
  req.socket?.unref();
623
627
  }, timeout);
624
628
  const abandon = setTimeout(() => req.destroy(), BODY_TIMEOUT_MS);
625
- abandon.unref?.();
626
629
  req.on("close", () => {
627
630
  clearTimeout(giveUp);
628
631
  clearTimeout(abandon);
@@ -3896,6 +3899,8 @@ var CheckoutRequiresGitError = class extends Error {
3896
3899
  };
3897
3900
  var BINARY_SNIFF_BYTES = 8192;
3898
3901
  var LIST_FILES_TIMEOUT_MS = 1e4;
3902
+ var LIST_FILES_ATTEMPTS = 3;
3903
+ var LIST_FILES_RETRY_MS = 25;
3899
3904
  function looksBinary(filePath, size) {
3900
3905
  if (size === 0) return false;
3901
3906
  let fd;
@@ -3927,33 +3932,55 @@ var CheckoutFilePlane = class {
3927
3932
  index() {
3928
3933
  return this.entries;
3929
3934
  }
3930
- async refresh() {
3931
- let stdout;
3932
- try {
3933
- const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
3934
- stdout = (0, import_node_child_process4.execFileSync)("git", args, {
3935
- cwd: this.root,
3936
- encoding: "utf8",
3937
- maxBuffer: 64 * 1024 * 1024,
3938
- timeout: this.listTimeoutMs,
3939
- // stating the environment is not redundant here. bun 1.3.14 resolves
3940
- // the binary for the synchronous form against the PATH it captured at
3941
- // startup and ignores a later change to `process.env.PATH`, so without
3942
- // this it runs a different git than every other call in the process.
3943
- env: process.env
3944
- });
3945
- } catch (error) {
3946
- const message = error instanceof Error ? error.message : String(error);
3947
- const killed = error instanceof Error && "signal" in error && error.signal === "SIGTERM";
3948
- throw new CheckoutRequiresGitError(
3949
- killed ? `git did not list the project's files in ${this.root} within ${this.listTimeoutMs / 1e3}s, so the box has no file set to serve. the checkout may be on a stalled filesystem, or this machine may be too loaded to start a subprocess.` : `could not list the project's files with git in ${this.root}: ${message}`
3950
- );
3951
- }
3935
+ listFiles() {
3936
+ const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
3937
+ const stdout = (0, import_node_child_process4.execFileSync)("git", args, {
3938
+ cwd: this.root,
3939
+ encoding: "utf8",
3940
+ maxBuffer: 64 * 1024 * 1024,
3941
+ timeout: this.listTimeoutMs,
3942
+ // stating the environment is not redundant here. bun 1.3.14 resolves
3943
+ // the binary for the synchronous form against the PATH it captured at
3944
+ // startup and ignores a later change to `process.env.PATH`, so without
3945
+ // this it runs a different git than every other call in the process.
3946
+ env: process.env
3947
+ });
3952
3948
  if (stdout.length === 0) {
3953
3949
  throw new CheckoutRequiresGitError(
3954
3950
  `git listed no ${this.trackedOnly ? "tracked " : ""}files in ${this.root}. either the checkout contains no eligible files, or this machine could not read the child process's output.`
3955
3951
  );
3956
3952
  }
3953
+ return stdout;
3954
+ }
3955
+ async refresh() {
3956
+ let stdout = "";
3957
+ let lastFailure;
3958
+ for (let attempt = 1; attempt <= LIST_FILES_ATTEMPTS; attempt++) {
3959
+ try {
3960
+ stdout = this.listFiles();
3961
+ lastFailure = void 0;
3962
+ break;
3963
+ } catch (error) {
3964
+ if (error instanceof CheckoutRequiresGitError) {
3965
+ lastFailure = error;
3966
+ } else {
3967
+ const message = error instanceof Error ? error.message : String(error);
3968
+ const killed = error instanceof Error && "signal" in error && error.signal === "SIGTERM";
3969
+ lastFailure = new CheckoutRequiresGitError(
3970
+ killed ? `git did not list the project's files in ${this.root} within ${this.listTimeoutMs / 1e3}s, so the box has no file set to serve. the checkout may be on a stalled filesystem, or this machine may be too loaded to start a subprocess.` : `could not list the project's files with git in ${this.root}: ${message}`
3971
+ );
3972
+ }
3973
+ if (attempt < LIST_FILES_ATTEMPTS) {
3974
+ await new Promise(
3975
+ (resolve2) => setTimeout(resolve2, LIST_FILES_RETRY_MS * attempt)
3976
+ );
3977
+ }
3978
+ }
3979
+ }
3980
+ if (lastFailure) {
3981
+ lastFailure.message = `${lastFailure.message} (${LIST_FILES_ATTEMPTS} attempts)`;
3982
+ throw lastFailure;
3983
+ }
3957
3984
  const next = /* @__PURE__ */ new Map();
3958
3985
  const nextSniffed = /* @__PURE__ */ new Map();
3959
3986
  for (const relative of stdout.split("\0")) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -841,11 +841,12 @@ function createBridge(wsPort, opts = {}) {
841
841
  } catch {
842
842
  }
843
843
  ws.close();
844
- setTimeout(() => {
844
+ const terminateGrace = setTimeout(() => {
845
845
  if (ws.readyState !== import_ws.WebSocket.CLOSED) {
846
846
  ws.terminate();
847
847
  }
848
- }, 250).unref();
848
+ }, 250);
849
+ ws.once("close", () => clearTimeout(terminateGrace));
849
850
  }
850
851
  };
851
852
  }
@@ -2858,9 +2859,11 @@ function openRnxDesktopWhenMetroIsReady({
2858
2859
  const deadline = Date.now() + timeoutMs;
2859
2860
  return new Promise((resolve2) => {
2860
2861
  let finished = false;
2862
+ let retryTimer;
2861
2863
  const finish = (opened) => {
2862
2864
  if (finished) return;
2863
2865
  finished = true;
2866
+ clearTimeout(retryTimer);
2864
2867
  scheduledMetroOpens.delete(key);
2865
2868
  resolve2(opened);
2866
2869
  };
@@ -2873,8 +2876,7 @@ function openRnxDesktopWhenMetroIsReady({
2873
2876
  finish(false);
2874
2877
  return;
2875
2878
  }
2876
- const timer = setTimeout(check, intervalMs);
2877
- timer.unref();
2879
+ retryTimer = setTimeout(check, intervalMs);
2878
2880
  };
2879
2881
  const check = () => {
2880
2882
  const request = import_node_http.default.get(
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "rnx";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-fingerprint-registry.ts
4
4
  var RNX_METRO_FINGERPRINT_SCHEMA_VERSION = 2;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -137,9 +137,11 @@ function openRnxDesktopWhenMetroIsReady({
137
137
  const deadline = Date.now() + timeoutMs;
138
138
  return new Promise((resolve) => {
139
139
  let finished = false;
140
+ let retryTimer;
140
141
  const finish = (opened) => {
141
142
  if (finished) return;
142
143
  finished = true;
144
+ clearTimeout(retryTimer);
143
145
  scheduledMetroOpens.delete(key);
144
146
  resolve(opened);
145
147
  };
@@ -152,8 +154,7 @@ function openRnxDesktopWhenMetroIsReady({
152
154
  finish(false);
153
155
  return;
154
156
  }
155
- const timer = setTimeout(check, intervalMs);
156
- timer.unref();
157
+ retryTimer = setTimeout(check, intervalMs);
157
158
  };
158
159
  const check = () => {
159
160
  const request = import_node_http.default.get(
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -521,7 +521,7 @@ function optionalDemoAppsSync() {
521
521
 
522
522
  // scripts/dev-server-scanner.ts
523
523
  var EXEC_EXIT_GRACE_MS = 2e3;
524
- function execGuarded(command, timeout, extra = {}) {
524
+ async function execGuarded(command, timeout, extra = {}) {
525
525
  let child;
526
526
  const ran = new Promise((resolve2, reject) => {
527
527
  child = (0, import_child_process.exec)(command, { encoding: "utf8", timeout, ...extra }, (err, stdout) => {
@@ -529,16 +529,20 @@ function execGuarded(command, timeout, extra = {}) {
529
529
  else resolve2({ stdout });
530
530
  });
531
531
  });
532
+ let deadlineTimer;
532
533
  const deadline = new Promise((_resolve, reject) => {
533
- const timer = setTimeout(() => {
534
+ deadlineTimer = setTimeout(() => {
534
535
  child?.kill("SIGKILL");
535
536
  const err = new Error(`\`${command}\` did not exit within ${timeout}ms`);
536
537
  Object.assign(err, { killed: true });
537
538
  reject(err);
538
539
  }, timeout + EXEC_EXIT_GRACE_MS);
539
- timer.unref?.();
540
540
  });
541
- return Promise.race([ran, deadline]);
541
+ try {
542
+ return await Promise.race([ran, deadline]);
543
+ } finally {
544
+ clearTimeout(deadlineTimer);
545
+ }
542
546
  }
543
547
  var TIMEOUT_MS = 250;
544
548
  var MANIFEST_TIMEOUT_MS = 1500;
@@ -604,7 +608,6 @@ function httpGet(hostname, port, path, method = "GET", timeout = TIMEOUT_MS, hea
604
608
  req.socket?.unref();
605
609
  }, timeout);
606
610
  const abandon = setTimeout(() => req.destroy(), BODY_TIMEOUT_MS);
607
- abandon.unref?.();
608
611
  req.on("close", () => {
609
612
  clearTimeout(giveUp);
610
613
  clearTimeout(abandon);
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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 __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
@@ -15006,7 +15006,7 @@ var init_optional_demo_registry = __esm({
15006
15006
  });
15007
15007
 
15008
15008
  // scripts/dev-server-scanner.ts
15009
- function execGuarded(command, timeout, extra = {}) {
15009
+ async function execGuarded(command, timeout, extra = {}) {
15010
15010
  let child;
15011
15011
  const ran = new Promise((resolve7, reject) => {
15012
15012
  child = (0, import_child_process.exec)(command, { encoding: "utf8", timeout, ...extra }, (err, stdout) => {
@@ -15014,16 +15014,20 @@ function execGuarded(command, timeout, extra = {}) {
15014
15014
  else resolve7({ stdout });
15015
15015
  });
15016
15016
  });
15017
+ let deadlineTimer;
15017
15018
  const deadline = new Promise((_resolve, reject) => {
15018
- const timer = setTimeout(() => {
15019
+ deadlineTimer = setTimeout(() => {
15019
15020
  child?.kill("SIGKILL");
15020
15021
  const err = new Error(`\`${command}\` did not exit within ${timeout}ms`);
15021
15022
  Object.assign(err, { killed: true });
15022
15023
  reject(err);
15023
15024
  }, timeout + EXEC_EXIT_GRACE_MS);
15024
- timer.unref?.();
15025
15025
  });
15026
- return Promise.race([ran, deadline]);
15026
+ try {
15027
+ return await Promise.race([ran, deadline]);
15028
+ } finally {
15029
+ clearTimeout(deadlineTimer);
15030
+ }
15027
15031
  }
15028
15032
  async function tcpPing(port, timeout = TCP_GATE_MS) {
15029
15033
  try {
@@ -15085,7 +15089,6 @@ function httpGet(hostname, port, path20, method = "GET", timeout = TIMEOUT_MS, h
15085
15089
  req.socket?.unref();
15086
15090
  }, timeout);
15087
15091
  const abandon = setTimeout(() => req.destroy(), BODY_TIMEOUT_MS);
15088
- abandon.unref?.();
15089
15092
  req.on("close", () => {
15090
15093
  clearTimeout(giveUp);
15091
15094
  clearTimeout(abandon);
@@ -18746,7 +18749,7 @@ function looksBinary(filePath, size) {
18746
18749
  if (fd !== void 0) import_node_fs10.default.closeSync(fd);
18747
18750
  }
18748
18751
  }
18749
- var import_node_child_process5, import_node_fs10, import_node_path10, CheckoutRequiresGitError, BINARY_SNIFF_BYTES, LIST_FILES_TIMEOUT_MS, CheckoutFilePlane;
18752
+ var import_node_child_process5, import_node_fs10, import_node_path10, CheckoutRequiresGitError, BINARY_SNIFF_BYTES, LIST_FILES_TIMEOUT_MS, LIST_FILES_ATTEMPTS, LIST_FILES_RETRY_MS, CheckoutFilePlane;
18750
18753
  var init_checkout_plane = __esm({
18751
18754
  "cli/commands/box/checkout-plane.ts"() {
18752
18755
  "use strict";
@@ -18757,6 +18760,8 @@ var init_checkout_plane = __esm({
18757
18760
  };
18758
18761
  BINARY_SNIFF_BYTES = 8192;
18759
18762
  LIST_FILES_TIMEOUT_MS = 1e4;
18763
+ LIST_FILES_ATTEMPTS = 3;
18764
+ LIST_FILES_RETRY_MS = 25;
18760
18765
  CheckoutFilePlane = class {
18761
18766
  root;
18762
18767
  entries = /* @__PURE__ */ new Map();
@@ -18774,33 +18779,55 @@ var init_checkout_plane = __esm({
18774
18779
  index() {
18775
18780
  return this.entries;
18776
18781
  }
18777
- async refresh() {
18778
- let stdout;
18779
- try {
18780
- const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
18781
- stdout = (0, import_node_child_process5.execFileSync)("git", args, {
18782
- cwd: this.root,
18783
- encoding: "utf8",
18784
- maxBuffer: 64 * 1024 * 1024,
18785
- timeout: this.listTimeoutMs,
18786
- // stating the environment is not redundant here. bun 1.3.14 resolves
18787
- // the binary for the synchronous form against the PATH it captured at
18788
- // startup and ignores a later change to `process.env.PATH`, so without
18789
- // this it runs a different git than every other call in the process.
18790
- env: process.env
18791
- });
18792
- } catch (error) {
18793
- const message = error instanceof Error ? error.message : String(error);
18794
- const killed = error instanceof Error && "signal" in error && error.signal === "SIGTERM";
18795
- throw new CheckoutRequiresGitError(
18796
- killed ? `git did not list the project's files in ${this.root} within ${this.listTimeoutMs / 1e3}s, so the box has no file set to serve. the checkout may be on a stalled filesystem, or this machine may be too loaded to start a subprocess.` : `could not list the project's files with git in ${this.root}: ${message}`
18797
- );
18798
- }
18782
+ listFiles() {
18783
+ const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
18784
+ const stdout = (0, import_node_child_process5.execFileSync)("git", args, {
18785
+ cwd: this.root,
18786
+ encoding: "utf8",
18787
+ maxBuffer: 64 * 1024 * 1024,
18788
+ timeout: this.listTimeoutMs,
18789
+ // stating the environment is not redundant here. bun 1.3.14 resolves
18790
+ // the binary for the synchronous form against the PATH it captured at
18791
+ // startup and ignores a later change to `process.env.PATH`, so without
18792
+ // this it runs a different git than every other call in the process.
18793
+ env: process.env
18794
+ });
18799
18795
  if (stdout.length === 0) {
18800
18796
  throw new CheckoutRequiresGitError(
18801
18797
  `git listed no ${this.trackedOnly ? "tracked " : ""}files in ${this.root}. either the checkout contains no eligible files, or this machine could not read the child process's output.`
18802
18798
  );
18803
18799
  }
18800
+ return stdout;
18801
+ }
18802
+ async refresh() {
18803
+ let stdout = "";
18804
+ let lastFailure;
18805
+ for (let attempt = 1; attempt <= LIST_FILES_ATTEMPTS; attempt++) {
18806
+ try {
18807
+ stdout = this.listFiles();
18808
+ lastFailure = void 0;
18809
+ break;
18810
+ } catch (error) {
18811
+ if (error instanceof CheckoutRequiresGitError) {
18812
+ lastFailure = error;
18813
+ } else {
18814
+ const message = error instanceof Error ? error.message : String(error);
18815
+ const killed = error instanceof Error && "signal" in error && error.signal === "SIGTERM";
18816
+ lastFailure = new CheckoutRequiresGitError(
18817
+ killed ? `git did not list the project's files in ${this.root} within ${this.listTimeoutMs / 1e3}s, so the box has no file set to serve. the checkout may be on a stalled filesystem, or this machine may be too loaded to start a subprocess.` : `could not list the project's files with git in ${this.root}: ${message}`
18818
+ );
18819
+ }
18820
+ if (attempt < LIST_FILES_ATTEMPTS) {
18821
+ await new Promise(
18822
+ (resolve7) => setTimeout(resolve7, LIST_FILES_RETRY_MS * attempt)
18823
+ );
18824
+ }
18825
+ }
18826
+ }
18827
+ if (lastFailure) {
18828
+ lastFailure.message = `${lastFailure.message} (${LIST_FILES_ATTEMPTS} attempts)`;
18829
+ throw lastFailure;
18830
+ }
18804
18831
  const next = /* @__PURE__ */ new Map();
18805
18832
  const nextSniffed = /* @__PURE__ */ new Map();
18806
18833
  for (const relative of stdout.split("\0")) {
@@ -22483,11 +22510,12 @@ function createBridge(wsPort, opts = {}) {
22483
22510
  } catch {
22484
22511
  }
22485
22512
  ws.close();
22486
- setTimeout(() => {
22513
+ const terminateGrace = setTimeout(() => {
22487
22514
  if (ws.readyState !== import_ws3.WebSocket.CLOSED) {
22488
22515
  ws.terminate();
22489
22516
  }
22490
- }, 250).unref();
22517
+ }, 250);
22518
+ ws.once("close", () => clearTimeout(terminateGrace));
22491
22519
  }
22492
22520
  };
22493
22521
  }
@@ -22695,12 +22723,14 @@ async function probeExpoManifest(normalizedBaseUrl, port) {
22695
22723
  async (res) => res.ok ? { ok: true, body: await res.text() } : null,
22696
22724
  () => void 0
22697
22725
  );
22726
+ let probeDeadline;
22698
22727
  const answered = await Promise.race([
22699
22728
  pending,
22700
- new Promise(
22701
- (resolve7) => setTimeout(() => resolve7("timeout"), MANIFEST_PROBE_TIMEOUT_MS).unref?.()
22702
- )
22729
+ new Promise((resolve7) => {
22730
+ probeDeadline = setTimeout(() => resolve7("timeout"), MANIFEST_PROBE_TIMEOUT_MS);
22731
+ })
22703
22732
  ]);
22733
+ clearTimeout(probeDeadline);
22704
22734
  if (answered === "timeout" || answered === void 0) return { state: "no-answer" };
22705
22735
  if (answered === null) return { state: "no-manifest" };
22706
22736
  body = answered.body;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.419 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.420 | (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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rnxsim",
3
- "version": "0.1.419",
3
+ "version": "0.1.420",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for rnx.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",