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
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -10195,7 +10195,69 @@ import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
10195
10195
  import os3 from "node:os";
10196
10196
  import path17 from "node:path";
10197
10197
  import { promisify as promisify2 } from "node:util";
10198
- import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
10198
+ import {
10199
+ brotliCompress,
10200
+ constants as zlibConstants,
10201
+ deflateRawSync,
10202
+ gunzip,
10203
+ gzip
10204
+ } from "node:zlib";
10205
+
10206
+ // ../sootsim-swift/src/icuData.ts
10207
+ var PACK_BYTES = 64 * 1024;
10208
+ var MAGIC = 1430473040;
10209
+ var VERSION = 1;
10210
+ var SWIFT_ICU_PACKED = `picu${VERSION}`;
10211
+ function swiftIcuLayout(head, blobBytes) {
10212
+ const view = new DataView(head.buffer, head.byteOffset, head.byteLength);
10213
+ const toc = view.getUint16(0, true);
10214
+ if (head[2] !== 218 || head[3] !== 39)
10215
+ throw new Error("swift icu data has no icu header");
10216
+ const count = view.getUint32(toc, true);
10217
+ const names = [];
10218
+ const offsets = new Uint32Array(count + 1);
10219
+ const decoder = new TextDecoder("latin1");
10220
+ for (let index = 0; index < count; index++) {
10221
+ const name2 = toc + view.getUint32(toc + 4 + index * 8, true);
10222
+ offsets[index] = toc + view.getUint32(toc + 8 + index * 8, true);
10223
+ names.push(decoder.decode(head.subarray(name2, head.indexOf(0, name2))));
10224
+ }
10225
+ offsets[count] = blobBytes;
10226
+ const packOf = new Uint32Array(count);
10227
+ const packs = [];
10228
+ for (let index = 0; index < count; index++) {
10229
+ const last = packs[packs.length - 1];
10230
+ if (last && offsets[index + 1] - last[0] <= PACK_BYTES) last[1] = offsets[index + 1];
10231
+ else packs.push([offsets[index], offsets[index + 1]]);
10232
+ packOf[index] = packs.length - 1;
10233
+ }
10234
+ return { headBytes: offsets[0], names, packOf, packs };
10235
+ }
10236
+ function swiftIcuPack(blob, deflate2) {
10237
+ const layout2 = swiftIcuLayout(blob, blob.byteLength);
10238
+ const parts = [
10239
+ deflate2(blob.subarray(0, layout2.headBytes)),
10240
+ ...layout2.packs.map(([start, end]) => deflate2(blob.subarray(start, end)))
10241
+ ];
10242
+ const index = new DataView(new ArrayBuffer(16 + parts.length * 4));
10243
+ index.setUint32(0, MAGIC, true);
10244
+ index.setUint32(4, VERSION, true);
10245
+ index.setUint32(8, blob.byteLength, true);
10246
+ index.setUint32(12, layout2.packs.length, true);
10247
+ parts.forEach((part, at2) => index.setUint32(16 + at2 * 4, part.byteLength, true));
10248
+ const packed = new Uint8Array(
10249
+ index.byteLength + parts.reduce((total, part) => total + part.byteLength, 0)
10250
+ );
10251
+ packed.set(new Uint8Array(index.buffer));
10252
+ let at = index.byteLength;
10253
+ for (const part of parts) {
10254
+ packed.set(part, at);
10255
+ at += part.byteLength;
10256
+ }
10257
+ return packed;
10258
+ }
10259
+
10260
+ // src/swift-icu.ts
10199
10261
  var run = promisify2(execFile2);
10200
10262
  var deflate = promisify2(gzip);
10201
10263
  var compressBrotli = promisify2(brotliCompress);
