peachsim 0.1.2742 → 0.1.2744

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 (126) 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 +137 -119
  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-I6YLE7RH.mjs → acorn-3G2P6SLD.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-YQSNOLNM.mjs → chunk-2XVKKP7C.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-RC3JQV7D.mjs → chunk-3N3NWKOV.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-GMFZTGVJ.mjs → chunk-3R76QB7G.mjs} +6 -6
  30. package/dist-lib/esm-chunks/{chunk-OXFGIZC4.mjs → chunk-4BSH2PJJ.mjs} +2 -2
  31. package/dist-lib/esm-chunks/{chunk-VWRLBFID.mjs → chunk-4J7M5ABU.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-QDTQYGJB.mjs → chunk-4SL6WT5R.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-CFPPESX7.mjs → chunk-5EMHE44C.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-4CNYVYQW.mjs → chunk-6HF6522F.mjs} +4 -4
  35. package/dist-lib/esm-chunks/{chunk-MHRTZ6I7.mjs → chunk-7PZCYBRZ.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-FKC5RBXR.mjs → chunk-CWTZZ5PW.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-Y4Q3W36I.mjs → chunk-EP64ATYX.mjs} +6 -6
  38. package/dist-lib/esm-chunks/{chunk-PLXC42XF.mjs → chunk-ESGH55PU.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-NWGCI4JC.mjs → chunk-FZCF4XKV.mjs} +3 -3
  40. package/dist-lib/esm-chunks/{chunk-VH5KY2GM.mjs → chunk-MHWKZ233.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-IVVVYJKG.mjs → chunk-MK5GDI4J.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-6LMI5DE3.mjs → chunk-NA3WRJON.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-MXADGMSE.mjs → chunk-OYGAP4IB.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-U262IRGM.mjs → chunk-Q3AUIPF2.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-2SC45KUK.mjs → chunk-QNMAUXAH.mjs} +145 -127
  46. package/dist-lib/esm-chunks/{chunk-G44GUBAL.mjs → chunk-SI55AJTD.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-HJBL2ND3.mjs → chunk-U6INDDV4.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-GPVGYC45.mjs → chunk-V6QXWGYS.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-ZRA35GYC.mjs → chunk-XRGF7PWG.mjs} +5 -5
  50. package/dist-lib/esm-chunks/{chunk-6QTRZNLH.mjs → chunk-YPT6XQJX.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{metro-layout-parser-QGTUKU6T.mjs → metro-layout-parser-IISMSHQ6.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-M2IXDM7B.mjs → swift-package-prebuilt-VA4DWCFB.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-4KYBNEBW.mjs → swift-sdk-app-module-3UUKIQI6.mjs} +16 -16
  54. package/dist-lib/esm-chunks/{swift-sdk-image-Z37PPINV.mjs → swift-sdk-image-XJURAHAQ.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-7KFCU6Y6.mjs → swift-sdk-image-producer-HF3NTKWX.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +137 -119
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +160 -143
  61. package/dist-lib/host/fetch-proxy-handler.cjs +5 -5
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +1 -1
  75. package/dist-lib/native-app-identity-project.mjs +15 -15
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +85 -85
  87. package/dist-lib/public-origins-lib.json +64 -64
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +160 -143
  95. package/dist-lib/swift-compile.cjs +133 -115
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/dist-types/packages/peach-engine/src/engine/native-font-dataContract.d.ts +1 -0
  123. package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +17 -1
  124. package/package.json +1 -1
  125. package/src/one-direct-host-source.ts +23 -24
  126. package/src/swift-compile.ts +171 -152
@@ -1,10 +1,10 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  acquireSwiftRootReadHold,
4
4
  hasLiveSwiftRootReaders,
5
5
  retainSwiftRootReadHold,
6
6
  withSwiftRootLock
7
- } from "./chunk-OXFGIZC4.mjs";
7
+ } from "./chunk-4BSH2PJJ.mjs";
8
8
  import {
9
9
  CORE_FOUNDATION_OVERLAY_GLOBALS,
10
10
  NATIVE_GRAPH_SDK_VERSION,
@@ -55,7 +55,7 @@ import {
55
55
  withoutImportedSdkEnumForwards,
56
56
  withoutSwiftDeclarations,
57
57
  writeBuildFile
58
- } from "./chunk-Y4Q3W36I.mjs";
58
+ } from "./chunk-EP64ATYX.mjs";
59
59
  import {
60
60
  SWIFT_AUTOLINK_LINKER,
61
61
  SWIFT_CACHE_HOLD_MARKER,
@@ -72,7 +72,7 @@ import {
72
72
  wasmThreadLinkFlags,
73
73
  windowAdmission,
74
74
  writeSwiftAutolinkLinker
75
- } from "./chunk-VWRLBFID.mjs";
75
+ } from "./chunk-4J7M5ABU.mjs";
76
76
  import {
77
77
  SWIFT_BINARY_TREES_DIR,
78
78
  SWIFT_NATIVE_INPUT_ROOT,
@@ -87,7 +87,7 @@ import {
87
87
  isSwiftResourcePath,
88
88
  isSwiftSourceLinkGraph,
89
89
  swiftProjectFilesProblems
90
- } from "./chunk-IVVVYJKG.mjs";
90
+ } from "./chunk-MK5GDI4J.mjs";
91
91
  import {
92
92
  OBJC_RESOURCE_ACCESSOR_BODY,
93
93
  OBJC_RESOURCE_ACCESSOR_HEADER,
@@ -110,16 +110,16 @@ import {
110
110
  swiftPackagePartition,
111
111
  swiftTargetModuleName,
112
112
  withoutGlogModuleMap
113
- } from "./chunk-U262IRGM.mjs";
113
+ } from "./chunk-Q3AUIPF2.mjs";
114
114
  import {
115
115
  rnxPublicBrand
116
- } from "./chunk-CFPPESX7.mjs";
116
+ } from "./chunk-5EMHE44C.mjs";
117
117
  import {
118
118
  isRecord
119
- } from "./chunk-RC3JQV7D.mjs";
119
+ } from "./chunk-3N3NWKOV.mjs";
120
120
  import {
121
121
  __publicField
122
- } from "./chunk-6QTRZNLH.mjs";
122
+ } from "./chunk-YPT6XQJX.mjs";
123
123
 
