rnxsim 0.1.403 → 0.1.405

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 (53) hide show
  1. package/README.md +17 -4
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/agent-identity.cjs +1 -1
  5. package/dist-lib/agent-sessions.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cli-constants.cjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/config.cjs +1 -1
  22. package/dist-lib/detox/index.cjs +1 -1
  23. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  24. package/dist-lib/home-paths.cjs +1 -1
  25. package/dist-lib/host/bridge-host.cjs +1 -1
  26. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  27. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  28. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  29. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  30. package/dist-lib/host/websocket-proxy.cjs +1 -1
  31. package/dist-lib/index.cjs +30 -6
  32. package/dist-lib/jump-to-source-babel.cjs +1 -1
  33. package/dist-lib/menu.cjs +1 -1
  34. package/dist-lib/menu.mjs +1 -1
  35. package/dist-lib/metro-fingerprint-registry.cjs +186 -0
  36. package/dist-lib/metro-fingerprint-registry.mjs +156 -0
  37. package/dist-lib/metro-production-bundle.cjs +66 -17
  38. package/dist-lib/metro-production-bundle.mjs +62 -15
  39. package/dist-lib/metro.cjs +30 -6
  40. package/dist-lib/profiles.cjs +1 -1
  41. package/dist-lib/public-brand.cjs +1 -1
  42. package/dist-lib/react-native-host-modules.cjs +1 -1
  43. package/dist-lib/react-native-host-modules.mjs +1 -1
  44. package/dist-lib/render-mode.cjs +1 -1
  45. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  46. package/dist-lib/sdk.cjs +1 -1
  47. package/dist-lib/sdk.mjs +1 -1
  48. package/dist-lib/skills.cjs +56 -24
  49. package/dist-lib/vite.cjs +1 -1
  50. package/package.json +8 -1
  51. package/src/metro-fingerprint-registry.ts +302 -0
  52. package/src/metro-plugin.ts +47 -4
  53. package/src/metro-production-bundle.ts +94 -16
package/README.md CHANGED
@@ -386,10 +386,14 @@ development Electron build against the same user-data directory may ask for
386
386
  one-time Keychain approval. `RNX_NO_OPEN=1` keeps the server headless. The
387
387
  Metro wrapper also has three independent non-window opt-ins.
388
388
  `devServer` serves the RNX shell from the Metro process. `productionBundles`
389
- appends Metro's exact module-ID-to-source-path map to every production bundle,
390
- as a trailing `globalThis.__sootsimModulePaths = { ... }` assignment.
391
- `developmentBundles` appends the same identity to every ordinary development
392
- bundle while keeping `__DEV__`, verbose module names, and the source map.
389
+ appends Metro's exact module identity to every production bundle, as a trailing
390
+ `globalThis.__sootsimModulePaths = { ... }` assignment. The versioned value
391
+ contains the module-ID-to-source-path map and the incoming bare logical
392
+ specifiers Metro resolved for each module. Logical specifiers keep identity
393
+ exact when a custom resolver maps a host package such as `react` outside
394
+ `node_modules`. `developmentBundles` appends the same identity to every
395
+ ordinary development bundle while keeping `__DEV__`, verbose module names, and
396
+ the source map.
393
397
 
394
398
  That footer is the only change. Metro drops the fourth `__d` argument when
395
399
  `dev` is false, so a production bundle names none of its modules, and RNX needs
@@ -398,6 +402,15 @@ load time. Resolution, transforms, minification, and the source map stay the
398
402
  app's own, so the annotated bundle is the bundle you ship: the footer assigns
399
403
  one unused global on a device, and Hermes drops it during bytecode compilation.
400
404
 
405
+ RNX also accepts an ordinary, unannotated Metro production JavaScript bundle.
406
+ That path reports identity as `inferred` and matches package graph fingerprints
407
+ from a separately updated, integrity-checked registry. It is deliberately less
408
+ strong than the plugin path: ambiguous packages stay unknown, every unknown
409
+ module receives a nonmatching synthetic name, and React must be identified
410
+ exactly or the load stops before app code runs. Hermes bytecode is not a
411
+ supported input; pass RNX the JavaScript bundle produced before Hermes
412
+ compilation. Use `productionBundles: true` when exact identity is required.
413
+
401
414
  ```js
402
415
  module.exports = withRNX(config, { productionBundles: true })
403
416
 
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_DEFAULT_MS = 500;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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;
@@ -3501,6 +3501,7 @@ var import_path4 = __toESM(require("path"), 1);
3501
3501
 
3502
3502
  // src/metro-production-bundle.ts
3503
3503
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
3504
+ var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
3504
3505
  var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
3505
3506
  function detachRNXMetroSourceMapUrl(bundleText) {
3506
3507
  const trimmedEnd = bundleText.replace(/\s+$/, "");
@@ -3511,13 +3512,13 @@ ${RNXSIM_METRO_SOURCE_MAP_COMMENT}`);
3511
3512
  if (url.includes("\n")) return { source: bundleText, sourceMappingUrl: null };