@@ -10239,12 +10301,6 @@ function brotliCompressQ11(bytes, cacheKey) {
10239
10301
  function brotliCompressQ4(bytes, cacheKey) {
10240
10302
  return cachedBrotli(bytes, 4, cacheKey);
10241
10303
  }
10242
- async function swiftIcuBrotli(icu) {
10243
- return brotliMemoryCache.get(`11:${icu.sha256}`) ?? brotliCompressQ11(await inflateGzip(icu.gzip), icu.sha256);
10244
- }
10245
- async function swiftIcuBrotliQ4(icu) {
10246
- return brotliMemoryCache.get(`4:${icu.sha256}`) ?? brotliCompressQ4(await inflateGzip(icu.gzip), icu.sha256);
10247
- }
10248
10304
  async function memo(cache, key, load2) {
10249
10305
  const cached = cache.get(key);
10250
10306
  if (cached !== void 0) return cached;
@@ -10347,6 +10403,40 @@ function icuSegment(object3) {
10347
10403
  throw new Error(`swift-icu: expected one icu data segment, found ${found.length}`);
10348
10404
  return found[0];
10349
10405
  }
10406
+ function swiftIcuAddress(icu) {
10407
+ return `${icu.sha256}.${SWIFT_ICU_PACKED}`;
10408
+ }
10409
+ var packedFiles = /* @__PURE__ */ new Map();
10410
+ function swiftIcuPacked(icu) {
10411
+ return memo(packedFiles, icu.sha256, async () => {
10412
+ const file = path17.join(
10413
+ os3.homedir(),
10414
+ ".peach",
10415
+ "cache",
10416
+ "swift-brotli",
10417
+ swiftIcuAddress(icu)
10418
+ );
10419
+ if (existsSync(file)) return readFile(file);
10420
+ const packed = Buffer.from(
10421
+ swiftIcuPack(
10422
+ await inflateGzip(icu.gzip),
10423
+ (bytes) => deflateRawSync(bytes, { level: 9 })
10424
+ )
10425
+ );
10426
+ await mkdir(path17.dirname(file), { recursive: true });
10427
+ const tmp = `${file}.${randomUUID2()}.tmp`;
10428
+ await writeFile(tmp, packed);
10429
+ await rename(tmp, file);
10430
+ return packed;
10431
+ });
10432
+ }
10433
+ async function swiftIcuBundleAsset(icu) {
10434
+ return {
10435
+ path: `__peach/swift-icu/${swiftIcuAddress(icu)}`,
10436
+ bytes: await swiftIcuPacked(icu),
10437
+ contentType: "application/octet-stream"
10438
+ };
10439
+ }
10350
10440
 
10351
10441
  // src/swift-link-roots.ts
10352
10442
  import fs6 from "node:fs";
@@ -11555,7 +11645,8 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
11555
11645
  "FirebaseStorage"
11556
11646
  ],
11557
11647
  GoogleMobileAds: [],
11558
- FBAudienceNetwork: []
11648
+ FBAudienceNetwork: [],
11649
+ ExpoModulesCore: []
11559
11650
  };
11560
11651
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
11561
11652
  function swiftOptionalFramework(name2) {
@@ -11949,12 +12040,14 @@ var executableLinkFlags = (root) => ` "-Xclang-linker", "-O0",
11949
12040
  "-Xlinker", "-lsetjmp",
11950
12041
  "-Xlinker", "--export-table",
11951
12042
  "-Xlinker", "--growable-table",
12043
+ "-Xlinker", "--wrap=swift_udata_open",
12044
+ "-Xlinker", "--wrap=swift_udata_openChoice",
11952
12045
  `;
11953
12046
  var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quoted, "-Wl,--end-lib"] : [];
11954
12047
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
11955
12048
  var MULTI_MANIFEST_VERSION = 66;
