peachsim 0.1.755 → 0.1.757

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 (77) hide show
  1. package/cli/app-config.ts +4 -29
  2. package/cli/commands/telemetry.ts +5 -2
  3. package/cli/privacy.ts +10 -2
  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-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +88 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +47 -36
  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 +13 -5
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +2551 -2220
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +914 -584
  48. package/dist-lib/native-app-identity.cjs +1 -1
  49. package/dist-lib/native-app-identity.mjs +1 -1
  50. package/dist-lib/native-firebase-metadata.cjs +1 -1
  51. package/dist-lib/native-firebase-metadata.mjs +1 -1
  52. package/dist-lib/plist.cjs +1 -1
  53. package/dist-lib/plist.mjs +1 -1
  54. package/dist-lib/profiles.cjs +1 -1
  55. package/dist-lib/public-brand.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.mjs +1 -1
  58. package/dist-lib/render-mode.cjs +1 -1
  59. package/dist-lib/scripts/dev-server-scanner.cjs +4 -4
  60. package/dist-lib/sdk.cjs +1 -1
  61. package/dist-lib/sdk.mjs +1 -1
  62. package/dist-lib/skills.cjs +104 -69
  63. package/dist-lib/swift-compile.cjs +1 -1
  64. package/dist-lib/swift-compile.mjs +1 -1
  65. package/dist-lib/swift-package.cjs +1 -1
  66. package/dist-lib/swift-package.mjs +1 -1
  67. package/dist-lib/swift-submit.cjs +1 -1
  68. package/dist-lib/swift-submit.mjs +1 -1
  69. package/dist-lib/swift-toolchain.cjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite-swift.cjs +1 -1
  72. package/dist-lib/vite.cjs +10 -4
  73. package/package.json +1 -1
  74. package/src/config.ts +92 -0
  75. package/src/configured-bundle-producer.ts +110 -0
  76. package/src/host/replacement-module-handler.ts +8 -2
  77. package/src/metro-plugin.ts +27 -0
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (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;
@@ -77,6 +77,16 @@ var init_backend_origin = __esm({
77
77
  }
78
78
  });
79
79
 
80
+ // src/is-record.ts
81
+ function isRecord(value) {
82
+ return typeof value === "object" && value !== null && !Array.isArray(value);
83
+ }
84
+ var init_is_record = __esm({
85
+ "src/is-record.ts"() {
86
+ "use strict";
87
+ }
88
+ });
89
+
80
90
  // ../../node_modules/plist/lib/parse.js