3512
3513
  return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
3513
3514
  }
3514
- function createRNXMetroModulePathsFooter(modulePaths) {
3515
- const payload = JSON.stringify(modulePaths).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
3515
+ function createRNXMetroModuleIdentityFooter(identity) {
3516
+ const payload = JSON.stringify(identity).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
3516
3517
  return `
3517
3518
  ${RNXSIM_METRO_MODULE_PATHS_PREFIX}${payload};`;
3518
3519
  }
3519
- function appendRNXMetroModulePathsFooter(bundleText, modulePaths) {
3520
- const footer = createRNXMetroModulePathsFooter(modulePaths);
3520
+ function appendRNXMetroModuleIdentityFooter(bundleText, identity) {
3521
+ const footer = createRNXMetroModuleIdentityFooter(identity);
3521
3522
  const detached = detachRNXMetroSourceMapUrl(bundleText);
3522
3523
  return detached.sourceMappingUrl === null ? bundleText + footer : `${detached.source}${footer}
3523
3524
  ${RNXSIM_METRO_SOURCE_MAP_COMMENT}${detached.sourceMappingUrl}`;
@@ -3567,7 +3568,30 @@ function appendRNXModulePaths(result, graph, options, projectRoot) {
3567
3568
  if (Object.keys(modulePaths).length !== dependencies.size) {
3568
3569
  throw new Error("rnxsim: bundle module IDs were not unique");
3569
3570
  }
3570
- return typeof result === "string" ? appendRNXMetroModulePathsFooter(result, modulePaths) : { ...result, code: appendRNXMetroModulePathsFooter(result.code, modulePaths) };
3571
+ const specifiersByModuleId = /* @__PURE__ */ new Map();
3572
+ for (const module2 of dependencies.values()) {
3573
+ for (const [dependencyKey, dependency] of module2.dependencies ?? []) {
3574
+ const specifier = dependency.data?.name ?? dependencyKey;
3575
+ if (specifier.length === 0 || specifier.startsWith(".") || specifier.startsWith("/") || typeof dependency.absolutePath !== "string") {
3576
+ continue;
3577
+ }
3578
+ const moduleId = String(createModuleId(dependency.absolutePath));
3579
+ if (!Object.prototype.hasOwnProperty.call(modulePaths, moduleId)) continue;
3580
+ const found = specifiersByModuleId.get(moduleId);
3581
+ if (found) found.add(specifier);
3582
+ else specifiersByModuleId.set(moduleId, /* @__PURE__ */ new Set([specifier]));
3583
+ }
3584
+ }
3585
+ const logicalSpecifiers = Object.fromEntries(
3586
+ [...specifiersByModuleId].sort(([left], [right]) => Number(left) - Number(right)).map(([moduleId, specifiers]) => [moduleId, [...specifiers].sort()])
3587
+ );
3588
+ const identity = {
3589
+ version: RNX_METRO_MODULE_IDENTITY_VERSION,
3590
+ identitySource: "rnx-plugin",
3591
+ modulePaths,
3592
+ logicalSpecifiers
3593
+ };
3594
+ return typeof result === "string" ? appendRNXMetroModuleIdentityFooter(result, identity) : { ...result, code: appendRNXMetroModuleIdentityFooter(result.code, identity) };
3571
3595
  }
3572
3596
  function withRNX(config, options = {}) {
3573
3597
  if (!options.devServer && !options.open && !options.productionBundles && !options.developmentBundles) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (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.403 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.405 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "rnx";
@@ -0,0 +1,186 @@
1
+ /*! rnx v0.1.405 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/metro-fingerprint-registry.ts
23
+ var metro_fingerprint_registry_exports = {};
24
+ __export(metro_fingerprint_registry_exports, {
25
+ RNX_METRO_FINGERPRINT_MAX_PAYLOAD_BYTES: () => RNX_METRO_FINGERPRINT_MAX_PAYLOAD_BYTES,
26
+ RNX_METRO_FINGERPRINT_MAX_POINTER_BYTES: () => RNX_METRO_FINGERPRINT_MAX_POINTER_BYTES,
27
+ RNX_METRO_FINGERPRINT_POINTER_PATH: () => RNX_METRO_FINGERPRINT_POINTER_PATH,
28
+ RNX_METRO_FINGERPRINT_SCHEMA_VERSION: () => RNX_METRO_FINGERPRINT_SCHEMA_VERSION,
29
+ parseRNXMetroFingerprintPointer: () => parseRNXMetroFingerprintPointer,
30
+ parseRNXMetroFingerprintRegistry: () => parseRNXMetroFingerprintRegistry
31
+ });
32
+ module.exports = __toCommonJS(metro_fingerprint_registry_exports);
33
+ var RNX_METRO_FINGERPRINT_SCHEMA_VERSION = 2;
34
+ var RNX_METRO_FINGERPRINT_POINTER_PATH = "/compile/metro-fingerprints.json";
35
+ var RNX_METRO_FINGERPRINT_MAX_POINTER_BYTES = 16 * 1024;
36
+ var RNX_METRO_FINGERPRINT_MAX_PAYLOAD_BYTES = 8 * 1024 * 1024;
37
+ function isRecord(value) {
38
+ return typeof value === "object" && value !== null && !Array.isArray(value);
39
+ }
40
+ function isSha256(value) {
41
+ return typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
42
+ }
43
+ function readStringArray(value) {
44
+ if (!Array.isArray(value) || !value.every((entry) => typeof entry === "string")) {
45
+ return null;
46
+ }
47
+ const entries = [...value];
48
+ if (new Set(entries).size !== entries.length || entries.some((entry, index) => index > 0 && entries[index - 1] >= entry)) {
49
+ return null;
50
+ }
51
+ return entries;
52
+ }
53
+ function parseRNXMetroFingerprintPointer(value) {
54
+ if (!isRecord(value)) return null;
55
+ const { schemaVersion, revision, integrity, bytes, payloadUrl } = value;
56
+ if (schemaVersion !== RNX_METRO_FINGERPRINT_SCHEMA_VERSION || !isSha256(revision) || !isSha256(integrity) || typeof bytes !== "number" || !Number.isSafeInteger(bytes) || bytes < 1 || typeof payloadUrl !== "string" || payloadUrl.length === 0) {
57
+ return null;
58
+ }
59
+ return { schemaVersion, revision, integrity, bytes, payloadUrl };
60
+ }
61
+ function parseRNXMetroFingerprintRegistry(value) {
62
+ if (!isRecord(value)) return null;
63
+ const { schemaVersion, revision } = value;
64
+ if (schemaVersion !== RNX_METRO_FINGERPRINT_SCHEMA_VERSION || !isSha256(revision) || !Array.isArray(value.atoms) || !Array.isArray(value.templates) || !isRecord(value.candidatesByFactoryDigest) || !isRecord(value.candidatesByDiscriminator)) {
65
+ return null;
66
+ }
67
+ const atoms = [];
68
+ for (const atomValue of value.atoms) {
69
+ if (!isRecord(atomValue)) return null;
70
+ const exports2 = readStringArray(atomValue.exports);
71
+ const literals = readStringArray(atomValue.literals);
72
+ if (typeof atomValue.key !== "string" || atomValue.key.length === 0 || !exports2 || !literals || typeof atomValue.dependencyArity !== "number" || !Number.isSafeInteger(atomValue.dependencyArity) || atomValue.dependencyArity < 0 || !isSha256(atomValue.factoryDigest)) {
73
+ return null;
74
+ }
75
+ atoms.push({
76
+ key: atomValue.key,
77
+ exports: exports2,
78
+ literals,
79
+ dependencyArity: atomValue.dependencyArity,
80
+ factoryDigest: atomValue.factoryDigest
81
+ });
82
+ }
83
+ const templates = [];
84
+ for (const templateValue of value.templates) {
85
+ if (!isRecord(templateValue) || typeof templateValue.packageName !== "string" || templateValue.packageName.length === 0 || typeof templateValue.packageVersion !== "string" || templateValue.packageVersion.length === 0 || !isSha256(templateValue.sourceIntegrity) || typeof templateValue.profile !== "string" || templateValue.profile.length === 0 || templateValue.platform !== "ios" && templateValue.platform !== "android" || !Array.isArray(templateValue.nodes) || templateValue.nodes.length === 0 || !Array.isArray(templateValue.roots) || templateValue.roots.length === 0) {
86
+ return null;
87
+ }
88
+ const nodes = [];
89
+ for (const nodeValue of templateValue.nodes) {
90
+ if (!isRecord(nodeValue) || typeof nodeValue.atom !== "number" || !Number.isSafeInteger(nodeValue.atom) || nodeValue.atom < 0 || nodeValue.atom >= atoms.length || !Array.isArray(nodeValue.internalDependencies) || nodeValue.landmarkPath !== void 0 && (typeof nodeValue.landmarkPath !== "string" || nodeValue.landmarkPath.length === 0)) {
91
+ return null;
92
+ }
93
+ const internalDependencies = [];
94
+ const positions = /* @__PURE__ */ new Set();
95
+ for (const edgeValue of nodeValue.internalDependencies) {
96
+ if (!isRecord(edgeValue) || typeof edgeValue.position !== "number" || !Number.isSafeInteger(edgeValue.position) || edgeValue.position < 0 || positions.has(edgeValue.position) || typeof edgeValue.node !== "number" || !Number.isSafeInteger(edgeValue.node) || edgeValue.node < 0 || edgeValue.node >= templateValue.nodes.length) {
97
+ return null;
98
+ }
99
+ positions.add(edgeValue.position);
100
+ internalDependencies.push({
101
+ position: edgeValue.position,
102
+ node: edgeValue.node
103
+ });
104
+ }
105
+ internalDependencies.sort((left, right) => left.position - right.position);
106
+ nodes.push({
107
+ atom: nodeValue.atom,
108
+ internalDependencies,
109
+ ...typeof nodeValue.landmarkPath === "string" ? { landmarkPath: nodeValue.landmarkPath } : {}
110
+ });
111
+ }
112
+ const roots = [];
113
+ for (const rootValue of templateValue.roots) {
114
+ if (!isRecord(rootValue) || typeof rootValue.node !== "number" || !Number.isSafeInteger(rootValue.node) || rootValue.node < 0 || rootValue.node >= nodes.length || !nodes[rootValue.node].landmarkPath) {
115
+ return null;
116
+ }
117
+ roots.push({ node: rootValue.node });
118
+ }
119
+ templates.push({
120
+ packageName: templateValue.packageName,
121
+ packageVersion: templateValue.packageVersion,
122
+ sourceIntegrity: templateValue.sourceIntegrity,
123
+ profile: templateValue.profile,
124
+ platform: templateValue.platform,
125
+ nodes,
126
+ roots
127
+ });
128
+ }
129
+ const candidatesByFactoryDigest = {};
130
+ for (const [factoryDigest, candidateValues] of Object.entries(
131
+ value.candidatesByFactoryDigest
132
+ )) {
133
+ if (!isSha256(factoryDigest) || !Array.isArray(candidateValues)) return null;
134
+ const candidates = [];
135
+ for (const candidateValue of candidateValues) {
136
+ if (!isRecord(candidateValue) || typeof candidateValue.template !== "number" || !Number.isSafeInteger(candidateValue.template) || candidateValue.template < 0 || candidateValue.template >= templates.length || typeof candidateValue.root !== "number" || !Number.isSafeInteger(candidateValue.root) || candidateValue.root < 0 || candidateValue.root >= templates[candidateValue.template].roots.length) {
137
+ return null;
138
+ }
139
+ const template = templates[candidateValue.template];
140
+ const root = template.roots[candidateValue.root];
141
+ if (atoms[template.nodes[root.node].atom].factoryDigest !== factoryDigest) {
142
+ return null;
143
+ }
144
+ candidates.push({
145
+ template: candidateValue.template,
146
+ root: candidateValue.root
147
+ });
148
+ }
149
+ candidatesByFactoryDigest[factoryDigest] = candidates;
150
+ }
151
+ const candidatesByDiscriminator = {};
152
+ for (const [discriminator, candidateValues] of Object.entries(
153
+ value.candidatesByDiscriminator
154
+ )) {
155
+ if (!/^(?:e|l|ea|la|el|ela):[a-f0-9]{16}$/.test(discriminator)) return null;
156
+ if (!Array.isArray(candidateValues) || candidateValues.length === 0) return null;
157
+ const candidates = [];
158
+ for (const candidateValue of candidateValues) {
159
+ if (!isRecord(candidateValue) || typeof candidateValue.template !== "number" || !Number.isSafeInteger(candidateValue.template) || candidateValue.template < 0 || candidateValue.template >= templates.length || typeof candidateValue.root !== "number" || !Number.isSafeInteger(candidateValue.root) || candidateValue.root < 0 || candidateValue.root >= templates[candidateValue.template].roots.length) {
160
+ return null;
161
+ }
162
+ candidates.push({
163
+ template: candidateValue.template,
164
+ root: candidateValue.root
165
+ });
166
+ }
167
+ candidatesByDiscriminator[discriminator] = candidates;
168
+ }
169
+ return {
170
+ schemaVersion,
171
+ revision,
172
+ atoms,
173
+ templates,
174
+ candidatesByFactoryDigest,
175
+ candidatesByDiscriminator
176
+ };
177
+ }
178
+ // Annotate the CommonJS export names for ESM import in node:
179
+ 0 && (module.exports = {
180
+ RNX_METRO_FINGERPRINT_MAX_PAYLOAD_BYTES,
181
+ RNX_METRO_FINGERPRINT_MAX_POINTER_BYTES,
182
+ RNX_METRO_FINGERPRINT_POINTER_PATH,
183
+ RNX_METRO_FINGERPRINT_SCHEMA_VERSION,
184
+ parseRNXMetroFingerprintPointer,
185
+ parseRNXMetroFingerprintRegistry
186
+ });