rnxsim 0.1.544 → 0.1.546

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/commands/control.ts +8 -2
  2. package/cli/commands/inspect/wait-selector.ts +12 -2
  3. package/cli/outbound-endpoints.ts +5 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/agent-identity.cjs +1 -1
  7. package/dist-lib/agent-sessions.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/detox/index.cjs +1 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/home-paths.cjs +1 -1
  29. package/dist-lib/host/bridge-host.cjs +29 -14
  30. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  31. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  33. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  34. package/dist-lib/host/websocket-proxy.cjs +1 -1
  35. package/dist-lib/index.cjs +1 -1
  36. package/dist-lib/jump-to-source-babel.cjs +1 -1
  37. package/dist-lib/jump-to-source-native.cjs +1 -1
  38. package/dist-lib/menu.cjs +1 -1
  39. package/dist-lib/menu.mjs +1 -1
  40. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  41. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  42. package/dist-lib/metro-production-bundle.cjs +1 -1
  43. package/dist-lib/metro-production-bundle.mjs +1 -1
  44. package/dist-lib/metro.cjs +1 -1
  45. package/dist-lib/profiles.cjs +1 -1
  46. package/dist-lib/public-brand.cjs +1 -1
  47. package/dist-lib/react-native-host-modules.cjs +1 -1
  48. package/dist-lib/react-native-host-modules.mjs +1 -1
  49. package/dist-lib/render-mode.cjs +1 -1
  50. package/dist-lib/scripts/dev-server-scanner.cjs +30 -14
  51. package/dist-lib/sdk.cjs +1 -1
  52. package/dist-lib/sdk.mjs +1 -1
  53. package/dist-lib/skills.cjs +30 -15
  54. package/dist-lib/swift-submit.cjs +1 -1
  55. package/dist-lib/swift-submit.mjs +1 -1
  56. package/dist-lib/swift.cjs +1 -1
  57. package/dist-lib/vite.cjs +1 -1
  58. package/package.json +1 -1
  59. package/scripts/dev-server-scanner.ts +40 -13
@@ -425,14 +425,20 @@ async function resolveConnectionInputForCli(target: string): Promise<ResolvedDev
425
425
  try {
426
426
  return await resolveConnectionInput(normalized)
427
427
  } catch (error) {
428
- if (!(error instanceof Error) || !error.message.startsWith("could not resolve a native bundle")) {
428
+ if (
429
+ !(error instanceof Error) ||
430
+ !error.message.startsWith('could not resolve a native bundle')
431
+ ) {
429
432
  throw error
430
433
  }
431
434
  lastError = error
432
435
  }
433
436
  await sleep(DEV_BUNDLE_RESOLVE_INTERVAL_MS)
434
437
  }
435
- throw lastError ?? new Error("could not resolve a native bundle for " + normalized + " after retrying.")
438
+ throw (
439
+ lastError ??
440
+ new Error('could not resolve a native bundle for ' + normalized + ' after retrying.')
441
+ )
436
442
  }
437
443
 
