peachsim 0.1.2441 → 0.1.2457

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 (170) hide show
  1. package/README.md +4 -49
  2. package/cli/app-catalog.ts +8 -7
  3. package/cli/app-stubs.ts +98 -70
  4. package/cli/cloud-box-artifact.ts +2 -5
  5. package/cli/cloud-client.ts +12 -1
  6. package/cli/commands/box.ts +41 -2
  7. package/cli/commands/compat.ts +5 -3
  8. package/cli/commands/cpu-profile.ts +11 -14
  9. package/cli/commands/diagnose.ts +5 -18
  10. package/cli/commands/inspect/describe.ts +4 -8
  11. package/cli/commands/maestro-generate.ts +4 -8
  12. package/cli/commands/mode.ts +3 -19
  13. package/cli/commands/perf.ts +3 -19
  14. package/cli/commands/permissions.ts +2 -6
  15. package/cli/commands/platform.ts +22 -14
  16. package/cli/commands/react.ts +7 -21
  17. package/cli/commands/record-three.ts +6 -10
  18. package/cli/commands/record.ts +38 -62
  19. package/cli/commands/screenshot-command.ts +8 -25
  20. package/cli/commands/storage.ts +4 -16
  21. package/cli/commands/three-mode.ts +6 -10
  22. package/cli/outbound-endpoints.ts +4 -5
  23. package/cli/parse-args.ts +45 -0
  24. package/cli/remote-metro.ts +1 -1
  25. package/cli/remote-simulators.ts +5 -1
  26. package/cli/send-to-box.ts +3 -1
  27. package/detox/index.ts +20 -1
  28. package/dist-lib/agent-daemon-client.cjs +2 -2
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +1 -1
  31. package/dist-lib/auth/shared-session.cjs +1 -1
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +2 -2
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +5 -5
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +3 -3
  40. package/dist-lib/bundle-channel.cjs +240 -316
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +3 -3
  43. package/dist-lib/cloud-contract.cjs +14 -1
  44. package/dist-lib/cloud-contract.mjs +5 -3
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +2 -2
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +7 -7
  49. package/dist-lib/config.cjs +1 -6
  50. package/dist-lib/config.mjs +5 -9
  51. package/dist-lib/detox/index.cjs +17 -5
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/esm-chunks/{acorn-FRQNHKFC.mjs → acorn-73XUBXBT.mjs} +3 -3
  54. package/dist-lib/esm-chunks/{chunk-IRMC5BCX.mjs → chunk-7V2QJGVI.mjs} +1 -1
  55. package/dist-lib/esm-chunks/{chunk-PMGJ7FLI.mjs → chunk-BHQEYJAF.mjs} +1 -1
  56. package/dist-lib/esm-chunks/{chunk-BAYRN7ZL.mjs → chunk-DSPFMVBM.mjs} +1 -1
  57. package/dist-lib/esm-chunks/{chunk-4HEUXQGM.mjs → chunk-GA73RJSG.mjs} +4 -4
  58. package/dist-lib/esm-chunks/{chunk-ABMB3G7I.mjs → chunk-IGBAFWZ3.mjs} +3 -3
  59. package/dist-lib/esm-chunks/{chunk-ZCMAKWHN.mjs → chunk-IKZDUGT6.mjs} +1 -1
  60. package/dist-lib/esm-chunks/{chunk-VAQJQDWI.mjs → chunk-IP5ZV36U.mjs} +1 -1
  61. package/dist-lib/esm-chunks/{chunk-O4EOBXAP.mjs → chunk-KGHQ4GK2.mjs} +1 -1
  62. package/dist-lib/esm-chunks/{chunk-4BZ3Z3IQ.mjs → chunk-KY63O76W.mjs} +2 -2
  63. package/dist-lib/esm-chunks/{chunk-QYYJESMK.mjs → chunk-LJ74MO6Y.mjs} +1 -1
  64. package/dist-lib/esm-chunks/{chunk-DJMWTW2B.mjs → chunk-LJX42YVT.mjs} +1 -1
  65. package/dist-lib/esm-chunks/{chunk-XO5GX4PI.mjs → chunk-O4KAW2JJ.mjs} +1 -1
  66. package/dist-lib/esm-chunks/{chunk-6A6JEVIF.mjs → chunk-OIFM356B.mjs} +1 -1
  67. package/dist-lib/esm-chunks/{chunk-NPLEBOWJ.mjs → chunk-P63DPATT.mjs} +1 -1
  68. package/dist-lib/esm-chunks/{chunk-VCAJFWZD.mjs → chunk-SCCOZKCP.mjs} +1 -1
  69. package/dist-lib/esm-chunks/{chunk-QUBR7LHU.mjs → chunk-TAZL253K.mjs} +41 -15
  70. package/dist-lib/esm-chunks/{chunk-ORYS5CC4.mjs → chunk-UBXCWZL3.mjs} +1 -1
  71. package/dist-lib/esm-chunks/{chunk-4ZRMJ5YO.mjs → chunk-ZQWWO33G.mjs} +14 -2
  72. package/dist-lib/esm-chunks/{metro-layout-parser-AUAVE5VL.mjs → metro-layout-parser-HNQRTPVE.mjs} +3 -3
  73. package/dist-lib/expo-swift-bundle.cjs +197 -336
  74. package/dist-lib/expo-swift-metadata.cjs +1 -1
  75. package/dist-lib/expo-swift-metadata.mjs +7 -7
  76. package/dist-lib/home-paths.cjs +1 -1
  77. package/dist-lib/host/bridge-host.cjs +276 -381
  78. package/dist-lib/host/fetch-proxy-handler.cjs +35 -43
  79. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  80. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  81. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  82. package/dist-lib/host/websocket-proxy.cjs +4 -2
  83. package/dist-lib/index.cjs +2 -105
  84. package/dist-lib/kotlin-host.cjs +6 -4
  85. package/dist-lib/menu.cjs +1 -1
  86. package/dist-lib/menu.mjs +3 -3
  87. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  88. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  89. package/dist-lib/metro-production-bundle.cjs +1 -1
  90. package/dist-lib/metro-production-bundle.mjs +4 -4
  91. package/dist-lib/native-app-identity-project.cjs +2 -2
  92. package/dist-lib/native-app-identity-project.mjs +12 -12
  93. package/dist-lib/native-app-identity.cjs +1 -1
  94. package/dist-lib/native-app-identity.mjs +6 -6
  95. package/dist-lib/native-firebase-metadata.cjs +1 -1
  96. package/dist-lib/native-firebase-metadata.mjs +3 -3
  97. package/dist-lib/pdfium-raster.cjs +1 -1
  98. package/dist-lib/pdfium-raster.mjs +2 -2
  99. package/dist-lib/plist.cjs +1 -1
  100. package/dist-lib/plist.mjs +3 -3
  101. package/dist-lib/profiles.cjs +1 -1
  102. package/dist-lib/public-brand.cjs +1 -1
  103. package/dist-lib/public-origins-lib-esm.json +64 -64
  104. package/dist-lib/public-origins-lib-static.json +1 -1
  105. package/dist-lib/public-origins-lib.json +107 -85
  106. package/dist-lib/react-native-host-modules.cjs +1 -1
  107. package/dist-lib/react-native-host-modules.mjs +2 -2
  108. package/dist-lib/reap-browser.cjs +1 -1
  109. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  110. package/dist-lib/sdk.cjs +1 -1
  111. package/dist-lib/sdk.mjs +7 -7
  112. package/dist-lib/skills.cjs +310 -310
  113. package/dist-lib/swift-compile.cjs +37 -11
  114. package/dist-lib/swift-compile.mjs +8 -8
  115. package/dist-lib/swift-package.cjs +1 -1
  116. package/dist-lib/swift-package.mjs +3 -3
  117. package/dist-lib/swift-submit.cjs +1 -1
  118. package/dist-lib/swift-submit.mjs +5 -5
  119. package/dist-lib/swift-toolchain.cjs +1 -1
  120. package/dist-lib/swift.cjs +1 -1
  121. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  122. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +14770 -0
  123. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +2790 -0
  124. package/dist-lib/vendor/acorn.cjs +1 -1
  125. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  126. package/dist-lib/vendor/ignore.cjs +1 -1
  127. package/dist-lib/vendor/magic-string.cjs +1 -1
  128. package/dist-lib/vendor/plist.cjs +1 -1
  129. package/dist-lib/vendor/prism.wasm +0 -0
  130. package/dist-lib/vendor/smol-toml.cjs +1 -1
  131. package/dist-lib/vendor/stream-json.cjs +1 -1
  132. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  133. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  134. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  135. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  136. package/dist-lib/vendor/sucrase.cjs +1 -1
  137. package/dist-lib/vendor/terser.cjs +1 -1
  138. package/dist-lib/vendor/valibot.cjs +1 -1
  139. package/dist-lib/vendor/ws.cjs +3710 -0
  140. package/dist-lib/vendor/zod.cjs +1 -1
  141. package/dist-lib/worklet-executable.cjs +1 -1
  142. package/dist-lib/worklet-executable.mjs +3 -3
  143. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +0 -3
  144. package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
  145. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
  146. package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +3 -1
  147. package/dist-types/packages/peach-engine/src/engine/text-paint.d.ts +1 -0
  148. package/dist-types/packages/peach-engine/src/engine/text-runs.d.ts +6 -1
  149. package/kotlin/sdk.tar.gz +0 -0
  150. package/package.json +22 -14
  151. package/skills/peach-setup/references/native-config.md +3 -3
  152. package/src/app-config.ts +7 -15
  153. package/src/cloud-contract.ts +35 -0
  154. package/src/config.ts +2 -6
  155. package/src/estree-walk.ts +13 -0
  156. package/src/host/network-policy.ts +4 -1
  157. package/src/index.ts +0 -1
  158. package/src/one-native-app-config.ts +14 -15
  159. package/src/podspec-prism.ts +7 -1
  160. package/src/process-group.ts +4 -1
  161. package/src/process-table.ts +6 -1
  162. package/src/swift-compile.ts +38 -8
  163. package/src/swift-host.ts +10 -4
  164. package/cli/commands/box/bundle-plane.ts +0 -154
  165. package/dist-lib/jump-to-source-babel.cjs +0 -131
  166. package/dist-lib/jump-to-source-native.cjs +0 -235
  167. package/src/java-static-imports.ts +0 -68
  168. package/src/jump-to-source-babel.ts +0 -143
  169. package/src/jump-to-source-native.ts +0 -200
  170. package/src/kotlin-jvm-sources.ts +0 -35
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2441 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2457 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -465,7 +465,8 @@ function readProcessTable(timeoutMs = 1e4, pid) {
465
465
  try {
466
466
  stat2 = (0, import_node_fs4.readFileSync)(`/proc/${name3}/stat`, "utf8");
467
467
  } catch (error) {
468
- if (error instanceof Error && "code" in error && error.code === "ENOENT") continue;
468
+ if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ESRCH"))
469
+ continue;
469
470
  throw error;
470
471
  }
471
472
  const fields = stat2.slice(stat2.lastIndexOf(")") + 2).trim().split(/\s+/);
@@ -701,7 +702,7 @@ function processesHaveExited(pids, pgid) {
701
702
  if (!mayExist) return true;
702
703
  const knownPids = new Set(pids);
703
704
  try {
704
- return !readProcessTable(FORCED_EXIT_TIMEOUT_MS).some(
705
+ return !readProcessTable(EXIT_SCAN_TIMEOUT_MS).some(
705
706
  (row) => (row.pgid === pgid || knownPids.has(row.pid)) && !row.zombie
706
707
  );
707
708
  } catch {
@@ -845,7 +846,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
845
846
  }
846
847
  if (inspectionError) throw inspectionError;
847
848
  }
848
- var import_node_child_process2, import_node_fs5, import_node_os3, import_node_path3, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
849
+ var import_node_child_process2, import_node_fs5, import_node_os3, import_node_path3, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, EXIT_SCAN_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
849
850
  var init_process_group = __esm({
850
851
  "src/process-group.ts"() {
851
852
  "use strict";
@@ -858,6 +859,7 @@ var init_process_group = __esm({
858
859
  init_process_table();
859
860
  GRACEFUL_TIMEOUT_MS = 3e3;
860
861
  FORCED_EXIT_TIMEOUT_MS = 1e3;
862
+ EXIT_SCAN_TIMEOUT_MS = 1e4;
861
863
  INSPECTION_TIMEOUT_MS = 1e4;
862
864
  FREEZE_GUARD_NAME = "process-freeze-guard";
863
865
  }
@@ -885,7 +887,7 @@ function runtimeTarballCacheName(product, version2) {
885
887
  return import_node_path4.default.posix.basename(product.tarballPath(version2));
886
888
  }
887
889
  function compareSemver(a, b) {
888
- const parse12 = (v7) => {
890
+ const parse14 = (v7) => {
889
891
  const hyphen = v7.indexOf("-");
890
892
  const core = hyphen >= 0 ? v7.slice(0, hyphen) : v7;
891
893
  const pre = hyphen >= 0 ? v7.slice(hyphen + 1) : "";
@@ -893,8 +895,8 @@ function compareSemver(a, b) {
893
895
  if (parts.some((n) => !Number.isFinite(n))) return [[Number.POSITIVE_INFINITY], v7];
894
896
  return [parts, pre];
895
897
  };
896
- const [an, ap] = parse12(a);
897
- const [bn, bp] = parse12(b);
898
+ const [an, ap] = parse14(a);
899
+ const [bn, bp] = parse14(b);
898
900
  for (let i = 0; i < Math.max(an.length, bn.length); i++) {
899
901
  const av = an[i] ?? 0;
900
902
  const bv = bn[i] ?? 0;
@@ -3074,7 +3076,9 @@ var init_pod_graph_specifications = __esm({
3074
3076
  function prism() {
3075
3077
  if (exports2) return exports2;
3076
3078
  const bytes = typeof __PEACH_PRISM_WASM__ === "string" ? Buffer.from(__PEACH_PRISM_WASM__, "base64") : import_node_fs15.default.readFileSync(
3077
- (0, import_node_module.createRequire)(__sootsim_import_meta_url).resolve("@ruby/prism/src/prism.wasm")
3079
+ (0, import_node_module.createRequire)(__sootsim_import_meta_url).resolve(
3080
+ true ? "peachsim/vendor/prism.wasm" : "@ruby/prism/src/prism.wasm"
3081
+ )
3078
3082
  );
3079
3083
  let memory = null;
3080
3084
  const EBADF = 8;
@@ -3121,7 +3125,7 @@ var init_podspec_prism = __esm({
3121
3125
  import_node_crypto6 = require("node:crypto");
3122
3126
  import_node_fs15 = __toESM(require("node:fs"), 1);
3123
3127
  import_node_module = require("node:module");
3124
- import_parsePrism = require("@ruby/prism/src/parsePrism.js");
3128
+ import_parsePrism = require("peachsim/vendor/@ruby/prism/src/parsePrism.js");
3125
3129
  RubySyntaxError = class extends Error {
3126
3130
  };
3127
3131
  exports2 = null;
@@ -5811,7 +5815,7 @@ var init_podspec_ruby = __esm({
5811
5815
  import_node_crypto7 = require("node:crypto");
5812
5816
  import_node_fs16 = __toESM(require("node:fs"), 1);
5813
5817
  import_node_path12 = __toESM(require("node:path"), 1);
5814
- N = __toESM(require("@ruby/prism/src/nodes.js"), 1);
5818
+ N = __toESM(require("peachsim/vendor/@ruby/prism/src/nodes.js"), 1);
5815
5819
  init_podspec_prism();
5816
5820
  UnsupportedRuby = class extends Error {
5817
5821
  };
@@ -16651,7 +16655,7 @@ var require_parse = __commonJS({
16651
16655
  var token;
16652
16656
  var key2;
16653
16657
  var root;
16654
- module2.exports = function parse12(text7, reviver) {
16658
+ module2.exports = function parse14(text7, reviver) {
16655
16659
  source = String(text7);
16656
16660
  parseState = "start";
16657
16661
  stack = [];
@@ -17707,10 +17711,10 @@ var require_stringify = __commonJS({
17707
17711
  // ../../node_modules/json5/lib/index.js
17708
17712
  var require_lib = __commonJS({
17709
17713
  "../../node_modules/json5/lib/index.js"(exports3, module2) {
17710
- var parse12 = require_parse();
17714
+ var parse14 = require_parse();
17711
17715
  var stringify4 = require_stringify();
17712
17716
  var JSON53 = {
17713
- parse: parse12,
17717
+ parse: parse14,
17714
17718
  stringify: stringify4
17715
17719
  };
17716
17720
  module2.exports = JSON53;
@@ -17727,7 +17731,7 @@ function isCollection(node) {
17727
17731
  }
17728
17732
  return false;
17729
17733
  }
17730
- function isNode(node) {
17734
+ function isNode2(node) {
17731
17735
  if (node && typeof node === "object")
17732
17736
  switch (node[NODE_TYPE]) {
17733
17737
  case ALIAS:
@@ -17770,7 +17774,7 @@ function visit(node, visitor) {
17770
17774
  }
17771
17775
  function visit_(key2, node, visitor, path142) {
17772
17776
  const ctrl = callVisitor(key2, node, visitor, path142);
17773
- if (isNode(ctrl) || isPair(ctrl)) {
17777
+ if (isNode2(ctrl) || isPair(ctrl)) {
17774
17778
  replaceNode(key2, path142, ctrl);
17775
17779
  return visit_(key2, ctrl, visitor, path142);
17776
17780
  }
@@ -17815,7 +17819,7 @@ async function visitAsync(node, visitor) {
17815
17819
  }
17816
17820
  async function visitAsync_(key2, node, visitor, path142) {
17817
17821
  const ctrl = await callVisitor(key2, node, visitor, path142);
17818
- if (isNode(ctrl) || isPair(ctrl)) {
17822
+ if (isNode2(ctrl) || isPair(ctrl)) {
17819
17823
  replaceNode(key2, path142, ctrl);
17820
17824
  return visitAsync_(key2, ctrl, visitor, path142);
17821
17825
  }
@@ -18061,10 +18065,10 @@ var init_directives = __esm({
18061
18065
  const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
18062
18066
  const tagEntries = Object.entries(this.tags);
18063
18067
  let tagNames;
18064
- if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
18068
+ if (doc && tagEntries.length > 0 && isNode2(doc.contents)) {
18065
18069
  const tags = {};
18066
18070
  visit(doc.contents, (_key, node) => {
18067
- if (isNode(node) && node.tag)
18071
+ if (isNode2(node) && node.tag)
18068
18072
  tags[node.tag] = true;
18069
18073
  });
18070
18074
  tagNames = Object.keys(tags);
@@ -18422,7 +18426,7 @@ function findTagObject(value, tagName, tags) {
18422
18426
  function createNode(value, tagName, ctx) {
18423
18427
  if (isDocument(value))
18424
18428
  value = value.contents;
18425
- if (isNode(value))
18429
+ if (isNode2(value))
18426
18430
  return value;
18427
18431
  if (isPair(value)) {
18428
18432
  const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
@@ -18531,7 +18535,7 @@ var init_Collection = __esm({
18531
18535
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
18532
18536
  if (schema4)
18533
18537
  copy.schema = schema4;
18534
- copy.items = copy.items.map((it) => isNode(it) || isPair(it) ? it.clone(schema4) : it);
18538
+ copy.items = copy.items.map((it) => isNode2(it) || isPair(it) ? it.clone(schema4) : it);
18535
18539
  if (this.range)
18536
18540
  copy.range = this.range.slice();
18537
18541
  return copy;
@@ -19150,7 +19154,7 @@ function stringify(item, ctx, onComment, onChompKeep) {
19150
19154
  }
19151
19155
  }
19152
19156
  let tagObj = void 0;
19153
- const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
19157
+ const node = isNode2(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
19154
19158
  tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
19155
19159
  const props = stringifyProps(node, tagObj, ctx);
19156
19160
  if (props.length > 0)
@@ -19173,12 +19177,12 @@ var init_stringify = __esm({
19173
19177
  // ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
19174
19178
  function stringifyPair({ key: key2, value }, ctx, onComment, onChompKeep) {
19175
19179
  const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
19176
- let keyComment = isNode(key2) && key2.comment || null;
19180
+ let keyComment = isNode2(key2) && key2.comment || null;
19177
19181
  if (simpleKeys) {
19178
19182
  if (keyComment) {
19179
19183
  throw new Error("With simple keys, key nodes cannot have comments");
19180
19184
  }
19181
- if (isCollection(key2) || !isNode(key2) && typeof key2 === "object") {
19185
+ if (isCollection(key2) || !isNode2(key2) && typeof key2 === "object") {
19182
19186
  const msg = "With simple keys, collection cannot be used as a key value";
19183
19187
  throw new Error(msg);
19184
19188
  }
@@ -19224,7 +19228,7 @@ ${indent2}:`;
19224
19228
  str3 += lineComment(str3, ctx.indent, commentString(keyComment));
19225
19229
  }
19226
19230
  let vsb, vcb, valueComment;
19227
- if (isNode(value)) {
19231
+ if (isNode2(value)) {
19228
19232
  vsb = !!value.spaceBefore;
19229
19233
  vcb = value.commentBefore;
19230
19234
  valueComment = value.comment;
@@ -19371,7 +19375,7 @@ var init_merge = __esm({
19371
19375
 
19372
19376
  // ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
19373
19377
  function addPairToJSMap(ctx, map2, { key: key2, value }) {
19374
- if (isNode(key2) && key2.addToJSMap)
19378
+ if (isNode2(key2) && key2.addToJSMap)
19375
19379
  key2.addToJSMap(ctx, map2, value);
19376
19380
  else if (isMergeKey(ctx, key2))
19377
19381
  addMergeToJSMap(ctx, map2, value);
@@ -19402,7 +19406,7 @@ function stringifyKey(key2, jsKey, ctx) {
19402
19406
  return "";
19403
19407
  if (typeof jsKey !== "object")
19404
19408
  return String(jsKey);
19405
- if (isNode(key2) && ctx?.doc) {
19409
+ if (isNode2(key2) && ctx?.doc) {
19406
19410
  const strCtx = createStringifyContext(ctx.doc, {});
19407
19411
  strCtx.anchors = /* @__PURE__ */ new Set();
19408
19412
  for (const node of ctx.anchors.keys())
@@ -19452,9 +19456,9 @@ var init_Pair = __esm({
19452
19456
  }
19453
19457
  clone(schema4) {
19454
19458
  let { key: key2, value } = this;
19455
- if (isNode(key2))
19459
+ if (isNode2(key2))
19456
19460
  key2 = key2.clone(schema4);
19457
- if (isNode(value))
19461
+ if (isNode2(value))
19458
19462
  value = value.clone(schema4);
19459
19463
  return new _Pair(key2, value);
19460
19464
  }
@@ -19483,14 +19487,14 @@ function stringifyBlockCollection({ comment, items: items2 }, ctx, { blockItemPr
19483
19487
  for (let i = 0; i < items2.length; ++i) {
19484
19488
  const item = items2[i];
19485
19489
  let comment2 = null;
19486
- if (isNode(item)) {
19490
+ if (isNode2(item)) {
19487
19491
  if (!chompKeep && item.spaceBefore)
19488
19492
  lines.push("");
19489
19493
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
19490
19494
  if (item.comment)
19491
19495
  comment2 = item.comment;
19492
19496
  } else if (isPair(item)) {
19493
- const ik = isNode(item.key) ? item.key : null;
19497
+ const ik = isNode2(item.key) ? item.key : null;
19494
19498
  if (ik) {
19495
19499
  if (!chompKeep && ik.spaceBefore)
19496
19500
  lines.push("");
@@ -19538,14 +19542,14 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
19538
19542
  for (let i = 0; i < items2.length; ++i) {
19539
19543
  const item = items2[i];
19540
19544
  let comment = null;
19541
- if (isNode(item)) {
19545
+ if (isNode2(item)) {
19542
19546
  if (item.spaceBefore)
19543
19547
  lines.push("");
19544
19548
  addCommentBefore(ctx, lines, item.commentBefore, false);
19545
19549
  if (item.comment)
19546
19550
  comment = item.comment;
19547
19551
  } else if (isPair(item)) {
19548
- const ik = isNode(item.key) ? item.key : null;
19552
+ const ik = isNode2(item.key) ? item.key : null;
19549
19553
  if (ik) {
19550
19554
  if (ik.spaceBefore)
19551
19555
  lines.push("");
@@ -19553,7 +19557,7 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
19553
19557
  if (ik.comment)
19554
19558
  reqNewline = true;
19555
19559
  }
19556
- const iv = isNode(item.value) ? item.value : null;
19560
+ const iv = isNode2(item.value) ? item.value : null;
19557
19561
  if (iv) {
19558
19562
  if (iv.comment)
19559
19563
  comment = iv.comment;
@@ -20903,7 +20907,7 @@ function stringifyDocument(doc, options) {
20903
20907
  let chompKeep = false;
20904
20908
  let contentComment = null;
20905
20909
  if (doc.contents) {
20906
- if (isNode(doc.contents)) {
20910
+ if (isNode2(doc.contents)) {
20907
20911
  if (doc.contents.spaceBefore && hasDirectives)
20908
20912
  lines.push("");
20909
20913
  if (doc.contents.commentBefore) {
@@ -21028,7 +21032,7 @@ var init_Document = __esm({
21028
21032
  if (this.directives)
21029
21033
  copy.directives = this.directives.clone();
21030
21034
  copy.schema = this.schema.clone();
21031
- copy.contents = isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
21035
+ copy.contents = isNode2(this.contents) ? this.contents.clone(copy.schema) : this.contents;
21032
21036
  if (this.range)
21033
21037
  copy.range = this.range.slice();
21034
21038
  return copy;
@@ -21961,7 +21965,7 @@ function composeCollection(CN2, ctx, token, props, onError) {
21961
21965
  }
21962
21966
  const coll = resolveCollection(CN2, ctx, token, onError, tagName, tag);
21963
21967
  const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
21964
- const node = isNode(res) ? res : new Scalar(res);
21968
+ const node = isNode2(res) ? res : new Scalar(res);
21965
21969
  node.range = coll.range;
21966
21970
  node.tag = tagName;
21967
21971
  if (tag?.format)
@@ -24845,7 +24849,7 @@ __export(dist_exports, {
24845
24849
  isCollection: () => isCollection,
24846
24850
  isDocument: () => isDocument,
24847
24851
  isMap: () => isMap,
24848
- isNode: () => isNode,
24852
+ isNode: () => isNode2,
24849
24853
  isPair: () => isPair,
24850
24854
  isScalar: () => isScalar,
24851
24855
  isSeq: () => isSeq,
@@ -26016,7 +26020,7 @@ function autolinkerAppleFlags(autolinkerManifest, appRoot) {
26016
26020
  return ["--platform", "ios"];
26017
26021
  }
26018
26022
  async function autolinkerResults(appRoot) {
26019
- const appRequire = (0, import_node_module5.createRequire)(import_node_path30.default.join(appRoot, "package.json"));
26023
+ const appRequire = (0, import_node_module6.createRequire)(import_node_path30.default.join(appRoot, "package.json"));
26020
26024
  let expoRoot;
26021
26025
  try {
26022
26026
  expoRoot = import_node_path30.default.dirname(appRequire.resolve("expo/package.json"));
@@ -26081,12 +26085,12 @@ async function expoAutolinkedPods(appRoot) {
26081
26085
  }))
26082
26086
  );
26083
26087
  }
26084
- var import_node_fs32, import_node_module5, import_node_path30;
26088
+ var import_node_fs32, import_node_module6, import_node_path30;
26085
26089
  var init_expo_autolinking = __esm({
26086
26090
  "src/expo-autolinking.ts"() {
26087
26091
  "use strict";
26088
26092
  import_node_fs32 = __toESM(require("node:fs"), 1);
26089
- import_node_module5 = require("node:module");
26093
+ import_node_module6 = require("node:module");
26090
26094
  import_node_path30 = __toESM(require("node:path"), 1);
26091
26095
  init_autolinker_process();
26092
26096
  init_is_record();
@@ -26170,7 +26174,7 @@ var init_swift_standin_digest = __esm({
26170
26174
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
26171
26175
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
26172
26176
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
26173
- STANDIN_SOURCE_DIGEST = true ? "f67788fcdc46df5ff4ec7efcc273b5c4e03ef3660ce824d2a0fecadb3e4df751" : standinSourceDigest();
26177
+ STANDIN_SOURCE_DIGEST = true ? "63118ef9a51a40246d1d92d46ba9262a11addaf6d84914f7e1b78d6ff3b9bf19" : standinSourceDigest();
26174
26178
  }
26175
26179
  });
26176
26180
 
@@ -40699,6 +40703,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
40699
40703
  }
40700
40704
  continue;
40701
40705
  }
40706
+ const textualIncludes = entries.map(([file]) => file).filter((file) => /\.(?:inc|inl|ipp|def)$/.test(file));
40702
40707
  native.set(target.name, {
40703
40708
  path: target.path,
40704
40709
  includeDirectory: import_node_path57.default.join(layout2.root, includes),
@@ -40706,7 +40711,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
40706
40711
  lateSources: late.map(([file]) => file.slice(prefix.length)),
40707
40712
  exclude: [
40708
40713
  ...late.map(([file]) => file.slice(prefix.length)),
40709
- ...entries.filter(([file]) => /\.(?:inc|inl|ipp|def)$/.test(file)).map(([file]) => file.slice(prefix.length))
40714
+ ...textualIncludes.map((file) => file.slice(prefix.length))
40710
40715
  ],
40711
40716
  ...late.length > 0 ? {
40712
40717
  late: {
@@ -40717,13 +40722,36 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
40717
40722
  }
40718
40723
  } : {}
40719
40724
  });
40720
- if (late.length > 0)
40721
- files2.set(
40722
- import_node_path57.default.join(layout2.root, target.path, "PeachSwiftImplementation/module.modulemap"),
40723
- `module ${swiftTargetModuleName(`${target.name}SwiftImplementation`)} { export * }
40724
- `
40725
+ if (late.length === 0) {
40726
+ const headers = import_node_path57.default.posix.join(target.path, target.publicHeadersPath ?? "include");
40727
+ const fragments = textualIncludes.filter(
40728
+ (file) => headers === "." || file.startsWith(`${headers}/`)
40725
40729
  );
40726
- if (late.length === 0 || entries.some(
40730
+ const name3 = swiftTargetModuleName(target.name);
40731
+ const map2 = import_node_path57.default.posix.join(headers, "module.modulemap");
40732
+ if (fragments.length > 0 && !Object.hasOwn(input.files, map2) && !files2.has(import_node_path57.default.join(layout2.root, map2)) && !Object.hasOwn(input.files, import_node_path57.default.posix.join(headers, `${name3}.h`)) && !Object.hasOwn(input.files, import_node_path57.default.posix.join(headers, name3, `${name3}.h`)))
40733
+ stageTargetFile(
40734
+ target.name,
40735
+ import_node_path57.default.join(layout2.root, map2),
40736
+ [
40737
+ `module ${name3} {`,
40738
+ ' umbrella "."',
40739
+ ...fragments.map(
40740
+ (file) => ` textual header ${JSON.stringify(import_node_path57.default.posix.relative(headers, file))}`
40741
+ ),
40742
+ " export *",
40743
+ "}",
40744
+ ""
40745
+ ].join("\n")
40746
+ );
40747
+ continue;
40748
+ }
40749
+ files2.set(
40750
+ import_node_path57.default.join(layout2.root, target.path, "PeachSwiftImplementation/module.modulemap"),
40751
+ `module ${swiftTargetModuleName(`${target.name}SwiftImplementation`)} { export * }
40752
+ `
40753
+ );
40754
+ if (entries.some(
40727
40755
  ([file, contents2]) => file.endsWith("/module.modulemap") && moduleMapName(contents2) === swiftTargetModuleName(target.name)
40728
40756
  ))
40729
40757
  continue;
@@ -43145,7 +43173,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
43145
43173
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
43146
43174
  MULTI_MANIFEST_VERSION = 72;
43147
43175
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
43148
- compilerSourceDigest = true ? "f691ad9847363fc601dda32d460b473efaac6c30948a278f162a896afa1df816" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
43176
+ compilerSourceDigest = true ? "82277b01523ae4b1fce8888e636cd6a98f714c692be322d3916352e5629be0f5" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
43149
43177
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
43150
43178
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
43151
43179
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -53038,12 +53066,12 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
53038
53066
  environment
53039
53067
  });
53040
53068
  }
53041
- var import_node_fs83, import_node_module8, import_node_path83, SDK_BEFORE_SCENE_REQUIREMENT;
53069
+ var import_node_fs83, import_node_module9, import_node_path83, SDK_BEFORE_SCENE_REQUIREMENT;
53042
53070
  var init_native_app_identity_project = __esm({
53043
53071
  "src/native-app-identity-project.ts"() {
53044
53072
  "use strict";
53045
53073
  import_node_fs83 = __toESM(require("node:fs"), 1);
53046
- import_node_module8 = require("node:module");
53074
+ import_node_module9 = require("node:module");
53047
53075
  import_node_path83 = __toESM(require("node:path"), 1);
53048
53076
  init_android_app_identity();
53049
53077
  init_is_record();
@@ -60663,11 +60691,14 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
60663
60691
  }
60664
60692
  for (const path142 of paths) {
60665
60693
  if (!isFlatResourceImage(path142)) continue;
60666
- const name3 = baseOf(path142).slice(0, -extOf(path142).length);
60694
+ const filename = baseOf(path142);
60695
+ const name3 = filename.slice(0, -extOf(filename).length);
60667
60696
  const { bundlePath, names } = namesFor(path142);
60668
60697
  if (name3 === "" || names.has(name3)) continue;
60669
60698
  names.add(name3);
60670
- table.push({ name: name3, file: path142, scale: flatScale(path142), bundlePath });
60699
+ const scaledFilename = filename.replace(/@[23]x(?=\.[^./]+$)/, "");
60700
+ const fileNames = (scaledFilename === filename ? [filename] : [filename, scaledFilename]).filter((lookup3) => !names.has(lookup3));
60701
+ table.push({ name: name3, file: path142, scale: flatScale(path142), bundlePath, fileNames });
60671
60702
  }
60672
60703
  return table;
60673
60704
  }
@@ -60797,13 +60828,13 @@ function templateElements(svg) {
60797
60828
  continue;
60798
60829
  }
60799
60830
  let [x, y] = offsets.at(-1) ?? [0, 0];
60800
- const transform5 = /transform="([^"]*)"/.exec(attributes)?.[1];
60801
- if (kind === "g" && transform5 !== void 0) {
60831
+ const transform6 = /transform="([^"]*)"/.exec(attributes)?.[1];
60832
+ if (kind === "g" && transform6 !== void 0) {
60802
60833
  const translate = /^\s*translate\(\s*([-0-9.]+)[\s,]*([-0-9.]*)\s*\)\s*$/.exec(
60803
- transform5
60834
+ transform6
60804
60835
  );
60805
60836
  const matrix = /^\s*matrix\(\s*1[\s,]+0[\s,]+0[\s,]+1[\s,]+([-0-9.]+)[\s,]+([-0-9.]+)\s*\)\s*$/.exec(
60806
- transform5
60837
+ transform6
60807
60838
  );
60808
60839
  const move = translate ?? matrix;
60809
60840
  if (!move) return null;
@@ -64976,10 +65007,10 @@ var require_packer_sync = __commonJS({
64976
65007
  var require_png_sync = __commonJS({
64977
65008
  "../../node_modules/pngjs/lib/png-sync.js"(exports3) {
64978
65009
  "use strict";
64979
- var parse12 = require_parser_sync();
65010
+ var parse14 = require_parser_sync();
64980
65011
  var pack = require_packer_sync();
64981
65012
  exports3.read = function(buffer, options) {
64982
- return parse12(buffer, options || {});
65013
+ return parse14(buffer, options || {});
64983
65014
  };
64984
65015
  exports3.write = function(png, options) {
64985
65016
  return pack(png, options);
@@ -65645,11 +65676,11 @@ do { try data.write(to: output) } catch { exit(7) }
65645
65676
  });
65646
65677
 
65647
65678
  // src/swift-standin-config.ts
65648
- var import_acorn, import_sucrase3;
65679
+ var import_acorn2, import_sucrase3;
65649
65680
  var init_swift_standin_config = __esm({
65650
65681
  "src/swift-standin-config.ts"() {
65651
65682
  "use strict";
65652
- import_acorn = require("peachsim/vendor/acorn");
65683
+ import_acorn2 = require("peachsim/vendor/acorn");
65653
65684
  import_sucrase3 = require("peachsim/vendor/sucrase");
65654
65685
  init_is_record();
65655
65686
  }
@@ -66967,7 +66998,7 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
66967
66998
  registered.set(`${sha2565}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
66968
66999
  }
66969
67000
  let imageBytes = 0;
66970
- for (const { name: name3, file, scale, bundlePath, renderingMode } of found2) {
67001
+ for (const { name: name3, file, scale, bundlePath, renderingMode, fileNames } of found2) {
66971
67002
  const disk = byRelative.get(file);
66972
67003
  if (!disk) continue;
66973
67004
  if (Object.keys(images).length >= limits.images) {
@@ -67006,12 +67037,15 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
67006
67037
  imageBytes += bytes.length;
67007
67038
  const hash = (0, import_node_crypto58.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
67008
67039
  const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
67009
- const variants = bundle[name3] ??= [];
67010
- variants.push({
67040
+ const variant2 = {
67011
67041
  uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
67012
67042
  scale: variantScale,
67013
67043
  ...renderingMode ? { renderingMode } : {}
67014
- });
67044
+ };
67045
+ for (const lookup3 of [name3, ...fileNames ?? []]) {
67046
+ const variants = bundle[lookup3] ??= [];
67047
+ variants.push(variant2);
67048
+ }
67015
67049
  table[bundlePath] = bundle;
67016
67050
  const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
67017
67051
  images[key2] = {
@@ -67026,6 +67060,9 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
67026
67060
  contentType: RESOURCE_CONTENT_TYPES[ext] ?? "application/octet-stream"
67027
67061
  });
67028
67062
  }
67063
+ for (const bundle of Object.values(table))
67064
+ for (const variants of Object.values(bundle))
67065
+ variants.sort((a, b) => a.scale - b.scale);
67029
67066
  for (const file of relative4) {
67030
67067
  if (file.endsWith(".colorset/Contents.json") || file.includes(".symbolset/"))
67031
67068
  watched.push(file);
@@ -68575,7 +68612,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
68575
68612
  const podsRoot = import_node_path105.default.dirname(app.cocoapods.manifestLock);
68576
68613
  const localPods = app.cocoapods.localPodspecs;
68577
68614
  const reactNativeRoot = import_node_path105.default.dirname(
68578
- (0, import_node_module12.createRequire)(import_node_path105.default.join(projectRoot, "package.json")).resolve(
68615
+ (0, import_node_module13.createRequire)(import_node_path105.default.join(projectRoot, "package.json")).resolve(
68579
68616
  "react-native/package.json"
68580
68617
  )
68581
68618
  );
@@ -68764,12 +68801,12 @@ function installedPodBinaries(directory2) {
68764
68801
  }
68765
68802
  return binaries.sort();
68766
68803
  }
68767
- var import_node_fs106, import_node_module12, import_node_path105, BINARY_BUNDLE, SOURCE;
68804
+ var import_node_fs106, import_node_module13, import_node_path105, BINARY_BUNDLE, SOURCE;
68768
68805
  var init_installed_native_libraries = __esm({
68769
68806
  "src/installed-native-libraries.ts"() {
68770
68807
  "use strict";
68771
68808
  import_node_fs106 = __toESM(require("node:fs"), 1);
68772
- import_node_module12 = require("node:module");
68809
+ import_node_module13 = require("node:module");
68773
68810
  import_node_path105 = __toESM(require("node:path"), 1);
68774
68811
  init_is_record();
68775
68812
  init_native_static_libraries();
@@ -68862,7 +68899,7 @@ function realTarget(target) {
68862
68899
  return import_node_path106.default.join(realTarget(import_node_path106.default.dirname(resolved)), import_node_path106.default.basename(resolved));
68863
68900
  }
68864
68901
  async function runInstalledTurboCodegen(appRoot, outDir, signal) {
68865
- const manifestPath = (0, import_node_module13.createRequire)(import_node_path106.default.join(appRoot, "package.json")).resolve(
68902
+ const manifestPath = (0, import_node_module14.createRequire)(import_node_path106.default.join(appRoot, "package.json")).resolve(
68866
68903
  "react-native/package.json"
68867
68904
  );
68868
68905
  const manifest = JSON.parse(import_node_fs107.default.readFileSync(manifestPath, "utf8"));
@@ -68902,14 +68939,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
68902
68939
  files: hashTree(generatedRoot)
68903
68940
  };
68904
68941
  }
68905
- var import_node_child_process51, import_node_crypto59, import_node_fs107, import_node_module13, import_node_path106, import_node_util11, run5, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
68942
+ var import_node_child_process51, import_node_crypto59, import_node_fs107, import_node_module14, import_node_path106, import_node_util11, run5, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
68906
68943
  var init_turbo_codegen_intake = __esm({
68907
68944
  "src/turbo-codegen-intake.ts"() {
68908
68945
  "use strict";
68909
68946
  import_node_child_process51 = require("node:child_process");
68910
68947
  import_node_crypto59 = require("node:crypto");
68911
68948
  import_node_fs107 = __toESM(require("node:fs"), 1);
68912
- import_node_module13 = require("node:module");
68949
+ import_node_module14 = require("node:module");
68913
68950
  import_node_path106 = __toESM(require("node:path"), 1);
68914
68951
  import_node_util11 = require("node:util");
68915
68952
  init_forked_script_contract();
@@ -73686,7 +73723,7 @@ async function prepareTurboCompileInput(options) {
73686
73723
  const reactNative = [options.appRoot, options.projectRoot].map(
73687
73724
  (root2) => import_node_path108.default.dirname(
73688
73725
  import_node_fs109.default.realpathSync(
73689
- (0, import_node_module14.createRequire)(import_node_path108.default.join(root2, "package.json")).resolve(
73726
+ (0, import_node_module15.createRequire)(import_node_path108.default.join(root2, "package.json")).resolve(
73690
73727
  "react-native/package.json"
73691
73728
  )
73692
73729
  )
@@ -73841,13 +73878,13 @@ async function compileTurboModule(options) {
73841
73878
  collection
73842
73879
  };
73843
73880
  }
73844
- var import_node_crypto61, import_node_fs109, import_node_module14, import_node_os24, import_node_path108;
73881
+ var import_node_crypto61, import_node_fs109, import_node_module15, import_node_os24, import_node_path108;
73845
73882
  var init_turbo_compile = __esm({
73846
73883
  "src/turbo-compile.ts"() {
73847
73884
  "use strict";
73848
73885
  import_node_crypto61 = require("node:crypto");
73849
73886
  import_node_fs109 = __toESM(require("node:fs"), 1);
73850
- import_node_module14 = require("node:module");
73887
+ import_node_module15 = require("node:module");
73851
73888
  import_node_os24 = __toESM(require("node:os"), 1);
73852
73889
  import_node_path108 = __toESM(require("node:path"), 1);
73853
73890
  init_native_app_identity_project();
@@ -74074,7 +74111,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
74074
74111
  };
74075
74112
  walk3("");
74076
74113
  const codegenRoot = import_node_path110.default.dirname(
74077
- (0, import_node_module15.createRequire)(import_node_path110.default.join(reactNativeRoot, "package.json")).resolve(
74114
+ (0, import_node_module16.createRequire)(import_node_path110.default.join(reactNativeRoot, "package.json")).resolve(
74078
74115
  "@react-native/codegen/package.json"
74079
74116
  )
74080
74117
  );
@@ -74175,13 +74212,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
74175
74212
  }
74176
74213
  }
74177
74214
  }
74178
- var import_node_crypto62, import_node_fs111, import_node_module15, import_node_path110, import_node_util12, recipe, strings4, building;
74215
+ var import_node_crypto62, import_node_fs111, import_node_module16, import_node_path110, import_node_util12, recipe, strings4, building;
74179
74216
  var init_react_native_core = __esm({
74180
74217
  "src/react-native-core.ts"() {
74181
74218
  "use strict";
74182
74219
  import_node_crypto62 = require("node:crypto");
74183
74220
  import_node_fs111 = __toESM(require("node:fs"), 1);
74184
- import_node_module15 = require("node:module");
74221
+ import_node_module16 = require("node:module");
74185
74222
  import_node_path110 = __toESM(require("node:path"), 1);
74186
74223
  import_node_util12 = require("node:util");
74187
74224
  init_home_paths();
@@ -74213,7 +74250,7 @@ var init_nitro_compiler_digest = __esm({
74213
74250
 
74214
74251
  // src/nitro-superset-inputs.ts
74215
74252
  async function nitroSupersetInputs(options) {
74216
- const resolve9 = (0, import_node_module17.createRequire)((0, import_node_path121.join)(options.appRoot, "package.json")).resolve;
74253
+ const resolve9 = (0, import_node_module18.createRequire)((0, import_node_path121.join)(options.appRoot, "package.json")).resolve;
74217
74254
  const pin2 = swiftNativePin();
74218
74255
  const inputs = {
74219
74256
  configuration: options.configuration,
@@ -74230,12 +74267,12 @@ async function nitroSupersetInputs(options) {
74230
74267
  inputs[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
74231
74268
  return inputs;
74232
74269
  }
74233
- var import_node_fs121, import_node_module17, import_node_path121, packageVersion;
74270
+ var import_node_fs121, import_node_module18, import_node_path121, packageVersion;
74234
74271
  var init_nitro_superset_inputs = __esm({
74235
74272
  "src/nitro-superset-inputs.ts"() {
74236
74273
  "use strict";
74237
74274
  import_node_fs121 = require("node:fs");
74238
- import_node_module17 = require("node:module");
74275
+ import_node_module18 = require("node:module");
74239
74276
  import_node_path121 = require("node:path");
74240
74277
  init_package_tree_digest();
74241
74278
  init_swift_native_pin();
@@ -74342,7 +74379,7 @@ var init_nitro_superset = __esm({
74342
74379
  init_nitroContract();
74343
74380
  init_swift_standin_digest();
74344
74381
  NITRO_SUPERSET_ENTRY_NAME = "superset";
74345
- NITRO_COMPILER_DIGEST = true ? "710d2f9837db98eb69d726f45a48ba8b1170f6846be9a2ed0329c0249adcea3d" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
74382
+ NITRO_COMPILER_DIGEST = true ? "40b5a3e48324aaea7cd2483960647c93319a36d65bd8e3de3289996016f66be0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
74346
74383
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
74347
74384
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
74348
74385
  published2 = /* @__PURE__ */ new Map();
@@ -74714,7 +74751,7 @@ function bindingNames(pattern) {
74714
74751
  throw new Error(`unsupported Kotlin export binding ${pattern.type}`);
74715
74752
  }
74716
74753
  function kotlinInstanceSource(source, factory, instanceImports = /* @__PURE__ */ new Map()) {
74717
- const program = (0, import_acorn2.parse)(source, { ecmaVersion: "latest", sourceType: "module" });
74754
+ const program = (0, import_acorn4.parse)(source, { ecmaVersion: "latest", sourceType: "module" });
74718
74755
  const imports2 = [];
74719
74756
  const body = [];
74720
74757
  let dependencies = 0;
@@ -74804,11 +74841,11 @@ return { peachDisposeInstance, ${exports3.map((item) => `${JSON.stringify(item.e
74804
74841
  exports: exports3
74805
74842
  };
74806
74843
  }
74807
- var import_acorn2;
74844
+ var import_acorn4;
74808
74845
  var init_kotlin_instance_source = __esm({
74809
74846
  "src/kotlin-instance-source.ts"() {
74810
74847
  "use strict";
74811
- import_acorn2 = require("peachsim/vendor/acorn");
74848
+ import_acorn4 = require("peachsim/vendor/acorn");
74812
74849
  }
74813
74850
  });
74814
74851
 
@@ -75308,7 +75345,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
75308
75345
  }
75309
75346
  function appKotlinLanguage(root) {
75310
75347
  const reactNative = import_node_path131.default.dirname(
75311
- (0, import_node_module19.createRequire)(import_node_path131.default.join(root, "package.json")).resolve("react-native/package.json")
75348
+ (0, import_node_module20.createRequire)(import_node_path131.default.join(root, "package.json")).resolve("react-native/package.json")
75312
75349
  );
75313
75350
  const versions = import_node_fs130.default.readFileSync(
75314
75351
  import_node_path131.default.join(reactNative, "gradle", "libs.versions.toml"),
@@ -75482,7 +75519,7 @@ function readExpoTypes(output) {
75482
75519
  };
75483
75520
  });
75484
75521
  }
75485
- async function scanSources(tool, parse12, toolchain, moduleRoot, files2) {
75522
+ async function scanSources(tool, parse14, toolchain, moduleRoot, files2) {
75486
75523
  const digest2 = (0, import_node_crypto76.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
75487
75524
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
75488
75525
  digest2.update(import_node_fs130.default.readFileSync(import_node_path131.default.join(moduleRoot, "sdk.tar.gz")));
@@ -75497,7 +75534,7 @@ async function scanSources(tool, parse12, toolchain, moduleRoot, files2) {
75497
75534
  });
75498
75535
  toolScans.set(key2, scan3);
75499
75536
  }
75500
- return parse12(await scan3);
75537
+ return parse14(await scan3);
75501
75538
  }
75502
75539
  async function scanExpoTypes(toolchain, moduleRoot, sources) {
75503
75540
  const candidates = sources.filter(
@@ -76287,7 +76324,7 @@ async function compileKotlin(input, origin) {
76287
76324
  import_node_path131.default.join(work, "js")
76288
76325
  ]);
76289
76326
  const skikoPath = import_node_path131.default.join(work, "js", "skiko.mjs");
76290
- const upstream = (0, import_acorn3.parse)(import_node_fs130.default.readFileSync(skikoPath, "utf8"), {
76327
+ const upstream = (0, import_acorn5.parse)(import_node_fs130.default.readFileSync(skikoPath, "utf8"), {
76291
76328
  ecmaVersion: "latest",
76292
76329
  sourceType: "module"
76293
76330
  });
@@ -76483,17 +76520,17 @@ async function serveKotlinRequest(pathname, res, app) {
76483
76520
  }
76484
76521
  return true;
76485
76522
  }
76486
- var import_node_child_process59, import_node_crypto76, import_node_fs130, import_node_module19, import_node_path131, import_node_util18, import_acorn3, run10, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
76523
+ var import_node_child_process59, import_node_crypto76, import_node_fs130, import_node_module20, import_node_path131, import_node_util18, import_acorn5, run10, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
76487
76524
  var init_kotlin_host = __esm({
76488
76525
  "src/kotlin-host.ts"() {
76489
76526
  "use strict";
76490
76527
  import_node_child_process59 = require("node:child_process");
76491
76528
  import_node_crypto76 = require("node:crypto");
76492
76529
  import_node_fs130 = __toESM(require("node:fs"), 1);
76493
- import_node_module19 = require("node:module");
76530
+ import_node_module20 = require("node:module");
76494
76531
  import_node_path131 = __toESM(require("node:path"), 1);
76495
76532
  import_node_util18 = require("node:util");
76496
- import_acorn3 = require("peachsim/vendor/acorn");
76533
+ import_acorn5 = require("peachsim/vendor/acorn");
76497
76534
  init_android_bridge_packages();
76498
76535
  init_android_view_classes();
76499
76536
  init_is_record();
@@ -76667,7 +76704,7 @@ function getCliRuntime() {
76667
76704
  if (loaded3) return loaded3.runtime;
76668
76705
  const root = peachRuntimeRoot();
76669
76706
  verifyCliCompanion(root);
76670
- const require2 = (0, import_node_module21.createRequire)(__sootsim_import_meta_url);
76707
+ const require2 = (0, import_node_module22.createRequire)(__sootsim_import_meta_url);
76671
76708
  const runtime = require2((0, import_node_path134.join)(root, cliCompanionPath()));
76672
76709
  if (runtime.cliCompanionAbi !== CLI_COMPANION_ABI) {
76673
76710
  throw new Error(
@@ -76678,13 +76715,13 @@ function getCliRuntime() {
76678
76715
  loaded3 = { root, runtime };
76679
76716
  return runtime;
76680
76717
  }
76681
- var import_node_crypto78, import_node_fs133, import_node_module21, import_node_path134, CLI_COMPANION_ABI, loaded3;
76718
+ var import_node_crypto78, import_node_fs133, import_node_module22, import_node_path134, CLI_COMPANION_ABI, loaded3;
76682
76719
  var init_cli_runtime = __esm({
76683
76720
  "src/cli-runtime.ts"() {
76684
76721
  "use strict";
76685
76722
  import_node_crypto78 = require("node:crypto");
76686
76723
  import_node_fs133 = require("node:fs");
76687
- import_node_module21 = require("node:module");
76724
+ import_node_module22 = require("node:module");
76688
76725
  import_node_path134 = require("node:path");
76689
76726
  init_src();
76690
76727
  init_runtime_companion();
@@ -79626,12 +79663,6 @@ var init_stub_manifest = __esm({
79626
79663
  runtimeTier: "none",
79627
79664
  buildResolvers: ["vite", "dep-prebundle"]
79628
79665
  },
79629
- reactNativeLaunchArguments: {
79630
- specifier: "react-native-launch-arguments",
79631
- stubFile: "react-native-launch-arguments.ts",
79632
- runtimeTier: "core",
79633
- buildResolvers: ["vite"]
79634
- },
79635
79666
  expoWinterFetch: {
79636
79667
  specifier: "expo/build/winter/fetch/index",
79637
79668
  stubFile: "expo-winter-fetch.ts",
@@ -80336,7 +80367,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
80336
80367
  async function resolveAndroidModules(appRoot) {
80337
80368
  let autolinker;
80338
80369
  try {
80339
- autolinker = (0, import_node_module23.createRequire)(import_node_path153.default.join(appRoot, "package.json")).resolve(
80370
+ autolinker = (0, import_node_module24.createRequire)(import_node_path153.default.join(appRoot, "package.json")).resolve(
80340
80371
  "expo-modules-autolinking/package.json"
80341
80372
  );
80342
80373
  } catch (error) {
@@ -80390,12 +80421,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
80390
80421
  }
80391
80422
  return linked;
80392
80423
  }
80393
- var import_node_fs148, import_node_module23, import_node_path153, resolving;
80424
+ var import_node_fs148, import_node_module24, import_node_path153, resolving;
80394
80425
  var init_android_autolinking = __esm({
80395
80426
  "src/android-autolinking.ts"() {
80396
80427
  "use strict";
80397
80428
  import_node_fs148 = __toESM(require("node:fs"), 1);
80398
- import_node_module23 = require("node:module");
80429
+ import_node_module24 = require("node:module");
80399
80430
  import_node_path153 = __toESM(require("node:path"), 1);
80400
80431
  init_androidAutolinkingContract();
80401
80432
  init_autolinker_process();
@@ -82522,7 +82553,7 @@ function memoizedBinarySearch(haystack, needle, state, key2) {
82522
82553
  state.lastNeedle = needle;
82523
82554
  return state.lastIndex = binarySearch(haystack, needle, low, high);
82524
82555
  }
82525
- function parse11(map2) {
82556
+ function parse13(map2) {
82526
82557
  return typeof map2 === "string" ? JSON.parse(map2) : map2;
82527
82558
  }
82528
82559
  function cast(map2) {
@@ -82600,7 +82631,7 @@ var init_trace_mapping = __esm({
82600
82631
  constructor(map2, mapUrl) {
82601
82632
  const isString = typeof map2 === "string";
82602
82633
  if (!isString && map2._decodedMemo) return map2;
82603
- const parsed2 = parse11(map2);
82634
+ const parsed2 = parse13(map2);
82604
82635
  const { version: version2, file, names, sourceRoot, sources, sourcesContent } = parsed2;
82605
82636
  this.version = version2;
82606
82637
  this.file = file;
@@ -83946,7 +83977,7 @@ async function createCloudBox(options) {
83946
83977
  warnings: artifact.warnings
83947
83978
  };
83948
83979
  }
83949
- var import_node_crypto86, import_node_fs155, import_node_path160, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS;
83980
+ var import_node_crypto86, import_node_fs155, import_node_path160, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS;
83950
83981
  var init_cloud_client = __esm({
83951
83982
  "cli/cloud-client.ts"() {
83952
83983
  "use strict";
@@ -83974,6 +84005,12 @@ var init_cloud_client = __esm({
83974
84005
  MAX_RNX_CLOUD_BUNDLE_BYTES = RNX_CLOUD_MAX_ARTIFACT_BYTES;
83975
84006
  REMOTE_COMMAND = "peach remote";
83976
84007
  PREVIEW_COMMAND = "peach preview";
84008
+ NanoDevelopmentOnlyError = class extends Error {
84009
+ code = "nano_development_only";
84010
+ constructor() {
84011
+ super("Nano requires a development build. [nano_development_only]");
84012
+ }
84013
+ };
83977
84014
  MAX_ASSET_DEST_FILES = 25e3;
83978
84015
  ACCOUNT_CHOICE_REFUSALS = /* @__PURE__ */ new Set([
83979
84016
  "accountId is required",
@@ -84003,6 +84040,7 @@ function cloudDevice(capturedModel) {
84003
84040
  return captured && getCliRuntime().settings_devices.getRuntimePlatform(captured) === "ios" ? captured : DEFAULT_DEVICE_BY_PLATFORM.ios;
84004
84041
  }
84005
84042
  async function sendToBox(options) {
84043
+ if (!isSootsimDevCheckout()) throw new NanoDevelopmentOnlyError();
84006
84044
  const captured = await options.send({
84007
84045
  type: "evaluate",
84008
84046
  simId: options.simId,
@@ -84050,6 +84088,7 @@ var init_send_to_box = __esm({
84050
84088
  "use strict";
84051
84089
  init_cli_runtime();
84052
84090
  init_device_catalog();
84091
+ init_home_paths();
84053
84092
  init_is_record();
84054
84093
  init_metro_production_bundle();
84055
84094
  init_simulator_route();
@@ -84071,7 +84110,7 @@ var import_fs6 = __toESM(require("fs"), 1);
84071
84110
  var import_http4 = require("http");
84072
84111
  var import_os3 = __toESM(require("os"), 1);
84073
84112
  var import_path5 = __toESM(require("path"), 1);
84074
- var import_ws3 = require("ws");
84113
+ var import_ws3 = require("peachsim/vendor/ws");
84075
84114
 
84076
84115
  // src/automatic-update-policy.ts
84077
84116
  var import_node_fs2 = require("node:fs");
@@ -84273,7 +84312,7 @@ var import_node_async_hooks3 = require("node:async_hooks");
84273
84312
  var import_node_child_process54 = require("node:child_process");
84274
84313
  var import_node_crypto64 = require("node:crypto");
84275
84314
  var import_node_fs113 = __toESM(require("node:fs"), 1);
84276
- var import_node_module16 = require("node:module");
84315
+ var import_node_module17 = require("node:module");
84277
84316
  var import_node_os25 = __toESM(require("node:os"), 1);
84278
84317
  var import_node_path112 = __toESM(require("node:path"), 1);
84279
84318
  var import_node_url5 = require("node:url");
@@ -84343,36 +84382,17 @@ init_answeredNativePackages();
84343
84382
 
84344
84383
  // src/app-config.ts
84345
84384
  var import_node_fs31 = require("node:fs");
84385
+ var import_node_module5 = require("node:module");
84346
84386
  var import_node_path29 = __toESM(require("node:path"), 1);
84347
- var import_jiti = require("jiti");
84348
84387
 
84349
84388
  // cli/app-stubs.ts
84350
84389
  var import_node_fs30 = require("node:fs");
84351
84390
  var import_node_path27 = require("node:path");
84352
84391
  init_version_range();
84353
- var import_oxc_parser2 = require("oxc-parser");
84392
+ var import_acorn = require("peachsim/vendor/acorn");
84354
84393
  var import_sucrase = require("peachsim/vendor/sucrase");
84355
84394
 
84356
84395
  // src/config.ts
84357
- var config_exports = {};
84358
- __export(config_exports, {
84359
- PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
84360
- PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
84361
- applyPeachConfigToUrl: () => applyPeachConfigToUrl,
84362
- collectConfiguredFileModules: () => collectConfiguredFileModules,
84363
- createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
84364
- defineConfig: () => defineConfig,
84365
- detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
84366
- hasPeachConfig: () => hasPeachConfig,
84367
- isPackageStubs: () => isPackageStubs,
84368
- isPeachConfig: () => isPeachConfig,
84369
- matchConfigModule: () => matchConfigModule,
84370
- mergePeachConfig: () => mergePeachConfig,
84371
- readNativeRenderer: () => readNativeRenderer,
84372
- readPeachBundleConfig: () => readPeachBundleConfig,
84373
- readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
84374
- readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
84375
- });
84376
84396
  init_version();
84377
84397
  init_bundle_global_footer();
84378
84398
  init_is_record();
@@ -84398,21 +84418,6 @@ function isNativeViewSource(value) {
84398
84418
  }
84399
84419
 
84400
84420
  // src/config.ts
84401
- function readNativeRenderer(value) {
84402
- if (value === void 0) return void 0;
84403
- if (value === "paper" || value === "fabric") return value;
84404
- throw new Error("nativeRenderer must be paper or fabric");
84405
- }
84406
- function matchConfigModule(name3, modules) {
84407
- const entries = Object.entries(modules).sort((a, b) => b[0].length - a[0].length);
84408
- const modulePath = name3.startsWith("/") ? name3 : `/${name3}`;
84409
- for (const [pattern, resolution] of entries) {
84410
- if (modulePath.includes(`/${pattern}/`) || modulePath.endsWith(`/${pattern}`) || modulePath.endsWith(`/${pattern}.js`) || modulePath.endsWith(`/${pattern}.ts`) || modulePath.endsWith(`/${pattern}.tsx`)) {
84411
- return { pattern, resolution };
84412
- }
84413
- }
84414
- return void 0;
84415
- }
84416
84421
  function isHybridObjectAnswer(answer2) {
84417
84422
  return answer2 === "unsupported" || isRecord(answer2) && typeof answer2.file === "string" && answer2.file.length > 0;
84418
84423
  }
@@ -84436,25 +84441,6 @@ function isPackageStubs(value) {
84436
84441
  )) && (value.hybridObjects === void 0 || isPackageHybridObjects(value.hybridObjects));
84437
84442
  }
84438
84443
  var PEACH_CONFIG_QUERY_PARAM = "peachConfig";
84439
- function collectConfiguredFileModules(config) {
84440
- return [
84441
- ...new Set(
84442
- [
84443
- "modules",
84444
- "turboModules",
84445
- "nativeModules",
84446
- "nativeViews",
84447
- "nativeHybridObjects"
84448
- ].flatMap((key2) => {
84449
- const entries = config && Reflect.get(config, key2);
84450
- if (!isRecord(entries)) return [];
84451
- return Object.values(entries).flatMap(
84452
- (entry) => isRecord(entry) && typeof entry.file === "string" ? [entry.file] : []
84453
- );
84454
- })
84455
- )
84456
- ];
84457
- }
84458
84444
  function isPeachConfig(value) {
84459
84445
  if (!isRecord(value)) return false;
84460
84446
  return (value.storeKit === void 0 || isRecord(value.storeKit) && typeof value.storeKit.configuration === "string" && value.storeKit.configuration.trim().length > 0) && (value.nativeRenderer === void 0 || value.nativeRenderer === "paper" || value.nativeRenderer === "fabric") && (value.mapKit === void 0 || isRecord(value.mapKit) && typeof value.mapKit.token === "string" && value.mapKit.token.length > 0 && value.mapKit.token === value.mapKit.token.trim()) && (value.runtimeVersion === void 0 || typeof value.runtimeVersion === "string" && value.runtimeVersion === value.runtimeVersion.trim() && isValidRuntimeVersion(value.runtimeVersion)) && [
@@ -84473,44 +84459,6 @@ function isPeachConfig(value) {
84473
84459
  (entry) => entry === "noop" || isNativeViewSource(entry) || isRecord(entry) && typeof entry.file === "string" && entry.file.length > 0
84474
84460
  ));
84475
84461
  }
84476
- var BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
84477
- var PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
84478
- function readPeachBundleConfig(value) {
84479
- if (value === void 0 || value === null) return null;
84480
- if (!isRecord(value) || !isPeachConfig(value.config) || !Array.isArray(value.runtimePackages) || !value.runtimePackages.every((name3) => typeof name3 === "string")) {
84481
- throw new Error("configured bundle metadata is malformed");
84482
- }
84483
- return { config: value.config, runtimePackages: [...value.runtimePackages] };
84484
- }
84485
- function readPeachBundleConfigFooter(source) {
84486
- const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
84487
- if (start < 0) return null;
84488
- const end = source.indexOf("\n", start + 1);
84489
- const line = source.slice(start + 1, end < 0 ? void 0 : end);
84490
- if (!line.endsWith(";")) throw new Error("configured bundle footer is truncated");
84491
- const result = readPeachBundleConfig(
84492
- JSON.parse(line.slice(BUNDLE_CONFIG_PREFIX.length, -1))
84493
- );
84494
- if (!result) throw new Error("configured bundle footer is empty");
84495
- return result;
84496
- }
84497
- function createPeachBundleConfigFooter(config) {
84498
- const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
84499
- return "\n" + BUNDLE_CONFIG_PREFIX + json + ";";
84500
- }
84501
- function detachPeachBundleConfigFooter(source) {
84502
- const configuredBundle = readPeachBundleConfigFooter(source);
84503
- if (!configuredBundle) return { source, configuredBundle };
84504
- const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
84505
- const end = source.indexOf("\n", start + 1);
84506
- return {
84507
- source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
84508
- configuredBundle
84509
- };
84510
- }
84511
- function defineConfig(config) {
84512
- return config;
84513
- }
84514
84462
  function hasOwnKeys(value) {
84515
84463
  return !!value && Object.keys(value).length > 0;
84516
84464
  }
@@ -84518,47 +84466,6 @@ function hasPeachConfig(config) {
84518
84466
  if (!config) return false;
84519
84467
  return config.nativeRenderer !== void 0 || config.mapKit !== void 0 || typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.nativeViews) || hasOwnKeys(config.nativeHybridObjects) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.initialProps) || hasOwnKeys(config.initialState);
84520
84468
  }
84521
- function mergePeachConfig(base2, override) {
84522
- if (!hasPeachConfig(base2) && !hasPeachConfig(override)) return void 0;
84523
- if (!hasPeachConfig(base2)) return override ? { ...override } : void 0;
84524
- if (!hasPeachConfig(override)) return base2 ? { ...base2 } : void 0;
84525
- return {
84526
- runtimeVersion: override.runtimeVersion ?? base2.runtimeVersion,
84527
- nativeRenderer: override.nativeRenderer ?? base2.nativeRenderer,
84528
- mapKit: override.mapKit ?? base2.mapKit,
84529
- modules: { ...base2.modules || {}, ...override.modules || {} },
84530
- turboModules: { ...base2.turboModules || {}, ...override.turboModules || {} },
84531
- nativeModules: {
84532
- ...base2.nativeModules || {},
84533
- ...override.nativeModules || {}
84534
- },
84535
- nativeViews: { ...base2.nativeViews || {}, ...override.nativeViews || {} },
84536
- nativeHybridObjects: {
84537
- ...base2.nativeHybridObjects || {},
84538
- ...override.nativeHybridObjects || {}
84539
- },
84540
- env: { ...base2.env || {}, ...override.env || {} },
84541
- network: {
84542
- remap: { ...base2.network?.remap || {}, ...override.network?.remap || {} }
84543
- },
84544
- initialProps: { ...base2.initialProps || {}, ...override.initialProps || {} },
84545
- initialState: { ...base2.initialState || {}, ...override.initialState || {} }
84546
- };
84547
- }
84548
- function readPeachConfigFromSearchParams(searchParams) {
84549
- const raw2 = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
84550
- if (!raw2) return void 0;
84551
- let parsed2;
84552
- try {
84553
- parsed2 = JSON.parse(raw2);
84554
- } catch (error) {
84555
- const message = error instanceof Error ? error.message : String(error);
84556
- console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
84557
- return void 0;
84558
- }
84559
- if (isRecord(parsed2)) readNativeRenderer(parsed2.nativeRenderer);
84560
- return isPeachConfig(parsed2) && hasPeachConfig(parsed2) ? parsed2 : void 0;
84561
- }
84562
84469
  function applyPeachConfigToUrl(url, config) {
84563
84470
  const parsed2 = new URL(url);
84564
84471
  if (hasPeachConfig(config)) {
@@ -84569,48 +84476,22 @@ function applyPeachConfigToUrl(url, config) {
84569
84476
  return parsed2.toString();
84570
84477
  }
84571
84478
 
84572
- // cli/app-stubs.ts
84573
- init_is_record();
84574
- init_nitro_source();
84575
- init_public_brand();
84576
-
84577
- // src/visit-parsed-program.ts
84578
- var import_oxc_parser = require("oxc-parser");
84479
+ // src/estree-walk.ts
84579
84480
  init_is_record();
84580
- function visitParsedProgram(program, visitor) {
84581
- const enterByType = /* @__PURE__ */ new Map();
84582
- const exitByType = /* @__PURE__ */ new Map();
84583
- for (const key2 of Object.keys(visitor)) {
84584
- const handler = Reflect.get(visitor, key2);
84585
- if (typeof handler !== "function") continue;
84586
- const invoke = (node) => {
84587
- handler(node);
84588
- };
84589
- if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
84590
- else enterByType.set(key2, invoke);
84591
- }
84592
- if (enterByType.size === 0 && exitByType.size === 0) return;
84593
- const hasExit = exitByType.size > 0;
84594
- function visit3(value) {
84595
- if (Array.isArray(value)) {
84596
- for (let i = 0; i < value.length; i++) visit3(value[i]);
84597
- return;
84598
- }
84599
- if (!isRecord(value) || typeof value.type !== "string") return;
84600
- const keys = import_oxc_parser.visitorKeys[value.type];
84601
- if (!keys) return;
84602
- const enter = enterByType.get(value.type);
84603
- if (enter) enter(value);
84604
- for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
84605
- if (hasExit) {
84606
- const exit = exitByType.get(value.type);
84607
- if (exit) exit(value);
84608
- }
84609
- }
84610
- visit3(program);
84481
+ function isNode(value) {
84482
+ return isRecord(value) && typeof value.type === "string";
84483
+ }
84484
+ function visitNodes(node, enter) {
84485
+ enter(node);
84486
+ for (const value of Object.values(node))
84487
+ for (const child of Array.isArray(value) ? value : [value])
84488
+ if (isNode(child)) visitNodes(child, enter);
84611
84489
  }
84612
84490
 
84613
84491
  // cli/app-stubs.ts
84492
+ init_is_record();
84493
+ init_nitro_source();
84494
+ init_public_brand();
84614
84495
  init_detect();
84615
84496
  function stubPackageTarget(name3) {
84616
84497
  const match = /^(?:@[^/]+\/)?peach-stub-(.+)$/.exec(name3);
@@ -84812,8 +84693,17 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
84812
84693
  } catch {
84813
84694
  return [];
84814
84695
  }
84815
- const { program, errors } = (0, import_oxc_parser2.parseSync)(file, code, { lang: "jsx" });
84816
- if (errors.length) return [];
84696
+ let program;
84697
+ try {
84698
+ program = (0, import_acorn.parse)(code, {
84699
+ ecmaVersion: "latest",
84700
+ sourceType: "module",
84701
+ allowHashBang: true,
84702
+ allowReturnOutsideFunction: true
84703
+ });
84704
+ } catch {
84705
+ return [];
84706
+ }
84817
84707
  const found2 = [];
84818
84708
  const androidRanges = [];
84819
84709
  const guard = (test, branch) => {
@@ -84828,50 +84718,63 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
84828
84718
  line: code.slice(0, at).split("\n").length
84829
84719
  });
84830
84720
  };
84831
- visitParsedProgram(program, {
84832
- IfStatement(node) {
84833
- guard(node.test, node.consequent);
84834
- },
84835
- ConditionalExpression(node) {
84836
- guard(node.test, node.consequent);
84837
- },
84838
- LogicalExpression(node) {
84839
- if (node.operator === "&&") guard(node.left, node.right);
84840
- },
84841
- VariableDeclarator(node) {
84842
- if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
84843
- return;
84844
- for (const property of node.id.properties) {
84845
- if (property.type !== "Property") continue;
84846
- const key2 = property.key;
84847
- if (!property.computed && key2.type === "Identifier")
84848
- add("module", key2.name, property.start, false);
84849
- else if (key2.type === "Literal" && typeof key2.value === "string")
84850
- add("module", key2.value, property.start, false);
84721
+ visitNodes(program, (node) => {
84722
+ switch (node.type) {
84723
+ case "IfStatement": {
84724
+ guard(node.test, node.consequent);
84725
+ break;
84851
84726
  }
84852
- },
84853
- CallExpression(node) {
84854
- const first = node.arguments[0];
84855
- if (first?.type !== "Literal" || typeof first.value !== "string") return;
84856
- const callee = node.callee;
84857
- const lookup3 = nativeLookupName(callee);
84858
- if (callee.type === "MemberExpression" && !callee.computed && nativeLookupName(callee.object) === "TurboModuleRegistry" && (lookup3 === "get" || lookup3 === "getEnforcing")) {
84859
- add("module", first.value, node.start, false);
84860
- } else if (lookup3) {
84861
- if (["requireNativeModule", "requireOptionalNativeModule"].includes(lookup3))
84862
- add("module", first.value, node.start, lookup3 === "requireOptionalNativeModule");
84863
- else if (["requireNativeComponent", "codegenNativeComponent"].includes(lookup3))
84864
- add("view", first.value, node.start, false);
84865
- else if (["requireNativeView", "requireNativeViewManager"].includes(lookup3)) {
84866
- const second = node.arguments[1];
84867
- const name3 = second?.type === "Literal" && typeof second.value === "string" ? `${first.value}_${second.value}` : first.value;
84868
- add("view", name3, node.start, false);
84727
+ case "ConditionalExpression": {
84728
+ guard(node.test, node.consequent);
84729
+ break;
84730
+ }
84731
+ case "LogicalExpression": {
84732
+ if (node.operator === "&&") guard(node.left, node.right);
84733
+ break;
84734
+ }
84735
+ case "VariableDeclarator": {
84736
+ if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
84737
+ return;
84738
+ for (const property of node.id.properties) {
84739
+ if (property.type !== "Property") continue;
84740
+ const key2 = property.key;
84741
+ if (!property.computed && key2.type === "Identifier")
84742
+ add("module", key2.name, property.start, false);
84743
+ else if (key2.type === "Literal" && typeof key2.value === "string")
84744
+ add("module", key2.value, property.start, false);
84745
+ }
84746
+ break;
84747
+ }
84748
+ case "CallExpression": {
84749
+ const first = node.arguments[0];
84750
+ if (first?.type !== "Literal" || typeof first.value !== "string") return;
84751
+ const callee = node.callee;
84752
+ const lookup3 = nativeLookupName(callee);
84753
+ if (callee.type === "MemberExpression" && !callee.computed && nativeLookupName(callee.object) === "TurboModuleRegistry" && (lookup3 === "get" || lookup3 === "getEnforcing")) {
84754
+ add("module", first.value, node.start, false);
84755
+ } else if (lookup3) {
84756
+ if (["requireNativeModule", "requireOptionalNativeModule"].includes(lookup3))
84757
+ add(
84758
+ "module",
84759
+ first.value,
84760
+ node.start,
84761
+ lookup3 === "requireOptionalNativeModule"
84762
+ );
84763
+ else if (["requireNativeComponent", "codegenNativeComponent"].includes(lookup3))
84764
+ add("view", first.value, node.start, false);
84765
+ else if (["requireNativeView", "requireNativeViewManager"].includes(lookup3)) {
84766
+ const second = node.arguments[1];
84767
+ const name3 = second?.type === "Literal" && typeof second.value === "string" ? `${first.value}_${second.value}` : first.value;
84768
+ add("view", name3, node.start, false);
84769
+ }
84869
84770
  }
84771
+ break;
84772
+ }
84773
+ case "MemberExpression": {
84774
+ if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
84775
+ add("module", node.property.name, node.start, false);
84776
+ break;
84870
84777
  }
84871
- },
84872
- MemberExpression(node) {
84873
- if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
84874
- add("module", node.property.name, node.start, false);
84875
84778
  }
84876
84779
  });
84877
84780
  return found2;
@@ -84948,11 +84851,11 @@ function configModule(configPath, packages) {
84948
84851
  if (configPath && (configPath.endsWith(".cjs") || configPath.endsWith(".js") && /\bmodule\.exports\b/.test(readSmallFile(configPath) ?? "")))
84949
84852
  return ["module.exports = {", ...body, "}"].join("\n");
84950
84853
  return [
84951
- `import { defineConfig } from '${rnxPublicBrand.packageName}/config'`,
84854
+ `import type { PeachConfig } from '${rnxPublicBrand.packageName}/config'`,
84952
84855
  "",
84953
- "export default defineConfig({",
84856
+ "export default {",
84954
84857
  ...body,
84955
- "})"
84858
+ "} satisfies PeachConfig"
84956
84859
  ].join("\n");
84957
84860
  }
84958
84861
  function wireSlotMigration(appDir, configPath, wire, kept = []) {
@@ -85181,9 +85084,6 @@ function workspacePackageDirs(appDir, pkg) {
85181
85084
  return [...dirs];
85182
85085
  }
85183
85086
 
85184
- // src/app-config.ts
85185
- init_public_brand();
85186
-
85187
85087
  // ../peach-globals/src/dynamic-type-scales.ts
85188
85088
  var IOS_DYNAMIC_TYPE_SCALES = [
85189
85089
  0.823,
@@ -85934,16 +85834,9 @@ async function loadRNXAppStubs(project2) {
85934
85834
  async function loadConfigFile(project2) {
85935
85835
  if (!project2.configPath) return void 0;
85936
85836
  try {
85937
- const jiti = (0, import_jiti.createJiti)(__sootsim_import_meta_url, {
85938
- interopDefault: true,
85939
- // metro serializes repeatedly in one process; edits must reload the config.
85940
- moduleCache: false,
85941
- tryNative: false,
85942
- virtualModules: {
85943
- [`${rnxPublicBrand.packageName}/config`]: config_exports
85944
- }
85945
- });
85946
- const loaded4 = project2.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs31.readFileSync)(project2.configPath, "utf8")) : await jiti.import(project2.configPath, { default: true });
85837
+ const configPath = import_node_path29.default.resolve(project2.configPath);
85838
+ delete (0, import_node_module5.createRequire)(__sootsim_import_meta_url).cache[configPath];
85839
+ const loaded4 = configPath.endsWith(".json") ? JSON.parse((0, import_node_fs31.readFileSync)(configPath, "utf8")) : Reflect.get(await import(configPath), "default");
85947
85840
  if (!isPeachConfig(loaded4)) {
85948
85841
  throw new Error("the default export must be a peach config object");
85949
85842
  }
@@ -86008,14 +85901,14 @@ init_react_native_core_digest();
86008
85901
  init_swift_compiler_digest();
86009
85902
  init_swift_standin_digest();
86010
85903
  function expoNativeCompilerDigestValue() {
86011
- return true ? "3167411d38960a2a75f2541e8948a65c500057768f7180642e97284a6e06f7bf" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
85904
+ return true ? "d2721a5a426ac104272e382f27c37ac5deab8be0ed9aff4e274daba20781f6df" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
86012
85905
  }
86013
85906
 
86014
85907
  // src/expo-native-workspace.ts
86015
85908
  var import_node_child_process39 = require("node:child_process");
86016
85909
  var import_node_crypto45 = require("node:crypto");
86017
85910
  var import_node_fs81 = __toESM(require("node:fs"), 1);
86018
- var import_node_module7 = require("node:module");
85911
+ var import_node_module8 = require("node:module");
86019
85912
  var import_node_os19 = __toESM(require("node:os"), 1);
86020
85913
  var import_node_path81 = __toESM(require("node:path"), 1);
86021
85914
  var import_node_util8 = require("node:util");
@@ -86172,7 +86065,7 @@ init_native_git();
86172
86065
  var import_node_child_process19 = require("node:child_process");
86173
86066
  var import_node_crypto20 = require("node:crypto");
86174
86067
  var import_node_fs39 = __toESM(require("node:fs"), 1);
86175
- var import_node_module6 = require("node:module");
86068
+ var import_node_module7 = require("node:module");
86176
86069
  var import_node_os8 = __toESM(require("node:os"), 1);
86177
86070
  var import_node_path37 = __toESM(require("node:path"), 1);
86178
86071
  var import_node_url3 = require("node:url");
@@ -86251,7 +86144,7 @@ async function generateAppSdkInChild(generatorFile, frameworks, options) {
86251
86144
  }
86252
86145
  }
86253
86146
  async function selectOneSDK(appRoot) {
86254
- const require2 = (0, import_node_module6.createRequire)(import_node_path37.default.join(appRoot, "package.json"));
86147
+ const require2 = (0, import_node_module7.createRequire)(import_node_path37.default.join(appRoot, "package.json"));
86255
86148
  let onePackage;
86256
86149
  try {
86257
86150
  onePackage = require2.resolve("one/package.json");
@@ -96111,7 +96004,7 @@ function declaresNativeDependency(manifest, name3) {
96111
96004
  return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
96112
96005
  }
96113
96006
  async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
96114
- const appRequire = (0, import_node_module7.createRequire)(import_node_path81.default.join(app, "package.json"));
96007
+ const appRequire = (0, import_node_module8.createRequire)(import_node_path81.default.join(app, "package.json"));
96115
96008
  const sourcePodEnv = {
96116
96009
  EXPO_USE_PRECOMPILED_MODULES: "0",
96117
96010
  ONE_PREBUILT_IOS: "0",
@@ -96656,7 +96549,7 @@ function writeExpoDiscovery(options) {
96656
96549
  // src/expo-native-prebuilt.ts
96657
96550
  var import_node_crypto48 = require("node:crypto");
96658
96551
  var import_node_fs86 = __toESM(require("node:fs"), 1);
96659
- var import_node_module10 = require("node:module");
96552
+ var import_node_module11 = require("node:module");
96660
96553
  var import_node_path86 = __toESM(require("node:path"), 1);
96661
96554
  var import_node_util9 = require("node:util");
96662
96555
  var import_plist7 = __toESM(require("peachsim/vendor/plist"), 1);
@@ -96700,7 +96593,7 @@ init_native_app_identity_project();
96700
96593
  // src/native-firebase-config.ts
96701
96594
  var import_node_child_process40 = require("node:child_process");
96702
96595
  var import_node_fs84 = __toESM(require("node:fs"), 1);
96703
- var import_node_module9 = require("node:module");
96596
+ var import_node_module10 = require("node:module");
96704
96597
  var import_node_os20 = __toESM(require("node:os"), 1);
96705
96598
  var import_node_path84 = __toESM(require("node:path"), 1);
96706
96599
  init_is_record();
@@ -96825,7 +96718,7 @@ function packageRootOf(appRoot, file) {
96825
96718
  async function expoNativeInputs(appRoot) {
96826
96719
  appRoot = import_node_fs86.default.realpathSync(appRoot);
96827
96720
  if (findXcodeProject(import_node_path86.default.join(appRoot, "ios"))) return null;
96828
- const appRequire = (0, import_node_module10.createRequire)(import_node_path86.default.join(appRoot, "package.json"));
96721
+ const appRequire = (0, import_node_module11.createRequire)(import_node_path86.default.join(appRoot, "package.json"));
96829
96722
  let fingerprintEntry;
96830
96723
  try {
96831
96724
  fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
@@ -97041,7 +96934,7 @@ var NATIVE_PREPARED_QUERY_PARAM = "prepared";
97041
96934
 
97042
96935
  // src/react-native-bridge-modules.ts
97043
96936
  var import_node_fs97 = __toESM(require("node:fs"), 1);
97044
- var import_node_module11 = require("node:module");
96937
+ var import_node_module12 = require("node:module");
97045
96938
  var import_node_path96 = __toESM(require("node:path"), 1);
97046
96939
  init_answeredNativePackages();
97047
96940
  init_swift_compile();
@@ -97518,7 +97411,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
97518
97411
  const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
97519
97412
  if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
97520
97413
  return;
97521
- const appRequire = (0, import_node_module11.createRequire)(manifestPath);
97414
+ const appRequire = (0, import_node_module12.createRequire)(manifestPath);
97522
97415
  const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
97523
97416
  for (const packageName of Object.keys(dependencies).sort()) {
97524
97417
  signal?.throwIfAborted();
@@ -98186,7 +98079,7 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
98186
98079
  const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
98187
98080
  const reactNativeRoot = import_node_fs113.default.realpathSync(
98188
98081
  import_node_path112.default.dirname(
98189
- (0, import_node_module16.createRequire)(import_node_path112.default.join(appRoot, "package.json")).resolve(
98082
+ (0, import_node_module17.createRequire)(import_node_path112.default.join(appRoot, "package.json")).resolve(
98190
98083
  "react-native/package.json"
98191
98084
  )
98192
98085
  )
@@ -98625,7 +98518,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
98625
98518
  signal?.throwIfAborted();
98626
98519
  appRoot = import_node_fs113.default.realpathSync(appRoot);
98627
98520
  const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
98628
- const appRequire = (0, import_node_module16.createRequire)(import_node_path112.default.join(appRoot, "package.json"));
98521
+ const appRequire = (0, import_node_module17.createRequire)(import_node_path112.default.join(appRoot, "package.json"));
98629
98522
  let expoRoot;
98630
98523
  try {
98631
98524
  expoRoot = import_node_path112.default.dirname(appRequire.resolve("expo/package.json"));
@@ -99758,7 +99651,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
99758
99651
  const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
99759
99652
  const projectRoot = options.installedWorkspace ? import_node_path112.default.dirname(import_node_path112.default.dirname(options.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).app;
99760
99653
  const reactNativeRoot = import_node_path112.default.dirname(
99761
- (0, import_node_module16.createRequire)(import_node_path112.default.join(projectRoot, "package.json")).resolve(
99654
+ (0, import_node_module17.createRequire)(import_node_path112.default.join(projectRoot, "package.json")).resolve(
99762
99655
  "react-native/package.json"
99763
99656
  )
99764
99657
  );
@@ -100241,7 +100134,7 @@ async function handleExpoSwiftRequest(req, res) {
100241
100134
  // src/expo-widgets-bundle.ts
100242
100135
  var import_node_child_process55 = require("node:child_process");
100243
100136
  var import_promises10 = __toESM(require("node:fs/promises"), 1);
100244
- var import_node_module18 = require("node:module");
100137
+ var import_node_module19 = require("node:module");
100245
100138
  var import_node_path123 = __toESM(require("node:path"), 1);
100246
100139
  var import_node_util14 = require("node:util");
100247
100140
 
@@ -100462,7 +100355,8 @@ init_is_record();
100462
100355
  // src/one-native-app-config.ts
100463
100356
  var import_node_fs115 = __toESM(require("node:fs"), 1);
100464
100357
  var import_node_path114 = __toESM(require("node:path"), 1);
100465
- var import_oxc_parser3 = require("oxc-parser");
100358
+ var import_acorn3 = require("peachsim/vendor/acorn");
100359
+ var import_sucrase4 = require("peachsim/vendor/sucrase");
100466
100360
  init_is_record();
100467
100361
  var CONFIG_FILES = [
100468
100362
  "vite.config.ts",
@@ -100490,10 +100384,6 @@ function staticValue(node) {
100490
100384
  return typeof value === "number" ? -value : NOT_STATIC;
100491
100385
  }
100492
100386
  return NOT_STATIC;
100493
- case "TSAsExpression":
100494
- case "TSSatisfiesExpression":
100495
- case "ParenthesizedExpression":
100496
- return staticValue(node.expression);
100497
100387
  case "ArrayExpression": {
100498
100388
  const items2 = [];
100499
100389
  for (const element of node.elements) {
@@ -100525,16 +100415,18 @@ function staticObject(node) {
100525
100415
  function readOneNativeApp(root) {
100526
100416
  const file = oneConfigPath(root);
100527
100417
  if (!file) return null;
100528
- const { program } = (0, import_oxc_parser3.parseSync)(file, import_node_fs115.default.readFileSync(file, "utf8"));
100418
+ const { code } = (0, import_sucrase4.transform)(import_node_fs115.default.readFileSync(file, "utf8"), {
100419
+ transforms: /\.[cm]?ts$/.test(file) ? ["typescript"] : [],
100420
+ disableESTransforms: true
100421
+ });
100529
100422
  let app = null;
100530
- visitParsedProgram(program, {
100531
- CallExpression(call) {
100532
- if (app || call.callee.type !== "Identifier" || call.callee.name !== "one") return;
100533
- const [options] = call.arguments;
100534
- if (options?.type !== "ObjectExpression") return;
100535
- const { native } = staticObject(options);
100536
- if (isRecord(native) && isRecord(native.app)) app = native.app;
100537
- }
100423
+ visitNodes((0, import_acorn3.parse)(code, { ecmaVersion: "latest", sourceType: "module" }), (call) => {
100424
+ if (app || call.type !== "CallExpression") return;
100425
+ if (call.callee.type !== "Identifier" || call.callee.name !== "one") return;
100426
+ const [options] = call.arguments;
100427
+ if (options?.type !== "ObjectExpression") return;
100428
+ const { native } = staticObject(options);
100429
+ if (isRecord(native) && isRecord(native.app)) app = native.app;
100538
100430
  });
100539
100431
  return app;
100540
100432
  }
@@ -100544,18 +100436,19 @@ function readAssetCatalog(files2, readContents2, imageUri, accentName) {
100544
100436
  const colors = enumerateBundleColors(files2, readContents2);
100545
100437
  const symbols = enumerateBundleSymbols(files2, readContents2, () => ".");
100546
100438
  const images = {};
100547
- for (const { name: name3, file, scale, renderingMode } of enumerateBundleImages(
100439
+ for (const { name: name3, file, scale, renderingMode, fileNames } of enumerateBundleImages(
100548
100440
  files2,
100549
100441
  readContents2
100550
100442
  )) {
100551
100443
  const uri = imageUri(file);
100552
- if (uri !== null)
100553
- (images[name3] ??= []).push({
100554
- uri,
100555
- scale,
100556
- ...renderingMode ? { renderingMode } : {}
100557
- });
100444
+ if (uri === null) continue;
100445
+ const variant2 = { uri, scale, ...renderingMode ? { renderingMode } : {} };
100446
+ for (const lookup3 of [name3, ...fileNames ?? []]) {
100447
+ const variants = images[lookup3] ??= [];
100448
+ variants.push(variant2);
100449
+ }
100558
100450
  }
100451
+ for (const variants of Object.values(images)) variants.sort((a, b) => a.scale - b.scale);
100559
100452
  if (accentName === null && Object.keys(colors).length === 0 && Object.keys(images).length === 0 && Object.keys(symbols).length === 0)
100560
100453
  return null;
100561
100454
  return { colors, images, symbols, accentName };
@@ -101814,7 +101707,7 @@ var handleNitroRequest = compiledModuleRequestHandler(
101814
101707
  init_swift_root_lock();
101815
101708
  var EXPO_WIDGETS_ROUTE = "/__peach/expo-widgets";
101816
101709
  async function buildExpoWidgetsBundle(appRoot, origin = "") {
101817
- const require2 = (0, import_node_module18.createRequire)(import_node_path123.default.join(appRoot, "package.json"));
101710
+ const require2 = (0, import_node_module19.createRequire)(import_node_path123.default.join(appRoot, "package.json"));
101818
101711
  let manifest;
101819
101712
  try {
101820
101713
  manifest = require2.resolve("expo-widgets/package.json");
@@ -101854,10 +101747,10 @@ init_kotlinDiscoveryContract();
101854
101747
 
101855
101748
  // src/one-native-source.ts
101856
101749
  var import_node_fs131 = __toESM(require("node:fs"), 1);
101857
- var import_node_module20 = require("node:module");
101750
+ var import_node_module21 = require("node:module");
101858
101751
  var import_node_path132 = __toESM(require("node:path"), 1);
101859
101752
  var import_node_url7 = require("node:url");
101860
- var import_ws = require("ws");
101753
+ var import_ws = require("peachsim/vendor/ws");
101861
101754
  init_backend_origin();
101862
101755
  init_kotlinDiscoveryContract();
101863
101756
 
@@ -102056,7 +101949,7 @@ function send2(app, change) {
102056
101949
  if (client2.readyState === import_ws.WebSocket.OPEN) client2.send(message);
102057
101950
  }
102058
101951
  async function swiftPackages2(root) {
102059
- const resolved = (0, import_node_module20.createRequire)(import_node_path132.default.join(root, "package.json")).resolve(
101952
+ const resolved = (0, import_node_module21.createRequire)(import_node_path132.default.join(root, "package.json")).resolve(
102060
101953
  "vxrn/swift-package-id"
102061
101954
  );
102062
101955
  const loaded4 = await import((0, import_node_url7.pathToFileURL)(resolved).href);
@@ -102674,7 +102567,7 @@ init_runtime_packs();
102674
102567
  init_swift_submit();
102675
102568
 
102676
102569
  // src/turbo-bundle.ts
102677
- var import_node_module22 = require("node:module");
102570
+ var import_node_module23 = require("node:module");
102678
102571
  var import_node_path136 = __toESM(require("node:path"), 1);
102679
102572
  init_installed_native_libraries();
102680
102573
  init_swift_distribution();
@@ -102731,7 +102624,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
102731
102624
  const { artifact, collection } = await compileTurboModule({
102732
102625
  appRoot,
102733
102626
  reactNativeRoot: import_node_path136.default.dirname(
102734
- (0, import_node_module22.createRequire)(import_node_path136.default.join(projectRoot, "package.json")).resolve(
102627
+ (0, import_node_module23.createRequire)(import_node_path136.default.join(projectRoot, "package.json")).resolve(
102735
102628
  "react-native/package.json"
102736
102629
  )
102737
102630
  ),
@@ -106116,6 +106009,8 @@ function describeEvent(event) {
106116
106009
  return `websocket frame opcode ${event.opcode} (${event.data.byteLength} bytes) to ${new URL(event.url).origin}`;
106117
106010
  case "tcp":
106118
106011
  return `tcp ${event.host}:${event.port}`;
106012
+ case "udp":
106013
+ return `udp ${event.host}:${event.port}`;
106119
106014
  case "tunnel":
106120
106015
  return `tunnel ${event.host}:${event.port}`;
106121
106016
  case "dns":
@@ -107858,7 +107753,7 @@ var import_http3 = require("http");
107858
107753
  var import_https2 = require("https");
107859
107754
  var import_net2 = require("net");
107860
107755
  var import_tls = require("tls");
107861
- var import_ws2 = require("ws");
107756
+ var import_ws2 = require("peachsim/vendor/ws");
107862
107757
  init_backend_origin();
107863
107758
  init_is_record();
107864
107759