peachsim 0.1.755 → 0.1.756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/cli/app-config.ts +4 -29
  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/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.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 +88 -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 +47 -36
  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 +13 -5
  34. package/dist-lib/host/websocket-proxy.cjs +1 -1
  35. package/dist-lib/index.cjs +2551 -2220
  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/kotlin-host.cjs +1 -1
  39. package/dist-lib/menu.cjs +1 -1
  40. package/dist-lib/menu.mjs +1 -1
  41. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  43. package/dist-lib/metro-production-bundle.cjs +1 -1
  44. package/dist-lib/metro-production-bundle.mjs +1 -1
  45. package/dist-lib/metro.cjs +914 -584
  46. package/dist-lib/native-app-identity.cjs +1 -1
  47. package/dist-lib/native-app-identity.mjs +1 -1
  48. package/dist-lib/native-firebase-metadata.cjs +1 -1
  49. package/dist-lib/native-firebase-metadata.mjs +1 -1
  50. package/dist-lib/plist.cjs +1 -1
  51. package/dist-lib/plist.mjs +1 -1
  52. package/dist-lib/profiles.cjs +1 -1
  53. package/dist-lib/public-brand.cjs +1 -1
  54. package/dist-lib/react-native-host-modules.cjs +1 -1
  55. package/dist-lib/react-native-host-modules.mjs +1 -1
  56. package/dist-lib/render-mode.cjs +1 -1
  57. package/dist-lib/scripts/dev-server-scanner.cjs +4 -4
  58. package/dist-lib/sdk.cjs +1 -1
  59. package/dist-lib/sdk.mjs +1 -1
  60. package/dist-lib/skills.cjs +94 -69
  61. package/dist-lib/swift-compile.cjs +1 -1
  62. package/dist-lib/swift-compile.mjs +1 -1
  63. package/dist-lib/swift-package.cjs +1 -1
  64. package/dist-lib/swift-package.mjs +1 -1
  65. package/dist-lib/swift-submit.cjs +1 -1
  66. package/dist-lib/swift-submit.mjs +1 -1
  67. package/dist-lib/swift-toolchain.cjs +1 -1
  68. package/dist-lib/swift.cjs +1 -1
  69. package/dist-lib/vite-swift.cjs +1 -1
  70. package/dist-lib/vite.cjs +10 -4
  71. package/package.json +1 -1
  72. package/src/config.ts +92 -0
  73. package/src/configured-bundle-producer.ts +110 -0
  74. package/src/host/replacement-module-handler.ts +8 -2
  75. 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.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-firebase-metadata.ts