438
444
  function getShellRoutePrefix(pathname: string): string {
@@ -19,13 +19,23 @@ export async function runWaitSelectorSubcommand(opts: {
19
19
  const testId = positional[1]
20
20
  if (!testId) {
21
21
  console.error(
22
- inspectUsage('selector', '<testid> [--max-ms 5000] [--gone] [--structural]'),
22
+ inspectUsage(
23
+ 'selector',
24
+ '<testid> [--max-ms 5000 | --timeout 5000] [--gone] [--structural]',
25
+ ),
23
26
  )
24
27
  rnxExit(1)
25
28
  }
29
+ // the wait budget. `--max-ms` names it, and `--timeout` (the global
30
+ // per-command budget) means the same thing for a command whose whole job is
31
+ // to wait — without this it parsed away and the wait silently stayed at 5s,
32
+ // reporting a false timeout.
26
33
  const maxMsIdx = args.indexOf('--max-ms')
34
+ const budgetIdx = maxMsIdx >= 0 ? maxMsIdx : args.indexOf('--timeout')
27
35
  const timeoutMs =
28
- maxMsIdx >= 0 && args[maxMsIdx + 1] ? Math.max(100, Number(args[maxMsIdx + 1])) : 5000
36
+ budgetIdx >= 0 && args[budgetIdx + 1]
37
+ ? Math.max(100, Number(args[budgetIdx + 1]))
38
+ : 5000
29
39
  const gone = args.includes('--gone')
30
40
  const structural = args.includes('--structural')
31
41
 
@@ -277,6 +277,11 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
277
277
  { category: 'contrast_user_action', count: 1 },
278
278
  'packages/rnx-cloud-box/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/internal/${encodeURIComponent()}`':
279
279
  { category: 'contrast_user_action', count: 1 },
280
+ // stop and delete authorize the caller against the account before any
281
+ // teardown. the account service owns the verdict on a key, its scope and the
282
+ // account it names; no project content is sent.
283
+ 'packages/rnx-cloud-box/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions?accountId=${encodeURIComponent()}&kind=box&status=running`':
284
+ { category: 'contrast_user_action', count: 1 },
280
285
  // the Cloudflare Worker forwards the already-authenticated request to the
281
286
  // selected Durable Object in the same service.
282
287
  'packages/rnx-cloud-box/src/worker.ts :: fetch :: request': {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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;
@@ -5098,7 +5098,7 @@ async function resolveLocalIconPath(hostname, port, rawIcon) {
5098
5098
  const res = await httpGet(hostname, port, candidate, "HEAD", ENRICH_TIMEOUT_MS);
5099
5099
  if (res?.statusCode === 200) {
5100
5100
  localIconPathCache.set(port, candidate);
5101
- portCache.delete(port);
5101
+ invalidatePortCache(port);
5102
5102
  return;
5103
5103
  }
5104
5104
  }
@@ -5220,7 +5220,7 @@ async function fetchManifestEnrichment(result, buildIconProxyUrl) {
5220
5220
  iconPath: parsed.iconPath,
5221
5221
  bundleId: parsed.bundleId
5222
5222
  });
5223
- portCache.delete(result.port);
5223
+ invalidatePortCache(result.port);
5224
5224
  }
5225
5225
  var knownNonPatched = /* @__PURE__ */ new Set();
5226
5226
  var knownNonExpo = /* @__PURE__ */ new Set();
@@ -5260,16 +5260,19 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
5260
5260
  const framework = launchUrl2.includes(
5261
5261
  "/one/metro-entry.bundle"
5262
5262
  ) ? "one" : "expo";
5263
- return applyManifest(
5264
- {
5265
- port,
5266
- framework,
5267
- bundleUrl: withRuntimeConfig(port, launchUrl2, owner.cwd),
5268
- hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
5269
- lastSeen: Date.now(),
5270
- ...owner
5271
- },
5272
- manifestRes,
5263
+ return enrichWithManifest(
5264
+ applyManifest(
5265
+ {
5266
+ port,
5267
+ framework,
5268
+ bundleUrl: withRuntimeConfig(port, launchUrl2, owner.cwd),
5269
+ hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
5270
+ lastSeen: Date.now(),
5271
+ ...owner
5272
+ },
5273
+ manifestRes,
5274
+ buildIconProxyUrl
5275
+ ),
5273
5276
  buildIconProxyUrl
5274
5277
  );
5275
5278
  }
@@ -5347,6 +5350,11 @@ function isSootSimSelfServer(server) {
5347
5350
  return false;
5348
5351
  }
5349
5352
  var portCache = /* @__PURE__ */ new Map();
5353
+ var portCacheInvalidatedAt = /* @__PURE__ */ new Map();
5354
+ function invalidatePortCache(port) {
5355
+ portCache.delete(port);
5356
+ portCacheInvalidatedAt.set(port, Date.now());
5357
+ }
5350
5358
  var NEGATIVE_CACHE_TTL_MS = 3e4;
5351
5359
  var WEAK_RESULT_CACHE_TTL_MS = 1500;
5352
5360
  function isWeakCachedResult(result) {
@@ -5401,6 +5409,9 @@ async function scanDevServers(opts = {}) {
5401
5409
  for (const p of [...localIconPathCache.keys()]) {
5402
5410
  if (!currentPorts.has(p)) localIconPathCache.delete(p);
5403
5411
  }
5412
+ for (const p of [...portCacheInvalidatedAt.keys()]) {
5413
+ if (!currentPorts.has(p)) portCacheInvalidatedAt.delete(p);
5414
+ }
5404
5415
  const results = [];
5405
5416
  const toProbe = [];
5406
5417
  for (const { port, pid } of processes) {
@@ -5419,12 +5430,16 @@ async function scanDevServers(opts = {}) {
5419
5430
  toProbe.push({ port, pid });
5420
5431
  }
5421
5432
  if (toProbe.length > 0) {
5433
+ const scanStartedAt = Date.now();
5422
5434
  const probed = await Promise.all(
5423
5435
  toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl, p))
5424
5436
  );
5425
5437
  probed.forEach((result, i) => {
5426
5438
  const { port, pid } = toProbe[i];
5427
- if (pid !== 0) portCache.set(port, { pid, result, cachedAt: Date.now() });
5439
+ const invalidatedAt = portCacheInvalidatedAt.get(port) ?? 0;
5440
+ if (pid !== 0 && invalidatedAt < scanStartedAt) {
5441
+ portCache.set(port, { pid, result, cachedAt: Date.now() });
5442
+ }
5428
5443
  if (result) results.push(result);
5429
5444
  });
5430
5445
  }
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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;
@@ -840,7 +840,7 @@ async function resolveLocalIconPath(hostname, port, rawIcon) {
840
840
  const res = await httpGet(hostname, port, candidate, "HEAD", ENRICH_TIMEOUT_MS);
841
841
  if (res?.statusCode === 200) {
842
842
  localIconPathCache.set(port, candidate);
843
- portCache.delete(port);
843
+ invalidatePortCache(port);
844
844
  return;
845
845
  }
846
846
  }
@@ -973,7 +973,7 @@ async function fetchManifestEnrichment(result, buildIconProxyUrl) {
973
973
  iconPath: parsed.iconPath,
974
974
  bundleId: parsed.bundleId
975
975
  });
976
- portCache.delete(result.port);
976
+ invalidatePortCache(result.port);
977
977
  }
978
978
  var knownNonPatched = /* @__PURE__ */ new Set();
979
979
  var knownNonExpo = /* @__PURE__ */ new Set();
@@ -1013,16 +1013,19 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
1013
1013
  const framework = launchUrl.includes(
1014
1014
  "/one/metro-entry.bundle"
1015
1015
  ) ? "one" : "expo";
1016
- return applyManifest(
1017
- {
1018
- port,
1019
- framework,
1020
- bundleUrl: withRuntimeConfig(port, launchUrl, owner.cwd),
1021
- hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
1022
- lastSeen: Date.now(),
1023
- ...owner
1024
- },
1025
- manifestRes,
1016
+ return enrichWithManifest(
1017
+ applyManifest(
1018
+ {
1019
+ port,
1020
+ framework,
1021
+ bundleUrl: withRuntimeConfig(port, launchUrl, owner.cwd),
1022
+ hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
1023
+ lastSeen: Date.now(),
1024
+ ...owner
1025
+ },
1026
+ manifestRes,
1027
+ buildIconProxyUrl
1028
+ ),
1026
1029
  buildIconProxyUrl
1027
1030
  );
1028
1031
  }
@@ -1101,6 +1104,11 @@ function isSootSimSelfServer(server) {
1101
1104
  }
1102
1105
  var __isSootSimSelfServerForTests = isSootSimSelfServer;
1103
1106
  var portCache = /* @__PURE__ */ new Map();
1107
+ var portCacheInvalidatedAt = /* @__PURE__ */ new Map();
1108
+ function invalidatePortCache(port) {
1109
+ portCache.delete(port);
1110
+ portCacheInvalidatedAt.set(port, Date.now());
1111
+ }
1104
1112
  var NEGATIVE_CACHE_TTL_MS = 3e4;
1105
1113
  var WEAK_RESULT_CACHE_TTL_MS = 1500;
1106
1114
  function isWeakCachedResult(result) {
@@ -1128,6 +1136,7 @@ function __resetScannerCache() {
1128
1136
  knownOne.clear();
1129
1137
  enrichmentCache.clear();
1130
1138
  enrichmentInFlight.clear();
1139
+ portCacheInvalidatedAt.clear();
1131
1140
  __resetAppSettingsBundleCacheForTests();
1132
1141
  }
1133
1142
  async function attachAppSettingsBundle(result, projectRoot) {
@@ -1165,6 +1174,9 @@ async function scanDevServers(opts = {}) {
1165
1174
  for (const p of [...localIconPathCache.keys()]) {
1166
1175
  if (!currentPorts.has(p)) localIconPathCache.delete(p);
1167
1176
  }
1177
+ for (const p of [...portCacheInvalidatedAt.keys()]) {
1178
+ if (!currentPorts.has(p)) portCacheInvalidatedAt.delete(p);
1179
+ }
1168
1180
  const results = [];
1169
1181
  const toProbe = [];
1170
1182
  for (const { port, pid } of processes) {
@@ -1183,12 +1195,16 @@ async function scanDevServers(opts = {}) {
1183
1195
  toProbe.push({ port, pid });
1184
1196
  }
1185
1197
  if (toProbe.length > 0) {
1198
+ const scanStartedAt = Date.now();
1186
1199
  const probed = await Promise.all(
1187
1200
  toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl, p))
1188
1201
  );
1189
1202
  probed.forEach((result, i) => {
1190
1203
  const { port, pid } = toProbe[i];
1191
- if (pid !== 0) portCache.set(port, { pid, result, cachedAt: Date.now() });
1204
+ const invalidatedAt = portCacheInvalidatedAt.get(port) ?? 0;
1205
+ if (pid !== 0 && invalidatedAt < scanStartedAt) {
1206
+ portCache.set(port, { pid, result, cachedAt: Date.now() });
1207
+ }
1192
1208
  if (result) results.push(result);
1193
1209
  });
1194
1210
  }
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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;
@@ -20007,7 +20007,7 @@ async function resolveLocalIconPath(hostname, port, rawIcon) {
20007
20007
  const res = await httpGet(hostname, port, candidate, "HEAD", ENRICH_TIMEOUT_MS);
20008
20008
  if (res?.statusCode === 200) {
20009
20009
  localIconPathCache.set(port, candidate);
20010
- portCache.delete(port);
20010
+ invalidatePortCache(port);
20011
20011
  return;
20012
20012
  }
20013
20013
  }
@@ -20126,7 +20126,7 @@ async function fetchManifestEnrichment(result, buildIconProxyUrl) {
20126
20126
  iconPath: parsed.iconPath,
20127
20127
  bundleId: parsed.bundleId
20128
20128
  });
20129
- portCache.delete(result.port);
20129
+ invalidatePortCache(result.port);
20130
20130
  }
20131
20131
  async function probePort(port, buildIconProxyUrl, listeningProcess) {
20132
20132
  await loadOptionalDemoApps();
@@ -20163,16 +20163,19 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
20163
20163
  const framework = launchUrl2.includes(
20164
20164
  "/one/metro-entry.bundle"
20165
20165
  ) ? "one" : "expo";
20166
- return applyManifest(
20167
- {
20168
- port,
20169
- framework,
20170
- bundleUrl: withRuntimeConfig(port, launchUrl2, owner.cwd),
20171
- hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
20172
- lastSeen: Date.now(),
20173
- ...owner
20174
- },
20175
- manifestRes,
20166
+ return enrichWithManifest(
20167
+ applyManifest(
20168
+ {
20169
+ port,
20170
+ framework,
20171
+ bundleUrl: withRuntimeConfig(port, launchUrl2, owner.cwd),
20172
+ hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
20173
+ lastSeen: Date.now(),
20174
+ ...owner
20175
+ },
20176
+ manifestRes,
20177
+ buildIconProxyUrl
20178
+ ),
20176
20179
  buildIconProxyUrl
20177
20180
  );
20178
20181
  }
@@ -20249,6 +20252,10 @@ function isSootSimSelfServer(server) {
20249
20252
  if (bundleId?.startsWith("dev.sootsim.")) return true;
20250
20253
  return false;
20251
20254
  }
20255
+ function invalidatePortCache(port) {
20256
+ portCache.delete(port);
20257
+ portCacheInvalidatedAt.set(port, Date.now());
20258
+ }
20252
20259
  function isWeakCachedResult(result) {
20253
20260
  if (!result) return true;
20254
20261
  if (result.framework === "metro" || result.framework === "unknown") return true;
@@ -20301,6 +20308,9 @@ async function scanDevServers(opts = {}) {
20301
20308
  for (const p of [...localIconPathCache.keys()]) {
20302
20309
  if (!currentPorts.has(p)) localIconPathCache.delete(p);
20303
20310
  }
20311
+ for (const p of [...portCacheInvalidatedAt.keys()]) {
20312
+ if (!currentPorts.has(p)) portCacheInvalidatedAt.delete(p);
20313
+ }
20304
20314
  const results = [];
20305
20315
  const toProbe = [];
20306
20316
  for (const { port, pid } of processes) {
@@ -20319,12 +20329,16 @@ async function scanDevServers(opts = {}) {
20319
20329
  toProbe.push({ port, pid });
20320
20330
  }
20321
20331
  if (toProbe.length > 0) {
20332
+ const scanStartedAt = Date.now();
20322
20333
  const probed = await Promise.all(
20323
20334
  toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl, p))
20324
20335
  );
20325
20336
  probed.forEach((result, i) => {
20326
20337
  const { port, pid } = toProbe[i];
20327
- if (pid !== 0) portCache.set(port, { pid, result, cachedAt: Date.now() });
20338
+ const invalidatedAt = portCacheInvalidatedAt.get(port) ?? 0;
20339
+ if (pid !== 0 && invalidatedAt < scanStartedAt) {
20340
+ portCache.set(port, { pid, result, cachedAt: Date.now() });
20341
+ }
20328
20342
  if (result) results.push(result);
20329
20343
  });
20330
20344
  }
@@ -20349,7 +20363,7 @@ async function scanDevServers(opts = {}) {
20349
20363
  }
20350
20364
  return results.filter((r) => !isSootSimSelfServer(r));
20351
20365
  }
20352
- var import_child_process, import_promises2, import_http, import_net, import_node_fs2, import_node_path3, EXEC_EXIT_GRACE_MS, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, TCP_GATE_MS, BODY_TIMEOUT_MS, FALLBACK_PORTS, SELF_PORT_RANGE_START, SELF_PORT_RANGE_END, DevServerScanUnavailableError, LISTING_TIMEOUT_MS, cwdByPid, localIconPathCache, localIconProbeInFlight, ENRICH_TIMEOUT_MS, enrichmentCache, enrichmentInFlight, knownNonPatched, knownNonExpo, knownOne, portCache, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
20366
+ var import_child_process, import_promises2, import_http, import_net, import_node_fs2, import_node_path3, EXEC_EXIT_GRACE_MS, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, TCP_GATE_MS, BODY_TIMEOUT_MS, FALLBACK_PORTS, SELF_PORT_RANGE_START, SELF_PORT_RANGE_END, DevServerScanUnavailableError, LISTING_TIMEOUT_MS, cwdByPid, localIconPathCache, localIconProbeInFlight, ENRICH_TIMEOUT_MS, enrichmentCache, enrichmentInFlight, knownNonPatched, knownNonExpo, knownOne, portCache, portCacheInvalidatedAt, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
20353
20367
  var init_dev_server_scanner = __esm({
20354
20368
  "scripts/dev-server-scanner.ts"() {
20355
20369
  "use strict";
@@ -20399,6 +20413,7 @@ var init_dev_server_scanner = __esm({
20399
20413
  knownNonExpo = /* @__PURE__ */ new Set();
20400
20414
  knownOne = /* @__PURE__ */ new Set();
20401
20415
  portCache = /* @__PURE__ */ new Map();
20416
+ portCacheInvalidatedAt = /* @__PURE__ */ new Map();
20402
20417
  NEGATIVE_CACHE_TTL_MS = 3e4;
20403
20418
  WEAK_RESULT_CACHE_TTL_MS = 1500;
20404
20419
  }
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.544 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.546 | (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.544",
3
+ "version": "0.1.546",
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",
@@ -629,7 +629,7 @@ async function resolveLocalIconPath(
629
629
  localIconPathCache.set(port, candidate)
630
630
  // the identified result caches as a strong entry and won't re-probe on
631
631
  // its own; drop it so the next scan republishes with the working url.
632
- portCache.delete(port)
632
+ invalidatePortCache(port)
633
633
  return
634
634
  }
635
635
  }
@@ -828,7 +828,7 @@ async function fetchManifestEnrichment(
828
828
  })
829
829
  // the nameless result cached as a strong entry and won't re-probe on its own;
830
830
  // drop it so the next scan re-runs probePort and publishes the enriched name.
831
- portCache.delete(result.port)
831
+ invalidatePortCache(result.port)
832
832
  }
833
833
 
834
834
  // ports confirmed to be running a non-sootsim dev server — safe to skip the
@@ -959,16 +959,22 @@ export async function probePort(
959
959
  )
960
960
  ? 'one'
961
961
  : 'expo'
962
- return applyManifest(
963
- {
964
- port,
965
- framework,
966
- bundleUrl: withRuntimeConfig(port, launchUrl, owner.cwd),
967
- hmrUrl: `${buildLoopbackProbeBaseUrl('ws:', probeHostname, port)}/hot`,
968
- lastSeen: Date.now(),
969
- ...owner,
970
- },
971
- manifestRes,
962
+ // enrichWithManifest kicks the local-icon shape probe; without it the
963
+ // optimistic metro icon URL publishes forever and the confirmed shape
964
+ // never lands. every other identified return wraps it too.
965
+ return enrichWithManifest(
966
+ applyManifest(
967
+ {
968
+ port,
969
+ framework,
970
+ bundleUrl: withRuntimeConfig(port, launchUrl, owner.cwd),
971
+ hmrUrl: `${buildLoopbackProbeBaseUrl('ws:', probeHostname, port)}/hot`,
972
+ lastSeen: Date.now(),
973
+ ...owner,
974
+ },
975
+ manifestRes,
976
+ buildIconProxyUrl,
977
+ ),
972
978
  buildIconProxyUrl,
973
979
  )
974
980
  }
@@ -1123,6 +1129,17 @@ interface PortCacheEntry {
1123
1129
  }
1124
1130
  const portCache = new Map<number, PortCacheEntry>()
1125
1131
 
1132
+ // out-of-band completions (the icon-shape probe, manifest enrichment) land
1133
+ // while a scan's own probeAll is still in flight, and the scan's cache write
1134
+ // would resurrect the entry they just dropped. stamp every such invalidation
1135
+ // so a scan only caches ports whose verdicts are newer than its own start.
1136
+ const portCacheInvalidatedAt = new Map<number, number>()
1137
+
1138
+ function invalidatePortCache(port: number): void {
1139
+ portCache.delete(port)
1140
+ portCacheInvalidatedAt.set(port, Date.now())
1141
+ }
1142
+
1126
1143
  // negative-cache holds a node/bun port that isn't a bundler (e.g. Contrast's own
1127
1144
  // api server, Zero, SQLite sync host, a dev tool). at scan interval 3s and a 1.5s ttl
1128
1145
  // we used to re-probe every scan, which hits `/` on the port every 3s — that
@@ -1166,6 +1183,7 @@ export function __resetScannerCache() {
1166
1183
  knownOne.clear()
1167
1184
  enrichmentCache.clear()
1168
1185
  enrichmentInFlight.clear()
1186
+ portCacheInvalidatedAt.clear()
1169
1187
  __resetAppSettingsBundleCacheForTests()
1170
1188
  }
1171
1189
 
@@ -1223,6 +1241,9 @@ export async function scanDevServers(
1223
1241
  for (const p of [...localIconPathCache.keys()]) {
1224
1242
  if (!currentPorts.has(p)) localIconPathCache.delete(p)
1225
1243
  }
1244
+ for (const p of [...portCacheInvalidatedAt.keys()]) {
1245
+ if (!currentPorts.has(p)) portCacheInvalidatedAt.delete(p)
1246
+ }
1226
1247
 
1227
1248
  const results: DiscoveredServer[] = []
1228
1249
  const toProbe: ListeningProcess[] = []
@@ -1251,6 +1272,7 @@ export async function scanDevServers(
1251
1272
  }
1252
1273
 
1253
1274
  if (toProbe.length > 0) {
1275
+ const scanStartedAt = Date.now()
1254
1276
  const probed = await Promise.all(
1255
1277
  toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl, p)),
1256
1278
  )
@@ -1258,7 +1280,12 @@ export async function scanDevServers(
1258
1280
  const { port, pid } = toProbe[i]
1259
1281
  // only cache when we have a real pid to key the entry against.
1260
1282
  // fallback-list ports (pid 0) always reprobe so we catch state changes.
1261
- if (pid !== 0) portCache.set(port, { pid, result, cachedAt: Date.now() })
1283
+ // skip ports an out-of-band completion invalidated mid-scan, so the
1284
+ // next scan re-probes instead of re-caching this scan's stale verdict.
1285
+ const invalidatedAt = portCacheInvalidatedAt.get(port) ?? 0
1286
+ if (pid !== 0 && invalidatedAt < scanStartedAt) {
1287
+ portCache.set(port, { pid, result, cachedAt: Date.now() })
1288
+ }
1262
1289
  if (result) results.push(result)
1263
1290
  })
1264
1291
  }