124
124
  // src/swift-compile.ts
125
125
  import {
@@ -14469,7 +14469,7 @@ async function compileGuestLink(options) {
14469
14469
  };
14470
14470
  const sdk = options.sdkImage;
14471
14471
  const sdkCallers = sdk.sdkInterface.guestCallers;
14472
- const sdkObjects = (await import("./swift-sdk-image-Z37PPINV.mjs")).readSwiftSdkManifestIndex(
14472
+ const sdkObjects = (await import("./swift-sdk-image-XJURAHAQ.mjs")).readSwiftSdkManifestIndex(
14473
14473
  sdk
14474
14474
  ).guestObjects;
14475
14475
  if (!sdkCallers || !sdkObjects)
@@ -14769,7 +14769,7 @@ async function compileGuestLink(options) {
14769
14769
  swiftAppModuleThunkSection,
14770
14770
  swiftSdkProjectionSpans,
14771
14771
  writeSwiftSdkAppLink
14772
- } = await import("./swift-sdk-app-module-4KYBNEBW.mjs");
14772
+ } = await import("./swift-sdk-app-module-3UUKIQI6.mjs");
14773
14773
  const project = options.project;
14774
14774
  const work = project ? mkdtempSync2(path14.join(directory, "app-module-")) : path14.join(directory, "app-module");
14775
14775
  if (project) chownSync(work, project.uid, project.gid);
@@ -16742,7 +16742,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
16742
16742
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
16743
16743
  var MULTI_MANIFEST_VERSION = 76;
16744
16744
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
16745
- var compilerSourceDigest = true ? "07651c3448f918d1873b3ecc1d3db59948c7cbfdd917cd5b69da610a327f857a" : swiftCompilerSourceDigest(import.meta.dirname);
16745
+ var compilerSourceDigest = true ? "9e43b96f22759d18028120bf151aaa3545b4a68d9cb280a87e81051893e9eb50" : swiftCompilerSourceDigest(import.meta.dirname);
16746
16746
  function swiftArtifactHash(input, release, moduleRoot) {
16747
16747
  return swiftCompileInputHash(input, release).update(swiftModuleDigest(moduleRoot)).digest("hex");
16748
16748
  }
@@ -17534,7 +17534,7 @@ function findTargetForFile(file, byDir, predicate) {
17534
17534
  }
17535
17535
  return void 0;
17536
17536
  }