11956
12049
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
11957
- var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(import.meta.dirname);
12050
+ var compilerSourceDigest = true ? "4f75152d1dc28713cff3f67f364f34122685cc0bbaca7fd0a59ca8e7cdf390dd" : swiftCompilerSourceDigest(import.meta.dirname);
11958
12051
  function swiftArtifactHash(input, release, moduleRoot) {
11959
12052
  const hash = createHash13("sha256");
11960
12053
  hash.update(`swift-compile
@@ -16329,9 +16422,10 @@ export {
16329
16422
  swiftCompileSdkOptions,
16330
16423
  swiftCrossImportFlags,
16331
16424
  swiftDistributionAt,
16425
+ swiftIcuAddress,
16332
16426
  swiftIcuAsset,
16333
- swiftIcuBrotli,
16334
- swiftIcuBrotliQ4,
16427
+ swiftIcuBundleAsset,
16428
+ swiftIcuPacked,
16335
16429
  swiftImportNames,
16336
16430
  swiftMacroPlugins,
16337
16431
  swiftModuleDigest,
@@ -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 __defProp = Object.defineProperty;
@@ -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
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -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 __defProp = Object.defineProperty;
@@ -86,7 +86,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
86
86
  var MAX_SWIFT_COMPILE_IMAGES = 256;
87
87
  var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
88
88
  var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
89
- var SWIFT_HOST_ABI = 68;
89
+ var SWIFT_HOST_ABI = 69;
90
90
  var POLL_INTERVAL_MS = 1500;
91
91
  function swiftNativeEntry(native, file) {
92
92
  return {
@@ -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
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -40,7 +40,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
40
40
  var MAX_SWIFT_COMPILE_IMAGES = 256;
41
41
  var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
42
42
  var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
43
- var SWIFT_HOST_ABI = 68;
43
+ var SWIFT_HOST_ABI = 69;
44
44
  var POLL_INTERVAL_MS = 1500;
45
45
  function swiftNativeEntry(native, file) {
46
46
  return {
@@ -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;
@@ -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 __defProp = Object.defineProperty;
@@ -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;
@@ -14697,6 +14697,68 @@ var import_node_os6 = __toESM(require("node:os"), 1);
14697
14697
  var import_node_path17 = __toESM(require("node:path"), 1);
14698
14698
  var import_node_util2 = require("node:util");
14699
14699
  var import_node_zlib = require("node:zlib");
14700
+
14701
+ // ../sootsim-swift/src/icuData.ts
14702
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
14703
+
14704
+ // ../peach-compat/src/stubs/wasm-memory.ts
14705
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
14706
+
14707
+ // ../sootsim-swift/src/icuData.ts
14708
+ var PACK_BYTES = 64 * 1024;
14709
+ var MAGIC = 1430473040;
14710
+ var VERSION = 1;
14711
+ var SWIFT_ICU_PACKED = `picu${VERSION}`;
14712
+ function swiftIcuLayout(head, blobBytes) {
14713
+ const view = new DataView(head.buffer, head.byteOffset, head.byteLength);
14714
+ const toc = view.getUint16(0, true);
14715
+ if (head[2] !== 218 || head[3] !== 39)
14716
+ throw new Error("swift icu data has no icu header");
14717
+ const count = view.getUint32(toc, true);
14718
+ const names = [];
14719
+ const offsets = new Uint32Array(count + 1);
14720
+ const decoder = new TextDecoder("latin1");
14721
+ for (let index = 0; index < count; index++) {
14722
+ const name3 = toc + view.getUint32(toc + 4 + index * 8, true);
14723
+ offsets[index] = toc + view.getUint32(toc + 8 + index * 8, true);
14724
+ names.push(decoder.decode(head.subarray(name3, head.indexOf(0, name3))));
14725
+ }
14726
+ offsets[count] = blobBytes;
14727
+ const packOf = new Uint32Array(count);
14728
+ const packs = [];
14729
+ for (let index = 0; index < count; index++) {
14730
+ const last = packs[packs.length - 1];
14731
+ if (last && offsets[index + 1] - last[0] <= PACK_BYTES) last[1] = offsets[index + 1];
14732
+ else packs.push([offsets[index], offsets[index + 1]]);
14733
+ packOf[index] = packs.length - 1;
14734
+ }
14735
+ return { headBytes: offsets[0], names, packOf, packs };
14736
+ }
14737
+ function swiftIcuPack(blob, deflate2) {
14738
+ const layout2 = swiftIcuLayout(blob, blob.byteLength);
14739
+ const parts = [
14740
+ deflate2(blob.subarray(0, layout2.headBytes)),
14741
+ ...layout2.packs.map(([start, end]) => deflate2(blob.subarray(start, end)))
14742
+ ];
14743
+ const index = new DataView(new ArrayBuffer(16 + parts.length * 4));
14744
+ index.setUint32(0, MAGIC, true);
14745
+ index.setUint32(4, VERSION, true);
14746
+ index.setUint32(8, blob.byteLength, true);
14747
+ index.setUint32(12, layout2.packs.length, true);
14748
+ parts.forEach((part, at2) => index.setUint32(16 + at2 * 4, part.byteLength, true));
14749
+ const packed = new Uint8Array(
14750
+ index.byteLength + parts.reduce((total, part) => total + part.byteLength, 0)
14751
+ );
14752
+ packed.set(new Uint8Array(index.buffer));
14753
+ let at = index.byteLength;
14754
+ for (const part of parts) {
14755
+ packed.set(part, at);
14756
+ at += part.byteLength;
14757
+ }
14758
+ return packed;
14759
+ }
14760
+
14761
+ // src/swift-icu.ts
14700
14762
  var run = (0, import_node_util2.promisify)(import_node_child_process15.execFile);
14701
14763
  var deflate = (0, import_node_util2.promisify)(import_node_zlib.gzip);
14702
14764
  var compressBrotli = (0, import_node_util2.promisify)(import_node_zlib.brotliCompress);
@@ -14737,9 +14799,6 @@ async function cachedBrotli(bytes, quality, cacheKey) {
14737
14799
  function brotliCompressQ4(bytes, cacheKey) {
14738
14800
  return cachedBrotli(bytes, 4, cacheKey);
14739
14801
  }
14740
- async function swiftIcuBrotliQ4(icu) {
14741
- return brotliMemoryCache.get(`4:${icu.sha256}`) ?? brotliCompressQ4(await inflateGzip(icu.gzip), icu.sha256);
14742
- }
14743
14802
  async function memo(cache, key2, load2) {
14744
14803
  const cached = cache.get(key2);
14745
14804
  if (cached !== void 0) return cached;
@@ -14842,6 +14901,33 @@ function icuSegment(object4) {
14842
14901
  throw new Error(`swift-icu: expected one icu data segment, found ${found.length}`);
14843
14902
  return found[0];
14844
14903
  }
14904
+ function swiftIcuAddress(icu) {
14905
+ return `${icu.sha256}.${SWIFT_ICU_PACKED}`;
14906
+ }
14907
+ var packedFiles = /* @__PURE__ */ new Map();
14908
+ function swiftIcuPacked(icu) {
14909
+ return memo(packedFiles, icu.sha256, async () => {
14910
+ const file = import_node_path17.default.join(
14911
+ import_node_os6.default.homedir(),
14912
+ ".peach",
14913
+ "cache",
14914
+ "swift-brotli",
14915
+ swiftIcuAddress(icu)
14916
+ );
14917
+ if ((0, import_node_fs17.existsSync)(file)) return (0, import_promises3.readFile)(file);
14918
+ const packed = Buffer.from(
14919
+ swiftIcuPack(
14920
+ await inflateGzip(icu.gzip),
14921
+ (bytes) => (0, import_node_zlib.deflateRawSync)(bytes, { level: 9 })
14922
+ )
14923
+ );
14924
+ await (0, import_promises3.mkdir)(import_node_path17.default.dirname(file), { recursive: true });
14925
+ const tmp = `${file}.${(0, import_node_crypto10.randomUUID)()}.tmp`;
14926
+ await (0, import_promises3.writeFile)(tmp, packed);
14927
+ await (0, import_promises3.rename)(tmp, file);
14928
+ return packed;
14929
+ });
14930
+ }
14845
14931
 
14846
14932
  // src/swift-link-roots.ts
14847
14933
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -15896,7 +15982,8 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
15896
15982
  "FirebaseStorage"
15897
15983
  ],
15898
15984
  GoogleMobileAds: [],
15899
- FBAudienceNetwork: []
15985
+ FBAudienceNetwork: [],
15986
+ ExpoModulesCore: []
15900
15987
  };
15901
15988
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
15902
15989
  function swiftOptionalFramework(name3) {
@@ -16290,12 +16377,14 @@ var executableLinkFlags = (root) => ` "-Xclang-linker", "-O0",
16290
16377
  "-Xlinker", "-lsetjmp",
16291
16378
  "-Xlinker", "--export-table",
16292
16379
  "-Xlinker", "--growable-table",
16380
+ "-Xlinker", "--wrap=swift_udata_open",
16381
+ "-Xlinker", "--wrap=swift_udata_openChoice",
16293
16382
  `;
16294
16383
  var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quoted, "-Wl,--end-lib"] : [];
16295
16384
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
16296
16385
  var MULTI_MANIFEST_VERSION = 66;
16297
16386
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
16298
- var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16387
+ var compilerSourceDigest = true ? "4f75152d1dc28713cff3f67f364f34122685cc0bbaca7fd0a59ca8e7cdf390dd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16299
16388
  function swiftArtifactHash(input, release, moduleRoot) {
16300
16389
  const hash = (0, import_node_crypto12.createHash)("sha256");
16301
16390
  hash.update(`swift-compile
@@ -28588,7 +28677,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
28588
28677
  var MAX_SWIFT_COMPILE_IMAGES = 256;
28589
28678
  var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
28590
28679
  var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
28591
- var SWIFT_HOST_ABI = 68;
28680
+ var SWIFT_HOST_ABI = 69;
28592
28681
  var POLL_INTERVAL_MS = 1500;
28593
28682
  function swiftNativeEntry(native, file) {
28594
28683
  return {
@@ -29428,7 +29517,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
29428
29517
  return hash.digest("hex");
29429
29518
  }
29430
29519
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
29431
- var STANDIN_SOURCE_DIGEST = true ? "90cf6a7c52efb9dc2256de1e8db220ebfeaccb64f6b7661fd2380ceba5f70d78" : standinSourceDigest();
29520
+ var STANDIN_SOURCE_DIGEST = true ? "56838318a30c08da3f8ac3fe73427f40d8b22cbb2c0c03ea059256af4430086e" : standinSourceDigest();
29432
29521
 
29433
29522
  // src/swift-standins.ts
29434
29523
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -35201,7 +35290,7 @@ function entryRootId(packagePath, file) {
35201
35290
  return `${import_node_path51.default.basename(packagePath)}${import_node_path51.default.posix.sep}${relative2}`;
35202
35291
  }
35203
35292
  function icuUrl(origin, artifact) {
35204
- return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${artifact.icu.sha256}`;
35293
+ return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
35205
35294
  }
35206
35295
  function standinLibraries(binaries, standins, rootDir, toolchain) {
35207
35296
  const linked = /* @__PURE__ */ new Map();
@@ -35877,20 +35966,30 @@ async function serveSwiftPackageAsset(pathname, res) {
35877
35966
  if (pathname.startsWith(ICU_PATH)) {
35878
35967
  for (const project of projects().values()) {
35879
35968
  const icu = project.artifacts.find(
35880
- (artifact) => "sha256" in artifact.icu && pathname === `${ICU_PATH}${artifact.icu.sha256}`
35969
+ (artifact) => "sha256" in artifact.icu && pathname === `${ICU_PATH}${swiftIcuAddress(artifact.icu)}`
35881
35970
  )?.icu;
35882
- if (!icu || "url" in icu || pathname !== `${ICU_PATH}${icu.sha256}`) continue;
35971
+ if (!icu || "url" in icu) continue;
35972
+ const packed = await swiftIcuPacked(icu);
35883
35973
  res.setHeader("access-control-allow-origin", "*");
35884
35974
  res.setHeader("cache-control", "public, max-age=31536000, immutable");
35885
- res.setHeader("vary", "accept-encoding");
35886
- if (acceptsBr) {
35887
- res.setHeader("content-type", "application/octet-stream");
35888
- res.setHeader("content-encoding", "br");
35889
- res.end(await swiftIcuBrotliQ4(icu));
35890
- } else {
35891
- res.setHeader("content-type", "application/gzip");
35892
- res.end(icu.gzip);
35975
+ res.setHeader("content-type", "application/octet-stream");
35976
+ res.setHeader("accept-ranges", "bytes");
35977
+ const range2 = /^bytes=(\d+)-(\d+)$/.exec(res.req?.headers.range ?? "");
35978
+ if (!range2) {
35979
+ res.end(packed);
35980
+ return true;
35981
+ }
35982
+ const start = Number(range2[1]);
35983
+ const end = Math.min(Number(range2[2]), packed.length - 1);
35984
+ if (start > end) {
35985
+ res.statusCode = 416;
35986
+ res.setHeader("content-range", `bytes */${packed.length}`);
35987
+ res.end();
35988
+ return true;
35893
35989
  }
35990
+ res.statusCode = 206;
35991
+ res.setHeader("content-range", `bytes ${start}-${end}/${packed.length}`);
35992
+ res.end(packed.subarray(start, end + 1));
35894
35993
  return true;
35895
35994
  }
35896
35995
  res.statusCode = 404;
package/dist-lib/vite.cjs CHANGED
@@ -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;
@@ -203,7 +203,7 @@ function isValidRuntimeVersion(value) {
203
203
  }
204
204
 
205
205
  // runtime-companion.json
206
- var runtime_companion_default = { abi: 1, sha256: "278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172", file: "node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs" };
206
+ var runtime_companion_default = { abi: 1, sha256: "dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1", file: "node/cli-dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1.cjs" };
207
207
 
208
208
  // src/answeredNativePackages.ts
209
209
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -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 __defProp = Object.defineProperty;
@@ -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
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1886",
3
+ "version": "0.1.1888",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172","file":"node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs"}
1
+ {"abi":1,"sha256":"dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1","file":"node/cli-dd8c466559decf84d36d9767726fa6eef79e81eb5fabafccc6cce7dc3d9787d1.cjs"}
@@ -1,6 +1,7 @@
1
1
  // release publishers use the same app compiler as local launches, then carry
2
2
  // its immutable native assets beside the javascript bundle.
3
3
  import { compileExpoSwiftModules } from './expo-swift-host'
4
+ import { swiftIcuBundleAsset } from './swift-icu'
4
5
  import type { ExpoSwiftCompilationResult } from './expoSwiftContract'
5
6
 
6
7
  export interface ExpoSwiftBundle {
@@ -22,13 +23,7 @@ export async function buildExpoSwiftBundle(
22
23
  bytes: artifact.bytes,
23
24
  contentType: 'application/wasm',
24
25
  })
25
- if ('gzip' in artifact.icu) {
26
- assets.push({
27
- path: `__peach/swift-icu/${artifact.icu.sha256}`,
28
- bytes: artifact.icu.gzip,
29
- contentType: 'application/gzip',
30
- })
31
- }
26
+ if ('gzip' in artifact.icu) assets.push(await swiftIcuBundleAsset(artifact.icu))
32
27
  },
33
28
  )
34
29
  if (!metadata) return null
@@ -53,10 +53,13 @@ export async function awaitExpoSwiftReady(
53
53
  }
54
54
  if (!res.ok) {
55
55
  const text = (await res.text()).trim()
56
- // parallel compiler jobs can print warnings after the fatal diagnostic.
56
+ // parallel compiler jobs can print warnings after the fatal diagnostic;
57
+ // cocoapods marks its failures `[!]` and a crashed hook `NameError - `.
57
58
  const errors = text
58
59
  .split('\n')
59
- .filter((line) => /(?:^|:\s)(?:fatal )?error:/.test(line))
60
+ .filter((line) =>
61
+ /(?:^|:\s)(?:fatal )?error:|^\[!\] |^\w+(?:::\w+)*Error - /.test(line),
62
+ )
60
63
  const detail = errors.join('\n')
61
64
  const body = detail
62
65
  ? detail.length > 2000
@@ -16,6 +16,7 @@ import { discoverNitroProviders, selectNitroProviders } from './nitro-source'
16
16
  import { sharedNitroModule } from './nitro-superset'
17
17
  import { swiftDistributionRoot } from './swift-distribution'
18
18
  import { icuUrl, type SwiftArtifact } from './swift-host'
19
+ import { swiftIcuBundleAsset } from './swift-icu'
19
20
  import type { NitroBuildConfiguration, NitroCompiledModule } from './nitroContract'
20
21
  import type { IncomingMessage, ServerResponse } from 'node:http'
21
22
 
@@ -134,21 +135,17 @@ export async function compileNitroApp(
134
135
  }
135
136
 
136
137
  /** a compiled module's served files: its wasm and, unless shared, its ICU. */
137
- export function compiledModuleAssets(artifact: SwiftArtifact): CompiledModuleAsset[] {
138
- const assets: CompiledModuleAsset[] = [
138
+ export async function compiledModuleAssets(
139
+ artifact: SwiftArtifact,
140
+ ): Promise<CompiledModuleAsset[]> {
141
+ return [
139
142
  {
140
143
  path: `__peach/swift/${artifact.hash}.wasm`,
141
144
  bytes: artifact.bytes,
142
145
  contentType: 'application/wasm',
143
146
  },
147
+ ...('gzip' in artifact.icu ? [await swiftIcuBundleAsset(artifact.icu)] : []),
144
148
  ]
145
- if ('gzip' in artifact.icu)
146
- assets.push({
147
- path: `__peach/swift-icu/${artifact.icu.sha256}`,
148
- bytes: artifact.icu.gzip,
149
- contentType: 'application/gzip',
150
- })
151
- return assets
152
149
  }
153
150
 
154
151
  export async function buildNitroBundle(
@@ -161,7 +158,7 @@ export async function buildNitroBundle(
161
158
  if (!compiled) return null
162
159
  return {
163
160
  metadata: compiled.metadata,
164
- assets: compiled.artifact ? compiledModuleAssets(compiled.artifact) : [],
161
+ assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : [],
165
162
  }
166
163
  }
167
164
 
@@ -1028,6 +1028,26 @@ class Evaluator {
1028
1028
  helper,
1029
1029
  node.args.map((arg) => this.ev(scope, arg)),
1030
1030
  )
1031
+ // react-native 0.75 podspecs call the global that react_native_pods.rb defines as
1032
+ // `Helpers::Constants.folly_config`
1033
+ if (node.name === 'get_folly_config') {
1034
+ let root = path.dirname(this.current)
1035
+ while (!fs.existsSync(path.join(root, 'scripts/cocoapods/helpers.rb'))) {
1036
+ if (root === path.dirname(root)) return this.fail('call to get_folly_config')
1037
+ root = path.dirname(root)
1038
+ }
1039
+ const helpers = fs.readFileSync(
1040
+ path.join(root, 'scripts/cocoapods/helpers.rb'),
1041
+ 'utf8',
1042
+ )
1043
+ const version = /:version\s*=>\s*'([^']*)'/.exec(helpers)?.[1]
1044
+ const flags = /:compiler_flags\s*=>\s*'([^']*)'/.exec(helpers)?.[1]
1045
+ if (!version || !flags) return this.fail('get_folly_config')
1046
+ return new Map([
1047
+ ['version', version],
1048
+ ['compiler_flags', flags],
1049
+ ])
1050
+ }
1031
1051
  return this.fail(`call to ${node.name}`)
1032
1052
  }
1033
1053
  case 'bin': {
@@ -50,9 +50,10 @@ import { compileGuestLink } from './swift-guest-compile'
50
50
  import {
51
51
  brotliCompressQ11,
52
52
  brotliCompressQ4,
53
+ swiftIcuAddress,
53
54
  swiftIcuAsset,
54
- swiftIcuBrotli,
55
- swiftIcuBrotliQ4,
55
+ swiftIcuBundleAsset,
56
+ swiftIcuPacked,
56
57
  type SwiftIcuAsset,
57
58
  } from './swift-icu'
58
59
  import { swiftObjcRootObjects } from './swift-link-roots'
@@ -141,9 +142,10 @@ import type { SwiftResourceBundle } from './swiftContract'
141
142
  export {
142
143
  brotliCompressQ11,
143
144
  brotliCompressQ4,
145
+ swiftIcuAddress,
144
146
  swiftIcuAsset,
145
- swiftIcuBrotli,
146
- swiftIcuBrotliQ4,
147
+ swiftIcuBundleAsset,
148
+ swiftIcuPacked,
147
149
  type SwiftIcuAsset,
148
150
  }
149
151
 
@@ -868,6 +870,7 @@ const OPTIONAL_FRAMEWORK_DEPENDENCIES: Record<string, string[]> = {
868
870
  ],
869
871
  GoogleMobileAds: [],
870
872
  FBAudienceNetwork: [],
873
+ ExpoModulesCore: [],
871
874
  }
872
875
  const OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES))
873
876
 
@@ -1505,7 +1508,8 @@ const ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One
1505
1508
  // edit pay for an optimizer pass and the artifact depend on the machine, so
1506
1509
  // -O0 on the clang link turns that pass off everywhere. the build root's
1507
1510
  // linker drops repeated autolink -l flags (writeSwiftAutolinkLinker). the
1508
- // rest is the native main-thread stack budget.
1511
+ // icu wraps route icu data opens through Sources/PeachICU, whose host places
1512
+ // each item on first use. the rest is the native main-thread stack budget.
1509
1513
  const executableLinkFlags = (root: string) => ` "-Xclang-linker", "-O0",
1510
1514
  "-Xclang-linker", ${JSON.stringify(`-fuse-ld=${path.join(root, SWIFT_AUTOLINK_LINKER)}`)},
1511
1515
  "-Xlinker", "-z", "-Xlinker", "stack-size=8372224",
@@ -1514,6 +1518,8 @@ const executableLinkFlags = (root: string) => ` "-Xclang-linker", "-O0"
1514
1518
  "-Xlinker", "-lsetjmp",
1515
1519
  "-Xlinker", "--export-table",
1516
1520
  "-Xlinker", "--growable-table",
1521
+ "-Xlinker", "--wrap=swift_udata_open",
1522
+ "-Xlinker", "--wrap=swift_udata_openChoice",
1517
1523
  `
1518
1524
  // the Darwin module's providers link as an archive does, ahead of the sdk's
1519
1525
  // libDarwinRecords.a, which supplies only what remains undefined