peachsim 0.1.2527 → 0.1.2529

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 (131) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +12 -9
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-T6G4255Y.mjs → acorn-DP76I5LX.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-K24SNWHU.mjs → chunk-4ESBMS7N.mjs} +2 -2
  28. package/dist-lib/esm-chunks/{chunk-IME3ZCZA.mjs → chunk-6RFG5TBM.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-23EBK3TJ.mjs → chunk-6Z7IRZOI.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-76CNB5WD.mjs → chunk-7JPE27MR.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-FUDD62EH.mjs → chunk-B2AUMFHR.mjs} +5 -5
  32. package/dist-lib/esm-chunks/{chunk-JUVIJLAC.mjs → chunk-COT5BNBM.mjs} +12 -12
  33. package/dist-lib/esm-chunks/{chunk-GB4YA5E6.mjs → chunk-DQKUZ34S.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-EAPPXMMI.mjs → chunk-FJQ7PIGT.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-O2JFLUIS.mjs → chunk-G7LSGLNN.mjs} +3 -3
  36. package/dist-lib/esm-chunks/{chunk-XV7GCCWZ.mjs → chunk-GHQDA4Q6.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-UIR3TIDF.mjs → chunk-KVE5PEF7.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-ONMVFFUT.mjs → chunk-LIHP4WC5.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-URPMXOMB.mjs → chunk-N5IOZ4Y2.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-XSINTB4R.mjs → chunk-N6JP6ZEK.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-YO7XYCYV.mjs → chunk-NCT2R5UW.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-5B5UUFBP.mjs → chunk-RXUKY2DH.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-MQDAS7A7.mjs → chunk-TTSPRDG5.mjs} +4 -4
  44. package/dist-lib/esm-chunks/{chunk-P5N2A74E.mjs → chunk-UY744LUK.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-MHIGP7B7.mjs → chunk-XB5NMNMP.mjs} +5 -5
  46. package/dist-lib/esm-chunks/{chunk-SI4WQWVZ.mjs → chunk-YMJXYR5V.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-TEU5G3EC.mjs → chunk-ZH3DACJC.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{metro-layout-parser-HNDOEVIO.mjs → metro-layout-parser-YENXVDM2.mjs} +3 -3
  49. package/dist-lib/esm-chunks/{swift-package-prebuilt-ZS3UDU4T.mjs → swift-package-prebuilt-VJCKF5Z5.mjs} +10 -10
  50. package/dist-lib/esm-chunks/{swift-sdk-app-module-E3OHZL4A.mjs → swift-sdk-app-module-ISPCBQYV.mjs} +13 -13
  51. package/dist-lib/esm-chunks/{swift-sdk-image-IMELPSCR.mjs → swift-sdk-image-4BCVFTGO.mjs} +13 -13
  52. package/dist-lib/esm-chunks/{swift-sdk-image-producer-6326I23S.mjs → swift-sdk-image-producer-JWFPWPYM.mjs} +4 -4
  53. package/dist-lib/expo-swift-bundle.cjs +11 -8
  54. package/dist-lib/expo-swift-metadata.cjs +1 -1
  55. package/dist-lib/expo-swift-metadata.mjs +7 -7
  56. package/dist-lib/home-paths.cjs +1 -1
  57. package/dist-lib/host/bridge-host.cjs +140 -106
  58. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +1 -1
  63. package/dist-lib/index.cjs +1 -1
  64. package/dist-lib/kotlin-host.cjs +1 -1
  65. package/dist-lib/menu.cjs +1 -1
  66. package/dist-lib/menu.mjs +3 -3
  67. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  69. package/dist-lib/metro-production-bundle.cjs +1 -1
  70. package/dist-lib/metro-production-bundle.mjs +4 -4
  71. package/dist-lib/native-app-identity-project.cjs +1 -1
  72. package/dist-lib/native-app-identity-project.mjs +15 -15
  73. package/dist-lib/native-app-identity.cjs +1 -1
  74. package/dist-lib/native-app-identity.mjs +6 -6
  75. package/dist-lib/native-firebase-metadata.cjs +1 -1
  76. package/dist-lib/native-firebase-metadata.mjs +3 -3
  77. package/dist-lib/pdfium-raster.cjs +1 -1
  78. package/dist-lib/pdfium-raster.mjs +2 -2
  79. package/dist-lib/plist.cjs +1 -1
  80. package/dist-lib/plist.mjs +3 -3
  81. package/dist-lib/profiles.cjs +1 -1
  82. package/dist-lib/public-brand.cjs +1 -1
  83. package/dist-lib/public-origins-lib-esm.json +79 -79
  84. package/dist-lib/public-origins-lib.json +69 -69
  85. package/dist-lib/react-native-host-modules.cjs +1 -1
  86. package/dist-lib/react-native-host-modules.mjs +2 -2
  87. package/dist-lib/reap-browser.cjs +1 -1
  88. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  89. package/dist-lib/sdk.cjs +1 -1
  90. package/dist-lib/sdk.mjs +7 -7
  91. package/dist-lib/skills.cjs +160 -126
  92. package/dist-lib/swift-compile.cjs +1 -1
  93. package/dist-lib/swift-compile.mjs +10 -10
  94. package/dist-lib/swift-package.cjs +1 -1
  95. package/dist-lib/swift-package.mjs +3 -3
  96. package/dist-lib/swift-submit.cjs +1 -1
  97. package/dist-lib/swift-submit.mjs +5 -5
  98. package/dist-lib/swift-svg-raster.cjs +1 -1
  99. package/dist-lib/swift-svg-raster.mjs +2 -2
  100. package/dist-lib/swift-toolchain.cjs +1 -1
  101. package/dist-lib/swift.cjs +1 -1
  102. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  103. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  105. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  106. package/dist-lib/vendor/acorn.cjs +1 -1
  107. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  108. package/dist-lib/vendor/ignore.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/plist.cjs +1 -1
  111. package/dist-lib/vendor/smol-toml.cjs +1 -1
  112. package/dist-lib/vendor/stream-json.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase.cjs +1 -1
  118. package/dist-lib/vendor/terser.cjs +1 -1
  119. package/dist-lib/vendor/valibot.cjs +1 -1
  120. package/dist-lib/vendor/ws.cjs +1 -1
  121. package/dist-lib/vendor/zod.cjs +1 -1
  122. package/dist-lib/worklet-executable.cjs +1 -1
  123. package/dist-lib/worklet-executable.mjs +3 -3
  124. package/dist-types/packages/peach-engine/src/engine/nativeScrollContract.d.ts +1 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/native-hot-ops.d.ts +2 -0
  126. package/kotlin/sdk.tar.gz +0 -0
  127. package/package.json +1 -1
  128. package/src/swift-distribution.lock.json +5 -0
  129. package/src/swift-startup-split.ts +66 -61
  130. package/src/turbo-source.ts +7 -4
  131. package/src/wasm-lazy-split.ts +46 -24
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2527 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2529 | (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;
@@ -35508,13 +35508,13 @@ var init_swift_standin_digest = __esm({
35508
35508
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
35509
35509
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
35510
35510
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
35511
- STANDIN_SOURCE_DIGEST = true ? "8e38ad92b17a0f7e662d658ed37a01af4562756c2271dde83551435e4b148112" : standinSourceDigest();
35511
+ STANDIN_SOURCE_DIGEST = true ? "3883edfb29d2c6c02053cf80f32a9f325a44c203f3c988419ca5920a3dcbca8e" : standinSourceDigest();
35512
35512
  }
35513
35513
  });
35514
35514
 
35515
35515
  // src/expo-native-compiler-digest.ts
35516
35516
  function expoNativeCompilerDigestValue() {
35517
- return true ? "255dd743490b7531b34901addf218f5570ec2136fdcb3dabf10c7255e26aad2e" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35517
+ return true ? "b22fea800cc7cd0234dc86833d4d3fb630afaf2ed9d8b426cb7b1f33097a1a92" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35518
35518
  }
35519
35519
  var import_node_crypto12;
35520
35520
  var init_expo_native_compiler_digest = __esm({
@@ -119902,19 +119902,23 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
119902
119902
  (0, import_node_fs130.writeFileSync)(slotFile, slots.join("\n") + "\n");
119903
119903
  const tableTool = (0, import_node_path130.join)((0, import_node_path130.dirname)(binaryen), "wasm-table-guard");
119904
119904
  let primaryTable;
119905
- const guard = async (file, lazy) => {
119905
+ const guard = async (file, lazy, env2) => {
119906
119906
  const guarded = file.replace(/\.wasm$/, ".guarded.wasm");
119907
119907
  let tableMinimum = 0;
119908
119908
  if (primaryTable && !hasFunctionTable((0, import_node_fs130.readFileSync)(file))) (0, import_node_fs130.copyFileSync)(file, guarded);
119909
119909
  else {
119910
- const { stdout } = await run11(tableTool, [
119911
- file,
119912
- guarded,
119913
- named ? "1" : "0",
119914
- shared ? "1" : "0",
119915
- slotFile,
119916
- ...adapted ? ["adapted"] : []
119917
- ]);
119910
+ const { stdout } = await run11(
119911
+ tableTool,
119912
+ [
119913
+ file,
119914
+ guarded,
119915
+ named ? "1" : "0",
119916
+ shared ? "1" : "0",
119917
+ slotFile,
119918
+ ...adapted ? ["adapted"] : []
119919
+ ],
119920
+ { env: env2 }
119921
+ );
119918
119922
  const layout2 = JSON.parse(stdout);
119919
119923
  if (typeof layout2 !== "object" || layout2 === null || !("tableMinimum" in layout2) || typeof layout2.tableMinimum !== "number" || !Number.isInteger(layout2.tableMinimum) || layout2.tableMinimum < 0)
119920
119924
  throw new Error("native table tool emitted an invalid split table minimum");
@@ -119949,22 +119953,33 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
119949
119953
  if (!primaryLazy.has(lazy)) members2.push(lazy);
119950
119954
  lazyByGroup.set(group2, members2);
119951
119955
  }
119952
- const sides = [];
119953
- const dyldGroups = [];
119954
- for (const [id, slots2] of slotsByPart.entries()) {
119956
+ const parts = slotsByPart.flatMap((slots2, id) => {
119955
119957
  const lazy = lazyByGroup.get(id);
119956
- if (slots2.length === 0 && !lazy) continue;
119957
- if (lazy) dyldGroups.push({ first: lazy[0], part: sides.length });
119958
- const part = await guard((0, import_node_path130.join)(directory2, `side-${id}.wasm`), lazy);
119959
- const bytes2 = (0, import_node_fs130.readFileSync)(part.file);
119960
- assertWasmCodeOnly(bytes2);
119961
- sides.push({
119962
- ...part,
119963
- slots: slots2,
119964
- sha256: (0, import_node_crypto77.createHash)("sha256").update(bytes2).digest("hex")
119965
- });
119966
- }
119967
- if (!sides.length) return { primary: describePart(input), sides: [] };
119958
+ return slots2.length || lazy ? [{ id, slots: slots2, lazy }] : [];
119959
+ });
119960
+ if (!parts.length) return { primary: describePart(input), sides: [] };
119961
+ const admitted = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
119962
+ const requested = Number(process.env.BINARYEN_CORES);
119963
+ const jobs = Math.min(
119964
+ 8,
119965
+ (0, import_node_os26.availableParallelism)(),
119966
+ Number.isInteger(admitted) && admitted > 0 ? admitted : 8,
119967
+ Number.isInteger(requested) && requested > 0 ? requested : 8
119968
+ );
119969
+ const env = jobs > 1 ? { ...process.env, BINARYEN_CORES: "1" } : void 0;
119970
+ const sides = await mapLimit(
119971
+ parts,
119972
+ jobs,
119973
+ async ({ id, slots: slots2, lazy }) => {
119974
+ const part = await guard((0, import_node_path130.join)(directory2, `side-${id}.wasm`), lazy, env);
119975
+ const bytes2 = (0, import_node_fs130.readFileSync)(part.file);
119976
+ assertWasmCodeOnly(bytes2);
119977
+ return { ...part, slots: slots2, sha256: (0, import_node_crypto77.createHash)("sha256").update(bytes2).digest("hex") };
119978
+ }
119979
+ );
119980
+ const dyldGroups = parts.flatMap(
119981
+ ({ lazy }, part) => lazy ? [{ first: lazy[0], part }] : []
119982
+ );
119968
119983
  return {
119969
119984
  primary,
119970
119985
  sides,
@@ -120027,17 +120042,20 @@ function describePart(file) {
120027
120042
  );
120028
120043
  return { file, functions, byteLength: bytes.byteLength };
120029
120044
  }
120030
- var import_node_child_process64, import_node_crypto77, import_node_fs130, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
120045
+ var import_node_child_process64, import_node_crypto77, import_node_fs130, import_node_os26, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
120031
120046
  var init_wasm_lazy_split = __esm({
120032
120047
  "src/wasm-lazy-split.ts"() {
120033
120048
  "use strict";
120034
120049
  import_node_child_process64 = require("node:child_process");
120035
120050
  import_node_crypto77 = require("node:crypto");
120036
120051
  import_node_fs130 = require("node:fs");
120052
+ import_node_os26 = require("node:os");
120037
120053
  import_node_path130 = require("node:path");
120038
120054
  import_node_util14 = require("node:util");
120055
+ init_mapLimit();
120039
120056
  init_nativeDyldTableContract();
120040
120057
  init_nativeWasmContract();
120058
+ init_admitted_mac_build();
120041
120059
  init_swift_guest_dyld_functions();
120042
120060
  init_swift_sdk_image_wasm();
120043
120061
  init_wasm_features();
@@ -120131,7 +120149,7 @@ async function splitSwiftApp(bytes, launch2) {
120131
120149
  const environment = launch2.environment.length ? `-${digest2(Buffer.from(JSON.stringify(launch2.environment)))}` : "";
120132
120150
  const guest = launch2.guest ? `-${digest2(Buffer.from(launch2.guest.source))}` : "";
120133
120151
  const args = launch2.arguments?.length ? `-argv-${digest2(Buffer.from(JSON.stringify(launch2.arguments)))}` : "";
120134
- const cache = (0, import_node_path131.join)(parent, `startup-v7-${platform}${environment}${guest}${args}`);
120152
+ const cache = (0, import_node_path131.join)(parent, `startup-v8-${platform}${environment}${guest}${args}`);
120135
120153
  return readSwiftStartupImage(cache) ?? await withStartupWork(bytes, async (work) => {
120136
120154
  const profile = (0, import_node_path131.join)(work.directory, "startup.profile");
120137
120155
  await profileStartup(work, launch2, "url", profile);
@@ -120139,7 +120157,7 @@ async function splitSwiftApp(bytes, launch2) {
120139
120157
  });
120140
120158
  }
120141
120159
  async function splitSwiftSdkImage(bytes, directory2, launch2, app) {
120142
- const profiles2 = (0, import_node_path131.join)(directory2, `profiles-v2-${platform}`);
120160
+ const profiles2 = (0, import_node_path131.join)(directory2, `profiles-v3-${platform}`);
120143
120161
  const prefix = `${app}-`;
120144
120162
  const own2 = (0, import_node_path131.join)(profiles2, `${prefix}${launch2.artifactHash}.profile`);
120145
120163
  const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
@@ -120149,7 +120167,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch2, app) {
120149
120167
  for (const file of files2) hash.update(file);
120150
120168
  const cache = (0, import_node_path131.join)(
120151
120169
  directory2,
120152
- `startup-v9-${platform}-${hash.digest("hex").slice(0, 16)}`
120170
+ `startup-v10-${platform}-${hash.digest("hex").slice(0, 16)}`
120153
120171
  );
120154
120172
  return { files: files2, cache };
120155
120173
  };
@@ -120192,7 +120210,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch2, app) {
120192
120210
  }
120193
120211
  async function withStartupWork(bytes, run18) {
120194
120212
  const binaryen = await installWasmOpt();
120195
- const directory2 = (0, import_node_fs131.mkdtempSync)((0, import_node_path131.join)((0, import_node_os26.tmpdir)(), "peach-swift-startup-"));
120213
+ const directory2 = (0, import_node_fs131.mkdtempSync)((0, import_node_path131.join)((0, import_node_os27.tmpdir)(), "peach-swift-startup-"));
120196
120214
  try {
120197
120215
  const original = (0, import_node_path131.join)(directory2, "full.wasm");
120198
120216
  (0, import_node_fs131.writeFileSync)(original, makeWasmFunctionNamesSingleLine(bytes));
@@ -120203,22 +120221,15 @@ async function withStartupWork(bytes, run18) {
120203
120221
  }
120204
120222
  async function profileStartup(work, launch2, role, output) {
120205
120223
  const instrumented = (0, import_node_path131.join)(work.directory, "instrumented.wasm");
120206
- const firstPaint = (0, import_node_path131.join)(work.directory, "first-paint.profile");
120207
- const afterPaint = (0, import_node_path131.join)(work.directory, "after-paint.profile");
120208
120224
  const functionCount = await instrumentNativeWasm(
120209
120225
  work.original,
120210
120226
  instrumented,
120211
120227
  work.binaryen
120212
120228
  );
120213
120229
  (0, import_node_fs131.writeFileSync)(
120214
- firstPaint,
120215
- await recordStartup(launch2, instrumented, functionCount, 0, role)
120216
- );
120217
- (0, import_node_fs131.writeFileSync)(
120218
- afterPaint,
120219
- await recordStartup(launch2, instrumented, functionCount, postPaintProfileMs, role)
120230
+ output,
120231
+ await bootSwiftPreview(launch2, { instrumented, functionCount, role })
120220
120232
  );
120221
- await mergeNativeWasmProfiles(work.binaryen, [firstPaint, afterPaint], output);
120222
120233
  }
120223
120234
  async function storeStartupSplit(work, profile, parent, cache, partCodeBytes) {
120224
120235
  const split = await splitNativeWasm(
@@ -120272,9 +120283,6 @@ async function storeStartupSplit(work, profile, parent, cache, partCodeBytes) {
120272
120283
  }
120273
120284
  return result;
120274
120285
  }
120275
- function recordStartup(launch2, instrumented, functionCount, afterPaintMs, role) {
120276
- return bootSwiftPreview(launch2, { instrumented, functionCount, afterPaintMs, role });
120277
- }
120278
120286
  async function bootSwiftPreview(launch2, profile) {
120279
120287
  const browser = await launchProvisionedPlaywright({
120280
120288
  chromiumSandbox: true,
@@ -120285,11 +120293,17 @@ async function bootSwiftPreview(launch2, profile) {
120285
120293
  }
120286
120294
  });
120287
120295
  const profileLength = profile ? 8 + 4 * profile.functionCount : 0;
120288
- let receive;
120289
- const collected = new Promise((resolve15) => {
120296
+ let capture = Promise.withResolvers();
120297
+ let receive = (_bytes) => {
120298
+ };
120299
+ const requestCapture = () => {
120300
+ const { promise, resolve: resolve15 } = Promise.withResolvers();
120290
120301
  receive = resolve15;
120291
- });
120292
- const { promise: captureRequested, resolve: requestCapture } = Promise.withResolvers();
120302
+ const asked = capture;
120303
+ capture = Promise.withResolvers();
120304
+ asked.resolve(true);
120305
+ return promise;
120306
+ };
120293
120307
  const guest = launch2.guest ?? { packageName, source: swiftGuestBundle(packageName) };
120294
120308
  const metadataPath = SWIFT_PACKAGE_PATH + encodeURIComponent(guest.packageName);
120295
120309
  const server = (0, import_node_http3.createServer)(async (request, response) => {
@@ -120299,8 +120313,8 @@ async function bootSwiftPreview(launch2, profile) {
120299
120313
  const { pathname } = url;
120300
120314
  setRuntimeIsolationHeaders(response);
120301
120315
  if (profile && pathname === NATIVE_PROFILE_ENDPOINT && request.method === "GET") {
120302
- await captureRequested;
120303
- response.writeHead(204, { "cache-control": "no-store" }).end();
120316
+ const again = await capture.promise;
120317
+ response.writeHead(again ? 204 : 410, { "cache-control": "no-store" }).end();
120304
120318
  return;
120305
120319
  }
120306
120320
  if (profile && pathname === NATIVE_PROFILE_ENDPOINT && request.method === "POST") {
@@ -120390,41 +120404,58 @@ async function bootSwiftPreview(launch2, profile) {
120390
120404
  return false;
120391
120405
  }
120392
120406
  );
120393
- if (!profile) {
120394
- if (!painted)
120395
- throw new Error(
120396
- [
120397
- launchErrors.find((error) => error.startsWith("SwiftCrash:"))?.split("\n")[0] ?? "app did not paint",
120398
- ...launchErrors
120399
- ].join("\n")
120400
- );
120401
- return;
120402
- }
120403
- if (painted && profile.afterPaintMs) await page.waitForTimeout(profile.afterPaintMs);
120404
- requestCapture();
120405
- let deadline;
120406
- try {
120407
- return await Promise.race([
120408
- collected,
120409
- new Promise((_, reject) => {
120410
- deadline = setTimeout(
120411
- () => reject(
120412
- new Error(["app reached no startup profile", ...launchErrors].join("\n"))
120413
- ),
120414
- 5e3
120415
- );
120416
- })
120417
- ]);
120418
- } finally {
120419
- clearTimeout(deadline);
120420
- }
120407
+ if (!painted)
120408
+ throw new Error(
120409
+ [
120410
+ launchErrors.find((error) => error.startsWith("SwiftCrash:"))?.split("\n")[0] ?? "app did not paint",
120411
+ ...launchErrors
120412
+ ].join("\n")
120413
+ );
120414
+ if (!profile) return;
120415
+ const collect = async () => {
120416
+ let deadline;
120417
+ try {
120418
+ return await Promise.race([
120419
+ requestCapture(),
120420
+ new Promise((_, reject) => {
120421
+ deadline = setTimeout(
120422
+ () => reject(
120423
+ new Error(
120424
+ ["app reached no startup profile", ...launchErrors].join("\n")
120425
+ )
120426
+ ),
120427
+ 5e3
120428
+ );
120429
+ })
120430
+ ]);
120431
+ } finally {
120432
+ clearTimeout(deadline);
120433
+ }
120434
+ };
120435
+ const ran = (bytes) => {
120436
+ let count = 0;
120437
+ for (let offset = 8; offset < bytes.length; offset += 4)
120438
+ if (bytes.readUInt32LE(offset)) count++;
120439
+ return count;
120440
+ };
120441
+ const window2 = Date.now() + profileWindowMs;
120442
+ let captured = await collect();
120443
+ for (let count = ran(captured); Date.now() < window2; ) {
120444
+ await page.waitForTimeout(profileQuietMs);
120445
+ const next = await collect();
120446
+ const nextCount = ran(next);
120447
+ captured = next;
120448
+ if (nextCount === count) break;
120449
+ count = nextCount;
120450
+ }
120451
+ return captured;
120421
120452
  } finally {
120422
- requestCapture();
120453
+ capture.resolve(false);
120423
120454
  await browser.close();
120424
120455
  server.close();
120425
120456
  }
120426
120457
  }
120427
- var import_node_crypto78, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
120458
+ var import_node_crypto78, import_node_fs131, import_node_http3, import_node_https2, import_node_os27, import_node_path131, packageName, guestPath, appPath, profileWindowMs, profileQuietMs, digest2, partDigest, platform;
120428
120459
  var init_swift_startup_split = __esm({
120429
120460
  "src/swift-startup-split.ts"() {
120430
120461
  "use strict";
@@ -120432,7 +120463,7 @@ var init_swift_startup_split = __esm({
120432
120463
  import_node_fs131 = require("node:fs");
120433
120464
  import_node_http3 = require("node:http");
120434
120465
  import_node_https2 = require("node:https");
120435
- import_node_os26 = require("node:os");
120466
+ import_node_os27 = require("node:os");
120436
120467
  import_node_path131 = require("node:path");
120437
120468
  init_simulator_route2();
120438
120469
  init_nativeWasmContract();
@@ -120452,7 +120483,7 @@ var init_swift_startup_split = __esm({
120452
120483
  guestPath = "/__peach/swift-guest.js";
120453
120484
  appPath = "/__peach/swift/startup.wasm";
120454
120485
  profileWindowMs = 3e4;
120455
- postPaintProfileMs = 850;
120486
+ profileQuietMs = 2e3;
120456
120487
  digest2 = (bytes) => (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
120457
120488
  partDigest = /^[a-f0-9]{64}$/;
120458
120489
  platform = `${process.platform}-${process.arch}`;
@@ -122144,7 +122175,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs2, resourceBundles) {
122144
122175
  }
122145
122176
  }
122146
122177
  if (xcode?.app.postBundleScripts.length) {
122147
- const dir = import_node_fs132.default.mkdtempSync(import_node_path132.default.join(import_node_os27.default.tmpdir(), "peach-xcode-bundle-"));
122178
+ const dir = import_node_fs132.default.mkdtempSync(import_node_path132.default.join(import_node_os28.default.tmpdir(), "peach-xcode-bundle-"));
122148
122179
  const wrapper = import_node_path132.default.basename(xcode.app.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")) || `${xcode.app.name}.app`;
122149
122180
  const bundle = import_node_path132.default.join(dir, wrapper);
122150
122181
  try {
@@ -123569,7 +123600,7 @@ function disposeSwiftProject(packagePath, signal) {
123569
123600
  xcodeProjects().delete(packagePath);
123570
123601
  sourceEntries().delete(packagePath);
123571
123602
  }
123572
- var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, swiftArtifactDigests, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123603
+ var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os28, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, swiftArtifactDigests, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123573
123604
  var init_swift_host = __esm({
123574
123605
  "src/swift-host.ts"() {
123575
123606
  "use strict";
@@ -123577,7 +123608,7 @@ var init_swift_host = __esm({
123577
123608
  import_node_child_process65 = require("node:child_process");
123578
123609
  import_node_crypto79 = require("node:crypto");
123579
123610
  import_node_fs132 = __toESM(require("node:fs"), 1);
123580
- import_node_os27 = __toESM(require("node:os"), 1);
123611
+ import_node_os28 = __toESM(require("node:os"), 1);
123581
123612
  import_node_path132 = __toESM(require("node:path"), 1);
123582
123613
  init_pngHeader();
123583
123614
  init_nativeSdkBindingContract();
@@ -126768,7 +126799,7 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
126768
126799
  // an app's Fabric component views, which its own Fabric host defines. the
126769
126800
  // bridge proxy and module decorator are what RCTInstance gives the renderer's
126770
126801
  // context container, where the legacy view manager interop reads them
126771
- void peachInstallFabricViews(facebook::jsi::Runtime &runtime, std::shared_ptr<facebook::react::CallInvoker> invoker, id bridgeProxy, id moduleDecorator) __attribute__((weak));
126802
+ void peachInstallFabricViews(facebook::jsi::Runtime &runtime, std::shared_ptr<facebook::react::CallInvoker> invoker, id bridgeProxy, id moduleDecorator, id imageLoader) __attribute__((weak));
126772
126803
  void peachTeardownFabricViews() __attribute__((weak));
126773
126804
 
126774
126805
  // UIKitCore: the key window and root view controller an app delegate makes at launch
@@ -126873,7 +126904,9 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
126873
126904
  }];
126874
126905
  [decorator.moduleRegistry setTurboModuleRegistry:manager];
126875
126906
  [manager installJSBindings:runtime];
126876
- if (peachInstallFabricViews) peachInstallFabricViews(runtime, invoker, ${bridgeProxy ? "bridgeProxy" : "nil"}, decorator);
126907
+ if (peachInstallFabricViews) {
126908
+ peachInstallFabricViews(runtime, invoker, ${bridgeProxy ? "bridgeProxy" : "nil"}, decorator, [manager moduleForName:"RCTImageLoader"]);
126909
+ }
126877
126910
  }
126878
126911
 
126879
126912
  // the screenshot the device took, as UIKit posts it to every observer in the
@@ -127667,13 +127700,14 @@ static void peachEventDispatcherDispatchEvent(id self, SEL _cmd, id<RCTEvent> ev
127667
127700
  react::convertIdToFollyDynamic(body));
127668
127701
  }
127669
127702
  @end
127670
- ` : ""}void peachInstallFabricViews(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> invoker, id bridgeProxy, id moduleDecorator) {
127703
+ ` : ""}void peachInstallFabricViews(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> invoker, id bridgeProxy, id moduleDecorator, id imageLoader) {
127671
127704
  fabricInvoker = std::move(invoker);
127672
127705
  fabricComponents = [PeachFabricComponents new];
127673
127706
  RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
127674
127707
  factory.thirdPartyFabricComponentsProvider = fabricComponents;
127675
127708
  fabricRegistry = [RCTComponentViewRegistry new];
127676
127709
  fabricContext = std::make_shared<react::ContextContainer>();
127710
+ fabricContext->insert("RCTImageLoader", react::wrapManagedObject(imageLoader));
127677
127711
  fabricScheduler = std::make_shared<react::RuntimeScheduler>(
127678
127712
  [](std::function<void(jsi::Runtime &)> &&work) { fabricInvoker->invokeAsync(std::move(work)); });
127679
127713
  fabricContext->insert(react::RuntimeSchedulerKey, std::weak_ptr<react::RuntimeScheduler>(fabricScheduler));
@@ -128463,6 +128497,7 @@ class JsCallInvoker final : public react::CallInvoker {
128463
128497
  #include <react/renderer/core/StateUpdate.h>
128464
128498
  #include <react/renderer/runtimescheduler/RuntimeScheduler.h>
128465
128499
  #include <react/utils/ContextContainer.h>
128500
+ #include <react/utils/ManagedObjectWrapper.h>
128466
128501
  #include <algorithm>
128467
128502
  #include <array>
128468
128503
  #include <cmath>
@@ -128497,7 +128532,6 @@ using namespace facebook;
128497
128532
  #include <react/renderer/components/view/ViewEventEmitter.h>
128498
128533
  #include <react/renderer/core/ShadowNodeFragment.h>
128499
128534
  #include <react/utils/FollyConvert.h>
128500
- #include <react/utils/ManagedObjectWrapper.h>
128501
128535
  #include <cmath>
128502
128536
  #include <cstdio>
128503
128537
  #include <mutex>
@@ -129208,7 +129242,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
129208
129242
  async function prepareTurboCompileInput(options2) {
129209
129243
  await prepareTurboSourceDependencies(options2.reactNativeRoot);
129210
129244
  const key2 = (0, import_node_crypto82.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
129211
- const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
129245
+ const scratch2 = import_node_path137.default.join(import_node_os29.default.tmpdir(), "peach-turbo-swift", key2);
129212
129246
  import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
129213
129247
  const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
129214
129248
  const collection = await collectTurboSources({
@@ -129408,14 +129442,14 @@ async function compileTurboModule(options2) {
129408
129442
  collection
129409
129443
  };
129410
129444
  }
129411
- var import_node_crypto82, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
129445
+ var import_node_crypto82, import_node_fs137, import_node_module18, import_node_os29, import_node_path137;
129412
129446
  var init_turbo_compile = __esm({
129413
129447
  "src/turbo-compile.ts"() {
129414
129448
  "use strict";
129415
129449
  import_node_crypto82 = require("node:crypto");
129416
129450
  import_node_fs137 = __toESM(require("node:fs"), 1);
129417
129451
  import_node_module18 = require("node:module");
129418
- import_node_os28 = __toESM(require("node:os"), 1);
129452
+ import_node_os29 = __toESM(require("node:os"), 1);
129419
129453
  import_node_path137 = __toESM(require("node:path"), 1);
129420
129454
  init_native_app_identity_project();
129421
129455
  init_nitro_adapter();
@@ -129765,7 +129799,7 @@ var init_react_native_core = __esm({
129765
129799
  init_swift_distribution();
129766
129800
  init_swift_package();
129767
129801
  init_swiftContract();
129768
- recipe = true ? "f9ce5f0cb35e2257b4d3d0df0446d353185529cbdbaa0dcbd0a6382287d69852" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
129802
+ recipe = true ? "b82a829c3491cbd76f8e400906349226a7ee455970ef249f9c41adc87541e84b" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
129769
129803
  strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
129770
129804
  building = /* @__PURE__ */ new Map();
129771
129805
  }
@@ -131607,7 +131641,7 @@ function expoUnitAppPaths(unit2) {
131607
131641
  });
131608
131642
  }
131609
131643
  function expoSwiftPackage(appKey, name3) {
131610
- return import_node_path141.default.join(import_node_os29.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
131644
+ return import_node_path141.default.join(import_node_os30.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
131611
131645
  }
131612
131646
  function failureRecordPath(packagePath) {
131613
131647
  const app = import_node_path141.default.dirname(import_node_path141.default.dirname(packagePath));
@@ -132387,7 +132421,7 @@ ${diagnostics}`}`
132387
132421
  }
132388
132422
  return true;
132389
132423
  }
132390
- var import_node_async_hooks3, import_node_child_process69, import_node_crypto85, import_node_fs141, import_node_module20, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132424
+ var import_node_async_hooks3, import_node_child_process69, import_node_crypto85, import_node_fs141, import_node_module20, import_node_os30, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132391
132425
  var init_expo_swift_host = __esm({
132392
132426
  "src/expo-swift-host.ts"() {
132393
132427
  "use strict";
@@ -132396,7 +132430,7 @@ var init_expo_swift_host = __esm({
132396
132430
  import_node_crypto85 = require("node:crypto");
132397
132431
  import_node_fs141 = __toESM(require("node:fs"), 1);
132398
132432
  import_node_module20 = require("node:module");
132399
- import_node_os29 = __toESM(require("node:os"), 1);
132433
+ import_node_os30 = __toESM(require("node:os"), 1);
132400
132434
  import_node_path141 = __toESM(require("node:path"), 1);
132401
132435
  import_node_url7 = require("node:url");
132402
132436
  import_node_util17 = require("node:util");
@@ -132473,13 +132507,13 @@ function expoPodsBundleInputs(podKeys, oneSDK = false) {
132473
132507
  )
132474
132508
  };
132475
132509
  }
132476
- var import_node_child_process70, import_node_fs142, import_node_os30, import_node_path142, v9, sliceTargetSchema, resourceBundleSchema, sliceManifestSchema, expoAppBundleEntryUrl;
132510
+ var import_node_child_process70, import_node_fs142, import_node_os31, import_node_path142, v9, sliceTargetSchema, resourceBundleSchema, sliceManifestSchema, expoAppBundleEntryUrl;
132477
132511
  var init_native_package_slice = __esm({
132478
132512
  "src/native-package-slice.ts"() {
132479
132513
  "use strict";
132480
132514
  import_node_child_process70 = require("node:child_process");
132481
132515
  import_node_fs142 = __toESM(require("node:fs"), 1);
132482
- import_node_os30 = __toESM(require("node:os"), 1);
132516
+ import_node_os31 = __toESM(require("node:os"), 1);
132483
132517
  import_node_path142 = __toESM(require("node:path"), 1);
132484
132518
  v9 = __toESM(require("peachsim/vendor/valibot"), 1);
132485
132519
  init_expo_swift_host();
@@ -137406,7 +137440,7 @@ async function oneWidgetPackage(appRoot) {
137406
137440
  ].join("\n")
137407
137441
  );
137408
137442
  const packagePath = import_node_path152.default.join(
137409
- import_node_os31.default.tmpdir(),
137443
+ import_node_os32.default.tmpdir(),
137410
137444
  "peach-one-widgets",
137411
137445
  (0, import_node_crypto89.createHash)("sha256").update(root).digest("hex"),
137412
137446
  ONE_WIDGET_PACKAGE
@@ -137422,13 +137456,13 @@ async function oneWidgetPackage(appRoot) {
137422
137456
  widget
137423
137457
  };
137424
137458
  }
137425
- var import_node_crypto89, import_node_fs152, import_node_os31, import_node_path152;
137459
+ var import_node_crypto89, import_node_fs152, import_node_os32, import_node_path152;
137426
137460
  var init_one_widget_package = __esm({
137427
137461
  "src/one-widget-package.ts"() {
137428
137462
  "use strict";
137429
137463
  import_node_crypto89 = require("node:crypto");
137430
137464
  import_node_fs152 = __toESM(require("node:fs"), 1);
137431
- import_node_os31 = __toESM(require("node:os"), 1);
137465
+ import_node_os32 = __toESM(require("node:os"), 1);
137432
137466
  import_node_path152 = __toESM(require("node:path"), 1);
137433
137467
  init_one_widget_metadata();
137434
137468
  init_swift_compile();
@@ -141195,7 +141229,7 @@ async function prepareNitroCompileInput(options2) {
141195
141229
  );
141196
141230
  if (reactProviders.length > 0 || usesReactHeaders) {
141197
141231
  const nitroReactCodegenDir = import_node_fs164.default.mkdtempSync(
141198
- import_node_path165.default.join(import_node_os32.default.tmpdir(), "peach-nitro-react-")
141232
+ import_node_path165.default.join(import_node_os33.default.tmpdir(), "peach-nitro-react-")
141199
141233
  );
141200
141234
  let support;
141201
141235
  try {
@@ -141287,7 +141321,7 @@ async function prepareNitroCompileInput(options2) {
141287
141321
  const key2 = (0, import_node_crypto98.createHash)("sha256").update(
141288
141322
  collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
141289
141323
  ).update("\0").update(import_node_fs164.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
141290
- const packagePath = import_node_path165.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
141324
+ const packagePath = import_node_path165.default.join(import_node_os33.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
141291
141325
  const sharedLibrary = [...nativeLibraries.values()].find(
141292
141326
  (pod) => pod.sharedLibrary
141293
141327
  )?.sharedLibrary;
@@ -141341,13 +141375,13 @@ function nitrogenGeneratedSources(podDirectory) {
141341
141375
  ...sources(import_node_path165.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
141342
141376
  ];
141343
141377
  }
141344
- var import_node_crypto98, import_node_fs164, import_node_os32, import_node_path165, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141378
+ var import_node_crypto98, import_node_fs164, import_node_os33, import_node_path165, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141345
141379
  var init_nitro_compile = __esm({
141346
141380
  "src/nitro-compile.ts"() {
141347
141381
  "use strict";
141348
141382
  import_node_crypto98 = require("node:crypto");
141349
141383
  import_node_fs164 = __toESM(require("node:fs"), 1);
141350
- import_node_os32 = __toESM(require("node:os"), 1);
141384
+ import_node_os33 = __toESM(require("node:os"), 1);
141351
141385
  import_node_path165 = __toESM(require("node:path"), 1);
141352
141386
  init_answeredNativePackages();
141353
141387
  init_installed_native_libraries();
@@ -141564,7 +141598,7 @@ var init_nitro_superset = __esm({
141564
141598
  init_nitroContract();
141565
141599
  init_swift_standin_digest();
141566
141600
  NITRO_SUPERSET_ENTRY_NAME = "superset";
141567
- NITRO_COMPILER_DIGEST = true ? "c702c4bf39715f02db4c0aa7e482abacc6d78fa540cc9da4e7f8600703e2b869" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141601
+ NITRO_COMPILER_DIGEST = true ? "30bd6a257c3a19ad41e33874df22ff116d6881f600a2f9b9db7c725c66395266" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141568
141602
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
141569
141603
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
141570
141604
  published3 = /* @__PURE__ */ new Map();
@@ -150292,16 +150326,16 @@ function setPauseAwareTimeout(fn, budgetMs, hostPid) {
150292
150326
  schedule();
150293
150327
  };
150294
150328
  }
150295
- var import_node_child_process77, import_node_fs178, import_node_os33, import_node_path181, LEDGER_PATH2, TICK_MS2, timers, poll, pollDueAt;
150329
+ var import_node_child_process77, import_node_fs178, import_node_os34, import_node_path181, LEDGER_PATH2, TICK_MS2, timers, poll, pollDueAt;
150296
150330
  var init_pause_aware_timeout = __esm({
150297
150331
  "cli/pause-aware-timeout.ts"() {
150298
150332
  "use strict";
150299
150333
  import_node_child_process77 = require("node:child_process");
150300
150334
  import_node_fs178 = require("node:fs");
150301
- import_node_os33 = __toESM(require("node:os"), 1);
150335
+ import_node_os34 = __toESM(require("node:os"), 1);
150302
150336
  import_node_path181 = __toESM(require("node:path"), 1);
150303
150337
  LEDGER_PATH2 = import_node_path181.default.join(
150304
- process.env.TM_HOME || import_node_path181.default.join(import_node_os33.default.homedir(), ".team-machine"),
150338
+ process.env.TM_HOME || import_node_path181.default.join(import_node_os34.default.homedir(), ".team-machine"),
150305
150339
  "governor-pauses.json"
150306
150340
  );
150307
150341
  TICK_MS2 = 500;
@@ -154289,7 +154323,7 @@ var init_crash_fingerprint = __esm({
154289
154323
  // cli/telemetry.ts
154290
154324
  function sanitizeDiagnosticMessage(value) {
154291
154325
  const firstLine = value.slice(0, 2048).split(/[\r\n\u2028\u2029]/, 1)[0] ?? "";
154292
- return firstLine.split((0, import_node_os34.homedir)()).join("<home>").replace(
154326
+ return firstLine.split((0, import_node_os35.homedir)()).join("<home>").replace(
154293
154327
  /<package:(?:@[\w.-]+\/)?[\w.-]+>|(?:https?:\/\/|file:\/\/|[A-Za-z]:[\\/]|<home>[\\/]|\/|\.{1,2}[\\/]|\b[\w.-]+[\\/])(?:[^\s"'<>]|\s(?=[^"'<>]*[\\/]))+/g,
154294
154328
  (location) => {
154295
154329
  if (location.startsWith("<package:")) return location;
@@ -154321,13 +154355,13 @@ function trackCliDiagnostic(diagnostic) {
154321
154355
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
154322
154356
  });
154323
154357
  }
154324
- var import_node_crypto109, import_node_fs183, import_node_os34, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
154358
+ var import_node_crypto109, import_node_fs183, import_node_os35, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
154325
154359
  var init_telemetry = __esm({
154326
154360
  "cli/telemetry.ts"() {
154327
154361
  "use strict";
154328
154362
  import_node_crypto109 = require("node:crypto");
154329
154363
  import_node_fs183 = require("node:fs");
154330
- import_node_os34 = require("node:os");
154364
+ import_node_os35 = require("node:os");
154331
154365
  init_event_identity();
154332
154366
  init_cli_version();
154333
154367
  init_crash_fingerprint();
@@ -160803,7 +160837,7 @@ function stageBuiltBundleManifest(bundleUrl, config) {
160803
160837
  const bundle = new URL(bundleUrl);
160804
160838
  if (!isStagedHostFileRequest(bundle.pathname) || Object.keys(config).length === 0)
160805
160839
  return null;
160806
- const directory2 = import_node_fs189.default.mkdtempSync(import_node_path190.default.join(import_node_os35.default.tmpdir(), "peach-app-manifest-"));
160840
+ const directory2 = import_node_fs189.default.mkdtempSync(import_node_path190.default.join(import_node_os36.default.tmpdir(), "peach-app-manifest-"));
160807
160841
  try {
160808
160842
  const file = import_node_path190.default.join(directory2, "manifest.json");
160809
160843
  import_node_fs189.default.writeFileSync(file, JSON.stringify({ extra: { expoClient: config } }));
@@ -161072,12 +161106,12 @@ function applyShellLaunchOptions(url, opts) {
161072
161106
  for (const entry of opts.args ?? []) url.searchParams.append("arg", entry);
161073
161107
  return url;
161074
161108
  }
161075
- var import_node_fs189, import_node_os35, import_node_path190, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS, startedExpoConfigReads;
161109
+ var import_node_fs189, import_node_os36, import_node_path190, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS, startedExpoConfigReads;
161076
161110
  var init_shell_url = __esm({
161077
161111
  "cli/commands/shell-url.ts"() {
161078
161112
  "use strict";
161079
161113
  import_node_fs189 = __toESM(require("node:fs"), 1);
161080
- import_node_os35 = __toESM(require("node:os"), 1);
161114
+ import_node_os36 = __toESM(require("node:os"), 1);
161081
161115
  import_node_path190 = __toESM(require("node:path"), 1);
161082
161116
  init_androidAutolinkingContract();
161083
161117
  init_androidRootModuleContract();
@@ -174552,7 +174586,7 @@ function repositories(body, where) {
174552
174586
  if (name3 === "google") roots.push("https://dl.google.com/dl/android/maven2");
174553
174587
  else if (name3 === "mavenCentral") roots.push("https://repo1.maven.org/maven2");
174554
174588
  else if (name3 === "mavenLocal")
174555
- roots.push(import_node_path198.default.join(import_node_os36.default.homedir(), ".m2", "repository"));
174589
+ roots.push(import_node_path198.default.join(import_node_os37.default.homedir(), ".m2", "repository"));
174556
174590
  else {
174557
174591
  const declared = direct ?? /["']([^"']+)["']/.exec(block2 ?? "")?.[1];
174558
174592
  if (!declared)
@@ -174659,7 +174693,7 @@ function extract(bytes, where) {
174659
174693
  const cached5 = pending.get(key2);
174660
174694
  if (cached5) return cached5;
174661
174695
  const request = (async () => {
174662
- const dest = import_node_path198.default.join(import_node_os36.default.tmpdir(), "peach-maven-sources", key2);
174696
+ const dest = import_node_path198.default.join(import_node_os37.default.tmpdir(), "peach-maven-sources", key2);
174663
174697
  const marker = import_node_path198.default.join(dest, ".complete");
174664
174698
  if (!import_node_fs197.default.existsSync(marker)) {
174665
174699
  const sources = zipSources(bytes, where);
@@ -174766,13 +174800,13 @@ async function kotlinSources2(bytes, where) {
174766
174800
  if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
174767
174801
  return kotlin;
174768
174802
  }
174769
- var import_node_crypto116, import_node_fs197, import_node_os36, import_node_path198, import_node_zlib12, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174803
+ var import_node_crypto116, import_node_fs197, import_node_os37, import_node_path198, import_node_zlib12, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174770
174804
  var init_kotlin_maven_sources = __esm({
174771
174805
  "src/kotlin-maven-sources.ts"() {
174772
174806
  "use strict";
174773
174807
  import_node_crypto116 = require("node:crypto");
174774
174808
  import_node_fs197 = __toESM(require("node:fs"), 1);
174775
- import_node_os36 = __toESM(require("node:os"), 1);
174809
+ import_node_os37 = __toESM(require("node:os"), 1);
174776
174810
  import_node_path198 = __toESM(require("node:path"), 1);
174777
174811
  import_node_zlib12 = require("node:zlib");
174778
174812
  pending = /* @__PURE__ */ new Map();
@@ -176536,7 +176570,7 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
176536
176570
  }
176537
176571
  const { executable, prefixArgs } = rnxSelfInvocation();
176538
176572
  const bridgeLogPath = import_node_path204.default.join(
176539
- import_node_os37.default.tmpdir(),
176573
+ import_node_os38.default.tmpdir(),
176540
176574
  `peach-bridge-${Date.now()}-${process.pid}.log`
176541
176575
  );
176542
176576
  const bridgeLogFd = import_node_fs203.default.openSync(bridgeLogPath, "a");
@@ -176721,8 +176755,8 @@ function unreachableBridgeMessage(port, handshake, timeoutMs) {
176721
176755
  return `peach open: requested bridge port ${port} is held by another program, not a peach bridge. stop it or pass a free port with --port <port>.`;
176722
176756
  }
176723
176757
  if (handshake === "timeout") {
176724
- const cores = Math.max(1, import_node_os37.default.cpus().length);
176725
- const load2 = import_node_os37.default.loadavg()[0];
176758
+ const cores = Math.max(1, import_node_os38.default.cpus().length);
176759
+ const load2 = import_node_os38.default.loadavg()[0];
176726
176760
  if (load2 >= cores) {
176727
176761
  return `peach open: requested bridge port ${port} did not finish its handshake within ${timeoutMs / 1e3}s while load average was ${load2.toFixed(1)} on ${cores} cores.`;
176728
176762
  }
@@ -176798,7 +176832,7 @@ async function stagePrebuiltBundle(file, bridgePort, prepareSource) {
176798
176832
  }
176799
176833
  function normalizeReplacementPath(filePath) {
176800
176834
  if (filePath.startsWith("~/")) {
176801
- return import_node_path204.default.join(import_node_os37.default.homedir(), filePath.slice(2));
176835
+ return import_node_path204.default.join(import_node_os38.default.homedir(), filePath.slice(2));
176802
176836
  }
176803
176837
  if (import_node_path204.default.isAbsolute(filePath)) return filePath;
176804
176838
  return import_node_path204.default.resolve(process.cwd(), filePath);
@@ -178100,7 +178134,7 @@ async function openSim(args, opts) {
178100
178134
  });
178101
178135
  const attached = await bridge.listSims().then((sims) => sims.find((sim) => sim.id === match.id)?.readyState ?? "gone").catch(() => "unknown");
178102
178136
  console.error(
178103
- ` sim ${match.id} bridge state: ${attached}; host load ${import_node_os37.default.loadavg()[0].toFixed(1)} on ${import_node_os37.default.cpus().length} cpus (a loaded host slows a cold first bundle past the budget; a sim that is open but never answers has a blocked page)`
178137
+ ` sim ${match.id} bridge state: ${attached}; host load ${import_node_os38.default.loadavg()[0].toFixed(1)} on ${import_node_os38.default.cpus().length} cpus (a loaded host slows a cold first bundle past the budget; a sim that is open but never answers has a blocked page)`
178104
178138
  );
178105
178139
  await printBridgeFailureDiagnostics(bridge, {
178106
178140
  errorsCommand: `peach get errors 5${hint}`,
@@ -178453,7 +178487,7 @@ async function runCloseCommand(args, opts = {}) {
178453
178487
  bridge.close();
178454
178488
  }
178455
178489
  }
178456
- var import_node_child_process79, import_node_fs203, import_node_http7, import_node_https3, import_node_net, import_node_os37, import_node_path204, import_ws8, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, OPEN_BRIDGE_RUNTIME_TIMEOUT_MS, OPEN_BRIDGE_HEALTH_TIMEOUT_MS, OPEN_BRIDGE_SILENCE_MS, LIVE_BRIDGE_HANDSHAKE_TIMEOUT_MS;
178490
+ var import_node_child_process79, import_node_fs203, import_node_http7, import_node_https3, import_node_net, import_node_os38, import_node_path204, import_ws8, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, OPEN_BRIDGE_RUNTIME_TIMEOUT_MS, OPEN_BRIDGE_HEALTH_TIMEOUT_MS, OPEN_BRIDGE_SILENCE_MS, LIVE_BRIDGE_HANDSHAKE_TIMEOUT_MS;
178457
178491
  var init_control = __esm({
178458
178492
  "cli/commands/control.ts"() {
178459
178493
  "use strict";
@@ -178462,7 +178496,7 @@ var init_control = __esm({
178462
178496
  import_node_http7 = __toESM(require("node:http"), 1);
178463
178497
  import_node_https3 = __toESM(require("node:https"), 1);
178464
178498
  import_node_net = __toESM(require("node:net"), 1);
178465
- import_node_os37 = __toESM(require("node:os"), 1);
178499
+ import_node_os38 = __toESM(require("node:os"), 1);
178466
178500
  import_node_path204 = __toESM(require("node:path"), 1);
178467
178501
  init_src();
178468
178502
  init_src2();