17537
- function compiledSwiftSources(files, targets, overlayFrameworks, headers, nativeSourceGlue = false) {
17537
+ function compiledSwiftSources(files, targets, overlayFrameworks, headers) {
17538
17538
  const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
17539
17539
  const byDir = indexTargetsByDirectory(ordered);
17540
17540
  const excludeSets = /* @__PURE__ */ new Map();
@@ -17560,7 +17560,7 @@ function compiledSwiftSources(files, targets, overlayFrameworks, headers, native
17560
17560
  const { onWasm, withoutWasm } = swiftTargetArchitectures(targets, swiftSources, headers);
17561
17561
  return new Map(
17562
17562
  [...owners].map(([file, { source, owner }]) => {
17563
- if (nativeSourceGlue && path23.posix.basename(file) === "OneNativeSource.generated.swift")
17563
+ if (path23.posix.basename(file) === "OneNativeSource.generated.swift")
17564
17564
  return [file, source];
17565
17565
  const manifest = /(?:^|\/)Package(?:@swift-[\d.]+)?\.swift$/.test(file);
17566
17566
  if (manifest && (!owner || /^Package(?:@swift-[\d.]+)?\.swift$/.test(file)))
@@ -19202,8 +19202,7 @@ module ${moduleName}.Swift {
19202
19202
  ([file]) => /\.(?:h|hh|hpp)$/.test(file)
19203
19203
  ));
19204
19204
  return headerFiles.filter(([file]) => file.startsWith(`${directory}/`)).map(([, contents]) => contents);
19205
- },
19206
- input.oneModule
19205
+ }
19207
19206
  );
19208
19207
  const libraryEntryFiles = /* @__PURE__ */ new Map();
19209
19208
  for (const target of [...targets]) {
@@ -20476,9 +20475,10 @@ var frameworkProductsReceiptSchema = object({
20476
20475
  objcHeaders: array(tuple([string(), string()])),
20477
20476
  archived: array(tuple([string(), string()]))
20478
20477
  });
20479
- function readFrameworkProductsReceipt(scratch, receiptKey) {
20478
+ function readFrameworkProductsReceipt(scratch, receiptKey, planChangedAt = 0n) {
20480
20479
  const receiptFile = path23.join(scratch, "products-ready", `${receiptKey}.json`);
20481
- if (!existsSync9(receiptFile)) return null;
20480
+ const receiptStat = statSync4(receiptFile, { bigint: true, throwIfNoEntry: false });
20481
+ if (!receiptStat || receiptStat.mtimeNs < planChangedAt) return null;
20482
20482
  let parsed;
20483
20483
  try {
20484
20484
  parsed = parse(
@@ -20602,117 +20602,136 @@ async function buildFrameworkProducts(scratch, args, allowWrite) {
20602
20602
  const unoptimized = args.input.unoptimized === true;
20603
20603
  const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
20604
20604
  const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
20605
- const receiptKey = createHash16("sha256").update(
20605
+ const receiptKeyFor = (products) => createHash16("sha256").update(
20606
20606
  JSON.stringify([
20607
20607
  "framework-products/v2",
20608
20608
  args.frameworkKey,
20609
20609
  unoptimized,
20610
20610
  args.sdk,
20611
20611
  args.toolchainBin,
20612
- [...linkedTargets.products].sort(),
20612
+ [...products].sort(),
20613
20613
  darwinRecordsMinimum(),
20614
20614
  args.plugins,
20615
20615
  sdkOptions,
20616
20616
  selectorOptions
20617
20617
  ])
20618
20618
  ).digest("hex").slice(0, 32);
20619
+ const receiptKey = receiptKeyFor(linkedTargets.products);
20619
20620
  const ready = readFrameworkProductsReceipt(scratch, receiptKey);
20620
20621
  if (ready) return ready;
20621
20622
  if (!allowWrite) return;
20622
20623
  const linkRoot = path23.join(scratch, "link");
20623
- writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
20624
- const frameworkTmp = path23.join(scratch, "peach-compiler-tmp");
20625
- mkdirSync7(frameworkTmp, { recursive: true });
20626
- const jobs = swiftCompilerJobs();
20627
- const targetJobs = jobs >= 4 ? 2 : 1;
20628
- const driverJobs = Math.max(1, Math.floor(jobs / targetJobs));
20629
- const cache = unoptimized ? null : prepareFrameworkCompileCache(
20624
+ const manifest = path23.join(linkRoot, "Package.swift");
20625
+ const manifestStat = statSync4(manifest, { bigint: true, throwIfNoEntry: false });
20626
+ const planStat = statSync4(path23.join(scratch, "release.yaml"), {
20627
+ bigint: true,
20628
+ throwIfNoEntry: false
20629
+ });
20630
+ const builtProducts = manifestStat && planStat ? [
20631
+ ...readFileSync13(manifest, "utf8").matchAll(
20632
+ /^\s*\.product\(name: "([^"]+)", package:/gm
20633
+ )
20634
+ ].map((match) => match[1]) : [];
20635
+ const reusePlan = manifestStat && planStat && linkedTargets.products.every((product) => builtProducts.includes(product)) && readFrameworkProductsReceipt(
20630
20636
  scratch,
20631
- args.moduleRoot,
20632
- args.toolchainBin,
20633
- sdkOptions,
20634
- linkedTargets.products
20637
+ receiptKeyFor(builtProducts),
20638
+ manifestStat.ctimeNs > planStat.ctimeNs ? manifestStat.ctimeNs : planStat.ctimeNs
20635
20639
  );
20636
- await runCompiler(
20637
- args.swift,
20638
- [
20639
- "build",
20640
- ...swiftPackageCacheOptions(),
20641
- "--build-system",
20642
- "native",
20643
- "-j",
20644
- String(targetJobs),
20645
- "--package-path",
20646
- linkRoot,
20647
- "--scratch-path",
20640
+ if (!reusePlan) {
20641
+ writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
20642
+ const frameworkTmp = path23.join(scratch, "peach-compiler-tmp");
20643
+ mkdirSync7(frameworkTmp, { recursive: true });
20644
+ const jobs = swiftCompilerJobs();
20645
+ const targetJobs = jobs >= 4 ? 2 : 1;
20646
+ const driverJobs = Math.max(1, Math.floor(jobs / targetJobs));
20647
+ const cache = unoptimized ? null : prepareFrameworkCompileCache(
20648
20648
  scratch,
20649
- "--target",
20650
- FRAMEWORK_LINK_TARGET,
20651
- ...sdkOptions,
20652
- ...selectorOptions,
20653
- "--swift-sdk",
20654
- args.sdk,
20655
- "-c",
20656
- "release",
20657
- ...cache ? ["-Xswiftc", "-driver-use-frontend-path", "-Xswiftc", cache.wrapper] : [],
20658
- "-Xswiftc",
20659
- unoptimized ? "-Onone" : "-Osize",
20660
- "-Xswiftc",
20661
- "-no-whole-module-optimization",
20662
- // optimized batches can move specialized definitions between object files.
20663
- ...unoptimized ? ["-Xswiftc", "-incremental"] : [],
20664
- "-Xswiftc",
20665
- "-enable-batch-mode",
20666
- // each batch repeats the same framework diagnostics.
20667
- ...unoptimized ? [] : ["-Xswiftc", "-suppress-warnings"],
20668
- "-Xswiftc",
20669
- "-j",
20670
- "-Xswiftc",
20671
- String(driverJobs),
20672
- // the release link strips all debug info, so none is generated.
20673
- "-Xswiftc",
20674
- "-gnone",
20675
- "-Xcc",
20676
- "-g0",
20677
- "-Xcxx",
20678
- "-g0",
20679
- "-Xswiftc",
20680
- "-num-threads",
20681
- "-Xswiftc",
20682
- "1",
20683
- ...swiftReproducibleBuildFlags([
20684
- [path23.dirname(args.toolchainBin), "toolchain"],
20685
- [args.moduleRoot, "framework"],
20686
- [scratch, "framework-scratch"]
20687
- ]),
20688
- ...args.plugins.libraries.flatMap((plugin) => [
20649
+ args.moduleRoot,
20650
+ args.toolchainBin,
20651
+ sdkOptions,
20652
+ linkedTargets.products
20653
+ );
20654
+ await runCompiler(
20655
+ args.swift,
20656
+ [
20657
+ "build",
20658
+ ...swiftPackageCacheOptions(),
20659
+ "--build-system",
20660
+ "native",
20661
+ "-j",
20662
+ String(targetJobs),
20663
+ "--package-path",
20664
+ linkRoot,
20665
+ "--scratch-path",
20666
+ scratch,
20667
+ "--target",
20668
+ FRAMEWORK_LINK_TARGET,
20669
+ ...sdkOptions,
20670
+ ...selectorOptions,
20671
+ "--swift-sdk",
20672
+ args.sdk,
20673
+ "-c",
20674
+ "release",
20675
+ ...cache ? ["-Xswiftc", "-driver-use-frontend-path", "-Xswiftc", cache.wrapper] : [],
20689
20676
  "-Xswiftc",
20690
- "-load-plugin-library",
20677
+ unoptimized ? "-Onone" : "-Osize",
20691
20678
  "-Xswiftc",
20692
- plugin
20693
- ]),
20694
- ...args.plugins.executables.flatMap((plugin) => [
20679
+ "-no-whole-module-optimization",
20680
+ // optimized batches can move specialized definitions between object files.
20681
+ ...unoptimized ? ["-Xswiftc", "-incremental"] : [],
20695
20682
  "-Xswiftc",
20696
- "-load-plugin-executable",
20683
+ "-enable-batch-mode",
20684
+ // each batch repeats the same framework diagnostics.
20685
+ ...unoptimized ? [] : ["-Xswiftc", "-suppress-warnings"],
20697
20686
  "-Xswiftc",
20698
- `${plugin}#ExpoModulesMacros`
20699
- ])
20700
- ],
20701
- // swiftpm hashes TMPDIR into its plan; keep one stable compiler scratch inside the locked slot.
20702
- // the framework build's warnings alone pass the default 1 MiB cap, which kills
20703
- // the build one step from the end.
20704
- {
20705
- ...args.buildOptions,
20706
- temporaryDirectory: frameworkTmp,
20707
- maxBuffer: 64 * 1024 * 1024
20708
- },
20709
- SWIFTPM_PROGRESS,
20710
- SWIFTPM_NOISE
20711
- ).catch((error) => {
20712
- throw new Error(outputOf(error), { cause: error });
20713
- }).finally(() => {
20714
- if (cache) reportFrameworkCompileCacheStats(scratch, cache.statsFile);
20715
- });
20687
+ "-j",
20688
+ "-Xswiftc",
20689
+ String(driverJobs),
20690
+ // the release link strips all debug info, so none is generated.
20691
+ "-Xswiftc",
20692
+ "-gnone",
20693
+ "-Xcc",
20694
+ "-g0",
20695
+ "-Xcxx",
20696
+ "-g0",
20697
+ "-Xswiftc",
20698
+ "-num-threads",
20699
+ "-Xswiftc",
20700
+ "1",
20701
+ ...swiftReproducibleBuildFlags([
20702
+ [path23.dirname(args.toolchainBin), "toolchain"],
20703
+ [args.moduleRoot, "framework"],
20704
+ [scratch, "framework-scratch"]
20705
+ ]),
20706
+ ...args.plugins.libraries.flatMap((plugin) => [
20707
+ "-Xswiftc",
20708
+ "-load-plugin-library",
20709
+ "-Xswiftc",
20710
+ plugin
20711
+ ]),
20712
+ ...args.plugins.executables.flatMap((plugin) => [
20713
+ "-Xswiftc",
20714
+ "-load-plugin-executable",
20715
+ "-Xswiftc",
20716
+ `${plugin}#ExpoModulesMacros`
20717
+ ])
20718
+ ],
20719
+ // swiftpm hashes TMPDIR into its plan; keep one stable compiler scratch inside the locked slot.
20720
+ // the framework build's warnings alone pass the default 1 MiB cap, which kills
20721
+ // the build one step from the end.
20722
+ {
20723
+ ...args.buildOptions,
20724
+ temporaryDirectory: frameworkTmp,
20725
+ maxBuffer: 64 * 1024 * 1024
20726
+ },
20727
+ SWIFTPM_PROGRESS,
20728
+ SWIFTPM_NOISE
20729
+ ).catch((error) => {
20730
+ throw new Error(outputOf(error), { cause: error });
20731
+ }).finally(() => {
20732
+ if (cache) reportFrameworkCompileCacheStats(scratch, cache.statsFile);
20733
+ });
20734
+ }
20716
20735
  const release = path23.join(scratch, WASM_TRIPLE, "release");
20717
20736
  const linked = frameworkLinkClosure(scratch, linkedTargets.targets);
20718
20737
  const objects = linked.objects;
@@ -20846,6 +20865,7 @@ var SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS = 4;
20846
20865
  var SWIFT_FRAMEWORK_SLOT_KEY = ".peach-framework-key";
20847
20866
  var SWIFT_FRAMEWORK_SLOT_ORIGIN = ".peach-framework-origin";
20848
20867
  var SWIFT_FRAMEWORK_SLOT_RELEASE = ".peach-framework-release";
20868
+ var SWIFT_FRAMEWORK_SLOT_HANDOFF = ".peach-framework-handoff";
20849
20869
  var SWIFT_BUILD_ROOT_SLOTS = 4;
20850
20870
  var SWIFT_BUILD_ROOT_SHAPE = ".peach-build-shape";
20851
20871
  function swiftFrameworkSlotCount(unoptimized) {
@@ -20878,18 +20898,8 @@ function swiftFrameworkSlotKey(slot) {
20878
20898
  function swiftFrameworkSlotRelease(slot) {
20879
20899
  return swiftFrameworkSlotRecord(slot, SWIFT_FRAMEWORK_SLOT_RELEASE);
20880
20900
  }
20881
- var SWIFT_FRAMEWORK_HOT_RECEIPT_MS = 15 * 60 * 1e3;
20882
- function swiftFrameworkSlotHasReceipt(slot) {
20883
- try {
20884
- return readdirSync4(path23.join(slot, "products-ready")).some(
20885
- (entry) => entry.endsWith(".json")
20886
- );
20887
- } catch (error) {
20888
- if (vanished(error)) return false;
20889
- throw error;
20890
- }
20891
- }
20892
- async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal, work, unoptimized = false) {
20901
+ var SWIFT_FRAMEWORK_HANDOFF_MS = 15 * 60 * 1e3;
20902
+ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal, work, unoptimized, linkOnly) {
20893
20903
  const slotCount = swiftFrameworkSlotCount(unoptimized);
20894
20904
  const slotsDir = swiftFrameworksDir(unoptimized);
20895
20905
  const slots = Array.from({ length: slotCount }, (_, index) => {
@@ -20906,8 +20916,12 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
20906
20916
  throw error;
20907
20917
  }
20908
20918
  };
20909
- const isRecentForeignReceipt = (slot, now) => !own(slot) && swiftFrameworkSlotHasReceipt(slot) && now - slotMtimeMs(slot) < SWIFT_FRAMEWORK_HOT_RECEIPT_MS;
20910
- const trySlot = (slot, mode, logSelection, allowHotForeign = true) => {
20919
+ const handoffFile = (slot) => path23.join(slot, SWIFT_FRAMEWORK_SLOT_HANDOFF);
20920
+ const hasPendingForeignHandoff = (slot, now) => {
20921
+ const stamp = statSync4(handoffFile(slot), { throwIfNoEntry: false });
20922
+ return stamp !== void 0 && !own(slot) && now - stamp.mtimeMs < SWIFT_FRAMEWORK_HANDOFF_MS;
20923
+ };
20924
+ const trySlot = (slot, mode, logSelection, allowPendingHandoff = true) => {
20911
20925
  return withSwiftRootLock(
20912
20926
  slot,
20913
20927
  async (lease) => {
@@ -20915,7 +20929,7 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
20915
20929
  if (mode !== "restage" && !matches) return;
20916
20930
  const allowWrite = mode !== "reuse";
20917
20931
  if (allowWrite && await hasLiveSwiftRootReaders(slot, signal)) return;
20918
- if (mode === "restage" && !matches && !allowHotForeign && isRecentForeignReceipt(slot, Date.now()))
20932
+ if (mode === "restage" && !matches && !allowPendingHandoff && hasPendingForeignHandoff(slot, Date.now()))
20919
20933
  return;
20920
20934
  if (!matches) logSelection?.();
20921
20935
  if (mode === "extend")
@@ -20929,6 +20943,8 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
20929
20943
  `[swift-framework-cache] ${path23.basename(slot)} hit=products release=${release}`
20930
20944
  );
20931
20945
  const now = /* @__PURE__ */ new Date();
20946
+ if (linkOnly) writeFileSync7(handoffFile(slot), "");
20947
+ else rmSync7(handoffFile(slot), { force: true });
20932
20948
  utimesSync(slot, now, now);
20933
20949
  return { value };
20934
20950
  },
@@ -20982,8 +20998,8 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
20982
20998
  return { slot, index, tier: 3, changes: Infinity, own: false, mtimeMs };
20983
20999
  const changes = changedInputsFor(slot, slotKey);
20984
21000
  const isOwn = own(slot);
20985
- const hotForeign = !isOwn && swiftFrameworkSlotHasReceipt(slot) && now - mtimeMs < SWIFT_FRAMEWORK_HOT_RECEIPT_MS;
20986
- return { slot, index, tier: hotForeign ? 2 : 0, changes, own: isOwn, mtimeMs };
21001
+ const tier = hasPendingForeignHandoff(slot, now) ? 2 : 0;
21002
+ return { slot, index, tier, changes, own: isOwn, mtimeMs };
20987
21003
  }).sort((left, right) => {
20988
21004
  if (left.tier !== right.tier) return left.tier - right.tier;
20989
21005
  if (left.tier === 0)
@@ -21109,6 +21125,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
21109
21125
  if (hadKey !== frameworkKey) {
21110
21126
  rmSync7(path23.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), { force: true });
21111
21127
  rmSync7(path23.join(slot, SWIFT_FRAMEWORK_SLOT_RELEASE), { force: true });
21128
+ rmSync7(path23.join(slot, SWIFT_FRAMEWORK_SLOT_HANDOFF), { force: true });
21112
21129
  rmSync7(path23.join(slot, "products-ready"), { recursive: true, force: true });
21113
21130
  rmSync7(path23.join(slot, "products-lib"), { recursive: true, force: true });
21114
21131
  rmSync7(path23.join(slot, "lib"), { recursive: true, force: true });
@@ -21256,7 +21273,7 @@ async function compileSwiftProjectOnce(sources, options) {
21256
21273
  const distribution = swiftDistributionAt(moduleRoot);
21257
21274
  const mirrorDistribution = options.linkOnly || options.project ? null : distribution;
21258
21275
  if (distribution) refreshSwiftCacheHold(moduleRoot);
21259
- const input = distribution && !options.intermediates ? (await import("./swift-package-prebuilt-M2IXDM7B.mjs")).useSwiftPackagePrebuilts(
21276
+ const input = distribution && !options.intermediates ? (await import("./swift-package-prebuilt-VA4DWCFB.mjs")).useSwiftPackagePrebuilts(
21260
21277
  sources,
21261
21278
  moduleRoot,
21262
21279
  options.toolchainBin
@@ -21269,7 +21286,7 @@ async function compileSwiftProjectOnce(sources, options) {
21269
21286
  sources: path23.join(root, "Sources", "App"),
21270
21287
  multi: compileTargets(input).length > 0
21271
21288
  };
21272
- const sdkImage = options.linkOnly ? void 0 : await (await import("./swift-sdk-image-Z37PPINV.mjs")).buildSwiftSdkImage(
21289
+ const sdkImage = options.linkOnly ? void 0 : await (await import("./swift-sdk-image-XJURAHAQ.mjs")).buildSwiftSdkImage(
21273
21290
  moduleRoot,
21274
21291
  !!guestGraph,
21275
21292
  distribution ? [] : linkedFrameworkTargets(moduleRoot, input).imports,
@@ -21460,7 +21477,8 @@ ${compatShape}` : "";
21460
21477
  moduleRoot,
21461
21478
  budget.signal,
21462
21479
  prepareFrameworks,
21463
- unoptimized
21480
+ unoptimized,
21481
+ options.linkOnly === true
21464
21482
  );
21465
21483
  if (!frameworks)
21466
21484
  throw new Error("Swift distribution did not provide its frameworks");
@@ -21988,7 +22006,7 @@ ${compatShape}` : "";
21988
22006
  });
21989
22007
  sdkAsset = { key: sdkImage.key, sha256: sdkImage.sha256, binding };
21990
22008
  } else {
21991
- const { buildSwiftAppModule } = await import("./swift-sdk-app-module-4KYBNEBW.mjs");
22009
+ const { buildSwiftAppModule } = await import("./swift-sdk-app-module-3UUKIQI6.mjs");
21992
22010
  const binding = await buildSwiftAppModule({
21993
22011
  buildRoot: root2,
21994
22012
  toolchainBin: options.toolchainBin,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var AGENT_IDENTITY_MAX_CHARS = 200;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../peach-globals/src/bundle-global-footer.ts
4
4
  function findBundleFooter(source, prefix) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,21 +1,21 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  LAUNCH_METADATA_KEYS,
4
4
  LAUNCH_METADATA_KEYS_PATH
5
- } from "./chunk-PLXC42XF.mjs";
5
+ } from "./chunk-ESGH55PU.mjs";
6
6
  import {
7
7
  cacheDir,
8
8
  parseSwiftDistributionLock,
9
9
  readActiveRuntime,
10
10
  runtimeDir
11
- } from "./chunk-Y4Q3W36I.mjs";
11
+ } from "./chunk-EP64ATYX.mjs";
12
12
  import {
13
13
  SWIFT_WASM_TRIPLE,
14
14
  registerSwiftHostCompiler
15
- } from "./chunk-VWRLBFID.mjs";
15
+ } from "./chunk-4J7M5ABU.mjs";
16
16
  import {
17
17
  isRecord
18
- } from "./chunk-RC3JQV7D.mjs";
18
+ } from "./chunk-3N3NWKOV.mjs";
19
19
 
20
20
  // src/swift-distribution.ts
21
21
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./chunk-6QTRZNLH.mjs";
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./chunk-YPT6XQJX.mjs";
3
3
 
4
4
  // src/metro-layout-parser.ts
5
5
  var whitespace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/y;
@@ -8,7 +8,7 @@ var lineBreak = /[\r\n\u2028\u2029]/;
8
8
  var metroLayoutParser;
9
9
  async function loadMetroLayoutParser() {
10
10
  if (metroLayoutParser) return metroLayoutParser;
11
- const { Parser } = await import("./acorn-I6YLE7RH.mjs");
11
+ const { Parser } = await import("./acorn-3G2P6SLD.mjs");
12
12
  metroLayoutParser = Parser.extend(
13
13
  (Base) => {
14
14
  const parseFunctionBody = Reflect.get(Base.prototype, "parseFunctionBody");
@@ -1,27 +1,27 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  compileTargets,
4
4
  fetchNativeEntry,
5
5
  nativeEntryKey,
6
6
  swiftAvailableModules
7
- } from "./chunk-2SC45KUK.mjs";
8
- import "./chunk-OXFGIZC4.mjs";
7
+ } from "./chunk-QNMAUXAH.mjs";
8
+ import "./chunk-4BSH2PJJ.mjs";
9
9
  import {
10
10
  swiftDistributionAt,
11
11
  swiftImportNames
12
- } from "./chunk-Y4Q3W36I.mjs";
13
- import "./chunk-VWRLBFID.mjs";
12
+ } from "./chunk-EP64ATYX.mjs";
13
+ import "./chunk-4J7M5ABU.mjs";
14
14
  import {
15
15
  SWIFT_REMOTE_PACKAGES_DIR
16
- } from "./chunk-IVVVYJKG.mjs";
16
+ } from "./chunk-MK5GDI4J.mjs";
17
17
  import {
18
18
  manifestCalls
19
- } from "./chunk-U262IRGM.mjs";
20
- import "./chunk-VH5KY2GM.mjs";
21
- import "./chunk-CFPPESX7.mjs";
22
- import "./chunk-MHRTZ6I7.mjs";
23
- import "./chunk-RC3JQV7D.mjs";
24
- import "./chunk-6QTRZNLH.mjs";
19
+ } from "./chunk-Q3AUIPF2.mjs";
20
+ import "./chunk-MHWKZ233.mjs";
21
+ import "./chunk-5EMHE44C.mjs";
22
+ import "./chunk-7PZCYBRZ.mjs";
23
+ import "./chunk-3N3NWKOV.mjs";
24
+ import "./chunk-YPT6XQJX.mjs";
25
25
 
26
26
  // src/swift-package-prebuilt.ts
27
27
  import { createHash } from "node:crypto";
@@ -1,10 +1,10 @@
1
- /*! peach v0.1.2742 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2744 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SWIFT_SDK_APP_MEMORY_BASE,
4
4
  SWIFT_SDK_MEMORY_BASE,
5
5
  SWIFT_SDK_PIECE_FIELDS,
6
6
  readSwiftSdkManifest
7
- } from "./chunk-GMFZTGVJ.mjs";
7
+ } from "./chunk-3R76QB7G.mjs";
8
8
  import {
9
9
  ADDEND_RELOCATIONS,
10
10
  KEEP_WASM_NAMES,
@@ -33,22 +33,22 @@ import {
33
33
  wasmReader,
34
34
  wasmSections,
35
35
  writeWasmCustomSection
36
- } from "./chunk-2SC45KUK.mjs";
37
- import "./chunk-OXFGIZC4.mjs";
38
- import "./chunk-ZRA35GYC.mjs";
39
- import "./chunk-PLXC42XF.mjs";
40
- import "./chunk-FKC5RBXR.mjs";
41
- import "./chunk-Y4Q3W36I.mjs";
36
+ } from "./chunk-QNMAUXAH.mjs";
37
+ import "./chunk-4BSH2PJJ.mjs";
38
+ import "./chunk-XRGF7PWG.mjs";
39
+ import "./chunk-ESGH55PU.mjs";
40
+ import "./chunk-CWTZZ5PW.mjs";
41
+ import "./chunk-EP64ATYX.mjs";
42
42
  import {
43
43
  SWIFT_WASM_TRIPLE
44
- } from "./chunk-VWRLBFID.mjs";
45
- import "./chunk-IVVVYJKG.mjs";
46
- import "./chunk-U262IRGM.mjs";
47
- import "./chunk-VH5KY2GM.mjs";
48
- import "./chunk-CFPPESX7.mjs";
49
- import "./chunk-MHRTZ6I7.mjs";
50
- import "./chunk-RC3JQV7D.mjs";
51
- import "./chunk-6QTRZNLH.mjs";
44
+ } from "./chunk-4J7M5ABU.mjs";
45
+ import "./chunk-MK5GDI4J.mjs";
46
+ import "./chunk-Q3AUIPF2.mjs";
47
+ import "./chunk-MHWKZ233.mjs";
48
+ import "./chunk-5EMHE44C.mjs";
49
+ import "./chunk-7PZCYBRZ.mjs";
50
+ import "./chunk-3N3NWKOV.mjs";
51
+ import "./chunk-YPT6XQJX.mjs";
52
52
 
53
53
  // src/swift-sdk-app-module.ts
54
54
  import { execFile } from "node:child_process";