4
4
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plist from "plist";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (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.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -542,7 +542,7 @@ var MAX_CHILD_DEPTH = 8;
542
542
  var MAX_PLIST_FILES = 32;
543
543
  var MAX_SPECIFIERS = 512;
544
544
  var settingsBundleCache = /* @__PURE__ */ new Map();
545
- function isRecord(value) {
545
+ function isRecord2(value) {
546
546
  return typeof value === "object" && value !== null && !Array.isArray(value);
547
547
  }
548
548
  function optionalString(value) {
@@ -671,7 +671,7 @@ async function parsePlistRecord(path) {
671
671
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
672
672
  const source = await (0, import_promises.readFile)(path, "utf8");
673
673
  const parsed = parsePlistSource(source);
674
- return isRecord(parsed) ? parsed : null;
674
+ return isRecord2(parsed) ? parsed : null;
675
675
  } catch {
676
676
  return null;
677
677
  }
@@ -707,7 +707,7 @@ function normalizeMultiValue(raw, key, title) {
707
707
  };
708
708
  }
709
709
  async function normalizeSpecifier(raw, context) {
710
- if (!isRecord(raw)) return null;
710
+ if (!isRecord2(raw)) return null;
711
711
  if (context.budget.specifiers >= MAX_SPECIFIERS) return null;
712
712
  const type = requiredString(raw.Type);
713
713
  if (!type) return null;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (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.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -19326,7 +19326,40 @@ var init_backend_origin = __esm({
19326
19326
  }
19327
19327
  });
19328
19328
 
19329
+ // ../contrast-runtime-delivery/src/version.ts
19330
+ function isValidRuntimeVersion(value) {
19331
+ return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
19332
+ }
19333
+ var init_version = __esm({
19334
+ "../contrast-runtime-delivery/src/version.ts"() {
19335
+ "use strict";
19336
+ }
19337
+ });
19338
+
19339
+ // src/is-record.ts
19340
+ function isRecord(value) {
19341
+ return typeof value === "object" && value !== null && !Array.isArray(value);
19342
+ }
19343
+ var init_is_record = __esm({
19344
+ "src/is-record.ts"() {
19345
+ "use strict";
19346
+ }
19347
+ });
19348
+
19329
19349
  // src/config.ts
19350
+ function isPeachConfig(value) {
19351
+ if (!isRecord(value)) return false;
19352
+ return (value.runtimeVersion === void 0 || typeof value.runtimeVersion === "string" && value.runtimeVersion === value.runtimeVersion.trim() && isValidRuntimeVersion(value.runtimeVersion)) && [
19353
+ "modules",
19354
+ "turboModules",
19355
+ "nativeModules",
19356
+ "nativeViews",
19357
+ "env",
19358
+ "network",
19359
+ "settings",
19360
+ "initialState"
19361
+ ].every((key) => value[key] === void 0 || isRecord(value[key]));
19362
+ }
19330
19363
  function hasOwnKeys(value) {
19331
19364
  return !!value && Object.keys(value).length > 0;
19332
19365
  }
@@ -19371,6 +19404,8 @@ var PEACH_CONFIG_QUERY_PARAM;
19371
19404
  var init_config = __esm({
19372
19405
  "src/config.ts"() {
19373
19406
  "use strict";
19407
+ init_version();
19408
+ init_is_record();
19374
19409
  PEACH_CONFIG_QUERY_PARAM = "peachConfig";
19375
19410
  }
19376
19411
  });
@@ -19691,7 +19726,7 @@ var init_plist = __esm({
19691
19726
  });
19692
19727
 
19693
19728
  // src/settings-bundle.ts
19694
- function isRecord(value) {
19729
+ function isRecord2(value) {
19695
19730
  return typeof value === "object" && value !== null && !Array.isArray(value);
19696
19731
  }
19697
19732
  function optionalString(value) {
@@ -19820,7 +19855,7 @@ async function parsePlistRecord(path33) {
19820
19855
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
19821
19856
  const source = await (0, import_promises.readFile)(path33, "utf8");
19822
19857
  const parsed = parsePlistSource(source);
19823
- return isRecord(parsed) ? parsed : null;
19858
+ return isRecord2(parsed) ? parsed : null;
19824
19859
  } catch {
19825
19860
  return null;
19826
19861
  }
@@ -19856,7 +19891,7 @@ function normalizeMultiValue(raw2, key, title) {
19856
19891
  };
19857
19892
  }
19858
19893
  async function normalizeSpecifier(raw2, context) {
19859
- if (!isRecord(raw2)) return null;
19894
+ if (!isRecord2(raw2)) return null;
19860
19895
  if (context.budget.specifiers >= MAX_SPECIFIERS) return null;
19861
19896
  const type = requiredString(raw2.Type);
19862
19897
  if (!type) return null;
@@ -21454,23 +21489,13 @@ var init_internal_child = __esm({
21454
21489
  }
21455
21490
  });
21456
21491
 
21457
- // src/is-record.ts
21458
- function isRecord2(value) {
21459
- return typeof value === "object" && value !== null && !Array.isArray(value);
21460
- }
21461
- var init_is_record = __esm({
21462
- "src/is-record.ts"() {
21463
- "use strict";
21464
- }
21465
- });
21466
-
21467
21492
  // src/swift-distribution-contract.ts
21468
21493
  function swiftDistributionHost(platform, arch) {
21469
21494
  const host2 = `${platform}-${arch}`;
21470
21495
  return SWIFT_DISTRIBUTION_HOSTS.find((candidate) => candidate === host2) ?? null;
21471
21496
  }
21472
21497
  function parseSwiftDistributionManifest(value) {
21473
- if (!isRecord2(value) || typeof value.id !== "string" || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || !isStrings(value.modules) || !isStrings(value.objects) || !isStrings(value.link) || !isRecord2(value.files) || !Object.values(value.files).every((sha) => typeof sha === "string") || typeof value.host !== "string" || !isStrings(value.plugins)) {
21498
+ if (!isRecord(value) || typeof value.id !== "string" || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || !isStrings(value.modules) || !isStrings(value.objects) || !isStrings(value.link) || !isRecord(value.files) || !Object.values(value.files).every((sha) => typeof sha === "string") || typeof value.host !== "string" || !isStrings(value.plugins)) {
21474
21499
  throw new Error(`invalid Swift distribution ${SWIFT_DISTRIBUTION_MANIFEST}`);
21475
21500
  }
21476
21501
  const host2 = SWIFT_DISTRIBUTION_HOSTS.find((candidate) => candidate === value.host);
@@ -21492,13 +21517,13 @@ function parseSwiftDistributionManifest(value) {
21492
21517
  };
21493
21518
  }
21494
21519
  function parseSwiftDistributionLock(value) {
21495
- if (!isRecord2(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || typeof value.source !== "string" || !isRecord2(value.hosts)) {
21520
+ if (!isRecord(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.release !== "string" || typeof value.wasmSdkId !== "string" || typeof value.wasmSdkUrl !== "string" || typeof value.wasmSdkChecksum !== "string" || typeof value.source !== "string" || !isRecord(value.hosts)) {
21496
21521
  throw new Error("invalid Swift distribution lock");
21497
21522
  }
21498
21523
  const hosts = value.hosts;
21499
21524
  const entry = (host2) => {
21500
21525
  const item = hosts[host2];
21501
- if (!isRecord2(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
21526
+ if (!isRecord(item) || typeof item.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(item.sha256) || typeof item.size !== "number") {
21502
21527
  throw new Error(`invalid Swift distribution lock entry for ${host2}`);
21503
21528
  }
21504
21529
  return { sha256: item.sha256, size: item.size };
@@ -23168,9 +23193,6 @@ var init_swift_compile = __esm({
23168
23193
  });
23169
23194
 
23170
23195
  // ../contrast-runtime-delivery/src/product.ts
23171
- function isValidRuntimeVersion(value) {
23172
- return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
23173
- }
23174
23196
  function listInstalledRuntimes(product) {
23175
23197
  try {
23176
23198
  return import_node_fs8.default.readdirSync(product.runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
@@ -23208,6 +23230,7 @@ var init_product = __esm({
23208
23230
  "use strict";
23209
23231
  import_node_fs8 = __toESM(require("node:fs"), 1);
23210
23232
  import_node_path8 = __toESM(require("node:path"), 1);
23233
+ init_version();
23211
23234
  }
23212
23235
  });
23213
23236
 
@@ -29181,6 +29204,7 @@ function compileReplacementModule(input) {
29181
29204
  return code.slice(token.start + 1, token.end - 1);
29182
29205
  };
29183
29206
  const bridgeNames = /* @__PURE__ */ new Map();
29207
+ const bareSpecifiers = /* @__PURE__ */ new Set();
29184
29208
  const declarations = [];
29185
29209
  let needsDefaultInterop = false;
29186
29210
  const bridgeFor = (specifier) => {
@@ -29281,6 +29305,7 @@ function compileReplacementModule(input) {
29281
29305
  if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isPeachKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
29282
29306
  throw unsupportedSpecifier(specifier);
29283
29307
  }
29308
+ bareSpecifiers.add(specifier);
29284
29309
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
29285
29310
  const replacement = bindings.map((binding) => {
29286
29311
  if (binding.imported === null) return `const ${binding.local} = ${bridge};`;
@@ -29303,6 +29328,7 @@ function compileReplacementModule(input) {
29303
29328
  const preamble = declarations.join(" ");
29304
29329
  return {
29305
29330
  code: preamble ? `${preamble} ${out}` : out,
29331
+ bareSpecifiers: [...bareSpecifiers],
29306
29332
  sourceMap: { ...sourceMap, sourcesContent: [input.source] }
29307
29333
  };
29308
29334
  }
@@ -29343,7 +29369,7 @@ function sendJavaScript(req, res, source) {
29343
29369
  });
29344
29370
  res.end(req.method === "HEAD" ? void 0 : source);
29345
29371
  }
29346
- function resolveLocalImport(fromFile, specifier) {
29372
+ function resolveReplacementModuleFile(fromFile, specifier) {
29347
29373
  const base = import_node_path23.default.resolve(import_node_path23.default.dirname(fromFile), specifier);
29348
29374
  const candidates = [
29349
29375
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
@@ -29457,7 +29483,10 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
29457
29483
  // so the token, cache key and runtime packages carry over.
29458
29484
  localModuleUrl: (specifier) => {
29459
29485
  const local = new URL(url.href);
29460
- local.searchParams.set("path", resolveLocalImport(targetPath, specifier));
29486
+ local.searchParams.set(
29487
+ "path",
29488
+ resolveReplacementModuleFile(targetPath, specifier)
29489
+ );
29461
29490
  return `${local.pathname}${local.search}`;
29462
29491
  }
29463
29492
  });
@@ -31794,7 +31823,8 @@ async function readOrInferModuleIdentity(bundle, mode, inferModuleIdentity) {
31794
31823
  }
31795
31824
  async function buildRnxCloudArtifact(bundle, options = {}) {
31796
31825
  const mode = options.mode ?? "production";
31797
- const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(bundle);
31826
+ const configured = (0, import_config2.detachPeachBundleConfigFooter)(bundle);
31827
+ const firebase = (0, import_native_firebase_metadata.detachNativeFirebaseFooter)(configured.source);
31798
31828
  const nativeIdentity = (0, import_native_app_identity.detachNativeAppIdentityFooter)(firebase.source);
31799
31829
  const identity = await readOrInferModuleIdentity(
31800
31830
  nativeIdentity.source,
@@ -31823,7 +31853,7 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
31823
31853
  })
31824
31854
  ]);
31825
31855
  const body = pieces.map((piece) => piece.code).join("\n");
31826
- const code = body + (nativeIdentity.identity ? (0, import_native_app_identity.createNativeAppIdentityFooter)(nativeIdentity.identity) : "") + (firebase.config ? (0, import_native_firebase_metadata.createNativeFirebaseFooter)(firebase.config) : "") + (0, import_metro_production_bundle.createRNXMetroModuleIdentityFooter)({
31856
+ const code = body + (nativeIdentity.identity ? (0, import_native_app_identity.createNativeAppIdentityFooter)(nativeIdentity.identity) : "") + (firebase.config ? (0, import_native_firebase_metadata.createNativeFirebaseFooter)(firebase.config) : "") + (configured.configuredBundle ? (0, import_config2.createPeachBundleConfigFooter)(configured.configuredBundle) : "") + (0, import_metro_production_bundle.createRNXMetroModuleIdentityFooter)({
31827
31857
  version: identity.version,
31828
31858
  identitySource: identity.identitySource,
31829
31859
  modulePaths: identity.modulePaths,
@@ -31886,10 +31916,11 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
31886
31916
  }
31887
31917
  };
31888
31918
  }
31889
- var import_metro_production_bundle, import_native_app_identity, import_native_firebase_metadata, import_terser, MODULE_PATHS_REQUIRED, SOURCE_MAP_REQUIRED, MINIFY_OPTIONS;
31919
+ var import_config2, import_metro_production_bundle, import_native_app_identity, import_native_firebase_metadata, import_terser, MODULE_PATHS_REQUIRED, SOURCE_MAP_REQUIRED, MINIFY_OPTIONS;
31890
31920
  var init_metroCloudArtifact = __esm({
31891
31921
  "../contrast-bundler/src/metroCloudArtifact.ts"() {
31892
31922
  "use strict";
31923
+ import_config2 = require("peachsim/config");
31893
31924
  import_metro_production_bundle = require("peachsim/metro-production-bundle");
31894
31925
  import_native_app_identity = require("peachsim/native-app-identity");
31895
31926
  import_native_firebase_metadata = require("peachsim/native-firebase-metadata");
@@ -33038,7 +33069,7 @@ function parseCloudSession(encoded) {
33038
33069
  } catch {
33039
33070
  throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
33040
33071
  }
33041
- if (!isRecord2(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
33072
+ if (!isRecord(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
33042
33073
  throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
33043
33074
  }
33044
33075
  const apiOrigin = parsed.apiOrigin;
@@ -33047,7 +33078,7 @@ function parseCloudSession(encoded) {
33047
33078
  }
33048
33079
  const platform = parsed.platform === "ios" || parsed.platform === "android" ? parsed.platform : void 0;
33049
33080
  const device = typeof parsed.device === "string" ? parsed.device : void 0;
33050
- const artifact = isRecord2(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
33081
+ const artifact = isRecord(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
33051
33082
  sha256: parsed.artifact.sha256,
33052
33083
  bytes: typeof parsed.artifact.bytes === "number" ? parsed.artifact.bytes : void 0
33053
33084
  } : void 0;
@@ -33203,8 +33234,8 @@ function failureSentence(text) {
33203
33234
  } catch {
33204
33235
  return null;
33205
33236
  }
33206
- if (!isRecord2(parsed)) return null;
33207
- if (isRecord2(parsed.error) && typeof parsed.error.message === "string") {
33237
+ if (!isRecord(parsed)) return null;
33238
+ if (isRecord(parsed.error) && typeof parsed.error.message === "string") {
33208
33239
  const code = typeof parsed.error.code === "string" && parsed.error.code ? ` [${parsed.error.code}]` : "";
33209
33240
  return `${parsed.error.message}${code}`;
33210
33241
  }
@@ -33649,16 +33680,16 @@ async function produceArtifact(bundlePath, maxBytes, command, assetPolicy) {
33649
33680
  };
33650
33681
  }
33651
33682
  function readCreateResponse(value, expectedBytes, expectedSha256) {
33652
- if (!isRecord2(value)) throw new Error("remote simulator create returned invalid JSON");
33683
+ if (!isRecord(value)) throw new Error("remote simulator create returned invalid JSON");
33653
33684
  const artifactId = `sha256:${expectedSha256}`;
33654
- const isExpectedArtifact = (artifact) => isRecord2(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
33685
+ const isExpectedArtifact = (artifact) => isRecord(artifact) && artifact.id === artifactId && typeof artifact.bytes === "number" && Number.isInteger(artifact.bytes) && artifact.bytes === expectedBytes;
33655
33686
  const boxId = value.boxId;
33656
33687
  const boxToken = value.token;
33657
33688
  const simulator = value.simulator;
33658
- const simId = isRecord2(simulator) ? simulator.simId : null;
33659
- const claim = isRecord2(simulator) ? simulator.claim : null;
33660
- const simulatorToken = isRecord2(simulator) ? simulator.token : null;
33661
- if (typeof boxId !== "string" || !boxId || value.size !== "nano" || typeof boxToken !== "string" || !boxToken || !isExpectedArtifact(value.artifact) || !isRecord2(simulator) || typeof simId !== "string" || !simId || !isExpectedArtifact(simulator.artifact) || !isRecord2(claim) || typeof claim.id !== "string" || !claim.id || typeof claim.expiresAt !== "number" || typeof simulatorToken !== "string" || !simulatorToken) {
33689
+ const simId = isRecord(simulator) ? simulator.simId : null;
33690
+ const claim = isRecord(simulator) ? simulator.claim : null;
33691
+ const simulatorToken = isRecord(simulator) ? simulator.token : null;
33692
+ if (typeof boxId !== "string" || !boxId || value.size !== "nano" || typeof boxToken !== "string" || !boxToken || !isExpectedArtifact(value.artifact) || !isRecord(simulator) || typeof simId !== "string" || !simId || !isExpectedArtifact(simulator.artifact) || !isRecord(claim) || typeof claim.id !== "string" || !claim.id || typeof claim.expiresAt !== "number" || typeof simulatorToken !== "string" || !simulatorToken) {
33662
33693
  throw new Error("remote simulator create returned an invalid receipt");
33663
33694
  }
33664
33695
  return {
@@ -33864,7 +33895,7 @@ var init_cloud_client = __esm({
33864
33895
  } catch {
33865
33896
  throw new Error("remote simulator command returned unreadable JSON");
33866
33897
  }
33867
- if (!isRecord2(parsed) || parsed.id !== body.id) {
33898
+ if (!isRecord(parsed) || parsed.id !== body.id) {
33868
33899
  throw new Error("remote simulator command returned an invalid command receipt");
33869
33900
  }
33870
33901
  if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
@@ -33935,7 +33966,7 @@ var init_cloud_client = __esm({
33935
33966
  } catch {
33936
33967
  throw new Error("box command returned unreadable JSON");
33937
33968
  }
33938
- if (!isRecord2(parsed) || parsed.id !== id) {
33969
+ if (!isRecord(parsed) || parsed.id !== id) {
33939
33970
  throw new Error("box command returned an invalid command receipt");
33940
33971
  }
33941
33972
  if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
@@ -33982,8 +34013,8 @@ async function sendToBox(options) {
33982
34013
  simId: options.simId,
33983
34014
  code: '(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'
33984
34015
  });
33985
- const bundleUrl = isRecord2(captured) ? captured.bundleUrl : null;
33986
- if (!isRecord2(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
34016
+ const bundleUrl = isRecord(captured) ? captured.bundleUrl : null;
34017
+ if (!isRecord(captured) || typeof bundleUrl !== "string" || !bundleUrl) {
33987
34018
  throw new Error(
33988
34019
  "send to box needs a simulator running an app: this one has no bundle loaded"
33989
34020
  );
@@ -33999,7 +34030,7 @@ async function sendToBox(options) {
33999
34030
  const storage = dumped;
34000
34031
  const created = await createCloudBox({
34001
34032
  bundlePath: toRNXProductionBundleUrl(bundleUrl),
34002
- device: options.device ?? cloudDevice(isRecord2(captured.deviceSpec) ? captured.deviceSpec.model : null),
34033
+ device: options.device ?? cloudDevice(isRecord(captured.deviceSpec) ? captured.deviceSpec.model : null),
34003
34034
  authorization: options.authorization,
34004
34035
  accountId: options.accountId,
34005
34036
  apiOrigin: options.apiOrigin,
@@ -37462,8 +37493,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37462
37493
  let config = {};
37463
37494
  const appJsonPath = import_node_path29.default.join(projectRoot, "app.json");
37464
37495
  const appJson = import_node_fs29.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs29.default.readFileSync(appJsonPath, "utf8")) : null;
37465
- const staticExpo = isRecord2(appJson) && (isRecord2(appJson.expo) || [appJson.ios, appJson.android].some(
37466
- (value) => isRecord2(value) && typeof value.googleServicesFile === "string"
37496
+ const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
37497
+ (value) => isRecord(value) && typeof value.googleServicesFile === "string"
37467
37498
  ));
37468
37499
  const dynamicExpo = [
37469
37500
  "app.config.js",
@@ -37474,16 +37505,16 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37474
37505
  if (staticExpo || dynamicExpo) {
37475
37506
  const require5 = (0, import_node_module2.createRequire)(import_node_path29.default.join(projectRoot, "package.json"));
37476
37507
  const configModule = require5("@expo/config");
37477
- if (!isRecord2(configModule) || typeof configModule.getConfig !== "function")
37508
+ if (!isRecord(configModule) || typeof configModule.getConfig !== "function")
37478
37509
  throw new Error("Expo native configuration is unavailable.");
37479
37510
  const resolved = Reflect.apply(configModule.getConfig, configModule, [
37480
37511
  projectRoot,
37481
37512
  { skipSDKVersionRequirement: true }
37482
37513
  ]);
37483
- config = isRecord2(resolved) && isRecord2(resolved.exp) ? resolved.exp : {};
37514
+ config = isRecord(resolved) && isRecord(resolved.exp) ? resolved.exp : {};
37484
37515
  }
37485
37516
  const ios = config.ios;
37486
- if (platforms.includes("ios") && (!isRecord2(ios) || typeof ios.googleServicesFile !== "string")) {
37517
+ if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
37487
37518
  const iosRoot = import_node_path29.default.join(projectRoot, "ios");
37488
37519
  if (import_node_fs29.default.existsSync(iosRoot)) {
37489
37520
  const projects2 = import_node_fs29.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
@@ -37547,14 +37578,14 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37547
37578
  }
37548
37579
  for (const platform of platforms) {
37549
37580
  const native = config[platform];
37550
- if (!isRecord2(native) || typeof native.googleServicesFile !== "string") continue;
37581
+ if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
37551
37582
  try {
37552
37583
  const source = import_node_fs29.default.readFileSync(
37553
37584
  import_node_path29.default.resolve(projectRoot, native.googleServicesFile),
37554
37585
  "utf8"
37555
37586
  );
37556
37587
  const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
37557
- if (!isRecord2(parsed)) throw new Error("Invalid Google services file.");
37588
+ if (!isRecord(parsed)) throw new Error("Invalid Google services file.");
37558
37589
  if (platform === "ios") {
37559
37590
  result[platform] = {
37560
37591
  apiKey: parsed.API_KEY,
@@ -37569,31 +37600,31 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
37569
37600
  deepLinkUrlScheme: parsed.REVERSED_CLIENT_ID
37570
37601
  };
37571
37602
  } else {
37572
- const project = isRecord2(parsed.project_info) ? parsed.project_info : {};
37603
+ const project = isRecord(parsed.project_info) ? parsed.project_info : {};
37573
37604
  const clients = Array.isArray(parsed.client) ? parsed.client : [];
37574
37605
  const client = clients.find((value) => {
37575
- if (!isRecord2(value) || !isRecord2(value.client_info)) return false;
37606
+ if (!isRecord(value) || !isRecord(value.client_info)) return false;
37576
37607
  const android = value.client_info.android_client_info;
37577
- return isRecord2(android) && android.package_name === native.package;
37608
+ return isRecord(android) && android.package_name === native.package;
37578
37609
  });
37579
- if (!isRecord2(client) || !isRecord2(client.client_info))
37610
+ if (!isRecord(client) || !isRecord(client.client_info))
37580
37611
  throw new Error("No Google services client matches the Android package.");
37581
37612
  const apiKeys = Array.isArray(client.api_key) ? client.api_key : [];
37582
37613
  const apiKey = apiKeys.find(
37583
- (value) => isRecord2(value) && typeof value.current_key === "string"
37614
+ (value) => isRecord(value) && typeof value.current_key === "string"
37584
37615
  );
37585
37616
  const oauthClients = Array.isArray(client.oauth_client) ? client.oauth_client : [];
37586
37617
  const oauth = oauthClients.find(
37587
- (value) => isRecord2(value) && value.client_type === 3
37618
+ (value) => isRecord(value) && value.client_type === 3
37588
37619
  );
37589
37620
  result[platform] = {
37590
- apiKey: isRecord2(apiKey) ? apiKey.current_key : void 0,
37621
+ apiKey: isRecord(apiKey) ? apiKey.current_key : void 0,
37591
37622
  appId: client.client_info.mobilesdk_app_id,
37592
37623
  projectId: project.project_id,
37593
37624
  databaseURL: project.firebase_url,
37594
37625
  storageBucket: project.storage_bucket,
37595
37626
  messagingSenderId: project.project_number,
37596
- clientId: isRecord2(oauth) ? oauth.client_id : void 0
37627
+ clientId: isRecord(oauth) ? oauth.client_id : void 0
37597
37628
  };
37598
37629
  }
37599
37630
  } catch (error) {
@@ -37834,15 +37865,6 @@ var init_app_project = __esm({
37834
37865
  });
37835
37866
 
37836
37867
  // cli/app-config.ts
37837
- function isOptionalRecord(value) {
37838
- return value === void 0 || value !== null && typeof value === "object" && !Array.isArray(value);
37839
- }
37840
- function isPeachConfig(value) {
37841
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
37842
- const runtimeVersion = Reflect.get(value, "runtimeVersion");
37843
- const network = Reflect.get(value, "network");
37844
- return (runtimeVersion === void 0 || typeof runtimeVersion === "string" && runtimeVersion === runtimeVersion.trim() && isValidRuntimeVersion(runtimeVersion)) && isOptionalRecord(Reflect.get(value, "modules")) && isOptionalRecord(Reflect.get(value, "turboModules")) && isOptionalRecord(Reflect.get(value, "nativeModules")) && isOptionalRecord(Reflect.get(value, "nativeViews")) && isOptionalRecord(Reflect.get(value, "env")) && isOptionalRecord(network) && isOptionalRecord(Reflect.get(value, "settings")) && isOptionalRecord(Reflect.get(value, "initialState"));
37845
- }
37846
37868
  function resolveFileEntries(entries, configDir) {
37847
37869
  if (!entries) return entries;
37848
37870
  return Object.fromEntries(
@@ -37867,6 +37889,9 @@ async function loadRNXAppConfig(project) {
37867
37889
  try {
37868
37890
  const jiti = (0, import_jiti.createJiti)(__sootsim_import_meta_url, {
37869
37891
  interopDefault: true,
37892
+ // metro serializes repeatedly in one process; edits must reload the config.
37893
+ moduleCache: false,
37894
+ tryNative: false,
37870
37895
  alias: {
37871
37896
  [`${rnxPublicBrand.packageName}/config`]: require2.resolve(
37872
37897
  `${rnxPublicBrand.packageName}/config`
@@ -37893,8 +37918,8 @@ var init_app_config = __esm({
37893
37918
  "use strict";
37894
37919
  import_node_module3 = require("node:module");
37895
37920
  import_node_path32 = __toESM(require("node:path"), 1);
37896
- init_src();
37897
37921
  import_jiti = require("jiti");
37922
+ init_config();
37898
37923
  init_public_brand();
37899
37924
  init_app_project();
37900
37925
  require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
@@ -40581,10 +40606,10 @@ var init_linux_browser_libs_lock = __esm({
40581
40606
 
40582
40607
  // cli/drivers/linux-browser-libs.ts
40583
40608
  function isLockPackage(value) {
40584
- return isRecord2(value) && typeof value.name === "string" && typeof value.version === "string" && typeof value.url === "string" && typeof value.sha256 === "string" && /^[a-f0-9]{64}$/.test(value.sha256) && typeof value.size === "number";
40609
+ return isRecord(value) && typeof value.name === "string" && typeof value.version === "string" && typeof value.url === "string" && typeof value.sha256 === "string" && /^[a-f0-9]{64}$/.test(value.sha256) && typeof value.size === "number";
40585
40610
  }
40586
40611
  function parseLinuxBrowserLibsLock(value) {
40587
- if (!isRecord2(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.suite !== "string" || !isRecord2(value.arches)) {
40612
+ if (!isRecord(value) || typeof value.id !== "string" || !/^[a-f0-9]{16}$/.test(value.id) || typeof value.suite !== "string" || !isRecord(value.arches)) {
40588
40613
  throw new Error("invalid linux browser library lock");
40589
40614
  }
40590
40615
  const { x64, arm64 } = value.arches;
@@ -40691,7 +40716,7 @@ function resolvePlaywright() {
40691
40716
  const modulePath = requireFromRoot.resolve(spec);
40692
40717
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
40693
40718
  const parsed = JSON.parse((0, import_node_fs34.readFileSync)(packageJsonPath, "utf8"));
40694
- if (!isRecord2(parsed) || typeof parsed.version !== "string") continue;
40719
+ if (!isRecord(parsed) || typeof parsed.version !== "string") continue;
40695
40720
  const corePackagePath = (0, import_node_module6.createRequire)(modulePath).resolve(
40696
40721
  "playwright-core/package.json"
40697
40722
  );
@@ -40761,7 +40786,7 @@ function probeBrowser(resolved, env) {
40761
40786
  }
40762
40787
  try {
40763
40788
  const parsed = JSON.parse(probe2.stdout);
40764
- if (!isRecord2(parsed) || typeof parsed.executablePath !== "string" || typeof parsed.exists !== "boolean") {
40789
+ if (!isRecord(parsed) || typeof parsed.executablePath !== "string" || typeof parsed.exists !== "boolean") {
40765
40790
  throw new Error("probe returned an invalid result");
40766
40791
  }
40767
40792
  return {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (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.755 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.756 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;