peachsim 0.1.2701 → 0.1.2703

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 (129) hide show
  1. package/cli/commands/package.ts +5 -5
  2. package/cli/commands/perf-native.ts +100 -58
  3. package/cli/package-duo-device.ts +24 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +2 -2
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +5 -5
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +3 -3
  16. package/dist-lib/bundle-channel.cjs +117 -10
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +3 -3
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +3 -3
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +2 -2
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +7 -7
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +5 -5
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/esm-chunks/{acorn-XYDEAJWX.mjs → acorn-43Q5KRLL.mjs} +3 -3
  30. package/dist-lib/esm-chunks/{chunk-JAQLYGVS.mjs → chunk-3XOKPZGS.mjs} +4 -4
  31. package/dist-lib/esm-chunks/{chunk-43X64A24.mjs → chunk-42K537BB.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-KXQ6YPZJ.mjs → chunk-4BMF44KC.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-2GFDQ2RY.mjs → chunk-4N7DHUC6.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-LGFEIKDM.mjs → chunk-B3AGCWOJ.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-YLVJRH27.mjs → chunk-DMHSTMXP.mjs} +6 -6
  36. package/dist-lib/esm-chunks/{chunk-BGLOJMLA.mjs → chunk-F3RRYYLF.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-CMBYCFEF.mjs → chunk-GUR2WE4P.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-WWK6GMXB.mjs → chunk-H5ELVRKG.mjs} +5 -5
  39. package/dist-lib/esm-chunks/{chunk-EBM3VDWK.mjs → chunk-HFPHOP7B.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-FW52XLFO.mjs → chunk-HXDBQN66.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-A5WFZ2XX.mjs → chunk-JZ5XJAXQ.mjs} +2 -2
  42. package/dist-lib/esm-chunks/{chunk-JYSDQDL2.mjs → chunk-K2OOA65C.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-Q5DBRTKN.mjs → chunk-KP2NMWWX.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-NFVR346F.mjs → chunk-NFKOUEBN.mjs} +6 -6
  45. package/dist-lib/esm-chunks/{chunk-OGJEDE5E.mjs → chunk-NNWFER2D.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-OPTGHXWZ.mjs → chunk-ODCTJTKL.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-DLRANZB6.mjs → chunk-SG3PGG3S.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-W6TXFCRI.mjs → chunk-SMBH32NF.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-SSR5S6R3.mjs → chunk-SOAH7CMP.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-STBRFFEL.mjs → chunk-TT3PYTWA.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-KGCR7O7F.mjs → chunk-UJSEYJ2F.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{chunk-DDGDFU4G.mjs → chunk-VSD7SG36.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{chunk-5FIKQ7F4.mjs → chunk-YF5O3ABY.mjs} +128 -18
  54. package/dist-lib/esm-chunks/{metro-layout-parser-NP3MSVX4.mjs → metro-layout-parser-UY33H5NJ.mjs} +3 -3
  55. package/dist-lib/esm-chunks/{swift-package-prebuilt-SVIMOFLA.mjs → swift-package-prebuilt-H3JZE3QC.mjs} +12 -12
  56. package/dist-lib/esm-chunks/{swift-sdk-app-module-A6YJ4KNJ.mjs → swift-sdk-app-module-FZWIOWZN.mjs} +16 -16
  57. package/dist-lib/esm-chunks/{swift-sdk-image-UYJ3VFF6.mjs → swift-sdk-image-7WNTYEJX.mjs} +16 -16
  58. package/dist-lib/esm-chunks/{swift-sdk-image-producer-7EWPBKNW.mjs → swift-sdk-image-producer-MJD3U6GW.mjs} +5 -5
  59. package/dist-lib/expo-swift-bundle.cjs +117 -10
  60. package/dist-lib/expo-swift-metadata.cjs +1 -1
  61. package/dist-lib/expo-swift-metadata.mjs +7 -7
  62. package/dist-lib/home-paths.cjs +1 -1
  63. package/dist-lib/host/bridge-host.cjs +392 -14
  64. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  65. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  66. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  67. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  68. package/dist-lib/host/websocket-proxy.cjs +1 -1
  69. package/dist-lib/index.cjs +1 -1
  70. package/dist-lib/kotlin-host.cjs +1 -1
  71. package/dist-lib/menu.cjs +1 -1
  72. package/dist-lib/menu.mjs +3 -3
  73. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  74. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  75. package/dist-lib/metro-production-bundle.cjs +1 -1
  76. package/dist-lib/metro-production-bundle.mjs +4 -4
  77. package/dist-lib/native-app-identity-project.cjs +1 -1
  78. package/dist-lib/native-app-identity-project.mjs +15 -15
  79. package/dist-lib/native-app-identity.cjs +1 -1
  80. package/dist-lib/native-app-identity.mjs +6 -6
  81. package/dist-lib/native-firebase-metadata.cjs +1 -1
  82. package/dist-lib/native-firebase-metadata.mjs +3 -3
  83. package/dist-lib/pdfium-raster.cjs +1 -1
  84. package/dist-lib/pdfium-raster.mjs +2 -2
  85. package/dist-lib/plist.cjs +1 -1
  86. package/dist-lib/plist.mjs +3 -3
  87. package/dist-lib/profiles.cjs +1 -1
  88. package/dist-lib/public-brand.cjs +1 -1
  89. package/dist-lib/public-origins-lib-esm.json +85 -85
  90. package/dist-lib/public-origins-lib.json +64 -64
  91. package/dist-lib/react-native-host-modules.cjs +1 -1
  92. package/dist-lib/react-native-host-modules.mjs +2 -2
  93. package/dist-lib/reap-browser.cjs +1 -1
  94. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  95. package/dist-lib/sdk.cjs +1 -1
  96. package/dist-lib/sdk.mjs +8 -8
  97. package/dist-lib/skills.cjs +392 -14
  98. package/dist-lib/swift-compile.cjs +111 -4
  99. package/dist-lib/swift-compile.mjs +12 -12
  100. package/dist-lib/swift-package.cjs +1 -1
  101. package/dist-lib/swift-package.mjs +3 -3
  102. package/dist-lib/swift-submit.cjs +1 -1
  103. package/dist-lib/swift-submit.mjs +6 -6
  104. package/dist-lib/swift-svg-raster.cjs +1 -1
  105. package/dist-lib/swift-svg-raster.mjs +2 -2
  106. package/dist-lib/swift-toolchain.cjs +1 -1
  107. package/dist-lib/swift.cjs +1 -1
  108. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  109. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  110. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  111. package/dist-lib/vendor/acorn.cjs +1 -1
  112. package/dist-lib/vendor/magic-string.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/dist-types/packages/peach-engine/{core-abi → shared}/value/kernel-client.d.ts +2 -2
  126. package/dist-types/packages/peach-engine/src/kernel/kernel.d.ts +1 -1
  127. package/package.json +1 -1
  128. package/src/one-native-controls-package.ts +306 -5
  129. package/src/swift-compile.ts +147 -9
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2701 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2703 | (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;
@@ -36019,7 +36019,7 @@ var init_swift_objc_sdk_tree = __esm({
36019
36019
 
36020
36020
  // src/swift-compiler-digest.ts
36021
36021
  function swiftArchiveCompilerDigestValue() {
36022
- return true ? "2ccb944d5c0397eaf9bd9ec9cf326ec9d8752cb10f21cdf33b99e424a631f2fe" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
36022
+ return true ? "10a1dc09394bc0196745c5277f51cf1355975d7ad316a0844781a3da3c3d2793" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
36023
36023
  }
36024
36024
  var import_node_crypto11, import_node_fs27, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
36025
36025
  var init_swift_compiler_digest = __esm({
@@ -36170,7 +36170,7 @@ var init_swift_standin_digest = __esm({
36170
36170
 
36171
36171
  // src/expo-native-compiler-digest.ts
36172
36172
  function expoNativeCompilerDigestValue() {
36173
- return true ? "d5919f7a93064a145d71abbe591877e4031ecad69d7602f0f7a9d33e630530da" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
36173
+ return true ? "6fd4ab24d79c8c63d4ebc87630e9d6bb5d9d51c189783ea4af28911a52e01ead" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
36174
36174
  }
36175
36175
  var import_node_crypto13;
36176
36176
  var init_expo_native_compiler_digest = __esm({
@@ -82827,6 +82827,93 @@ function readFrameworkProductsReceipt(scratch2, receiptKey) {
82827
82827
  objcHeaders: new Map(parsed2.objcHeaders)
82828
82828
  };
82829
82829
  }
82830
+ function resolveBunBinary() {
82831
+ if (import_node_path84.default.basename(process.execPath).startsWith("bun")) return process.execPath;
82832
+ for (const candidate of [
82833
+ import_node_path84.default.join(import_node_os18.default.homedir(), "builders/bun/bin/bun"),
82834
+ import_node_path84.default.join(import_node_os18.default.homedir(), ".bun/bin/bun"),
82835
+ "/opt/homebrew/bin/bun",
82836
+ "/usr/local/bin/bun",
82837
+ "bun"
82838
+ ]) {
82839
+ const probe2 = (0, import_node_child_process45.spawnSync)(candidate, ["--version"], { stdio: "ignore" });
82840
+ if (probe2.status === 0) return candidate;
82841
+ }
82842
+ return null;
82843
+ }
82844
+ function frameworkHeaderContext(moduleRoot, products) {
82845
+ const sources = import_node_path84.default.join(moduleRoot, "Sources");
82846
+ const files2 = [];
82847
+ if ((0, import_node_fs84.existsSync)(sources)) {
82848
+ for (const entry of (0, import_node_fs84.readdirSync)(sources, { recursive: true, withFileTypes: true })) {
82849
+ if (!entry.isFile()) continue;
82850
+ const rel = import_node_path84.default.relative(sources, import_node_path84.default.join(entry.parentPath, entry.name));
82851
+ if (/\.(?:h|hh|hpp|hxx|inc|def|modulemap|apinotes)$/.test(rel)) files2.push(rel);
82852
+ }
82853
+ }
82854
+ return (0, import_node_crypto51.createHash)("sha256").update(JSON.stringify([[...products].sort(), files2.sort()])).digest("hex");
82855
+ }
82856
+ function shellQuote(value) {
82857
+ return `'${value.replaceAll("'", "'\\''")}'`;
82858
+ }
82859
+ function prepareFrameworkCompileCache(scratch2, moduleRoot, toolchainBin, sdkOptions, products) {
82860
+ const launcher2 = import_node_path84.default.join(moduleRoot, "scripts/build-cache-launcher.ts");
82861
+ if (!(0, import_node_fs84.existsSync)(launcher2)) return null;
82862
+ const bunBin = resolveBunBinary();
82863
+ if (!bunBin) return null;
82864
+ const cacheRoot = import_node_path84.default.join(swiftCacheDir(), "swift-distribution-compile-cache");
82865
+ (0, import_node_fs84.mkdirSync)(cacheRoot, { recursive: true });
82866
+ const wrapperDir = import_node_path84.default.join(scratch2, "launch");
82867
+ (0, import_node_fs84.mkdirSync)(wrapperDir, { recursive: true });
82868
+ const wrapper = import_node_path84.default.join(wrapperDir, "swift-frontend");
82869
+ const statsFile = import_node_path84.default.join(scratch2, `compile-cache-stats-${process.pid}.jsonl`);
82870
+ (0, import_node_fs84.rmSync)(statsFile, { force: true });
82871
+ const sdkFlagIndex = sdkOptions.indexOf("--swift-sdks-path");
82872
+ const sdkViewDir = sdkFlagIndex >= 0 && sdkFlagIndex + 1 < sdkOptions.length ? sdkOptions[sdkFlagIndex + 1] : void 0;
82873
+ const pathMapEntries = [["$SLOT_ROOT", scratch2]];
82874
+ if (sdkViewDir) pathMapEntries.push(["$SDK_VIEW", sdkViewDir]);
82875
+ const pathMap = JSON.stringify(pathMapEntries);
82876
+ const context = frameworkHeaderContext(moduleRoot, products);
82877
+ const script = [
82878
+ "#!/bin/sh",
82879
+ `export SWIFT_SDK_COMPILE_CACHE=${shellQuote(cacheRoot)}`,
82880
+ "export SWIFT_SDK_COMPILE_CACHE_REUSE=1",
82881
+ `export SWIFT_SDK_COMPILE_CACHE_PATH_MAP=${shellQuote(pathMap)}`,
82882
+ `export SWIFT_SDK_COMPILE_CACHE_CONTEXT=${shellQuote(context)}`,
82883
+ `export SWIFT_SDK_COMPILE_CACHE_STATS=${shellQuote(statsFile)}`,
82884
+ `exec ${shellQuote(bunBin)} ${shellQuote(launcher2)} ${shellQuote(import_node_path84.default.join(toolchainBin, "swift-frontend"))} "$@"`,
82885
+ ""
82886
+ ].join("\n");
82887
+ const partial = `${wrapper}.${process.pid}.${(0, import_node_crypto51.randomUUID)()}.partial`;
82888
+ (0, import_node_fs84.writeFileSync)(partial, script, { mode: 493 });
82889
+ (0, import_node_fs84.chmodSync)(partial, 493);
82890
+ (0, import_node_fs84.renameSync)(partial, wrapper);
82891
+ return { wrapper, statsFile };
82892
+ }
82893
+ function reportFrameworkCompileCacheStats(scratch2, statsFile) {
82894
+ if (!(0, import_node_fs84.existsSync)(statsFile)) return;
82895
+ let hits = 0;
82896
+ let misses = 0;
82897
+ let savedMs = 0;
82898
+ try {
82899
+ for (const line of (0, import_node_fs84.readFileSync)(statsFile, "utf8").split("\n").filter(Boolean)) {
82900
+ const entry = JSON.parse(line);
82901
+ hits += entry.hits ?? 0;
82902
+ misses += entry.misses ?? 0;
82903
+ savedMs += entry.savedMs ?? 0;
82904
+ }
82905
+ } catch (error) {
82906
+ if (error instanceof SyntaxError) return;
82907
+ throw error;
82908
+ } finally {
82909
+ (0, import_node_fs84.rmSync)(statsFile, { force: true });
82910
+ }
82911
+ if (hits > 0 || misses > 0) {
82912
+ console.error(
82913
+ `[swift-framework-compile-cache] ${import_node_path84.default.basename(scratch2)} hits=${hits} misses=${misses} saved=${(savedMs / 1e3).toFixed(1)}s`
82914
+ );
82915
+ }
82916
+ }
82830
82917
  async function buildFrameworkProducts(scratch2, args, allowWrite) {
82831
82918
  const linkedTargets = linkedFrameworkTargets(args.moduleRoot, args.input);
82832
82919
  const unoptimized = args.input.unoptimized === true;
@@ -82856,6 +82943,13 @@ async function buildFrameworkProducts(scratch2, args, allowWrite) {
82856
82943
  const jobs = swiftCompilerJobs();
82857
82944
  const targetJobs = jobs >= 4 ? 2 : 1;
82858
82945
  const driverJobs = Math.max(1, Math.floor(jobs / targetJobs));
82946
+ const cache = unoptimized ? null : prepareFrameworkCompileCache(
82947
+ scratch2,
82948
+ args.moduleRoot,
82949
+ args.toolchainBin,
82950
+ sdkOptions,
82951
+ linkedTargets.products
82952
+ );
82859
82953
  await runCompiler(
82860
82954
  args.swift,
82861
82955
  [
@@ -82877,6 +82971,7 @@ async function buildFrameworkProducts(scratch2, args, allowWrite) {
82877
82971
  args.sdk,
82878
82972
  "-c",
82879
82973
  "release",
82974
+ ...cache ? ["-Xswiftc", "-driver-use-frontend-path", "-Xswiftc", cache.wrapper] : [],
82880
82975
  "-Xswiftc",
82881
82976
  unoptimized ? "-Onone" : "-Osize",
82882
82977
  "-Xswiftc",
@@ -82932,6 +83027,8 @@ async function buildFrameworkProducts(scratch2, args, allowWrite) {
82932
83027
  SWIFTPM_NOISE
82933
83028
  ).catch((error) => {
82934
83029
  throw new Error(outputOf(error), { cause: error });
83030
+ }).finally(() => {
83031
+ if (cache) reportFrameworkCompileCacheStats(scratch2, cache.statsFile);
82935
83032
  });
82936
83033
  const release = import_node_path84.default.join(scratch2, WASM_TRIPLE, "release");
82937
83034
  const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
@@ -83059,6 +83156,16 @@ ${args.frameworkKey}`,
83059
83156
  (0, import_node_fs84.renameSync)(partialReceipt, receiptFile2);
83060
83157
  return result;
83061
83158
  }
83159
+ function swiftFrameworkSlotCount(unoptimized) {
83160
+ const base2 = unoptimized ? SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS : SWIFT_FRAMEWORK_SLOTS;
83161
+ if (process.platform !== "linux") return base2;
83162
+ const cores = import_node_os18.default.availableParallelism();
83163
+ return unoptimized ? Math.min(8, Math.max(base2, Math.floor(cores / 16))) : Math.min(16, Math.max(base2, Math.floor(cores / 8)));
83164
+ }
83165
+ function swiftBuildRootSlotCount() {
83166
+ if (process.platform !== "linux") return SWIFT_BUILD_ROOT_SLOTS;
83167
+ return import_node_os18.default.availableParallelism() >= 64 ? 8 : SWIFT_BUILD_ROOT_SLOTS;
83168
+ }
83062
83169
  function swiftFrameworksDir(unoptimized = false) {
83063
83170
  return import_node_path84.default.join(
83064
83171
  swiftCacheDir(),
@@ -83080,7 +83187,7 @@ function swiftFrameworkSlotRelease(slot) {
83080
83187
  return swiftFrameworkSlotRecord(slot, SWIFT_FRAMEWORK_SLOT_RELEASE);
83081
83188
  }
83082
83189
  async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal, work, unoptimized = false) {
83083
- const slotCount = unoptimized ? SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS : SWIFT_FRAMEWORK_SLOTS;
83190
+ const slotCount = swiftFrameworkSlotCount(unoptimized);
83084
83191
  const slotsDir = swiftFrameworksDir(unoptimized);
83085
83192
  const slots = Array.from({ length: slotCount }, (_, index) => {
83086
83193
  const slot = import_node_path84.default.join(slotsDir, `slot-${index}`);
@@ -83174,7 +83281,7 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
83174
83281
  }
83175
83282
  }
83176
83283
  async function withSwiftBuildRootSlot(baseRoot, exactShape, compatShape, signal, work) {
83177
- const slots = Array.from({ length: SWIFT_BUILD_ROOT_SLOTS }, (_, index) => {
83284
+ const slots = Array.from({ length: swiftBuildRootSlotCount() }, (_, index) => {
83178
83285
  const slot = index === 0 ? baseRoot : `${baseRoot}-s${index}`;
83179
83286
  (0, import_node_fs84.mkdirSync)(slot, { recursive: true });
83180
83287
  return slot;
@@ -84410,7 +84517,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
84410
84517
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
84411
84518
  MULTI_MANIFEST_VERSION = 76;
84412
84519
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
84413
- compilerSourceDigest = true ? "5405a15ee2e958619090c720ff4ed5353b64cfacbdc81e773dae4300cdc6b692" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
84520
+ compilerSourceDigest = true ? "f8823b39a6f101e159cffdd4e1598d7edb8645267453be7613ef42f7c3ee4154" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
84414
84521
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
84415
84522
  MODULE_MAP_RESPONSE_FILE_RUN = 16;
84416
84523
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
@@ -107984,16 +108091,16 @@ if (result.error) throw result.error;
107984
108091
  process.exit(result.status ?? 1);
107985
108092
  `
107986
108093
  );
107987
- const shellQuote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
108094
+ const shellQuote2 = (value) => `'${value.replaceAll("'", "'\\''")}'`;
107988
108095
  import_node_fs114.default.writeFileSync(
107989
108096
  file,
107990
108097
  `#!/bin/sh
107991
108098
  for arg in "$@"; do
107992
108099
  case "$arg" in
107993
- -framework|-weak_framework|-Wl,-framework,*|-Wl,-weak_framework,*) exec node ${shellQuote(script)} "$@" ;;
108100
+ -framework|-weak_framework|-Wl,-framework,*|-Wl,-weak_framework,*) exec node ${shellQuote2(script)} "$@" ;;
107994
108101
  esac
107995
108102
  done
107996
- exec ${shellQuote(configuration2.compiler)} "$@"
108103
+ exec ${shellQuote2(configuration2.compiler)} "$@"
107997
108104
  `,
107998
108105
  { mode: 493 }
107999
108106
  );
@@ -145173,10 +145280,12 @@ function shardOneNativeStyleSource(name3, source, shardCount = ONE_NATIVE_STYLE_
145173
145280
  mainDepth += braceDelta(maskedLine);
145174
145281
  }
145175
145282
  const headerText = headerLines.join("\n");
145283
+ const stem2 = name3.slice(0, -".swift".length);
145284
+ const dispatchShards = shardOneNativeSDKStyleDispatch(mainLines, headerText, stem2);
145176
145285
  const out = [
145177
- { name: name3, source: mainLines.join("\n") }
145286
+ { name: name3, source: dispatchShards.mainLines.join("\n") },
145287
+ ...dispatchShards.shards
145178
145288
  ];
145179
- const stem2 = name3.slice(0, -".swift".length);
145180
145289
  for (let i = 0; i < buckets.length; i++) {
145181
145290
  const bucket = buckets[i];
145182
145291
  if (bucket.chunks.length === 0) continue;
@@ -145193,6 +145302,269 @@ ${shardBody}
145193
145302
  }
145194
145303
  return out;
145195
145304
  }
145305
+ function shardOneNativeSDKStyleDispatch(mainLines, headerText, stem2, shardCount = 6) {
145306
+ let switchStart = -1;
145307
+ let switchEnd = -1;
145308
+ let defaultLine = -1;
145309
+ for (let i = 0; i < mainLines.length; i++) {
145310
+ if (mainLines[i].trim() === "switch name {") {
145311
+ switchStart = i;
145312
+ break;
145313
+ }
145314
+ }
145315
+ if (switchStart < 0) return { mainLines, shards: [] };
145316
+ const masked = swiftCodeMask(mainLines.join("\n")).split("\n");
145317
+ if (masked.length !== mainLines.length) return { mainLines, shards: [] };
145318
+ const braceDelta2 = (line) => {
145319
+ let delta = 0;
145320
+ for (let i = 0; i < line.length; i++) {
145321
+ if (line[i] === "{") delta++;
145322
+ else if (line[i] === "}") delta--;
145323
+ }
145324
+ return delta;
145325
+ };
145326
+ let depth = 1;
145327
+ for (let i = switchStart + 1; i < mainLines.length; i++) {
145328
+ const trimmed = masked[i].trim();
145329
+ if (depth === 1 && trimmed.startsWith("default:")) {
145330
+ defaultLine = i;
145331
+ }
145332
+ if (!trimmed.startsWith("#")) {
145333
+ depth += braceDelta2(masked[i]);
145334
+ if (depth === 0) {
145335
+ switchEnd = i;
145336
+ break;
145337
+ }
145338
+ if (depth < 0) return { mainLines, shards: [] };
145339
+ }
145340
+ }
145341
+ if (switchEnd < 0 || defaultLine < 0) return { mainLines, shards: [] };
145342
+ const caseChunks = [];
145343
+ let current2 = [];
145344
+ let ifDepth = 0;
145345
+ const flush = () => {
145346
+ if (current2.length > 0) {
145347
+ caseChunks.push(current2);
145348
+ current2 = [];
145349
+ }
145350
+ };
145351
+ for (let i = switchStart + 1; i < defaultLine; i++) {
145352
+ const line = mainLines[i];
145353
+ const trimmed = masked[i].trim();
145354
+ if (ifDepth === 0) {
145355
+ if (trimmed.startsWith("#if ")) {
145356
+ flush();
145357
+ ifDepth++;
145358
+ current2.push(line);
145359
+ continue;
145360
+ }
145361
+ if (trimmed.startsWith("case ")) {
145362
+ flush();
145363
+ current2.push(line);
145364
+ continue;
145365
+ }
145366
+ if (trimmed === "" && current2.length === 0) continue;
145367
+ current2.push(line);
145368
+ continue;
145369
+ }
145370
+ current2.push(line);
145371
+ if (trimmed.startsWith("#if ")) ifDepth++;
145372
+ else if (trimmed === "#endif") {
145373
+ ifDepth--;
145374
+ if (ifDepth < 0) return { mainLines, shards: [] };
145375
+ if (ifDepth === 0) flush();
145376
+ }
145377
+ }
145378
+ if (ifDepth !== 0) return { mainLines, shards: [] };
145379
+ flush();
145380
+ if (caseChunks.length < shardCount * 2) return { mainLines, shards: [] };
145381
+ const buckets = Array.from(
145382
+ { length: shardCount },
145383
+ () => ({ lines: 0, chunks: [] })
145384
+ );
145385
+ for (const chunk of caseChunks) {
145386
+ let target = buckets[0];
145387
+ for (const candidate of buckets) {
145388
+ if (candidate.lines < target.lines) target = candidate;
145389
+ }
145390
+ target.chunks.push(chunk);
145391
+ target.lines += chunk.length;
145392
+ }
145393
+ const shards2 = [];
145394
+ const callLines = [];
145395
+ for (let i = 0; i < buckets.length; i++) {
145396
+ const bucket = buckets[i];
145397
+ if (bucket.chunks.length === 0) continue;
145398
+ const fnName = `oneNativeSDKStyleDispatch${i}`;
145399
+ const casesBody = bucket.chunks.map((chunk) => chunk.join("\n")).join("\n");
145400
+ shards2.push({
145401
+ name: `${stem2}.dispatch-${String(i).padStart(2, "0")}.swift`,
145402
+ source: [
145403
+ headerText,
145404
+ "",
145405
+ "extension AnyView {",
145406
+ ` func ${fnName}(_ name: String, _ value: String, emit: @escaping (String, String) -> Void) -> AnyView? {`,
145407
+ " var view = self",
145408
+ " switch name {",
145409
+ casesBody,
145410
+ " default: return nil",
145411
+ " }",
145412
+ " return view",
145413
+ " }",
145414
+ "}",
145415
+ ""
145416
+ ].join("\n")
145417
+ });
145418
+ const prefix = callLines.length === 0 ? " if let next = " : " ?? ";
145419
+ callLines.push(`${prefix}view.${fnName}(name, value, emit: emit)`);
145420
+ }
145421
+ const defaultBody = mainLines.slice(defaultLine, switchEnd).map(
145422
+ (line, index) => index === 0 ? line.replace(/^\s*default:\s*/, " ") : line
145423
+ );
145424
+ const replacement = [
145425
+ ...callLines,
145426
+ " {",
145427
+ " view = next",
145428
+ " } else {",
145429
+ ...defaultBody,
145430
+ " }"
145431
+ ];
145432
+ const nextMainLines = [
145433
+ ...mainLines.slice(0, switchStart),
145434
+ ...replacement,
145435
+ ...mainLines.slice(switchEnd + 1)
145436
+ ];
145437
+ return { mainLines: nextMainLines, shards: shards2 };
145438
+ }
145439
+ function shardOneNativeAnimationValuesSource(name3, source, shardCount = 6) {
145440
+ if (name3 !== "OneNativeAnimationValues.swift" || source.length < 4e4) {
145441
+ return [{ name: name3, source }];
145442
+ }
145443
+ const masked = swiftCodeMask(source);
145444
+ const lines = source.split("\n");
145445
+ const maskedLines = masked.split("\n");
145446
+ if (lines.length !== maskedLines.length) return [{ name: name3, source }];
145447
+ const braceDelta2 = (line) => {
145448
+ let delta = 0;
145449
+ for (let i = 0; i < line.length; i++) {
145450
+ if (line[i] === "{") delta++;
145451
+ else if (line[i] === "}") delta--;
145452
+ }
145453
+ return delta;
145454
+ };
145455
+ const headerLines = [];
145456
+ let bodyStart = 0;
145457
+ let headerIfDepth = 0;
145458
+ for (let i = 0; i < lines.length; i++) {
145459
+ const trimmed = maskedLines[i].trim();
145460
+ if (trimmed === "") {
145461
+ headerLines.push(lines[i]);
145462
+ bodyStart = i + 1;
145463
+ continue;
145464
+ }
145465
+ if (trimmed.startsWith("import ")) {
145466
+ headerLines.push(lines[i]);
145467
+ bodyStart = i + 1;
145468
+ continue;
145469
+ }
145470
+ if (trimmed.startsWith("#if ")) {
145471
+ headerIfDepth++;
145472
+ headerLines.push(lines[i]);
145473
+ bodyStart = i + 1;
145474
+ continue;
145475
+ }
145476
+ if (trimmed === "#endif" && headerIfDepth > 0) {
145477
+ headerIfDepth--;
145478
+ headerLines.push(lines[i]);
145479
+ bodyStart = i + 1;
145480
+ continue;
145481
+ }
145482
+ if (headerIfDepth > 0 && trimmed.startsWith("#")) {
145483
+ headerLines.push(lines[i]);
145484
+ bodyStart = i + 1;
145485
+ continue;
145486
+ }
145487
+ break;
145488
+ }
145489
+ if (headerIfDepth !== 0) return [{ name: name3, source }];
145490
+ const mainLines = lines.slice(0, bodyStart);
145491
+ const chunks = [];
145492
+ let current2 = [];
145493
+ let depth = 0;
145494
+ let ifDepth = 0;
145495
+ let chunkSawBrace = false;
145496
+ let chunkIsSdkValue = false;
145497
+ const flush = () => {
145498
+ if (current2.length === 0) return;
145499
+ if (chunkIsSdkValue) chunks.push(current2);
145500
+ else mainLines.push(...current2);
145501
+ current2 = [];
145502
+ chunkSawBrace = false;
145503
+ chunkIsSdkValue = false;
145504
+ };
145505
+ for (let i = bodyStart; i < lines.length; i++) {
145506
+ const text7 = lines[i];
145507
+ const maskedLine = maskedLines[i];
145508
+ const trimmed = maskedLine.trim();
145509
+ if (current2.length === 0 && text7.trim() === "") {
145510
+ mainLines.push(text7);
145511
+ continue;
145512
+ }
145513
+ if (depth === 0 && /^func\s+oneNativeSDKValue\w*\b/.test(trimmed)) {
145514
+ chunkIsSdkValue = true;
145515
+ }
145516
+ current2.push(text7);
145517
+ if (trimmed.startsWith("#if ")) {
145518
+ ifDepth++;
145519
+ continue;
145520
+ }
145521
+ if (trimmed === "#endif") {
145522
+ ifDepth--;
145523
+ if (ifDepth < 0) return [{ name: name3, source }];
145524
+ if (ifDepth === 0 && depth === 0) flush();
145525
+ continue;
145526
+ }
145527
+ if (trimmed.startsWith("#")) continue;
145528
+ const delta = braceDelta2(maskedLine);
145529
+ if (delta !== 0) chunkSawBrace = true;
145530
+ depth += delta;
145531
+ if (depth < 0) return [{ name: name3, source }];
145532
+ if (ifDepth === 0 && depth === 0 && chunkSawBrace) flush();
145533
+ }
145534
+ if (depth !== 0 || ifDepth !== 0) return [{ name: name3, source }];
145535
+ flush();
145536
+ if (chunks.length < 2) return [{ name: name3, source }];
145537
+ const buckets = Array.from(
145538
+ { length: Math.min(shardCount, chunks.length) },
145539
+ () => ({ lines: 0, chunks: [] })
145540
+ );
145541
+ for (const chunk of chunks) {
145542
+ let target = buckets[0];
145543
+ for (const candidate of buckets) {
145544
+ if (candidate.lines < target.lines) target = candidate;
145545
+ }
145546
+ target.chunks.push(chunk);
145547
+ target.lines += chunk.length;
145548
+ }
145549
+ const headerText = headerLines.join("\n");
145550
+ const out = [
145551
+ { name: name3, source: mainLines.join("\n") }
145552
+ ];
145553
+ const stem2 = name3.slice(0, -".swift".length);
145554
+ for (let i = 0; i < buckets.length; i++) {
145555
+ const bucket = buckets[i];
145556
+ if (bucket.chunks.length === 0) continue;
145557
+ const shardBody = bucket.chunks.map((chunk) => chunk.join("\n")).join("\n\n");
145558
+ out.push({
145559
+ name: `${stem2}.shard-${String(i).padStart(2, "0")}.swift`,
145560
+ source: `${headerText}
145561
+
145562
+ ${shardBody}
145563
+ `
145564
+ });
145565
+ }
145566
+ return out;
145567
+ }
145196
145568
  function excludedGroupSource(source, defines) {
145197
145569
  const code = swiftCodeMask(source).trim();
145198
145570
  const group = /^#if (ONE_GROUP_\w+)[ \t]*\r?\n/.exec(code)?.[1];
@@ -145301,7 +145673,8 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
145301
145673
  watched.add(leafMeasurePath);
145302
145674
  const files2 = /* @__PURE__ */ new Map();
145303
145675
  for (const [name3, source] of controls) {
145304
- for (const shard2 of shardOneNativeStyleSource(name3, source)) {
145676
+ const sharded = name3 === "OneNativeStyle.swift" ? shardOneNativeStyleSource(name3, source) : name3 === "OneNativeAnimationValues.swift" ? shardOneNativeAnimationValuesSource(name3, source) : [{ name: name3, source }];
145677
+ for (const shard2 of sharded) {
145305
145678
  files2.set("Sources/ControlsCore/" + shard2.name, shard2.source);
145306
145679
  }
145307
145680
  const full = paths.get(name3);
@@ -145376,7 +145749,12 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
145376
145749
  const controlSettings = [
145377
145750
  ".swiftLanguageMode(.v5)",
145378
145751
  ...swiftDefines(defines),
145379
- ...bindings ? ['.unsafeFlags(["-Xfrontend", "-import-module", "-Xfrontend", "One"])'] : []
145752
+ // OneNativeControlsCore compiles generated SwiftUI wrappers that emit
145753
+ // thousands of actor-isolation warnings per build, stalling stderr I/O.
145754
+ `.unsafeFlags(${JSON.stringify([
145755
+ "-suppress-warnings",
145756
+ ...bindings ? ["-Xfrontend", "-import-module", "-Xfrontend", "One"] : []
145757
+ ])})`
145380
145758
  ];
145381
145759
  const hostSettings = hostClangDefines.length ? `, cSettings: [${hostClangDefines.join(", ")}], cxxSettings: [${hostClangDefines.join(", ")}]` : "";
145382
145760
  let manifest;
@@ -151775,7 +152153,7 @@ var init_nitro_superset = __esm({
151775
152153
  init_nitroContract();
151776
152154
  init_swift_standin_digest();
151777
152155
  NITRO_SUPERSET_ENTRY_NAME = "superset";
151778
- NITRO_COMPILER_DIGEST = true ? "dcf5640ec2f21e304683265354409cc78661f2324bf2e9809d3d09bcb23b39f4" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
152156
+ NITRO_COMPILER_DIGEST = true ? "feb0b5221554104f81d7bdc24e12aa9338b9c204bb8d00be16850a92c5a80330" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
151779
152157
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
151780
152158
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
151781
152159
  published3 = /* @__PURE__ */ new Map();