81
91
  var require_parse = __commonJS({
82
92
  "../../node_modules/plist/lib/parse.js"(exports2) {
@@ -753,16 +763,6 @@ var init_public_brand = __esm({
753
763
  }
754
764
  });
755
765
 
756
- // src/is-record.ts
757
- function isRecord2(value) {
758
- return typeof value === "object" && value !== null && !Array.isArray(value);
759
- }
760
- var init_is_record = __esm({
761
- "src/is-record.ts"() {
762
- "use strict";
763
- }
764
- });
765
-
766
766
  // src/auth/shared-session.ts
767
767
  function sharedDesktopAuthAccounts(user) {
768
768
  return [
@@ -3032,7 +3032,8 @@ async function readOrInferModuleIdentity(bundle, mode, inferModuleIdentity) {
3032
3032
  }
3033
3033
  async function buildRnxCloudArtifact(bundle, options = {}) {
3034
3034
  const mode = options.mode ?? "production";
3035
- const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(bundle);
3035
+ const configured = (0, import_config2.detachPeachBundleConfigFooter)(bundle);
3036
+ const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(configured.source);
3036
3037
  const nativeIdentity = (0, import_native_app_identity.detachNativeAppIdentityFooter)(firebase.source);
3037
3038
  const identity = await readOrInferModuleIdentity(
3038
3039
  nativeIdentity.source,
@@ -3061,7 +3062,7 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
3061
3062
  })
3062
3063
  ]);
3063
3064
  const body = pieces.map((piece) => piece.code).join("\n");
3064
- 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)({
3065
+ 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)({
3065
3066
  version: identity.version,
3066
3067
  identitySource: identity.identitySource,
3067
3068
  modulePaths: identity.modulePaths,
@@ -3124,10 +3125,11 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
3124
3125
  }
3125
3126
  };
3126
3127
  }
3127
- var import_metro_production_bundle, import_native_app_identity, import_native_firebase_metadata, import_terser, MODULE_PATHS_REQUIRED, SOURCE_MAP_REQUIRED, MINIFY_OPTIONS;
3128
+ 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;
3128
3129
  var init_metroCloudArtifact = __esm({
3129
3130
  "../contrast-bundler/src/metroCloudArtifact.ts"() {
3130
3131
  "use strict";
3132
+ import_config2 = require("peachsim/config");
3131
3133
  import_metro_production_bundle = require("peachsim/metro-production-bundle");
3132
3134
  import_native_app_identity = require("peachsim/native-app-identity");
3133
3135
  import_native_firebase_metadata = require("peachsim/native-firebase-metadata");
@@ -4346,8 +4348,8 @@ function failureSentence(text) {
4346
4348
  } catch {
4347
4349
  return null;
4348
4350
  }
4349
- if (!isRecord2(parsed)) return null;
4350
- if (isRecord2(parsed.error) && typeof parsed.error.message === "string") {
4351
+ if (!isRecord(parsed)) return null;
4352
+ if (isRecord(parsed.error) && typeof parsed.error.message === "string") {
4351
4353
  const code = typeof parsed.error.code === "string" && parsed.error.code ? ` [${parsed.error.code}]` : "";
4352
4354
  return `${parsed.error.message}${code}`;
4353
4355
  }
@@ -4792,16 +4794,16 @@ async function produceArtifact(bundlePath, maxBytes, command, assetPolicy) {
4792
4794
  };
4793
4795
  }
4794
4796
  function readCreateResponse(value, expectedBytes, expectedSha256) {
4795
- if (!isRecord2(value)) throw new Error("remote simulator create returned invalid JSON");
4797
+ if (!isRecord(value)) throw new Error("remote simulator create returned invalid JSON");
4796
4798
  const artifactId = `sha256:${expectedSha256}`;
4797
- const isExpectedArtifact = (artifact) => isRecord2(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
4799
+ const isExpectedArtifact = (artifact) => isRecord(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
4798
4800
  const boxId = value.boxId;
4799
4801
  const boxToken = value.token;
4800
4802
  const simulator = value.simulator;
4801
- const simId = isRecord2(simulator) ? simulator.simId : null;
4802
- const claim = isRecord2(simulator) ? simulator.claim : null;
4803
- const simulatorToken = isRecord2(simulator) ? simulator.token : null;
4804
- 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) {
4803
+ const simId = isRecord(simulator) ? simulator.simId : null;
4804
+ const claim = isRecord(simulator) ? simulator.claim : null;
4805
+ const simulatorToken = isRecord(simulator) ? simulator.token : null;
4806
+ 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) {
4805
4807
  throw new Error("remote simulator create returned an invalid receipt");
4806
4808
  }
4807
4809
  return {
@@ -4947,8 +4949,8 @@ async function sendToBox(options) {
4947
4949
  simId: options.simId,
4948
4950
  code: '(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'
4949
4951
  });
4950
- const bundleUrl = isRecord2(captured) ? captured.bundleUrl : null;
4951
- if (!isRecord2(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
4952
+ const bundleUrl = isRecord(captured) ? captured.bundleUrl : null;
4953
+ if (!isRecord(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
4952
4954
  throw new Error(
4953
4955
  "send to box needs a simulator running an app: this one has no bundle loaded"
4954
4956
  );
@@ -4964,7 +4966,7 @@ async function sendToBox(options) {
4964
4966
  const storage = dumped;
4965
4967
  const created = await createCloudBox({
4966
4968
  bundlePath: toRNXProductionBundleUrl(bundleUrl),
4967
- device: options.device ?? cloudDevice(isRecord2(captured.deviceSpec) ? captured.deviceSpec.model : null),
4969
+ device: options.device ?? cloudDevice(isRecord(captured.deviceSpec) ? captured.deviceSpec.model : null),
4968
4970
  authorization: options.authorization,
4969
4971
  accountId: options.accountId,
4970
4972
  apiOrigin: options.apiOrigin,
@@ -5172,7 +5174,13 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
5172
5174
  // scripts/dev-server-scanner.ts
5173
5175
  init_backend_origin();
5174
5176
 
5177
+ // ../contrast-runtime-delivery/src/version.ts
5178
+ function isValidRuntimeVersion(value) {
5179
+ return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
5180
+ }
5181
+
5175
5182
  // src/config.ts
5183
+ init_is_record();
5176
5184
  var PEACH_CONFIG_QUERY_PARAM = "peachConfig";
5177
5185
  function hasOwnKeys(value) {
5178
5186
  return !!value && Object.keys(value).length > 0;
@@ -5252,7 +5260,7 @@ var MAX_CHILD_DEPTH = 8;
5252
5260
  var MAX_PLIST_FILES = 32;
5253
5261
  var MAX_SPECIFIERS = 512;
5254
5262
  var settingsBundleCache = /* @__PURE__ */ new Map();
5255
- function isRecord(value) {
5263
+ function isRecord2(value) {
5256
5264
  return typeof value === "object" && value !== null && !Array.isArray(value);
5257
5265
  }
5258
5266
  function optionalString(value) {
@@ -5381,7 +5389,7 @@ async function parsePlistRecord(path20) {
5381
5389
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
5382
5390
  const source = await (0, import_promises.readFile)(path20, "utf8");
5383
5391
  const parsed = parsePlistSource(source);
5384
- return isRecord(parsed) ? parsed : null;
5392
+ return isRecord2(parsed) ? parsed : null;
5385
5393
  } catch {
5386
5394
  return null;
5387
5395
  }
@@ -5417,7 +5425,7 @@ function normalizeMultiValue(raw2, key, title) {
5417
5425
  };
5418
5426
  }
5419
5427
  async function normalizeSpecifier(raw2, context) {
5420
- if (!isRecord(raw2)) return null;
5428
+ if (!isRecord2(raw2)) return null;
5421
5429
  if (context.budget.specifiers >= MAX_SPECIFIERS) return null;
5422
5430
  const type = requiredString(raw2.Type);
5423
5431
  if (!type) return null;
@@ -6365,7 +6373,7 @@ function swiftDistributionHost(platform, arch) {
6365
6373
  }
6366
6374
  var isStrings = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
6367
6375
  function parseSwiftDistributionManifest(value) {
6368
- 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)) {
6376
+ 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)) {
6369
6377
  throw new Error(`invalid Swift distribution ${SWIFT_DISTRIBUTION_MANIFEST}`);
6370
6378
  }
6371
6379
  const host2 = SWIFT_DISTRIBUTION_HOSTS.find((candidate) => candidate === value.host);
@@ -6387,13 +6395,13 @@ function parseSwiftDistributionManifest(value) {
6387
6395
  };
6388
6396
  }
6389
6397
  function parseSwiftDistributionLock(value) {
6390
- 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)) {
6398
+ 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)) {
6391
6399
  throw new Error("invalid Swift distribution lock");
6392
6400
  }
6393
6401
  const hosts = value.hosts;
6394
6402
  const entry = (host2) => {
6395
6403
  const item = hosts[host2];
6396
- if (!isRecord2(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
6404
+ if (!isRecord(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
6397
6405
  throw new Error(`invalid Swift distribution lock entry for ${host2}`);
6398
6406
  }
6399
6407
  return { sha256: item.sha256, size: item.size };
@@ -8037,9 +8045,6 @@ var import_promises3 = require("node:stream/promises");
8037
8045
  // ../contrast-runtime-delivery/src/product.ts
8038
8046
  var import_node_fs8 = __toESM(require("node:fs"), 1);
8039
8047
  var import_node_path8 = __toESM(require("node:path"), 1);
8040
- function isValidRuntimeVersion(value) {
8041
- return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
8042
- }
8043
8048
  function listInstalledRuntimes(product) {
8044
8049
  try {
8045
8050
  return import_node_fs8.default.readdirSync(product.runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
@@ -13576,6 +13581,7 @@ function compileReplacementModule(input) {
13576
13581
  return code.slice(token.start + 1, token.end - 1);
13577
13582
  };
13578
13583
  const bridgeNames = /* @__PURE__ */ new Map();
13584
+ const bareSpecifiers = /* @__PURE__ */ new Set();
13579
13585
  const declarations = [];
13580
13586
  let needsDefaultInterop = false;
13581
13587
  const bridgeFor = (specifier) => {
@@ -13676,6 +13682,7 @@ function compileReplacementModule(input) {
13676
13682
  if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isPeachKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
13677
13683
  throw unsupportedSpecifier(specifier);
13678
13684
  }
13685
+ bareSpecifiers.add(specifier);
13679
13686
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
13680
13687
  const replacement = bindings.map((binding) => {
13681
13688
  if (binding.imported === null) return `const ${binding.local} = ${bridge};`;
@@ -13698,6 +13705,7 @@ function compileReplacementModule(input) {
13698
13705
  const preamble = declarations.join(" ");
13699
13706
  return {
13700
13707
  code: preamble ? `${preamble} ${out}` : out,
13708
+ bareSpecifiers: [...bareSpecifiers],
13701
13709
  sourceMap: { ...sourceMap, sourcesContent: [input.source] }
13702
13710
  };
13703
13711
  }
@@ -13721,7 +13729,7 @@ function sendJavaScript(req, res, source) {
13721
13729
  });
13722
13730
  res.end(req.method === "HEAD" ? void 0 : source);
13723
13731
  }
13724
- function resolveLocalImport(fromFile, specifier) {
13732
+ function resolveReplacementModuleFile(fromFile, specifier) {
13725
13733
  const base = import_node_path23.default.resolve(import_node_path23.default.dirname(fromFile), specifier);
13726
13734
  const candidates = [
13727
13735
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
@@ -13835,7 +13843,10 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
13835
13843
  // so the token, cache key and runtime packages carry over.
13836
13844
  localModuleUrl: (specifier) => {
13837
13845
  const local = new URL(url.href);
13838
- local.searchParams.set("path", resolveLocalImport(targetPath, specifier));
13846
+ local.searchParams.set(
13847
+ "path",
13848
+ resolveReplacementModuleFile(targetPath, specifier)
13849
+ );
13839
13850
  return `${local.pathname}${local.search}`;
13840
13851
  }
13841
13852
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (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.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (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.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (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;
@@ -34,7 +34,8 @@ var replacement_module_handler_exports = {};
34
34
  __export(replacement_module_handler_exports, {
35
35
  REPLACEMENT_MODULE_ROUTE: () => REPLACEMENT_MODULE_ROUTE,
36
36
  handleReplacementModuleRequest: () => handleReplacementModuleRequest,
37
- isReplacementModuleRequestUrl: () => isReplacementModuleRequestUrl
37
+ isReplacementModuleRequestUrl: () => isReplacementModuleRequestUrl,
38
+ resolveReplacementModuleFile: () => resolveReplacementModuleFile
38
39
  });
39
40
  module.exports = __toCommonJS(replacement_module_handler_exports);
40
41
  var import_node_fs = require("node:fs");
@@ -218,6 +219,7 @@ function compileReplacementModule(input) {
218
219
  return code.slice(token.start + 1, token.end - 1);
219
220
  };
220
221
  const bridgeNames = /* @__PURE__ */ new Map();
222
+ const bareSpecifiers = /* @__PURE__ */ new Set();
221
223
  const declarations = [];
222
224
  let needsDefaultInterop = false;
223
225
  const bridgeFor = (specifier) => {
@@ -318,6 +320,7 @@ function compileReplacementModule(input) {
318
320
  if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isPeachKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
319
321
  throw unsupportedSpecifier(specifier);
320
322
  }
323
+ bareSpecifiers.add(specifier);
321
324
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
322
325
  const replacement = bindings.map((binding) => {
323
326
  if (binding.imported === null) return `const ${binding.local} = ${bridge};`;
@@ -340,6 +343,7 @@ function compileReplacementModule(input) {
340
343
  const preamble = declarations.join(" ");
341
344
  return {
342
345
  code: preamble ? `${preamble} ${out}` : out,
346
+ bareSpecifiers: [...bareSpecifiers],
343
347
  sourceMap: { ...sourceMap, sourcesContent: [input.source] }
344
348
  };
345
349
  }
@@ -371,7 +375,7 @@ function sendJavaScript(req, res, source) {
371
375
  });
372
376
  res.end(req.method === "HEAD" ? void 0 : source);
373
377
  }
374
- function resolveLocalImport(fromFile, specifier) {
378
+ function resolveReplacementModuleFile(fromFile, specifier) {
375
379
  const base = import_node_path.default.resolve(import_node_path.default.dirname(fromFile), specifier);
376
380
  const candidates = [
377
381
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
@@ -485,7 +489,10 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
485
489
  // so the token, cache key and runtime packages carry over.
486
490
  localModuleUrl: (specifier) => {
487
491
  const local = new URL(url.href);
488
- local.searchParams.set("path", resolveLocalImport(targetPath, specifier));
492
+ local.searchParams.set(
493
+ "path",
494
+ resolveReplacementModuleFile(targetPath, specifier)
495
+ );
489
496
  return `${local.pathname}${local.search}`;
490
497
  }
491
498
  });
@@ -508,5 +515,6 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
508
515
  0 && (module.exports = {
509
516
  REPLACEMENT_MODULE_ROUTE,
510
517
  handleReplacementModuleRequest,
511
- isReplacementModuleRequestUrl
518
+ isReplacementModuleRequestUrl,
519
+ resolveReplacementModuleFile
512
520
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.757 | (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;