peachsim 0.1.1886 → 0.1.1888

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 (92) hide show
  1. package/cli/native-input.ts +1 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +208 -83
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +5 -3
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +138 -43
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +149 -25
  32. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +18 -4
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +18 -4
  48. package/dist-lib/native-app-identity-project.cjs +17 -3
  49. package/dist-lib/native-app-identity-project.mjs +24 -4
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +27 -24
  61. package/dist-lib/public-origins-lib.json +70 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +185 -43
  69. package/dist-lib/swift-compile.cjs +102 -13
  70. package/dist-lib/swift-compile.mjs +106 -12
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +2 -2
  74. package/dist-lib/swift-submit.mjs +2 -2
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +118 -19
  78. package/dist-lib/vite.cjs +2 -2
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/package.json +1 -1
  82. package/runtime-companion.json +1 -1
  83. package/src/expo-swift-bundle.ts +2 -7
  84. package/src/expo-swift-ready.ts +5 -2
  85. package/src/nitro-bundle.ts +7 -10
  86. package/src/podspec-sources.ts +20 -0
  87. package/src/swift-compile.ts +11 -5
  88. package/src/swift-host.ts +32 -19
  89. package/src/swift-icu.ts +60 -18
  90. package/src/swift-submit.ts +3 -1
  91. package/src/turbo-bundle.ts +1 -1
  92. package/src/turbo-codegen-intake.ts +10 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1886 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1888 | (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;
@@ -2896,25 +2896,25 @@ var init_capability_inventory_coverage = __esm({
2896
2896
  ios: {
2897
2897
  combined: {
2898
2898
  raw: {
2899
- covered: 274,
2900
- ratio: 0.161651917404,
2899
+ covered: 279,
2900
+ ratio: 0.164601769912,
2901
2901
  total: 1695
2902
2902
  },
2903
2903
  weighted: {
2904
- covered: 0.589252284991,
2905
- ratio: 0.129005038694,
2904
+ covered: 0.596373380318,
2905
+ ratio: 0.130564060529,
2906
2906
  total: 4.56766875895
2907
2907
  }
2908
2908
  },
2909
2909
  semantic: {
2910
2910
  raw: {
2911
- covered: 274,
2912
- ratio: 0.218326693227,
2911
+ covered: 279,
2912
+ ratio: 0.222310756972,
2913
2913
  total: 1255
2914
2914
  },
2915
2915
  weighted: {
2916
- covered: 0.589252284991,
2917
- ratio: 0.551403153229,
2916
+ covered: 0.596373380318,
2917
+ ratio: 0.558066842989,
2918
2918
  total: 1.06864148589
2919
2919
  }
2920
2920
  },
@@ -10965,7 +10965,7 @@ var init_registry = __esm({
10965
10965
  {
10966
10966
  range: ">=2.0.0-beta.100",
10967
10967
  coverage: 0.72,
10968
- note: "native-seam for one's native modules and host views, tested with One 2.14.1. one's React code runs from the bundle and converts its public props into native host props. One.SecureStore imports One's SecureStoreOptions and does not throw Expo MissingPlistKeyException for requireAuthentication; getItem and an overwriting setItem of an authenticated item scan through the simulator Face ID alert and reject E_SECURE_STORE_GET or E_SECURE_STORE_SET with the status.",
10968
+ note: "native-seam for one's native modules and host views, tested with One 2.15.0. one's React code runs from the bundle and converts its public props into native host props. One.SecureStore imports One's SecureStoreOptions and does not throw Expo MissingPlistKeyException for requireAuthentication; getItem and an overwriting setItem of an authenticated item scan through the simulator Face ID alert and reject E_SECURE_STORE_GET or E_SECURE_STORE_SET with the status.",
10969
10969
  working: "One.SecureStore, One.UI.SafeArea provider metrics, One.iOS.ToolbarHost, BarButtonItem with SF Symbols/image sources, badges, fixed/fluid spacers, view children, nested MenuAction trees, disabled/selected/destructive actions, visible action callbacks, Swift.DefaultToolbarItem sidebarToggle and title at automatic placement in an inline NavigationStack, minimized search at bottomBar placement, Swift.Tab navigationStack false page and shared toolbar, ZoomTransitionSource source-window registration, ZoomTransitionEnabler destination alignment, OneNativeDatePicker graphical calendar, compact date popover, editable time capsules, explicit wheels, controlled selection events, locale, timezone and date bounds",
10970
10970
  missing: "One.UI.PictureInPicture never enters picture in picture, Color native host, SplitView gamma host, other DefaultToolbarItem placements and containers, bottom SearchBarSlot integration with a configured native search controller, exact UIKit shared-background grouping"
10971
10971
  }
@@ -30781,7 +30781,7 @@ var init_swift_submit = __esm({
30781
30781
  MAX_SWIFT_COMPILE_IMAGES = 256;
30782
30782
  MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
30783
30783
  MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
30784
- SWIFT_HOST_ABI = 68;
30784
+ SWIFT_HOST_ABI = 69;
30785
30785
  POLL_INTERVAL_MS = 1500;
30786
30786
  }
30787
30787
  });
@@ -51568,6 +51568,76 @@ var init_swift_guest_compile = __esm({
51568
51568
  }
51569
51569
  });
51570
51570
 
51571
+ // ../peach-compat/src/stubs/wasm-memory.ts
51572
+ var init_wasm_memory = __esm({
51573
+ "../peach-compat/src/stubs/wasm-memory.ts"() {
51574
+ "use strict";
51575
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
51576
+ }
51577
+ });
51578
+
51579
+ // ../sootsim-swift/src/icuData.ts
51580
+ function swiftIcuLayout(head, blobBytes) {
51581
+ const view = new DataView(head.buffer, head.byteOffset, head.byteLength);
51582
+ const toc = view.getUint16(0, true);
51583
+ if (head[2] !== 218 || head[3] !== 39)
51584
+ throw new Error("swift icu data has no icu header");
51585
+ const count = view.getUint32(toc, true);
51586
+ const names = [];
51587
+ const offsets = new Uint32Array(count + 1);
51588
+ const decoder2 = new TextDecoder("latin1");
51589
+ for (let index = 0; index < count; index++) {
51590
+ const name3 = toc + view.getUint32(toc + 4 + index * 8, true);
51591
+ offsets[index] = toc + view.getUint32(toc + 8 + index * 8, true);
51592
+ names.push(decoder2.decode(head.subarray(name3, head.indexOf(0, name3))));
51593
+ }
51594
+ offsets[count] = blobBytes;
51595
+ const packOf = new Uint32Array(count);
51596
+ const packs = [];
51597
+ for (let index = 0; index < count; index++) {
51598
+ const last = packs[packs.length - 1];
51599
+ if (last && offsets[index + 1] - last[0] <= PACK_BYTES) last[1] = offsets[index + 1];
51600
+ else packs.push([offsets[index], offsets[index + 1]]);
51601
+ packOf[index] = packs.length - 1;
51602
+ }
51603
+ return { headBytes: offsets[0], names, packOf, packs };
51604
+ }
51605
+ function swiftIcuPack(blob, deflate2) {
51606
+ const layout2 = swiftIcuLayout(blob, blob.byteLength);
51607
+ const parts = [
51608
+ deflate2(blob.subarray(0, layout2.headBytes)),
51609
+ ...layout2.packs.map(([start, end]) => deflate2(blob.subarray(start, end)))
51610
+ ];
51611
+ const index = new DataView(new ArrayBuffer(16 + parts.length * 4));
51612
+ index.setUint32(0, MAGIC, true);
51613
+ index.setUint32(4, VERSION, true);
51614
+ index.setUint32(8, blob.byteLength, true);
51615
+ index.setUint32(12, layout2.packs.length, true);
51616
+ parts.forEach((part, at2) => index.setUint32(16 + at2 * 4, part.byteLength, true));
51617
+ const packed = new Uint8Array(
51618
+ index.byteLength + parts.reduce((total, part) => total + part.byteLength, 0)
51619
+ );
51620
+ packed.set(new Uint8Array(index.buffer));
51621
+ let at = index.byteLength;
51622
+ for (const part of parts) {
51623
+ packed.set(part, at);
51624
+ at += part.byteLength;
51625
+ }
51626
+ return packed;
51627
+ }
51628
+ var PACK_BYTES, MAGIC, VERSION, SWIFT_ICU_PACKED;
51629
+ var init_icuData = __esm({
51630
+ "../sootsim-swift/src/icuData.ts"() {
51631
+ "use strict";
51632
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
51633
+ init_wasm_memory();
51634
+ PACK_BYTES = 64 * 1024;
51635
+ MAGIC = 1430473040;
51636
+ VERSION = 1;
51637
+ SWIFT_ICU_PACKED = `picu${VERSION}`;
51638
+ }
51639
+ });
51640
+
51571
51641
  // src/swift-icu.ts
51572
51642
  async function cachedBrotli(bytes, quality, cacheKey) {
51573
51643
  const key2 = cacheKey && /^[a-f0-9]{64}$/.test(cacheKey) ? cacheKey : (0, import_node_crypto21.createHash)("sha256").update(bytes).digest("hex");
@@ -51600,9 +51670,6 @@ async function cachedBrotli(bytes, quality, cacheKey) {
51600
51670
  function brotliCompressQ4(bytes, cacheKey) {
51601
51671
  return cachedBrotli(bytes, 4, cacheKey);
51602
51672
  }
51603
- async function swiftIcuBrotliQ4(icu) {
51604
- return brotliMemoryCache.get(`4:${icu.sha256}`) ?? brotliCompressQ4(await inflateGzip(icu.gzip), icu.sha256);
51605
- }
51606
51673
  async function memo(cache, key2, load2) {
51607
51674
  const cached4 = cache.get(key2);
51608
51675
  if (cached4 !== void 0) return cached4;
@@ -51705,7 +51772,40 @@ function icuSegment(object6) {
51705
51772
  throw new Error(`swift-icu: expected one icu data segment, found ${found.length}`);
51706
51773
  return found[0];
51707
51774
  }
51708
- var import_node_child_process26, import_node_crypto21, import_node_fs42, import_promises4, import_node_os9, import_node_path39, import_node_util7, import_node_zlib2, run6, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, brotliMemoryCache;
51775
+ function swiftIcuAddress(icu) {
51776
+ return `${icu.sha256}.${SWIFT_ICU_PACKED}`;
51777
+ }
51778
+ function swiftIcuPacked(icu) {
51779
+ return memo(packedFiles, icu.sha256, async () => {
51780
+ const file = import_node_path39.default.join(
51781
+ import_node_os9.default.homedir(),
51782
+ ".peach",
51783
+ "cache",
51784
+ "swift-brotli",
51785
+ swiftIcuAddress(icu)
51786
+ );
51787
+ if ((0, import_node_fs42.existsSync)(file)) return (0, import_promises4.readFile)(file);
51788
+ const packed = Buffer.from(
51789
+ swiftIcuPack(
51790
+ await inflateGzip(icu.gzip),
51791
+ (bytes) => (0, import_node_zlib2.deflateRawSync)(bytes, { level: 9 })
51792
+ )
51793
+ );
51794
+ await (0, import_promises4.mkdir)(import_node_path39.default.dirname(file), { recursive: true });
51795
+ const tmp = `${file}.${(0, import_node_crypto21.randomUUID)()}.tmp`;
51796
+ await (0, import_promises4.writeFile)(tmp, packed);
51797
+ await (0, import_promises4.rename)(tmp, file);
51798
+ return packed;
51799
+ });
51800
+ }
51801
+ async function swiftIcuBundleAsset(icu) {
51802
+ return {
51803
+ path: `__peach/swift-icu/${swiftIcuAddress(icu)}`,
51804
+ bytes: await swiftIcuPacked(icu),
51805
+ contentType: "application/octet-stream"
51806
+ };
51807
+ }
51808
+ var import_node_child_process26, import_node_crypto21, import_node_fs42, import_promises4, import_node_os9, import_node_path39, import_node_util7, import_node_zlib2, run6, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, brotliMemoryCache, packedFiles;
51709
51809
  var init_swift_icu = __esm({
51710
51810
  "src/swift-icu.ts"() {
51711
51811
  "use strict";
@@ -51718,6 +51818,7 @@ var init_swift_icu = __esm({
51718
51818
  import_node_path39 = __toESM(require("node:path"), 1);
51719
51819
  import_node_util7 = require("node:util");
51720
51820
  import_node_zlib2 = require("node:zlib");
51821
+ init_icuData();
51721
51822
  init_swift_toolchain();
51722
51823
  run6 = (0, import_node_util7.promisify)(import_node_child_process26.execFile);
51723
51824
  deflate = (0, import_node_util7.promisify)(import_node_zlib2.gzip);
@@ -51728,6 +51829,7 @@ var init_swift_icu = __esm({
51728
51829
  raw = /* @__PURE__ */ new Map();
51729
51830
  assets = /* @__PURE__ */ new Map();
51730
51831
  brotliMemoryCache = /* @__PURE__ */ new Map();
51832
+ packedFiles = /* @__PURE__ */ new Map();
51731
51833
  }
51732
51834
  });
51733
51835
 
@@ -56812,7 +56914,8 @@ var init_swift_compile = __esm({
56812
56914
  "FirebaseStorage"
56813
56915
  ],
56814
56916
  GoogleMobileAds: [],
56815
- FBAudienceNetwork: []
56917
+ FBAudienceNetwork: [],
56918
+ ExpoModulesCore: []
56816
56919
  };
56817
56920
  OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
56818
56921
  SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
@@ -56846,12 +56949,14 @@ var init_swift_compile = __esm({
56846
56949
  "-Xlinker", "-lsetjmp",
56847
56950
  "-Xlinker", "--export-table",
56848
56951
  "-Xlinker", "--growable-table",
56952
+ "-Xlinker", "--wrap=swift_udata_open",
56953
+ "-Xlinker", "--wrap=swift_udata_openChoice",
56849
56954
  `;
56850
56955
  darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quoted, "-Wl,--end-lib"] : [];
56851
56956
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
56852
56957
  MULTI_MANIFEST_VERSION = 66;
56853
56958
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
56854
- compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
56959
+ compilerSourceDigest = true ? "4f75152d1dc28713cff3f67f364f34122685cc0bbaca7fd0a59ca8e7cdf390dd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
56855
56960
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
56856
56961
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
56857
56962
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -63126,7 +63231,7 @@ var init_swift_standin_digest = __esm({
63126
63231
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
63127
63232
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
63128
63233
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
63129
- STANDIN_SOURCE_DIGEST = true ? "90cf6a7c52efb9dc2256de1e8db220ebfeaccb64f6b7661fd2380ceba5f70d78" : standinSourceDigest();
63234
+ STANDIN_SOURCE_DIGEST = true ? "56838318a30c08da3f8ac3fe73427f40d8b22cbb2c0c03ea059256af4430086e" : standinSourceDigest();
63130
63235
  }
63131
63236
  });
63132
63237
 
@@ -63856,7 +63961,7 @@ var init_expo_native_prebuilt = __esm({
63856
63961
  init_swift_native_pin();
63857
63962
  init_xcode_project();
63858
63963
  EXPO_NATIVE_ENTRY_NAME = "ios";
63859
- EXPO_NATIVE_COMPILER_DIGEST = true ? "444cda48ba9b9c74b0dc463609e87f9f1381fedfa296d91acfd7c2f201645ae4" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
63964
+ EXPO_NATIVE_COMPILER_DIGEST = true ? "843410d42be8fd166bdddbaa03285830cab2acc226f04e85ff9ec476e60f7b54" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
63860
63965
  IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
63861
63966
  expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
63862
63967
  isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
@@ -73132,7 +73237,7 @@ function entryRootId(packagePath, file) {
73132
73237
  return `${import_node_path76.default.basename(packagePath)}${import_node_path76.default.posix.sep}${relative5}`;
73133
73238
  }
73134
73239
  function icuUrl(origin, artifact) {
73135
- return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${artifact.icu.sha256}`;
73240
+ return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
73136
73241
  }
73137
73242
  function standinLibraries(binaries, standins, rootDir, toolchain) {
73138
73243
  const linked = /* @__PURE__ */ new Map();
@@ -73801,20 +73906,30 @@ async function serveSwiftPackageAsset(pathname, res) {
73801
73906
  if (pathname.startsWith(ICU_PATH)) {
73802
73907
  for (const project2 of projects().values()) {
73803
73908
  const icu = project2.artifacts.find(
73804
- (artifact) => "sha256" in artifact.icu && pathname === `${ICU_PATH}${artifact.icu.sha256}`
73909
+ (artifact) => "sha256" in artifact.icu && pathname === `${ICU_PATH}${swiftIcuAddress(artifact.icu)}`
73805
73910
  )?.icu;
73806
- if (!icu || "url" in icu || pathname !== `${ICU_PATH}${icu.sha256}`) continue;
73911
+ if (!icu || "url" in icu) continue;
73912
+ const packed = await swiftIcuPacked(icu);
73807
73913
  res.setHeader("access-control-allow-origin", "*");
73808
73914
  res.setHeader("cache-control", "public, max-age=31536000, immutable");
73809
- res.setHeader("vary", "accept-encoding");
73810
- if (acceptsBr) {
73811
- res.setHeader("content-type", "application/octet-stream");
73812
- res.setHeader("content-encoding", "br");
73813
- res.end(await swiftIcuBrotliQ4(icu));
73814
- } else {
73815
- res.setHeader("content-type", "application/gzip");
73816
- res.end(icu.gzip);
73915
+ res.setHeader("content-type", "application/octet-stream");
73916
+ res.setHeader("accept-ranges", "bytes");
73917
+ const range2 = /^bytes=(\d+)-(\d+)$/.exec(res.req?.headers.range ?? "");
73918
+ if (!range2) {
73919
+ res.end(packed);
73920
+ return true;
73817
73921
  }
73922
+ const start = Number(range2[1]);
73923
+ const end = Math.min(Number(range2[2]), packed.length - 1);
73924
+ if (start > end) {
73925
+ res.statusCode = 416;
73926
+ res.setHeader("content-range", `bytes */${packed.length}`);
73927
+ res.end();
73928
+ return true;
73929
+ }
73930
+ res.statusCode = 206;
73931
+ res.setHeader("content-range", `bytes ${start}-${end}/${packed.length}`);
73932
+ res.end(packed.subarray(start, end + 1));
73818
73933
  return true;
73819
73934
  }
73820
73935
  res.statusCode = 404;
@@ -73842,7 +73957,7 @@ async function serveSwiftPackageAsset(pathname, res) {
73842
73957
  res.end("swift artifact is stale");
73843
73958
  return true;
73844
73959
  }
73845
- function swiftPackageAssets(packagePath, hash) {
73960
+ async function swiftPackageAssets(packagePath, hash) {
73846
73961
  const project2 = projects().get(import_node_fs79.default.realpathSync(packagePath));
73847
73962
  const artifact = project2?.artifacts.find((candidate) => candidate.hash === hash);
73848
73963
  if (!project2 || !artifact) throw new Error(`Swift artifact ${hash} was not built`);
@@ -73854,11 +73969,10 @@ function swiftPackageAssets(packagePath, hash) {
73854
73969
  ]);
73855
73970
  for (const [key2, resource] of project2.resourceFiles)
73856
73971
  assets2.set(`${RESOURCE_PATH}${key2}`, resource);
73857
- if ("sha256" in artifact.icu)
73858
- assets2.set(`${ICU_PATH}${artifact.icu.sha256}`, {
73859
- bytes: artifact.icu.gzip,
73860
- contentType: "application/gzip"
73861
- });
73972
+ if ("sha256" in artifact.icu) {
73973
+ const asset = await swiftIcuBundleAsset(artifact.icu);
73974
+ assets2.set(`/${asset.path}`, asset);
73975
+ }
73862
73976
  return assets2;
73863
73977
  }
73864
73978
  function disposeSwiftProject(packagePath, signal) {
@@ -75257,6 +75371,24 @@ var init_podspec_sources = __esm({
75257
75371
  helper,
75258
75372
  node.args.map((arg) => this.ev(scope2, arg))
75259
75373
  );
75374
+ if (node.name === "get_folly_config") {
75375
+ let root = import_node_path78.default.dirname(this.current);
75376
+ while (!import_node_fs81.default.existsSync(import_node_path78.default.join(root, "scripts/cocoapods/helpers.rb"))) {
75377
+ if (root === import_node_path78.default.dirname(root)) return this.fail("call to get_folly_config");
75378
+ root = import_node_path78.default.dirname(root);
75379
+ }
75380
+ const helpers = import_node_fs81.default.readFileSync(
75381
+ import_node_path78.default.join(root, "scripts/cocoapods/helpers.rb"),
75382
+ "utf8"
75383
+ );
75384
+ const version2 = /:version\s*=>\s*'([^']*)'/.exec(helpers)?.[1];
75385
+ const flags = /:compiler_flags\s*=>\s*'([^']*)'/.exec(helpers)?.[1];
75386
+ if (!version2 || !flags) return this.fail("get_folly_config");
75387
+ return /* @__PURE__ */ new Map([
75388
+ ["version", version2],
75389
+ ["compiler_flags", flags]
75390
+ ]);
75391
+ }
75260
75392
  return this.fail(`call to ${node.name}`);
75261
75393
  }
75262
75394
  case "bin": {
@@ -75886,7 +76018,13 @@ function installedFabricSources(reactNativeRoot, { legacyBridge = false, bridgeO
75886
76018
  import_node_path79.default.basename(file, ".podspec")
75887
76019
  )
75888
76020
  );
75889
- if (required.length !== (bridgeOnly ? LEGACY_BRIDGE_PODS : RENDERER_PODS).size)
76021
+ const expected = [...bridgeOnly ? LEGACY_BRIDGE_PODS : RENDERER_PODS].filter(
76022
+ (name3) => !RENDERER_PODS_VERSIONED.has(name3)
76023
+ );
76024
+ const present = required.filter(
76025
+ (file) => !RENDERER_PODS_VERSIONED.has(import_node_path79.default.basename(file, ".podspec"))
76026
+ );
76027
+ if (present.length !== expected.length)
75890
76028
  throw new Error(`${reactNativeRoot}: installed renderer podspecs are incomplete`);
75891
76029
  return specs.map((file) => {
75892
76030
  const directory2 = import_node_path79.default.dirname(file);
@@ -75987,7 +76125,6 @@ var init_turbo_codegen_intake = __esm({
75987
76125
  "React-FabricComponents",
75988
76126
  "React-FabricImage",
75989
76127
  "React-RCTFabric",
75990
- "React-RCTFBReactNativeSpec",
75991
76128
  "React-graphics",
75992
76129
  "React-rendererdebug",
75993
76130
  "React-utils",
@@ -76000,13 +76137,15 @@ var init_turbo_codegen_intake = __esm({
76000
76137
  "React-runtimescheduler",
76001
76138
  "React-ImageManager",
76002
76139
  "React-performancetimeline",
76003
- "React-jsinspectortracing",
76004
76140
  "React-jsinspector",
76005
76141
  "React-cxxreact",
76006
76142
  "React-jserrorhandler",
76007
76143
  "Yoga"
76008
76144
  ]);
76009
76145
  RENDERER_PODS_VERSIONED = /* @__PURE__ */ new Set([
76146
+ // added after react-native 0.75
76147
+ "React-RCTFBReactNativeSpec",
76148
+ "React-jsinspectortracing",
76010
76149
  // missing in 0.78, present in 0.81
76011
76150
  "React-renderercss",
76012
76151
  "React-oscompat",
@@ -81812,7 +81951,7 @@ var init_nitro_superset = __esm({
81812
81951
  init_swift_standin_digest();
81813
81952
  NITRO_SUPERSET_ENTRY_NAME = "superset";
81814
81953
  packageVersion = (root) => JSON.parse((0, import_node_fs92.readFileSync)((0, import_node_path89.join)(root, "package.json"), "utf8")).version;
81815
- NITRO_COMPILER_DIGEST = true ? "43964a9db8dd0af68a9dff0b3cd7ec292faa8ac0ee4da2817ec84ebc9d457530" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
81954
+ NITRO_COMPILER_DIGEST = true ? "ad6ae7b2e9b0e73d533e71fee86360a54f044741e1b57d6838163ba389d20a58" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
81816
81955
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
81817
81956
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
81818
81957
  published2 = /* @__PURE__ */ new Map();
@@ -81987,6 +82126,7 @@ var init_nitro_bundle = __esm({
81987
82126
  init_nitro_superset();
81988
82127
  init_swift_distribution();
81989
82128
  init_swift_host();
82129
+ init_swift_icu();
81990
82130
  NITRO_ROUTE = "/__peach/nitro";
81991
82131
  handleNitroRequest = compiledModuleRequestHandler(
81992
82132
  "Nitro",
@@ -82060,7 +82200,7 @@ var init_expo_widgets_bundle = __esm({
82060
82200
  var runtime_companion_default;
82061
82201
  var init_runtime_companion = __esm({
82062
82202
  "runtime-companion.json"() {
82063
- runtime_companion_default = { abi: 1, sha256: "278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172", file: "node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs" };
82203
+ runtime_companion_default = { abi: 1, sha256: "dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1", file: "node/cli-dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1.cjs" };
82064
82204
  }
82065
82205
  });
82066
82206
 
@@ -101380,7 +101520,9 @@ async function awaitExpoSwiftReady(endpointUrl, options = {}, label = "expo swif
101380
101520
  }
101381
101521
  if (!res.ok) {
101382
101522
  const text6 = (await res.text()).trim();
101383
- const errors = text6.split("\n").filter((line) => /(?:^|:\s)(?:fatal )?error:/.test(line));
101523
+ const errors = text6.split("\n").filter(
101524
+ (line) => /(?:^|:\s)(?:fatal )?error:|^\[!\] |^\w+(?:::\w+)*Error - /.test(line)
101525
+ );
101384
101526
  const detail = errors.join("\n");
101385
101527
  const body = detail ? detail.length > 2e3 ? `${detail.slice(0, 2e3)}\u2026` : detail : text6.length > 2e3 ? `\u2026${text6.slice(-2e3)}` : text6;
101386
101528
  const hint = res.status === 404 ? `; peach cli ${getCliVersion()} serves this route, so if an older peach bridge holds this port, run \`peach daemon restart\` to load the matching bridge (it closes every sim that bridge hosts, so it was not restarted)` : "";
@@ -118375,7 +118517,7 @@ async function prepareNativeInput(input, opts) {
118375
118517
  const prepared = await prepareSwiftInput(input, opts);
118376
118518
  try {
118377
118519
  const built2 = await prepared.build(opts.origin);
118378
- const assets2 = prepared.host.swiftPackageAssets(
118520
+ const assets2 = await prepared.host.swiftPackageAssets(
118379
118521
  prepared.packagePath,
118380
118522
  built2.metadata.hash
118381
118523
  );
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1886 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1888 | (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;
@@ -62,9 +62,10 @@ __export(swift_compile_exports, {
62
62
  swiftCompileSdkOptions: () => swiftCompileSdkOptions,
63
63
  swiftCrossImportFlags: () => swiftCrossImportFlags,
64
64
  swiftDistributionAt: () => swiftDistributionAt,
65
+ swiftIcuAddress: () => swiftIcuAddress,
65
66
  swiftIcuAsset: () => swiftIcuAsset,
66
- swiftIcuBrotli: () => swiftIcuBrotli,
67
- swiftIcuBrotliQ4: () => swiftIcuBrotliQ4,
67
+ swiftIcuBundleAsset: () => swiftIcuBundleAsset,
68
+ swiftIcuPacked: () => swiftIcuPacked,
68
69
  swiftImportNames: () => swiftImportNames,
69
70
  swiftMacroPlugins: () => swiftMacroPlugins,
70
71
  swiftModuleDigest: () => swiftModuleDigest,
@@ -10245,6 +10246,62 @@ var import_node_os6 = __toESM(require("node:os"), 1);
10245
10246
  var import_node_path17 = __toESM(require("node:path"), 1);
10246
10247
  var import_node_util = require("node:util");
10247
10248
  var import_node_zlib = require("node:zlib");
10249
+
10250
+ // ../sootsim-swift/src/icuData.ts
10251
+ var PACK_BYTES = 64 * 1024;
10252
+ var MAGIC = 1430473040;
10253
+ var VERSION = 1;
10254
+ var SWIFT_ICU_PACKED = `picu${VERSION}`;
10255
+ function swiftIcuLayout(head, blobBytes) {
10256
+ const view = new DataView(head.buffer, head.byteOffset, head.byteLength);
10257
+ const toc = view.getUint16(0, true);
10258
+ if (head[2] !== 218 || head[3] !== 39)
10259
+ throw new Error("swift icu data has no icu header");
10260
+ const count = view.getUint32(toc, true);
10261
+ const names = [];
10262
+ const offsets = new Uint32Array(count + 1);
10263
+ const decoder = new TextDecoder("latin1");
10264
+ for (let index = 0; index < count; index++) {
10265
+ const name2 = toc + view.getUint32(toc + 4 + index * 8, true);
10266
+ offsets[index] = toc + view.getUint32(toc + 8 + index * 8, true);
10267
+ names.push(decoder.decode(head.subarray(name2, head.indexOf(0, name2))));
10268
+ }
10269
+ offsets[count] = blobBytes;
10270
+ const packOf = new Uint32Array(count);
10271
+ const packs = [];
10272
+ for (let index = 0; index < count; index++) {
10273
+ const last = packs[packs.length - 1];
10274
+ if (last && offsets[index + 1] - last[0] <= PACK_BYTES) last[1] = offsets[index + 1];
10275
+ else packs.push([offsets[index], offsets[index + 1]]);
10276
+ packOf[index] = packs.length - 1;
10277
+ }
10278
+ return { headBytes: offsets[0], names, packOf, packs };
10279
+ }
10280
+ function swiftIcuPack(blob, deflate2) {
10281
+ const layout2 = swiftIcuLayout(blob, blob.byteLength);
10282
+ const parts = [
10283
+ deflate2(blob.subarray(0, layout2.headBytes)),
10284
+ ...layout2.packs.map(([start, end]) => deflate2(blob.subarray(start, end)))
10285
+ ];
10286
+ const index = new DataView(new ArrayBuffer(16 + parts.length * 4));
10287
+ index.setUint32(0, MAGIC, true);
10288
+ index.setUint32(4, VERSION, true);
10289
+ index.setUint32(8, blob.byteLength, true);
10290
+ index.setUint32(12, layout2.packs.length, true);
10291
+ parts.forEach((part, at2) => index.setUint32(16 + at2 * 4, part.byteLength, true));
10292
+ const packed = new Uint8Array(
10293
+ index.byteLength + parts.reduce((total, part) => total + part.byteLength, 0)
10294
+ );
10295
+ packed.set(new Uint8Array(index.buffer));
10296
+ let at = index.byteLength;
10297
+ for (const part of parts) {
10298
+ packed.set(part, at);
10299
+ at += part.byteLength;
10300
+ }
10301
+ return packed;
10302
+ }
10303
+
10304
+ // src/swift-icu.ts
10248
10305
  var run = (0, import_node_util.promisify)(import_node_child_process14.execFile);
10249
10306
  var deflate = (0, import_node_util.promisify)(import_node_zlib.gzip);
10250
10307
  var compressBrotli = (0, import_node_util.promisify)(import_node_zlib.brotliCompress);
@@ -10288,12 +10345,6 @@ function brotliCompressQ11(bytes, cacheKey) {
10288
10345
  function brotliCompressQ4(bytes, cacheKey) {
10289
10346
  return cachedBrotli(bytes, 4, cacheKey);
10290
10347
  }
10291
- async function swiftIcuBrotli(icu) {
10292
- return brotliMemoryCache.get(`11:${icu.sha256}`) ?? brotliCompressQ11(await inflateGzip(icu.gzip), icu.sha256);
10293
- }
10294
- async function swiftIcuBrotliQ4(icu) {
10295
- return brotliMemoryCache.get(`4:${icu.sha256}`) ?? brotliCompressQ4(await inflateGzip(icu.gzip), icu.sha256);
10296
- }
10297
10348
  async function memo(cache, key, load2) {
10298
10349
  const cached = cache.get(key);
10299
10350
  if (cached !== void 0) return cached;
@@ -10396,6 +10447,40 @@ function icuSegment(object3) {
10396
10447
  throw new Error(`swift-icu: expected one icu data segment, found ${found.length}`);
10397
10448
  return found[0];
10398
10449
  }
10450
+ function swiftIcuAddress(icu) {
10451
+ return `${icu.sha256}.${SWIFT_ICU_PACKED}`;
10452
+ }
10453
+ var packedFiles = /* @__PURE__ */ new Map();
10454
+ function swiftIcuPacked(icu) {
10455
+ return memo(packedFiles, icu.sha256, async () => {
10456
+ const file = import_node_path17.default.join(
10457
+ import_node_os6.default.homedir(),
10458
+ ".peach",
10459
+ "cache",
10460
+ "swift-brotli",
10461
+ swiftIcuAddress(icu)
10462
+ );
10463
+ if ((0, import_node_fs16.existsSync)(file)) return (0, import_promises3.readFile)(file);
10464
+ const packed = Buffer.from(
10465
+ swiftIcuPack(
10466
+ await inflateGzip(icu.gzip),
10467
+ (bytes) => (0, import_node_zlib.deflateRawSync)(bytes, { level: 9 })
10468
+ )
10469
+ );
10470
+ await (0, import_promises3.mkdir)(import_node_path17.default.dirname(file), { recursive: true });
10471
+ const tmp = `${file}.${(0, import_node_crypto10.randomUUID)()}.tmp`;
10472
+ await (0, import_promises3.writeFile)(tmp, packed);
10473
+ await (0, import_promises3.rename)(tmp, file);
10474
+ return packed;
10475
+ });
10476
+ }
10477
+ async function swiftIcuBundleAsset(icu) {
10478
+ return {
10479
+ path: `__peach/swift-icu/${swiftIcuAddress(icu)}`,
10480
+ bytes: await swiftIcuPacked(icu),
10481
+ contentType: "application/octet-stream"
10482
+ };
10483
+ }
10399
10484
 
10400
10485
  // src/swift-link-roots.ts
10401
10486
  var import_node_fs17 = __toESM(require("node:fs"), 1);
@@ -11583,7 +11668,8 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
11583
11668
  "FirebaseStorage"
11584
11669
  ],
11585
11670
  GoogleMobileAds: [],
11586
- FBAudienceNetwork: []
11671
+ FBAudienceNetwork: [],
11672
+ ExpoModulesCore: []
11587
11673
  };
11588
11674
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
11589
11675
  function swiftOptionalFramework(name2) {
@@ -11977,12 +12063,14 @@ var executableLinkFlags = (root) => ` "-Xclang-linker", "-O0",
11977
12063
  "-Xlinker", "-lsetjmp",
11978
12064
  "-Xlinker", "--export-table",
11979
12065
  "-Xlinker", "--growable-table",
12066
+ "-Xlinker", "--wrap=swift_udata_open",
12067
+ "-Xlinker", "--wrap=swift_udata_openChoice",
11980
12068
  `;
11981
12069
  var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quoted, "-Wl,--end-lib"] : [];
11982
12070
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
11983
12071
  var MULTI_MANIFEST_VERSION = 66;
11984
12072
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
11985
- var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12073
+ var compilerSourceDigest = true ? "4f75152d1dc28713cff3f67f364f34122685cc0bbaca7fd0a59ca8e7cdf390dd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
11986
12074
  function swiftArtifactHash(input, release, moduleRoot) {
11987
12075
  const hash = (0, import_node_crypto12.createHash)("sha256");
11988
12076
  hash.update(`swift-compile
@@ -16358,9 +16446,10 @@ function compileSwiftProjectOnce(input, options) {
16358
16446
  swiftCompileSdkOptions,
16359
16447
  swiftCrossImportFlags,
16360
16448
  swiftDistributionAt,
16449
+ swiftIcuAddress,
16361
16450
  swiftIcuAsset,
16362
- swiftIcuBrotli,
16363
- swiftIcuBrotliQ4,
16451
+ swiftIcuBundleAsset,
16452
+ swiftIcuPacked,
16364
16453
  swiftImportNames,
16365
16454
  swiftMacroPlugins,
16366
16455
  swiftModuleDigest,