peachsim 0.1.2300 → 0.1.2302

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 (107) hide show
  1. package/cli/commands/control.ts +1 -0
  2. package/cli/commands/inspect.ts +2 -1
  3. package/cli/commands/shell-url.ts +5 -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 +1 -1
  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 +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +677 -355
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +3 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +628 -306
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +2889 -354
  34. package/dist-lib/host/fetch-proxy-handler.cjs +6 -6
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +14 -9
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +13 -9
  50. package/dist-lib/native-app-identity-project.cjs +9 -5
  51. package/dist-lib/native-app-identity-project.mjs +9 -5
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +24 -24
  63. package/dist-lib/public-origins-lib.json +56 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +2 -1
  69. package/dist-lib/sdk.mjs +2 -1
  70. package/dist-lib/skills.cjs +788 -415
  71. package/dist-lib/swift-compile.cjs +15 -7
  72. package/dist-lib/swift-compile.mjs +15 -7
  73. package/dist-lib/swift-package.cjs +1 -1
  74. package/dist-lib/swift-package.mjs +1 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +23 -11
  80. package/dist-lib/vite.cjs +6 -6
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +1 -0
  84. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -0
  85. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -0
  86. package/dist-types/packages/peach-engine/src/render-worker/activitykit-activityContract.d.ts +17 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +5 -0
  88. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +4 -0
  89. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +3 -1
  90. package/dist-types/packages/peach-kit/src/capabilities.d.ts +4 -0
  91. package/java-platform/licenses/fdlibm.txt +3 -0
  92. package/kotlin/sdk.tar.gz +0 -0
  93. package/package.json +1 -1
  94. package/runtime-companion.json +1 -1
  95. package/src/expo-discovery-cache.ts +6 -6
  96. package/src/expo-native-workspace.ts +85 -37
  97. package/src/expo-swift-host.ts +19 -4
  98. package/src/host/bridge-host.ts +9 -0
  99. package/src/launchMetadataContract.ts +1 -0
  100. package/src/one-sdk-preparation.ts +61 -5
  101. package/src/swift-guest-compile.ts +19 -3
  102. package/src/swift-guest-source-plan.ts +7 -2
  103. package/src/swiftContract.ts +3 -0
  104. package/src/turbo-compile.ts +60 -4
  105. package/src/turbo-source.ts +239 -35
  106. package/src/widget-extension-bundle.ts +48 -0
  107. package/src/xcode-project.ts +22 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2300 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2302 | (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;
@@ -10915,6 +10915,45 @@ var init_native_prebuilt = __esm({
10915
10915
  });
10916
10916
 
10917
10917
  // src/one-sdk-preparation.ts
10918
+ async function generateAppSdkInChild(generatorFile, frameworks) {
10919
+ const directory2 = import_node_fs13.default.mkdtempSync(import_node_path11.default.join(import_node_os5.default.tmpdir(), "peach-one-sdk-"));
10920
+ const resultFile = import_node_path11.default.join(directory2, "result.json");
10921
+ try {
10922
+ const child = (0, import_node_child_process8.spawn)(
10923
+ "node",
10924
+ [
10925
+ "--input-type=module",
10926
+ "-e",
10927
+ GENERATE_SCRIPT,
10928
+ generatorFile,
10929
+ resultFile,
10930
+ JSON.stringify(frameworks)
10931
+ ],
10932
+ { stdio: ["ignore", "ignore", "pipe"] }
10933
+ );
10934
+ let stderr = "";
10935
+ child.stderr.setEncoding("utf8");
10936
+ child.stderr.on("data", (chunk) => {
10937
+ stderr += chunk;
10938
+ });
10939
+ const [status, signal] = await new Promise(
10940
+ (resolve4, reject) => {
10941
+ child.once("error", reject);
10942
+ child.once("close", (code, closeSignal) => resolve4([code, closeSignal]));
10943
+ }
10944
+ );
10945
+ if (status !== 0)
10946
+ throw new Error(
10947
+ `One SDK source generation failed (${signal ?? `exit ${status}`})${stderr ? `: ${stderr.trim().slice(-2e3)}` : ""}`
10948
+ );
10949
+ const result = JSON.parse(
10950
+ import_node_fs13.default.readFileSync(resultFile, "utf8")
10951
+ );
10952
+ return { generation: result.generation, files: new Map(result.files) };
10953
+ } finally {
10954
+ import_node_fs13.default.rmSync(directory2, { recursive: true, force: true });
10955
+ }
10956
+ }
10918
10957
  async function selectOneSDK(appRoot) {
10919
10958
  const require2 = (0, import_node_module2.createRequire)(import_node_path11.default.join(appRoot, "package.json"));
10920
10959
  let onePackage;
@@ -10971,7 +11010,10 @@ async function prepareOneSDKSources(appRoot, output2) {
10971
11010
  import_node_fs13.default.copyFileSync(import_node_path11.default.join(published3, name3), import_node_path11.default.join(directory2, name3));
10972
11011
  return;
10973
11012
  }
10974
- const generated = await selected.generator.generateAppSdk(selected.frameworks);
11013
+ const generated = await generateAppSdkInChild(
11014
+ import_node_path11.default.join(selected.one, "dist/sdk/app.mjs"),
11015
+ selected.frameworks
11016
+ );
10975
11017
  if (generated.generation !== generation)
10976
11018
  throw new Error("One SDK source generation differs from the installed facades");
10977
11019
  import_node_fs13.default.rmSync(directory2, { recursive: true, force: true });
@@ -10985,17 +11027,27 @@ async function prepareOneSDKSources(appRoot, output2) {
10985
11027
  };
10986
11028
  import_node_fs13.default.writeFileSync(import_node_path11.default.join(directory2, "manifest.json"), JSON.stringify(manifest));
10987
11029
  }
10988
- var import_node_crypto4, import_node_fs13, import_node_module2, import_node_path11, import_node_url;
11030
+ var import_node_child_process8, import_node_crypto4, import_node_fs13, import_node_module2, import_node_os5, import_node_path11, import_node_url, GENERATE_SCRIPT;
10989
11031
  var init_one_sdk_preparation = __esm({
10990
11032
  "src/one-sdk-preparation.ts"() {
10991
11033
  "use strict";
11034
+ import_node_child_process8 = require("node:child_process");
10992
11035
  import_node_crypto4 = require("node:crypto");
10993
11036
  import_node_fs13 = __toESM(require("node:fs"), 1);
10994
11037
  import_node_module2 = require("node:module");
11038
+ import_node_os5 = __toESM(require("node:os"), 1);
10995
11039
  import_node_path11 = __toESM(require("node:path"), 1);
10996
11040
  import_node_url = require("node:url");
10997
11041
  init_native_prebuilt();
10998
11042
  init_oneSdkContract();
11043
+ GENERATE_SCRIPT = `
11044
+ import { writeFileSync } from 'node:fs'
11045
+ import { pathToFileURL } from 'node:url'
11046
+ const [generatorFile, resultFile, frameworks] = process.argv.slice(1)
11047
+ const generator = await import(pathToFileURL(generatorFile).href)
11048
+ const { files, generation } = await generator.generateAppSdk(JSON.parse(frameworks))
11049
+ writeFileSync(resultFile, JSON.stringify({ generation, files: [...files] }))
11050
+ `;
10999
11051
  }
11000
11052
  });
11001
11053
 
@@ -12144,7 +12196,7 @@ var swiftCoverageProvenance;
12144
12196
  var init_provenance = __esm({
12145
12197
  "src/swift-coverage/provenance.ts"() {
12146
12198
  "use strict";
12147
- swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"96a57d4b999e75658683d635d3522d6c7ae30b4c8bc38a8114af353bce5162ff","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
12199
+ swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"f0e86caccf203fa58395cbac9fed64577bb98a061efdf24f85a289c4e5996db9","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
12148
12200
  }
12149
12201
  });
12150
12202
 
@@ -14718,7 +14770,7 @@ function linuxBrowserLibsKey(id, arch) {
14718
14770
  return `linux-libs/${id}/${arch}.tar.gz`;
14719
14771
  }
14720
14772
  function missingLibraries(executablePath, libraryPath) {
14721
- const ldd = (0, import_node_child_process8.spawnSync)("ldd", [executablePath], {
14773
+ const ldd = (0, import_node_child_process9.spawnSync)("ldd", [executablePath], {
14722
14774
  encoding: "utf8",
14723
14775
  timeout: 3e4,
14724
14776
  env: libraryPath ? {
@@ -14781,11 +14833,11 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
14781
14833
  }
14782
14834
  return { ok: true, libraryPath };
14783
14835
  }
14784
- var import_node_child_process8, import_node_fs18, import_node_path16, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
14836
+ var import_node_child_process9, import_node_fs18, import_node_path16, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
14785
14837
  var init_linux_browser_libs = __esm({
14786
14838
  "cli/drivers/linux-browser-libs.ts"() {
14787
14839
  "use strict";
14788
- import_node_child_process8 = require("node:child_process");
14840
+ import_node_child_process9 = require("node:child_process");
14789
14841
  import_node_fs18 = require("node:fs");
14790
14842
  import_node_path16 = require("node:path");
14791
14843
  init_src();
@@ -14953,7 +15005,7 @@ function ensureSwiftLinuxRuntime(release) {
14953
15005
  `);
14954
15006
  const download2 = `${plan.dest}.${process.pid}.tmp`;
14955
15007
  try {
14956
- (0, import_node_child_process9.execFileSync)(
15008
+ (0, import_node_child_process10.execFileSync)(
14957
15009
  "curl",
14958
15010
  [
14959
15011
  "-fsSL",
@@ -15020,7 +15072,7 @@ function swiftCompilerRelease(release) {
15020
15072
  }
15021
15073
  function swiftToolchainBin(release) {
15022
15074
  if (process.platform === "darwin") {
15023
- const dirs = [import_node_os5.default.homedir(), "/"].map(
15075
+ const dirs = [import_node_os6.default.homedir(), "/"].map(
15024
15076
  (base) => import_node_path19.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
15025
15077
  );
15026
15078
  return dirs.find((dir) => import_node_fs22.default.existsSync(import_node_path19.default.join(dir, "swift"))) ?? dirs[0];
@@ -15066,7 +15118,7 @@ exec ${JSON.stringify(import_node_path19.default.join(toolchainBin, "wasm-ld"))}
15066
15118
  }
15067
15119
  function peachHome() {
15068
15120
  const override = process.env.PEACH_HOME;
15069
- return override ? import_node_path19.default.resolve(override) : import_node_path19.default.join(import_node_os5.default.homedir(), ".peach");
15121
+ return override ? import_node_path19.default.resolve(override) : import_node_path19.default.join(import_node_os6.default.homedir(), ".peach");
15070
15122
  }
15071
15123
  function peachSwiftSdksDir() {
15072
15124
  return process.env.PEACH_SWIFT_SDKS_PATH ?? import_node_path19.default.join(peachHome(), "swift", "sdks");
@@ -15075,7 +15127,7 @@ function agentSharedCacheRoot() {
15075
15127
  if (process.platform !== "darwin" || !process.env.TM_SESSION) return null;
15076
15128
  if (agentBuildersRoot) return agentBuildersRoot;
15077
15129
  const policy = JSON.parse(
15078
- (0, import_node_child_process9.execFileSync)("tm", ["machine", "policy", "--json"], {
15130
+ (0, import_node_child_process10.execFileSync)("tm", ["machine", "policy", "--json"], {
15079
15131
  encoding: "utf8",
15080
15132
  timeout: 3e4
15081
15133
  })
@@ -15083,7 +15135,7 @@ function agentSharedCacheRoot() {
15083
15135
  const mounts = policy.storage_mounts ?? [];
15084
15136
  if (!Array.isArray(mounts)) throw new Error("storage_mounts must be a list");
15085
15137
  const isMount = (directory2) => {
15086
- const lines = (0, import_node_child_process9.execFileSync)("/bin/df", ["-P", directory2], {
15138
+ const lines = (0, import_node_child_process10.execFileSync)("/bin/df", ["-P", directory2], {
15087
15139
  encoding: "utf8",
15088
15140
  timeout: 3e4
15089
15141
  }).trim().split("\n");
@@ -15098,13 +15150,13 @@ function agentSharedCacheRoot() {
15098
15150
  throw new Error(`configured storage is not mounted: ${mount}`);
15099
15151
  }
15100
15152
  const heavy = policy.heavy_data_dir;
15101
- if (heavy == null) return agentBuildersRoot = import_node_path19.default.join(import_node_os5.default.homedir(), "builders");
15153
+ if (heavy == null) return agentBuildersRoot = import_node_path19.default.join(import_node_os6.default.homedir(), "builders");
15102
15154
  if (typeof heavy !== "string" || !import_node_path19.default.isAbsolute(heavy) || !import_node_fs22.default.statSync(heavy).isDirectory())
15103
15155
  throw new Error(`configured heavy_data_dir is unavailable: ${heavy}`);
15104
15156
  const mounted = isMount(heavy);
15105
15157
  if (import_node_path19.default.dirname(heavy) === "/Volumes" && !mounted)
15106
15158
  throw new Error(`configured storage is not mounted: ${heavy}`);
15107
- return agentBuildersRoot = mounted && import_node_fs22.default.statSync(heavy).dev === import_node_fs22.default.statSync(import_node_os5.default.homedir()).dev ? import_node_path19.default.join(import_node_os5.default.homedir(), "builders") : import_node_path19.default.join(heavy, "builders");
15159
+ return agentBuildersRoot = mounted && import_node_fs22.default.statSync(heavy).dev === import_node_fs22.default.statSync(import_node_os6.default.homedir()).dev ? import_node_path19.default.join(import_node_os6.default.homedir(), "builders") : import_node_path19.default.join(heavy, "builders");
15108
15160
  }
15109
15161
  function buildersRootEnv() {
15110
15162
  const root = process.env[BUILDERS_ROOT_ENV]?.trim();
@@ -15202,7 +15254,7 @@ ${swiftInstallSteps(release, sdk2)}`
15202
15254
  const swift = import_node_path19.default.join(bin, "swift");
15203
15255
  const listed = [swift, sdk2.wasmSdkId, ...swiftSdkOptions()].join("\0");
15204
15256
  if (!listedSdks.has(listed)) {
15205
- const sdks = (0, import_node_child_process9.execFileSync)(swift, ["sdk", "list", ...swiftSdkOptions()], {
15257
+ const sdks = (0, import_node_child_process10.execFileSync)(swift, ["sdk", "list", ...swiftSdkOptions()], {
15206
15258
  encoding: "utf8",
15207
15259
  env: swiftEnvironment(),
15208
15260
  stdio: ["ignore", "pipe", "pipe"]
@@ -15232,7 +15284,7 @@ function swiftSdkBundle(swift, id, options) {
15232
15284
  const key2 = [swift, id, ...options].join("\0");
15233
15285
  const known = sdkBundles.get(key2);
15234
15286
  if (known && import_node_fs22.default.existsSync(known)) return known;
15235
- const configuration = (0, import_node_child_process9.execFileSync)(
15287
+ const configuration = (0, import_node_child_process10.execFileSync)(
15236
15288
  swift,
15237
15289
  ["sdk", "configure", ...options, "--show-configuration", id, "wasm64-unknown-wasip1"],
15238
15290
  { encoding: "utf8", env: swiftEnvironment(), stdio: ["ignore", "pipe", "pipe"] }
@@ -15334,7 +15386,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
15334
15386
  throw new Error("declared Swift SDK archive checksum mismatch");
15335
15387
  const store = import_node_path19.default.join(staging, "sdks");
15336
15388
  import_node_fs22.default.mkdirSync(store);
15337
- (0, import_node_child_process9.execFileSync)(
15389
+ (0, import_node_child_process10.execFileSync)(
15338
15390
  swift,
15339
15391
  [
15340
15392
  "sdk",
@@ -15354,7 +15406,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
15354
15406
  const expected = swiftSdkPayloadChecksum(stagedBundle);
15355
15407
  const locks = import_node_path19.default.join(import_node_path19.default.resolve(peachSwiftSdksDir()), ".peach-locks");
15356
15408
  import_node_fs22.default.mkdirSync(locks, { recursive: true });
15357
- (0, import_node_child_process9.execFileSync)(
15409
+ (0, import_node_child_process10.execFileSync)(
15358
15410
  "perl",
15359
15411
  [
15360
15412
  "-e",
@@ -15395,7 +15447,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
15395
15447
  }
15396
15448
  }
15397
15449
  function swiftSdkStagingDirectory(prefix) {
15398
- const parent = scratch?.directory ?? import_node_os5.default.tmpdir();
15450
+ const parent = scratch?.directory ?? import_node_os6.default.tmpdir();
15399
15451
  if (!import_node_fs22.default.existsSync(parent)) throw new Error(`Swift SDK install is missing ${parent}`);
15400
15452
  return import_node_fs22.default.mkdtempSync(import_node_path19.default.join(parent, prefix));
15401
15453
  }
@@ -15414,7 +15466,7 @@ function installSwiftWasmSdk(release, sdk2) {
15414
15466
  if (sdk2.wasmSdkUrl.startsWith("file:"))
15415
15467
  import_node_fs22.default.copyFileSync((0, import_node_url2.fileURLToPath)(sdk2.wasmSdkUrl), archive);
15416
15468
  else
15417
- (0, import_node_child_process9.execFileSync)(
15469
+ (0, import_node_child_process10.execFileSync)(
15418
15470
  "curl",
15419
15471
  [
15420
15472
  "-fsSL",
@@ -15501,7 +15553,7 @@ async function swiftCompilerAsync(release, signal) {
15501
15553
  throw new Error(`Swift compiler binary mismatch: ${relative4}`);
15502
15554
  }
15503
15555
  }
15504
- const { stdout } = await (0, import_node_util2.promisify)(import_node_child_process9.execFile)(binary2, ["--version"], {
15556
+ const { stdout } = await (0, import_node_util2.promisify)(import_node_child_process10.execFile)(binary2, ["--version"], {
15505
15557
  encoding: "utf8",
15506
15558
  env: swiftEnvironment(),
15507
15559
  signal
@@ -15520,7 +15572,7 @@ function swiftCompiler(release) {
15520
15572
  throw new Error(`Swift compiler ${release} is missing ${binary2}`);
15521
15573
  if (release.includes("-custom-"))
15522
15574
  verifySwiftHostCompiler(release, import_node_path19.default.resolve(bin, "../.."));
15523
- const version2 = (0, import_node_child_process9.execFileSync)(binary2, ["--version"], {
15575
+ const version2 = (0, import_node_child_process10.execFileSync)(binary2, ["--version"], {
15524
15576
  encoding: "utf8",
15525
15577
  env: swiftEnvironment(),
15526
15578
  stdio: ["ignore", "pipe", "pipe"]
@@ -15591,14 +15643,14 @@ function swiftCompilerInstall(release) {
15591
15643
  ]
15592
15644
  };
15593
15645
  }
15594
- var import_node_child_process9, import_node_crypto9, import_node_fs22, import_node_os5, import_node_path19, import_node_url2, import_node_util2, SWIFT_HOST_COMPILER_RELEASE, SWIFT_HOST_COMPILER_ID, compilerArchives, linuxRuntimeLibs, SWIFT_PRIVATE_DISTRIBUTION_ENV, SWIFT_AUTOLINK_LINKER, BUILDERS_ROOT_ENV, agentBuildersRoot, scratch, linuxLibraryPath, linuxHostSdkRoot, listedSdks, sdkBundles, sdkFileHashes, sdkFilesHashed, loadedSdkHashFiles, verifiedCompilers;
15646
+ var import_node_child_process10, import_node_crypto9, import_node_fs22, import_node_os6, import_node_path19, import_node_url2, import_node_util2, SWIFT_HOST_COMPILER_RELEASE, SWIFT_HOST_COMPILER_ID, compilerArchives, linuxRuntimeLibs, SWIFT_PRIVATE_DISTRIBUTION_ENV, SWIFT_AUTOLINK_LINKER, BUILDERS_ROOT_ENV, agentBuildersRoot, scratch, linuxLibraryPath, linuxHostSdkRoot, listedSdks, sdkBundles, sdkFileHashes, sdkFilesHashed, loadedSdkHashFiles, verifiedCompilers;
15595
15647
  var init_swift_toolchain = __esm({
15596
15648
  "src/swift-toolchain.ts"() {
15597
15649
  "use strict";
15598
- import_node_child_process9 = require("node:child_process");
15650
+ import_node_child_process10 = require("node:child_process");
15599
15651
  import_node_crypto9 = require("node:crypto");
15600
15652
  import_node_fs22 = __toESM(require("node:fs"), 1);
15601
- import_node_os5 = __toESM(require("node:os"), 1);
15653
+ import_node_os6 = __toESM(require("node:os"), 1);
15602
15654
  import_node_path19 = __toESM(require("node:path"), 1);
15603
15655
  import_node_url2 = require("node:url");
15604
15656
  import_node_util2 = require("node:util");
@@ -15890,7 +15942,7 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
15890
15942
  Math.floor(minimum % 1e4 / 100),
15891
15943
  minimum % 100
15892
15944
  ].join(".");
15893
- const result = (0, import_node_child_process10.spawnSync)(
15945
+ const result = (0, import_node_child_process11.spawnSync)(
15894
15946
  import_node_path20.default.join(toolchainBin, "clang"),
15895
15947
  [
15896
15948
  "-target",
@@ -15923,11 +15975,11 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
15923
15975
  platforms.set(key2, flags);
15924
15976
  return flags;
15925
15977
  }
15926
- var import_node_child_process10, import_node_path20, platforms;
15978
+ var import_node_child_process11, import_node_path20, platforms;
15927
15979
  var init_swift_objc_platform = __esm({
15928
15980
  "src/swift-objc-platform.ts"() {
15929
15981
  "use strict";
15930
- import_node_child_process10 = require("node:child_process");
15982
+ import_node_child_process11 = require("node:child_process");
15931
15983
  import_node_path20 = __toESM(require("node:path"), 1);
15932
15984
  init_swift_toolchain();
15933
15985
  platforms = /* @__PURE__ */ new Map();
@@ -17663,7 +17715,7 @@ function developerDirs() {
17663
17715
  try {
17664
17716
  add(
17665
17717
  // runner-toolchain-platform: darwin
17666
- (0, import_node_child_process11.execFileSync)("xcode-select", ["-p"], {
17718
+ (0, import_node_child_process12.execFileSync)("xcode-select", ["-p"], {
17667
17719
  encoding: "utf8",
17668
17720
  stdio: ["ignore", "pipe", "pipe"]
17669
17721
  }).trim()
@@ -17682,7 +17734,7 @@ function readNativeSdk(developerDir2) {
17682
17734
  const env = { ...process.env, DEVELOPER_DIR: developerDir2 };
17683
17735
  const xcrun = (args) => (
17684
17736
  // runner-toolchain-platform: darwin
17685
- (0, import_node_child_process11.execFileSync)("xcrun", args, {
17737
+ (0, import_node_child_process12.execFileSync)("xcrun", args, {
17686
17738
  encoding: "utf8",
17687
17739
  env,
17688
17740
  stdio: ["ignore", "pipe", "pipe"]
@@ -17697,7 +17749,7 @@ function readNativeSdk(developerDir2) {
17697
17749
  sdk: xcrun(["--sdk", "iphonesimulator", "--show-sdk-version"]),
17698
17750
  settings: digest4("SDKSettings.json"),
17699
17751
  build: digest4("System/Library/CoreServices/SystemVersion.plist"),
17700
- compilerVersion: (0, import_node_child_process11.execFileSync)(compiler, ["--version"], {
17752
+ compilerVersion: (0, import_node_child_process12.execFileSync)(compiler, ["--version"], {
17701
17753
  encoding: "utf8",
17702
17754
  env,
17703
17755
  stdio: ["ignore", "pipe", "pipe"]
@@ -18167,7 +18219,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
18167
18219
  for (let round = 0; ; round++) {
18168
18220
  import_node_fs23.default.rmSync(out, { recursive: true, force: true });
18169
18221
  import_node_fs23.default.mkdirSync(out, { recursive: true });
18170
- const run13 = (0, import_node_child_process11.spawnSync)(
18222
+ const run13 = (0, import_node_child_process12.spawnSync)(
18171
18223
  ...withoutCoreDump(import_node_path22.default.join(toolchainBin, "swift-symbolgraph-extract"), [
18172
18224
  "-module-name",
18173
18225
  surface.module,
@@ -18352,7 +18404,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
18352
18404
  )
18353
18405
  ].join("\n")
18354
18406
  );
18355
- const run13 = (0, import_node_child_process11.spawnSync)(
18407
+ const run13 = (0, import_node_child_process12.spawnSync)(
18356
18408
  import_node_path22.default.join(toolchainBin, "swift-frontend"),
18357
18409
  [
18358
18410
  "-typecheck",
@@ -18480,7 +18532,7 @@ function inheritedDefaultInits(surface, graphs, toolchainBin, search, moduleCach
18480
18532
  )
18481
18533
  ].join("\n")
18482
18534
  );
18483
- const run13 = (0, import_node_child_process11.spawnSync)(
18535
+ const run13 = (0, import_node_child_process12.spawnSync)(
18484
18536
  import_node_path22.default.join(toolchainBin, "swift-frontend"),
18485
18537
  [
18486
18538
  "-dump-ast",
@@ -18553,7 +18605,7 @@ function requiredInits(surface, graphs, toolchainBin, search, moduleCache, work)
18553
18605
  )
18554
18606
  ].join("\n")
18555
18607
  );
18556
- const run13 = (0, import_node_child_process11.spawnSync)(
18608
+ const run13 = (0, import_node_child_process12.spawnSync)(
18557
18609
  import_node_path22.default.join(toolchainBin, "swift-frontend"),
18558
18610
  [
18559
18611
  "-typecheck",
@@ -18612,7 +18664,7 @@ function protocolProperties(surface, headersDir, graphs, toolchainBin, search, w
18612
18664
  ].map((file) => `#import ${JSON.stringify(file)}
18613
18665
  `).join("")
18614
18666
  );
18615
- const run13 = (0, import_node_child_process11.spawnSync)(
18667
+ const run13 = (0, import_node_child_process12.spawnSync)(
18616
18668
  import_node_path22.default.join(toolchainBin, "clang"),
18617
18669
  [
18618
18670
  "-x",
@@ -18695,7 +18747,7 @@ function objcDeclarationAST(surface, framework, toolchainBin, search, work, orig
18695
18747
  "-ast-dump-all=json"
18696
18748
  ];
18697
18749
  const dump2 = (filter) => {
18698
- const run13 = (0, import_node_child_process11.spawnSync)(
18750
+ const run13 = (0, import_node_child_process12.spawnSync)(
18699
18751
  import_node_path22.default.join(toolchainBin, "clang"),
18700
18752
  [
18701
18753
  ...args,
@@ -18777,7 +18829,7 @@ function enumValues(graphs, surface, framework, toolchainBin, search, work, orig
18777
18829
  if (flag === "-sdk") flags.push("-isysroot", dir);
18778
18830
  else flags.push(flag, dir);
18779
18831
  }
18780
- const run13 = (0, import_node_child_process11.spawnSync)(
18832
+ const run13 = (0, import_node_child_process12.spawnSync)(
18781
18833
  import_node_path22.default.join(toolchainBin, "clang"),
18782
18834
  [
18783
18835
  "-x",
@@ -18852,11 +18904,11 @@ function constantValue(node) {
18852
18904
  }
18853
18905
  return null;
18854
18906
  }
18855
- var import_node_child_process11, import_node_crypto10, import_node_fs23, import_node_path22, REFINED_CONSTANT_TYPES, NATIVE_GRAPH_SDK_VERSION, WASI_EMULATION, WASI_EMULATION_FLAGS, NATIVE_GRAPH_INPUTS, NATIVE_GRAPH_ID, resolvedPinnedSdk, ROUNDS, sdkId, headerFiles, MISSING_IMPORT, FRAMEWORK_HEADER, FRAMEWORK_MODULEMAP, sdkDeclarations;
18907
+ var import_node_child_process12, import_node_crypto10, import_node_fs23, import_node_path22, REFINED_CONSTANT_TYPES, NATIVE_GRAPH_SDK_VERSION, WASI_EMULATION, WASI_EMULATION_FLAGS, NATIVE_GRAPH_INPUTS, NATIVE_GRAPH_ID, resolvedPinnedSdk, ROUNDS, sdkId, headerFiles, MISSING_IMPORT, FRAMEWORK_HEADER, FRAMEWORK_MODULEMAP, sdkDeclarations;
18856
18908
  var init_swift_objc_standin = __esm({
18857
18909
  "src/swift-objc-standin.ts"() {
18858
18910
  "use strict";
18859
- import_node_child_process11 = require("node:child_process");
18911
+ import_node_child_process12 = require("node:child_process");
18860
18912
  import_node_crypto10 = require("node:crypto");
18861
18913
  import_node_fs23 = __toESM(require("node:fs"), 1);
18862
18914
  import_node_path22 = __toESM(require("node:path"), 1);
@@ -19117,7 +19169,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
19117
19169
  ]);
19118
19170
  const cached2 = sdkViews.get(key2);
19119
19171
  if (cached2 && import_node_fs24.default.existsSync(cached2.manifest)) return touchSdkView(cached2.options);
19120
- const configuration = (0, import_node_child_process12.execFileSync)(
19172
+ const configuration = (0, import_node_child_process13.execFileSync)(
19121
19173
  import_node_path23.default.join(toolchainBin, "swift"),
19122
19174
  [
19123
19175
  "sdk",
@@ -19246,11 +19298,11 @@ function swiftSharedSdkInputFiles(moduleRoot) {
19246
19298
  const root = swiftSharedSdkRoot(moduleRoot, false);
19247
19299
  return (0, import_node_fs24.readdirSync)(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path23.default.relative(moduleRoot, import_node_path23.default.join(entry.parentPath, entry.name))).sort();
19248
19300
  }
19249
- var import_node_child_process12, import_node_crypto11, import_node_fs24, import_node_path23, distributionHeaderRoots, WEAKEN_FOUNDATION_SYMS, sdkViews;
19301
+ var import_node_child_process13, import_node_crypto11, import_node_fs24, import_node_path23, distributionHeaderRoots, WEAKEN_FOUNDATION_SYMS, sdkViews;
19250
19302
  var init_swift_shared_sdk = __esm({
19251
19303
  "src/swift-shared-sdk.ts"() {
19252
19304
  "use strict";
19253
- import_node_child_process12 = require("node:child_process");
19305
+ import_node_child_process13 = require("node:child_process");
19254
19306
  import_node_crypto11 = require("node:crypto");
19255
19307
  import_node_fs24 = __toESM(require("node:fs"), 1);
19256
19308
  import_node_path23 = __toESM(require("node:path"), 1);
@@ -19273,14 +19325,14 @@ var init_swift_shared_sdk = __esm({
19273
19325
  // src/swift-darwin-records.ts
19274
19326
  function compileDarwinRecords(args) {
19275
19327
  const records = import_node_path24.default.join(args.packageRoot, "Sources/DarwinRecords");
19276
- const runtime = (0, import_node_fs25.mkdtempSync)(import_node_path24.default.join((0, import_node_os6.tmpdir)(), "peach-objc-runtime-"));
19328
+ const runtime = (0, import_node_fs25.mkdtempSync)(import_node_path24.default.join((0, import_node_os7.tmpdir)(), "peach-objc-runtime-"));
19277
19329
  (0, import_node_fs25.symlinkSync)(import_node_path24.default.join(args.darwin, "usr/include/objc"), import_node_path24.default.join(runtime, "objc"));
19278
19330
  const objects = (0, import_node_fs25.readdirSync)(records).filter((file) => file.endsWith(".c") || file.endsWith(".m")).sort((a, b) => a < b ? -1 : a > b ? 1 : 0).map((file) => {
19279
19331
  const object6 = import_node_path24.default.join(
19280
19332
  args.out,
19281
19333
  `${DARWIN_RECORDS_PREFIX}${file.replace(/\.[cm]$/, ".o")}`
19282
19334
  );
19283
- (0, import_node_child_process13.execFileSync)(
19335
+ (0, import_node_child_process14.execFileSync)(
19284
19336
  import_node_path24.default.join(args.bin, "clang"),
19285
19337
  [
19286
19338
  "--target=wasm64-unknown-wasip1",
@@ -19315,13 +19367,13 @@ function compileDarwinRecords(args) {
19315
19367
  (0, import_node_fs25.rmSync)(runtime, { recursive: true });
19316
19368
  return objects;
19317
19369
  }
19318
- var import_node_child_process13, import_node_fs25, import_node_os6, import_node_path24, DARWIN_RECORDS_PREFIX, darwinRecordsMinimum;
19370
+ var import_node_child_process14, import_node_fs25, import_node_os7, import_node_path24, DARWIN_RECORDS_PREFIX, darwinRecordsMinimum;
19319
19371
  var init_swift_darwin_records = __esm({
19320
19372
  "src/swift-darwin-records.ts"() {
19321
19373
  "use strict";
19322
- import_node_child_process13 = require("node:child_process");
19374
+ import_node_child_process14 = require("node:child_process");
19323
19375
  import_node_fs25 = require("node:fs");
19324
- import_node_os6 = require("node:os");
19376
+ import_node_os7 = require("node:os");
19325
19377
  import_node_path24 = __toESM(require("node:path"), 1);
19326
19378
  init_swift_objc_platform();
19327
19379
  init_swift_objc_runtime();
@@ -21951,18 +22003,18 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
21951
22003
  transformations
21952
22004
  });
21953
22005
  } else
21954
- (0, import_node_child_process14.execFileSync)(import_node_path25.default.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
22006
+ (0, import_node_child_process15.execFileSync)(import_node_path25.default.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
21955
22007
  stdio: "pipe",
21956
22008
  maxBuffer: Infinity,
21957
22009
  ...owner
21958
22010
  });
21959
22011
  import_node_fs26.default.rmSync(rspPath, { force: true });
21960
22012
  }
21961
- var import_node_child_process14, import_node_crypto12, import_node_fs26, import_node_path25, v2, HAS_ADDEND, WIDE_DATA_RELOCS, ROOT_SEG_PREFIXES, RECORD_SEGS, PARTITIONED_SEGS, PRUNED_SDK_ARCHIVES, OMIT_SDK_LIB_FLAGS, NEUTRALIZED_SWIFTRT_SECTIONS, parsedObjectCache, SWIFTUI_WRAPPER_HOST_PROTOCOLS;
22013
+ var import_node_child_process15, import_node_crypto12, import_node_fs26, import_node_path25, v2, HAS_ADDEND, WIDE_DATA_RELOCS, ROOT_SEG_PREFIXES, RECORD_SEGS, PARTITIONED_SEGS, PRUNED_SDK_ARCHIVES, OMIT_SDK_LIB_FLAGS, NEUTRALIZED_SWIFTRT_SECTIONS, parsedObjectCache, SWIFTUI_WRAPPER_HOST_PROTOCOLS;
21962
22014
  var init_swift_wasm_prune = __esm({
21963
22015
  "src/swift-wasm-prune.ts"() {
21964
22016
  "use strict";
21965
- import_node_child_process14 = require("node:child_process");
22017
+ import_node_child_process15 = require("node:child_process");
21966
22018
  import_node_crypto12 = require("node:crypto");
21967
22019
  import_node_fs26 = __toESM(require("node:fs"), 1);
21968
22020
  import_node_path25 = __toESM(require("node:path"), 1);
@@ -22053,7 +22105,7 @@ var init_swift_wasm_prune = __esm({
22053
22105
  // src/swift-guest-archive.ts
22054
22106
  function aliasGuestArchive(options) {
22055
22107
  const original = readArMembers((0, import_node_fs27.readFileSync)(options.archive));
22056
- const listed = (0, import_node_child_process15.execFileSync)(options.llvmAr, ["t", options.archive], {
22108
+ const listed = (0, import_node_child_process16.execFileSync)(options.llvmAr, ["t", options.archive], {
22057
22109
  encoding: "utf8"
22058
22110
  }).trimEnd().split("\n");
22059
22111
  if (!original.length || listed.length !== original.length || original.some((member, index) => member.name !== listed[index]))
@@ -22079,7 +22131,7 @@ function aliasGuestArchive(options) {
22079
22131
  );
22080
22132
  const archive = import_node_path26.default.join(options.directory, "archive.a");
22081
22133
  (0, import_node_fs27.rmSync)(archive, { force: true });
22082
- (0, import_node_child_process15.execFileSync)(options.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
22134
+ (0, import_node_child_process16.execFileSync)(options.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
22083
22135
  const rewritten = readArMembers((0, import_node_fs27.readFileSync)(archive));
22084
22136
  if (rewritten.length !== members2.length || rewritten.some(
22085
22137
  (member, index) => member.name !== members2[index].alias || (0, import_node_crypto13.createHash)("sha256").update(member.bytes).digest("hex") !== members2[index].sha256
@@ -22114,11 +22166,11 @@ function aliasGuestLinkIdentities(identities, archives) {
22114
22166
  }
22115
22167
  return result;
22116
22168
  }
22117
- var import_node_child_process15, import_node_crypto13, import_node_fs27, import_node_path26;
22169
+ var import_node_child_process16, import_node_crypto13, import_node_fs27, import_node_path26;
22118
22170
  var init_swift_guest_archive = __esm({
22119
22171
  "src/swift-guest-archive.ts"() {
22120
22172
  "use strict";
22121
- import_node_child_process15 = require("node:child_process");
22173
+ import_node_child_process16 = require("node:child_process");
22122
22174
  import_node_crypto13 = require("node:crypto");
22123
22175
  import_node_fs27 = require("node:fs");
22124
22176
  import_node_path26 = __toESM(require("node:path"), 1);
@@ -23492,8 +23544,8 @@ function swiftPackageLinkage(target) {
23492
23544
  function guestSourceImages(graph) {
23493
23545
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
23494
23546
  const entry = targets.get(graph.entry);
23495
- if (!entry || entry.productType !== "com.apple.product-type.application")
23496
- throw new Error("source graph has no application entry");
23547
+ if (!entry || entry.productType !== "com.apple.product-type.application" && entry.productType !== "com.apple.product-type.app-extension")
23548
+ throw new Error("source graph has no application or app extension entry");
23497
23549
  const images = [
23498
23550
  { id: 0, owner: entry.id, members: [] }
23499
23551
  ];
@@ -24457,7 +24509,7 @@ function linkGuestImages(options) {
24457
24509
  );
24458
24510
  const output2 = import_node_fs30.default.openSync(trace, "w");
24459
24511
  try {
24460
- (0, import_node_child_process16.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "pipe"] });
24512
+ (0, import_node_child_process17.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "pipe"] });
24461
24513
  } finally {
24462
24514
  import_node_fs30.default.closeSync(output2);
24463
24515
  }
@@ -24471,7 +24523,7 @@ function linkGuestImages(options) {
24471
24523
  source,
24472
24524
  '#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
24473
24525
  );
24474
- (0, import_node_child_process16.execFileSync)(
24526
+ (0, import_node_child_process17.execFileSync)(
24475
24527
  clang,
24476
24528
  [...options.projection.clangOptions, "-c", source, "-o", discoveryProjection],
24477
24529
  { stdio: "pipe" }
@@ -24585,7 +24637,7 @@ function linkGuestImages(options) {
24585
24637
  }
24586
24638
  const members2 = archives.get(artifact.path);
24587
24639
  if (!members2) continue;
24588
- const listed = (0, import_node_child_process16.execFileSync)(llvmAr, ["t", artifact.path], { encoding: "utf8" }).trimEnd().split("\n");
24640
+ const listed = (0, import_node_child_process17.execFileSync)(llvmAr, ["t", artifact.path], { encoding: "utf8" }).trimEnd().split("\n");
24589
24641
  if (listed.length !== members2.length || new Set(listed).size !== listed.length || members2.some(
24590
24642
  (member, i) => listed[i] !== member.name || import_node_path29.default.basename(member.name) !== member.name
24591
24643
  ))
@@ -24608,13 +24660,13 @@ function linkGuestImages(options) {
24608
24660
  import_node_fs30.default.rmSync(output2, { force: true });
24609
24661
  const response = import_node_path29.default.join(memberDir, "members.rsp");
24610
24662
  import_node_fs30.default.writeFileSync(response, inputs.map((input) => JSON.stringify(input)).join(" "));
24611
- (0, import_node_child_process16.execFileSync)(llvmAr, ["rcs", output2, `@${response}`], { stdio: "pipe" });
24663
+ (0, import_node_child_process17.execFileSync)(llvmAr, ["rcs", output2, `@${response}`], { stdio: "pipe" });
24612
24664
  replacements.set(artifact.path, output2);
24613
24665
  }
24614
24666
  const irPath = import_node_path29.default.join(directory2, "ledger.ll");
24615
24667
  const ledgerObject = import_node_path29.default.join(directory2, "ledger.o");
24616
24668
  import_node_fs30.default.writeFileSync(irPath, ledger.llvmIR);
24617
- (0, import_node_child_process16.execFileSync)(
24669
+ (0, import_node_child_process17.execFileSync)(
24618
24670
  clang,
24619
24671
  ["--target=wasm64-unknown-wasip1", "-c", irPath, "-o", ledgerObject],
24620
24672
  { stdio: "pipe" }
@@ -24656,7 +24708,7 @@ function linkGuestImages(options) {
24656
24708
  const projectionSource = import_node_path29.default.join(directory2, "projection.c");
24657
24709
  projectionObject = import_node_path29.default.join(directory2, "projection.o");
24658
24710
  import_node_fs30.default.writeFileSync(projectionSource, projectionStorage.source);
24659
- (0, import_node_child_process16.execFileSync)(
24711
+ (0, import_node_child_process17.execFileSync)(
24660
24712
  clang,
24661
24713
  [...projection.clangOptions, "-c", projectionSource, "-o", projectionObject],
24662
24714
  {
@@ -24833,7 +24885,7 @@ function discoverGuestLinkInputs(options) {
24833
24885
  const trace = import_node_path29.default.join(options.directory, "preselection-inputs.txt");
24834
24886
  const traceOutput = import_node_fs30.default.openSync(trace, "w");
24835
24887
  try {
24836
- (0, import_node_child_process16.execFileSync)(options.wasmLd, [`@${response}`], {
24888
+ (0, import_node_child_process17.execFileSync)(options.wasmLd, [`@${response}`], {
24837
24889
  stdio: ["ignore", traceOutput, "pipe"]
24838
24890
  });
24839
24891
  } finally {
@@ -24991,7 +25043,7 @@ function verifyGuestSymbolScopes(options) {
24991
25043
  const tracePath = import_node_path29.default.join(options.directory, "scope-trace.txt");
24992
25044
  const traceOutput = import_node_fs30.default.openSync(tracePath, "w");
24993
25045
  try {
24994
- (0, import_node_child_process16.execFileSync)(options.wasmLd, [`@${response}`], {
25046
+ (0, import_node_child_process17.execFileSync)(options.wasmLd, [`@${response}`], {
24995
25047
  stdio: ["ignore", traceOutput, "pipe"]
24996
25048
  });
24997
25049
  } finally {
@@ -25257,11 +25309,11 @@ function linkPrunedGuestImages(options) {
25257
25309
  if (!result) throw new Error("guest link did not receive pruned inputs");
25258
25310
  return result;
25259
25311
  }
25260
- var import_node_child_process16, import_node_fs30, import_node_path29, import_node_string_decoder;
25312
+ var import_node_child_process17, import_node_fs30, import_node_path29, import_node_string_decoder;
25261
25313
  var init_swift_guest_link = __esm({
25262
25314
  "src/swift-guest-link.ts"() {
25263
25315
  "use strict";
25264
- import_node_child_process16 = require("node:child_process");
25316
+ import_node_child_process17 = require("node:child_process");
25265
25317
  import_node_fs30 = __toESM(require("node:fs"), 1);
25266
25318
  import_node_path29 = __toESM(require("node:path"), 1);
25267
25319
  import_node_string_decoder = require("node:string_decoder");
@@ -25365,7 +25417,7 @@ function sourceGuestClangLinkOptions(options) {
25365
25417
  throw new Error(`missing clang ${flag} for ${file}`);
25366
25418
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
25367
25419
  }
25368
- (0, import_node_child_process17.execFileSync)(command.args[0], [...args, "-S", "-emit-llvm"], { stdio: "inherit" });
25420
+ (0, import_node_child_process18.execFileSync)(command.args[0], [...args, "-S", "-emit-llvm"], { stdio: "inherit" });
25369
25421
  const flags = clangIrLinkOptions((0, import_node_fs31.readFileSync)(output2, "utf8"));
25370
25422
  for (let index2 = 0; index2 < flags.length; index2++) {
25371
25423
  const flag = flags[index2];
@@ -25503,7 +25555,7 @@ function sourceGuestRuntimeLinks(options) {
25503
25555
  response,
25504
25556
  image.objects.map((file) => JSON.stringify(file)).join("\n") + "\n"
25505
25557
  );
25506
- const autolink = image.objects.length ? (0, import_node_child_process17.execFileSync)(
25558
+ const autolink = image.objects.length ? (0, import_node_child_process18.execFileSync)(
25507
25559
  import_node_path30.default.join(options.toolchainBin, "swift-autolink-extract"),
25508
25560
  [`@${response}`, "-o", "-"],
25509
25561
  { encoding: "utf8" }
@@ -25596,11 +25648,11 @@ function logicalGuestLinkOptions(args, identities, roots) {
25596
25648
  }
25597
25649
  return output2;
25598
25650
  }
25599
- var import_node_child_process17, import_node_crypto16, import_node_fs31, import_node_path30, CLANG_TARGET_MODULE_WRAPPER;
25651
+ var import_node_child_process18, import_node_crypto16, import_node_fs31, import_node_path30, CLANG_TARGET_MODULE_WRAPPER;
25600
25652
  var init_swift_guest_source_inputs = __esm({
25601
25653
  "src/swift-guest-source-inputs.ts"() {
25602
25654
  "use strict";
25603
- import_node_child_process17 = require("node:child_process");
25655
+ import_node_child_process18 = require("node:child_process");
25604
25656
  import_node_crypto16 = require("node:crypto");
25605
25657
  import_node_fs31 = require("node:fs");
25606
25658
  import_node_path30 = __toESM(require("node:path"), 1);
@@ -25869,7 +25921,7 @@ async function runWasmOpt(file, output2, optimize, skipPasses, binary2) {
25869
25921
  const thunks = `${output2}.thunks.wat`;
25870
25922
  (0, import_node_fs32.writeFileSync)(guest, narrowed.module);
25871
25923
  (0, import_node_fs32.writeFileSync)(thunks, narrowed.thunks);
25872
- await (0, import_node_util3.promisify)(import_node_child_process18.execFile)((0, import_node_path31.join)((0, import_node_path31.dirname)(binary2), "wasm-merge"), [
25924
+ await (0, import_node_util3.promisify)(import_node_child_process19.execFile)((0, import_node_path31.join)((0, import_node_path31.dirname)(binary2), "wasm-merge"), [
25873
25925
  ...features,
25874
25926
  ...names,
25875
25927
  guest,
@@ -25928,11 +25980,11 @@ async function lowerWasm(file, output2, options) {
25928
25980
  await installWasmOpt()
25929
25981
  );
25930
25982
  }
25931
- var import_node_child_process18, import_node_fs32, import_node_path31, import_node_util3, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, LOWERING, WASM_LOWER_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
25983
+ var import_node_child_process19, import_node_fs32, import_node_path31, import_node_util3, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, LOWERING, WASM_LOWER_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
25932
25984
  var init_wasm_optimize = __esm({
25933
25985
  "src/wasm-optimize.ts"() {
25934
25986
  "use strict";
25935
- import_node_child_process18 = require("node:child_process");
25987
+ import_node_child_process19 = require("node:child_process");
25936
25988
  import_node_fs32 = require("node:fs");
25937
25989
  import_node_path31 = require("node:path");
25938
25990
  import_node_util3 = require("node:util");
@@ -26006,6 +26058,12 @@ async function compileGuestLink(options) {
26006
26058
  (target) => target.productName.endsWith(".framework") ? [target.productName.slice(0, -10)] : []
26007
26059
  )
26008
26060
  );
26061
+ const sourceLibraries = new Set(
26062
+ options.graph.targets.flatMap((target) => {
26063
+ const library = /^lib(.+)\.(?:a|dylib)$/.exec(target.productName);
26064
+ return library ? [library[1]] : [];
26065
+ })
26066
+ );
26009
26067
  const entry = targets.get(options.graph.entry);
26010
26068
  if (!entry) throw new Error("guest source graph has no entry");
26011
26069
  const imageBuildVersion = (value) => {
@@ -26025,7 +26083,7 @@ async function compileGuestLink(options) {
26025
26083
  stubSource,
26026
26084
  '#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
26027
26085
  );
26028
- (0, import_node_child_process19.execFileSync)(
26086
+ (0, import_node_child_process20.execFileSync)(
26029
26087
  import_node_path32.default.join(options.toolchainBin, "clang"),
26030
26088
  [...clangOptions, "-c", stubSource, "-o", stub],
26031
26089
  { stdio: "pipe" }
@@ -26175,10 +26233,12 @@ async function compileGuestLink(options) {
26175
26233
  images: sourceImages.map((image) => ({
26176
26234
  id: image.id,
26177
26235
  objects: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => artifact.path),
26178
- // a `-framework Name` for a framework the source graph builds links
26179
- // that framework's own image, which the plan already depends on
26236
+ // a `-framework Name` or `-lname` for a product the source graph
26237
+ // builds links that product's own target, which the plan already holds
26180
26238
  linkerFlags: image.members.flatMap((id) => targets.get(id).linkerFlags).filter(
26181
- (flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? ""))
26239
+ (flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? "")) && !sourceLibraries.has(
26240
+ flag.startsWith("-l") && flag.length > 2 ? flag.slice(2) : flags[index - 1] === "-l" ? flag : ""
26241
+ ) && !(flag === "-l" && sourceLibraries.has(flags[index + 1] ?? ""))
26182
26242
  ),
26183
26243
  clangLinkOptions: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => ({
26184
26244
  object: import_node_path32.default.resolve(rewritten.get(artifact.path) ?? artifact.path),
@@ -26340,11 +26400,11 @@ async function compileGuestLink(options) {
26340
26400
  });
26341
26401
  (0, import_node_fs33.writeFileSync)(options.optimized, finalized.wasm);
26342
26402
  }
26343
- var import_node_child_process19, import_node_fs33, import_node_path32;
26403
+ var import_node_child_process20, import_node_fs33, import_node_path32;
26344
26404
  var init_swift_guest_compile = __esm({
26345
26405
  "src/swift-guest-compile.ts"() {
26346
26406
  "use strict";
26347
- import_node_child_process19 = require("node:child_process");
26407
+ import_node_child_process20 = require("node:child_process");
26348
26408
  import_node_fs33 = require("node:fs");
26349
26409
  import_node_path32 = __toESM(require("node:path"), 1);
26350
26410
  init_swift_guest_archive();
@@ -26535,7 +26595,7 @@ function swiftIcuAddress(icu) {
26535
26595
  function swiftIcuPacked(icu) {
26536
26596
  return memo(packedFiles, icu.sha256, async () => {
26537
26597
  const file = import_node_path33.default.join(
26538
- import_node_os7.default.homedir(),
26598
+ import_node_os8.default.homedir(),
26539
26599
  ".peach",
26540
26600
  "cache",
26541
26601
  "swift-brotli",
@@ -26562,21 +26622,21 @@ async function swiftIcuBundleAsset(icu) {
26562
26622
  contentType: "application/octet-stream"
26563
26623
  };
26564
26624
  }
26565
- var import_node_child_process20, import_node_crypto17, import_node_fs34, import_promises4, import_node_os7, import_node_path33, import_node_util4, import_node_zlib3, run, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, packedFiles;
26625
+ var import_node_child_process21, import_node_crypto17, import_node_fs34, import_promises4, import_node_os8, import_node_path33, import_node_util4, import_node_zlib3, run, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, packedFiles;
26566
26626
  var init_swift_icu = __esm({
26567
26627
  "src/swift-icu.ts"() {
26568
26628
  "use strict";
26569
- import_node_child_process20 = require("node:child_process");
26629
+ import_node_child_process21 = require("node:child_process");
26570
26630
  import_node_crypto17 = require("node:crypto");
26571
26631
  import_node_fs34 = require("node:fs");
26572
26632
  import_promises4 = require("node:fs/promises");
26573
- import_node_os7 = __toESM(require("node:os"), 1);
26633
+ import_node_os8 = __toESM(require("node:os"), 1);
26574
26634
  import_node_path33 = __toESM(require("node:path"), 1);
26575
26635
  import_node_util4 = require("node:util");
26576
26636
  import_node_zlib3 = require("node:zlib");
26577
26637
  init_icuData();
26578
26638
  init_swift_toolchain();
26579
- run = (0, import_node_util4.promisify)(import_node_child_process20.execFile);
26639
+ run = (0, import_node_util4.promisify)(import_node_child_process21.execFile);
26580
26640
  deflate = (0, import_node_util4.promisify)(import_node_zlib3.gzip);
26581
26641
  compressBrotli = (0, import_node_util4.promisify)(import_node_zlib3.brotliCompress);
26582
26642
  inflateGzip = (0, import_node_util4.promisify)(import_node_zlib3.gunzip);
@@ -26759,7 +26819,7 @@ function prepareSwiftProjectProcess(root, user) {
26759
26819
  (0, import_node_fs36.mkdirSync)(tmp, { recursive: true });
26760
26820
  const caches = ["cache", "config", "security"].map((name3) => import_node_path35.default.join(swiftpm, name3));
26761
26821
  for (const directory2 of caches) (0, import_node_fs36.mkdirSync)(directory2, { recursive: true });
26762
- (0, import_node_child_process21.execFileSync)("chown", ["-R", "-P", `${user.uid}:${user.gid}`, root, home]);
26822
+ (0, import_node_child_process22.execFileSync)("chown", ["-R", "-P", `${user.uid}:${user.gid}`, root, home]);
26763
26823
  (0, import_node_fs36.chmodSync)(root, 448);
26764
26824
  (0, import_node_fs36.chmodSync)(home, 448);
26765
26825
  return {
@@ -26782,7 +26842,7 @@ function prepareSwiftProjectProcess(root, user) {
26782
26842
  };
26783
26843
  }
26784
26844
  function endSwiftProjectProcesses(user) {
26785
- (0, import_node_child_process21.execFileSync)("sh", ["-c", "kill -s KILL -- -1 2>/dev/null || true"], {
26845
+ (0, import_node_child_process22.execFileSync)("sh", ["-c", "kill -s KILL -- -1 2>/dev/null || true"], {
26786
26846
  uid: user.uid,
26787
26847
  gid: user.gid
26788
26848
  });
@@ -26809,11 +26869,11 @@ function removeProjectLinks(root) {
26809
26869
  }
26810
26870
  }
26811
26871
  }
26812
- var import_node_child_process21, import_node_fs36, import_node_path35;
26872
+ var import_node_child_process22, import_node_fs36, import_node_path35;
26813
26873
  var init_swift_project_user = __esm({
26814
26874
  "src/swift-project-user.ts"() {
26815
26875
  "use strict";
26816
- import_node_child_process21 = require("node:child_process");
26876
+ import_node_child_process22 = require("node:child_process");
26817
26877
  import_node_fs36 = require("node:fs");
26818
26878
  import_node_path35 = __toESM(require("node:path"), 1);
26819
26879
  }
@@ -26821,7 +26881,7 @@ var init_swift_project_user = __esm({
26821
26881
 
26822
26882
  // src/swift-reproducible.ts
26823
26883
  function swiftReproducibleBuildFlags(roots) {
26824
- return [[import_node_os8.default.homedir(), "home"], ...roots].flatMap(
26884
+ return [[import_node_os9.default.homedir(), "home"], ...roots].flatMap(
26825
26885
  ([root, name3]) => [.../* @__PURE__ */ new Set([root, (0, import_node_fs37.realpathSync)(root)])].map((from) => `${from}=/peach/${name3}`)
26826
26886
  ).flatMap((map2) => [
26827
26887
  "-Xswiftc",
@@ -26834,12 +26894,12 @@ function swiftReproducibleBuildFlags(roots) {
26834
26894
  `-ffile-prefix-map=${map2}`
26835
26895
  ]);
26836
26896
  }
26837
- var import_node_fs37, import_node_os8;
26897
+ var import_node_fs37, import_node_os9;
26838
26898
  var init_swift_reproducible = __esm({
26839
26899
  "src/swift-reproducible.ts"() {
26840
26900
  "use strict";
26841
26901
  import_node_fs37 = require("node:fs");
26842
- import_node_os8 = __toESM(require("node:os"), 1);
26902
+ import_node_os9 = __toESM(require("node:os"), 1);
26843
26903
  }
26844
26904
  });
26845
26905
 
@@ -26926,11 +26986,11 @@ function groupAlive(table, leader) {
26926
26986
  return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
26927
26987
  }
26928
26988
  function swiftRootLocksDir() {
26929
- return import_node_path36.default.join((0, import_node_os9.homedir)(), ".peach", "cache", "swift-root-locks");
26989
+ return import_node_path36.default.join((0, import_node_os10.homedir)(), ".peach", "cache", "swift-root-locks");
26930
26990
  }
26931
26991
  function withCocoaPodsCacheLock(work) {
26932
26992
  return withSwiftRootLock(
26933
- process.env.CP_CACHE_DIR || import_node_path36.default.join((0, import_node_os9.homedir)(), "Library/Caches/CocoaPods"),
26993
+ process.env.CP_CACHE_DIR || import_node_path36.default.join((0, import_node_os10.homedir)(), "Library/Caches/CocoaPods"),
26934
26994
  work
26935
26995
  );
26936
26996
  }
@@ -27007,7 +27067,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
27007
27067
  }
27008
27068
  },
27009
27069
  spawn(command, args, options, companion) {
27010
- const child = (0, import_node_child_process22.spawn)(
27070
+ const child = (0, import_node_child_process23.spawn)(
27011
27071
  "/bin/sh",
27012
27072
  ["-c", 'IFS= read -r go || exit 1; exec "$@" </dev/null', "sh", command, ...args],
27013
27073
  { ...options, detached: true, stdio: ["pipe", "pipe", "pipe"] }
@@ -27037,14 +27097,14 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
27037
27097
  (0, import_node_fs38.writeFileSync)(import_node_path36.default.join(directory2, name(held, "released")), "");
27038
27098
  }
27039
27099
  }
27040
- var import_node_child_process22, import_node_crypto18, import_node_fs38, import_node_os9, import_node_path36, POLL_MS, INSPECT_ATTEMPTS, START_TOLERANCE_MS, name;
27100
+ var import_node_child_process23, import_node_crypto18, import_node_fs38, import_node_os10, import_node_path36, POLL_MS, INSPECT_ATTEMPTS, START_TOLERANCE_MS, name;
27041
27101
  var init_swift_root_lock = __esm({
27042
27102
  "src/swift-root-lock.ts"() {
27043
27103
  "use strict";
27044
- import_node_child_process22 = require("node:child_process");
27104
+ import_node_child_process23 = require("node:child_process");
27045
27105
  import_node_crypto18 = require("node:crypto");
27046
27106
  import_node_fs38 = require("node:fs");
27047
- import_node_os9 = require("node:os");
27107
+ import_node_os10 = require("node:os");
27048
27108
  import_node_path36 = __toESM(require("node:path"), 1);
27049
27109
  init_process_group();
27050
27110
  init_process_table();
@@ -27059,7 +27119,7 @@ var init_swift_root_lock = __esm({
27059
27119
  function compileUniformTypeConstants(args) {
27060
27120
  const source = import_node_path37.default.join(args.packageRoot, "runtime/UniformTypeIdentifiersConstants.m");
27061
27121
  const object6 = import_node_path37.default.join(args.out, "UniformTypeIdentifiers-NativeConstants.o");
27062
- (0, import_node_child_process23.execFileSync)(
27122
+ (0, import_node_child_process24.execFileSync)(
27063
27123
  import_node_path37.default.join(args.bin, "clang"),
27064
27124
  [
27065
27125
  "--target=wasm64-unknown-wasip1",
@@ -27080,11 +27140,11 @@ function compileUniformTypeConstants(args) {
27080
27140
  );
27081
27141
  return object6;
27082
27142
  }
27083
- var import_node_child_process23, import_node_path37;
27143
+ var import_node_child_process24, import_node_path37;
27084
27144
  var init_swift_uniform_type_constants = __esm({
27085
27145
  "src/swift-uniform-type-constants.ts"() {
27086
27146
  "use strict";
27087
- import_node_child_process23 = require("node:child_process");
27147
+ import_node_child_process24 = require("node:child_process");
27088
27148
  import_node_path37 = __toESM(require("node:path"), 1);
27089
27149
  init_swift_objc_runtime();
27090
27150
  init_swift_objc_standin();
@@ -27224,7 +27284,7 @@ async function runCompiler(command, args, options, stream = false, quiet) {
27224
27284
  detached: true,
27225
27285
  stdio: ["ignore", "pipe", "pipe"]
27226
27286
  };
27227
- const child = options.lease ? options.lease.spawn(command, args, launch, options.frameworkLease) : (0, import_node_child_process24.spawn)(command, args, launch);
27287
+ const child = options.lease ? options.lease.spawn(command, args, launch, options.frameworkLease) : (0, import_node_child_process25.spawn)(command, args, launch);
27228
27288
  let stopping;
27229
27289
  try {
27230
27290
  return await new Promise((resolve4, reject) => {
@@ -27302,7 +27362,7 @@ function swiftBuildJobs() {
27302
27362
  const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
27303
27363
  return Math.min(
27304
27364
  process.platform === "darwin" ? Infinity : 4,
27305
- Math.max(1, Math.floor(import_node_os10.default.availableParallelism() / 2)),
27365
+ Math.max(1, Math.floor(import_node_os11.default.availableParallelism() / 2)),
27306
27366
  Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
27307
27367
  );
27308
27368
  }
@@ -27756,7 +27816,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin) {
27756
27816
  const key2 = JSON.stringify([toolchainBin, sdk2, options]);
27757
27817
  const cached2 = sdkPaths.get(key2);
27758
27818
  if (cached2) return cached2;
27759
- const configuration = (0, import_node_child_process24.execFileSync)(
27819
+ const configuration = (0, import_node_child_process25.execFileSync)(
27760
27820
  import_node_path40.default.join(toolchainBin, "swift"),
27761
27821
  [
27762
27822
  "sdk",
@@ -32040,14 +32100,14 @@ function compileSwiftProjectOnce(input, options) {
32040
32100
  options.signal
32041
32101
  );
32042
32102
  }
32043
- var import_node_child_process24, import_node_crypto19, import_node_fs41, import_node_os10, import_node_path40, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, objcEnumerations, sdkDeclarationOwners, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, FOUNDATION_IMPLICIT_MODULES, PRECONCURRENCY_FOUNDATION_IMPORT, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, DIRECTIVE, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
32103
+ var import_node_child_process25, import_node_crypto19, import_node_fs41, import_node_os11, import_node_path40, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, objcEnumerations, sdkDeclarationOwners, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, FOUNDATION_IMPLICIT_MODULES, PRECONCURRENCY_FOUNDATION_IMPORT, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, DIRECTIVE, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
32044
32104
  var init_swift_compile = __esm({
32045
32105
  "src/swift-compile.ts"() {
32046
32106
  "use strict";
32047
- import_node_child_process24 = require("node:child_process");
32107
+ import_node_child_process25 = require("node:child_process");
32048
32108
  import_node_crypto19 = require("node:crypto");
32049
32109
  import_node_fs41 = require("node:fs");
32050
- import_node_os10 = __toESM(require("node:os"), 1);
32110
+ import_node_os11 = __toESM(require("node:os"), 1);
32051
32111
  import_node_path40 = __toESM(require("node:path"), 1);
32052
32112
  v5 = __toESM(require("valibot"), 1);
32053
32113
  init_admitted_mac_build();
@@ -32277,7 +32337,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
32277
32337
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
32278
32338
  MULTI_MANIFEST_VERSION = 68;
32279
32339
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
32280
- compilerSourceDigest = true ? "3c645ce8a5442f60dce1735912506ad6fa5d09cb92da26cff3950c374b371e2b" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32340
+ compilerSourceDigest = true ? "ad311d7f868d4920f32f2ed00502f49f84fb83ae19817180a70ef5f799334169" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32281
32341
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
32282
32342
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
32283
32343
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -33264,7 +33324,7 @@ async function swiftDistributionRoot(signal) {
33264
33324
  }
33265
33325
  async function installSwiftToolchain(release, sdk2, signal, compilerOnly = false) {
33266
33326
  const root = import_node_path42.default.resolve(swiftToolchainBin(release), "../..");
33267
- const owned = process.platform === "darwin" ? import_node_path42.default.join(import_node_os11.default.homedir(), "Library/Developer/Toolchains", `${release}.xctoolchain`) : import_node_path42.default.join(rnxHomeDir(), "swift", "toolchains", release);
33327
+ const owned = process.platform === "darwin" ? import_node_path42.default.join(import_node_os12.default.homedir(), "Library/Developer/Toolchains", `${release}.xctoolchain`) : import_node_path42.default.join(rnxHomeDir(), "swift", "toolchains", release);
33268
33328
  const selectedCompiler = process.platform === "darwin" && import_node_fs43.default.existsSync(import_node_path42.default.join(root, "usr/bin/swift"));
33269
33329
  if (release.includes("-custom-") && root === owned && !selectedCompiler && !swiftCompilerReady(release)) {
33270
33330
  const archive = swiftHostCompilerArchive(release);
@@ -33367,12 +33427,12 @@ function swiftModuleToolchain(root) {
33367
33427
  const { release } = swiftModuleCompiler(root);
33368
33428
  return { release, toolchainBin: swiftToolchain(release, swiftModuleSdk(root)) };
33369
33429
  }
33370
- var import_node_fs43, import_node_os11, import_node_path42, SWIFT_ENDPOINT_ENV, DEFAULT_SWIFT_ENDPOINT, installs, staleWarned;
33430
+ var import_node_fs43, import_node_os12, import_node_path42, SWIFT_ENDPOINT_ENV, DEFAULT_SWIFT_ENDPOINT, installs, staleWarned;
33371
33431
  var init_swift_distribution = __esm({
33372
33432
  "src/swift-distribution.ts"() {
33373
33433
  "use strict";
33374
33434
  import_node_fs43 = __toESM(require("node:fs"), 1);
33375
- import_node_os11 = __toESM(require("node:os"), 1);
33435
+ import_node_os12 = __toESM(require("node:os"), 1);
33376
33436
  import_node_path42 = __toESM(require("node:path"), 1);
33377
33437
  init_src();
33378
33438
  init_linux_browser_libs();
@@ -33463,7 +33523,7 @@ function dumpInputs(dir) {
33463
33523
  path: command,
33464
33524
  realpath: import_node_fs44.default.realpathSync(command),
33465
33525
  sha256: (0, import_node_crypto21.createHash)("sha256").update(import_node_fs44.default.readFileSync(command)).digest("hex"),
33466
- version: (0, import_node_child_process25.execFileSync)(command, ["--version"], {
33526
+ version: (0, import_node_child_process26.execFileSync)(command, ["--version"], {
33467
33527
  encoding: "utf8",
33468
33528
  env: swiftEnvironment(),
33469
33529
  stdio: ["ignore", "pipe", "pipe"]
@@ -33526,7 +33586,7 @@ function dump(dir, requirePrepared = false) {
33526
33586
  if (requirePrepared) throw new SwiftManifestPreparationRequired(dir);
33527
33587
  let output2;
33528
33588
  try {
33529
- output2 = (0, import_node_child_process25.execFileSync)(
33589
+ output2 = (0, import_node_child_process26.execFileSync)(
33530
33590
  command,
33531
33591
  [
33532
33592
  "package",
@@ -33866,7 +33926,7 @@ let package = Package(
33866
33926
  ]
33867
33927
  )
33868
33928
  `;
33869
- const dir = import_node_fs44.default.mkdtempSync(import_node_path43.default.join(import_node_os12.default.tmpdir(), "peach-resolve-"));
33929
+ const dir = import_node_fs44.default.mkdtempSync(import_node_path43.default.join(import_node_os13.default.tmpdir(), "peach-resolve-"));
33870
33930
  import_node_fs44.default.writeFileSync(import_node_path43.default.join(dir, "Package.swift"), manifest);
33871
33931
  const args = [
33872
33932
  "package",
@@ -33906,7 +33966,7 @@ async function resolveSwiftPackageRequirementsAsync(requirements, destination, s
33906
33966
  const { dir, args, options, failed, publish } = resolveRequest(requirements);
33907
33967
  try {
33908
33968
  try {
33909
- await (0, import_node_util5.promisify)(import_node_child_process25.execFile)(swiftCommand(), args, { ...options, signal });
33969
+ await (0, import_node_util5.promisify)(import_node_child_process26.execFile)(swiftCommand(), args, { ...options, signal });
33910
33970
  } catch (error) {
33911
33971
  throw failed(error);
33912
33972
  }
@@ -33947,14 +34007,14 @@ function swiftTargetFiles(manifest, target) {
33947
34007
  }
33948
34008
  return [...new Set(files2)].sort();
33949
34009
  }
33950
- var import_node_child_process25, import_node_crypto21, import_node_fs44, import_node_os12, import_node_path43, import_node_util5, TARGET_TYPES, targetRelative, isTargetType, record, array3, string4, cacheDir3, evaluated, execFileAsync, cachedToolchain, SwiftManifestPreparationRequired, manifestPreparations, GUEST_PLATFORMS, within, requirementClause;
34010
+ var import_node_child_process26, import_node_crypto21, import_node_fs44, import_node_os13, import_node_path43, import_node_util5, TARGET_TYPES, targetRelative, isTargetType, record, array3, string4, cacheDir3, evaluated, execFileAsync, cachedToolchain, SwiftManifestPreparationRequired, manifestPreparations, GUEST_PLATFORMS, within, requirementClause;
33951
34011
  var init_swift_package_manifest = __esm({
33952
34012
  "src/swift-package-manifest.ts"() {
33953
34013
  "use strict";
33954
- import_node_child_process25 = require("node:child_process");
34014
+ import_node_child_process26 = require("node:child_process");
33955
34015
  import_node_crypto21 = require("node:crypto");
33956
34016
  import_node_fs44 = __toESM(require("node:fs"), 1);
33957
- import_node_os12 = __toESM(require("node:os"), 1);
34017
+ import_node_os13 = __toESM(require("node:os"), 1);
33958
34018
  import_node_path43 = __toESM(require("node:path"), 1);
33959
34019
  import_node_util5 = require("node:util");
33960
34020
  init_home_paths();
@@ -33978,7 +34038,7 @@ var init_swift_package_manifest = __esm({
33978
34038
  string4 = (value) => typeof value === "string" ? value : void 0;
33979
34039
  cacheDir3 = import_node_path43.default.join(cacheDir(), "swift-manifests");
33980
34040
  evaluated = /* @__PURE__ */ new Map();
33981
- execFileAsync = (0, import_node_util5.promisify)(import_node_child_process25.execFile);
34041
+ execFileAsync = (0, import_node_util5.promisify)(import_node_child_process26.execFile);
33982
34042
  SwiftManifestPreparationRequired = class extends Error {
33983
34043
  constructor(dir) {
33984
34044
  super(`swift package manifest requires preparation: ${dir}`);
@@ -34663,7 +34723,7 @@ function loadProject(xcodeproj) {
34663
34723
  function selectedDeveloperDir() {
34664
34724
  developerDir ??= process.platform === "darwin" ? (
34665
34725
  // runner-toolchain-platform: darwin
34666
- (0, import_node_child_process26.execFileSync)("xcode-select", ["-p"], {
34726
+ (0, import_node_child_process27.execFileSync)("xcode-select", ["-p"], {
34667
34727
  encoding: "utf8",
34668
34728
  stdio: ["ignore", "pipe", "pipe"]
34669
34729
  }).trim()
@@ -35067,7 +35127,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
35067
35127
  str(phase.shellPath) ?? "/bin/sh",
35068
35128
  str(phase.shellScript) ?? ""
35069
35129
  );
35070
- (0, import_node_child_process26.execFileSync)(shell, args, {
35130
+ (0, import_node_child_process27.execFileSync)(shell, args, {
35071
35131
  cwd: project2.projectDir,
35072
35132
  env,
35073
35133
  stdio: ["ignore", "pipe", "pipe"],
@@ -35175,7 +35235,7 @@ ${output2}`
35175
35235
  const families = settings("TARGETED_DEVICE_FAMILY").split(",").map((value) => value.trim());
35176
35236
  if (families.includes("1")) args.push("--target-device", "iphone");
35177
35237
  if (families.includes("2")) args.push("--target-device", "ipad");
35178
- (0, import_node_child_process26.execFileSync)("xcrun", args, {
35238
+ (0, import_node_child_process27.execFileSync)("xcrun", args, {
35179
35239
  cwd: project2.projectDir,
35180
35240
  stdio: ["ignore", "pipe", "pipe"],
35181
35241
  timeout: runScriptTimeoutMs
@@ -35220,7 +35280,7 @@ ${output2}`
35220
35280
  args.push("-swiftVersion", settings("SWIFT_VERSION") || "5.0");
35221
35281
  if (settings("DEFINES_MODULE") === "YES")
35222
35282
  args.push("-moduleName", settings("PRODUCT_MODULE_NAME"));
35223
- (0, import_node_child_process26.execFileSync)("xcrun", args, {
35283
+ (0, import_node_child_process27.execFileSync)("xcrun", args, {
35224
35284
  cwd: project2.projectDir,
35225
35285
  stdio: ["ignore", "pipe", "pipe"],
35226
35286
  timeout: runScriptTimeoutMs
@@ -35519,7 +35579,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35519
35579
  options.installedPods
35520
35580
  );
35521
35581
  const allTargets = projects2.flatMap(projectTargets);
35522
- const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
35582
+ const appTargets = allTargets.filter(
35583
+ (ref) => isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
35584
+ );
35523
35585
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
35524
35586
  const container = import_node_path45.default.basename(xcodeprojOrWorkspace);
35525
35587
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
@@ -35583,7 +35645,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35583
35645
  const words2 = settingList(flags);
35584
35646
  const linked = new Set(linkedTargets(ref).map((link) => link.target));
35585
35647
  return words2.flatMap((word, index) => {
35586
- const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
35648
+ const library = word.startsWith("-l") && word.length > 2 ? word.slice(2) : words2[index - 1] === "-l" ? word : void 0;
35649
+ const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : library ? byProduct.get(`lib${library}.a`) ?? byProduct.get(`lib${library}.dylib`) : void 0;
35587
35650
  if (!target || target === ref || linked.has(target)) return [];
35588
35651
  linked.add(target);
35589
35652
  return [{ target, attributes: [] }];
@@ -36585,11 +36648,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
36585
36648
  cocoapods
36586
36649
  };
36587
36650
  }
36588
- var import_node_child_process26, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
36651
+ var import_node_child_process27, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
36589
36652
  var init_xcode_project = __esm({
36590
36653
  "src/xcode-project.ts"() {
36591
36654
  "use strict";
36592
- import_node_child_process26 = require("node:child_process");
36655
+ import_node_child_process27 = require("node:child_process");
36593
36656
  import_node_crypto22 = require("node:crypto");
36594
36657
  import_node_fs45 = __toESM(require("node:fs"), 1);
36595
36658
  import_node_path45 = __toESM(require("node:path"), 1);
@@ -36624,6 +36687,7 @@ var init_xcode_project = __esm({
36624
36687
  "compiler-default"
36625
36688
  ]);
36626
36689
  APPLICATION = "com.apple.product-type.application";
36690
+ APP_EXTENSION = "com.apple.product-type.app-extension";
36627
36691
  RESOURCE_BUNDLE = "com.apple.product-type.bundle";
36628
36692
  PRODUCT_MACH_O_TYPES = {
36629
36693
  "com.apple.product-type.application": "mh_execute",
@@ -36723,7 +36787,7 @@ async function readExpoConfigAsync(projectRoot) {
36723
36787
  const directory2 = resultDirectory();
36724
36788
  const resultPath = import_node_path46.default.join(directory2, "config.json");
36725
36789
  try {
36726
- const child = (0, import_node_child_process27.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
36790
+ const child = (0, import_node_child_process28.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
36727
36791
  cwd: projectRoot,
36728
36792
  stdio: ["ignore", "ignore", "pipe"],
36729
36793
  timeout: EXPO_CONFIG_TIMEOUT_MS
@@ -36744,13 +36808,13 @@ async function readExpoConfigAsync(projectRoot) {
36744
36808
  import_node_fs46.default.rmSync(directory2, { recursive: true, force: true });
36745
36809
  }
36746
36810
  }
36747
- var import_node_child_process27, import_node_fs46, import_node_os13, import_node_path46, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
36811
+ var import_node_child_process28, import_node_fs46, import_node_os14, import_node_path46, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
36748
36812
  var init_native_firebase_config = __esm({
36749
36813
  "src/native-firebase-config.ts"() {
36750
36814
  "use strict";
36751
- import_node_child_process27 = require("node:child_process");
36815
+ import_node_child_process28 = require("node:child_process");
36752
36816
  import_node_fs46 = __toESM(require("node:fs"), 1);
36753
- import_node_os13 = __toESM(require("node:os"), 1);
36817
+ import_node_os14 = __toESM(require("node:os"), 1);
36754
36818
  import_node_path46 = __toESM(require("node:path"), 1);
36755
36819
  init_is_record();
36756
36820
  init_plist();
@@ -36772,7 +36836,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
36772
36836
  if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
36773
36837
  writeFileSync(process.argv[2], result, { mode: 0o600 });`;
36774
36838
  EXPO_CONFIG_TIMEOUT_MS = 3e4;
36775
- resultDirectory = () => import_node_fs46.default.mkdtempSync(import_node_path46.default.join(import_node_os13.default.tmpdir(), "peach-expo-config-"));
36839
+ resultDirectory = () => import_node_fs46.default.mkdtempSync(import_node_path46.default.join(import_node_os14.default.tmpdir(), "peach-expo-config-"));
36776
36840
  }
36777
36841
  });
36778
36842
 
@@ -36903,18 +36967,18 @@ async function expoAutolinkedPods(appRoot) {
36903
36967
  }))
36904
36968
  );
36905
36969
  }
36906
- var import_node_child_process28, import_node_fs48, import_node_module3, import_node_path48, import_node_util6, run2;
36970
+ var import_node_child_process29, import_node_fs48, import_node_module3, import_node_path48, import_node_util6, run2;
36907
36971
  var init_expo_autolinking = __esm({
36908
36972
  "src/expo-autolinking.ts"() {
36909
36973
  "use strict";
36910
- import_node_child_process28 = require("node:child_process");
36974
+ import_node_child_process29 = require("node:child_process");
36911
36975
  import_node_fs48 = __toESM(require("node:fs"), 1);
36912
36976
  import_node_module3 = require("node:module");
36913
36977
  import_node_path48 = __toESM(require("node:path"), 1);
36914
36978
  import_node_util6 = require("node:util");
36915
36979
  init_forked_script_contract();
36916
36980
  init_is_record();
36917
- run2 = (0, import_node_util6.promisify)(import_node_child_process28.execFile);
36981
+ run2 = (0, import_node_util6.promisify)(import_node_child_process29.execFile);
36918
36982
  }
36919
36983
  });
36920
36984
 
@@ -37033,18 +37097,18 @@ function ensureToolchain(toolchain) {
37033
37097
  toolchains.set(key2, ready);
37034
37098
  return ready;
37035
37099
  }
37036
- var import_node_child_process29, import_node_crypto24, import_node_fs49, import_node_path49, import_node_util7, run3, toolchains;
37100
+ var import_node_child_process30, import_node_crypto24, import_node_fs49, import_node_path49, import_node_util7, run3, toolchains;
37037
37101
  var init_kotlin_toolchain = __esm({
37038
37102
  "src/kotlin-toolchain.ts"() {
37039
37103
  "use strict";
37040
- import_node_child_process29 = require("node:child_process");
37104
+ import_node_child_process30 = require("node:child_process");
37041
37105
  import_node_crypto24 = require("node:crypto");
37042
37106
  import_node_fs49 = __toESM(require("node:fs"), 1);
37043
37107
  import_node_path49 = __toESM(require("node:path"), 1);
37044
37108
  import_node_util7 = require("node:util");
37045
37109
  init_home_paths();
37046
37110
  init_is_record();
37047
- run3 = (0, import_node_util7.promisify)(import_node_child_process29.execFile);
37111
+ run3 = (0, import_node_util7.promisify)(import_node_child_process30.execFile);
37048
37112
  toolchains = /* @__PURE__ */ new Map();
37049
37113
  }
37050
37114
  });
@@ -37530,11 +37594,11 @@ function glogSources() {
37530
37594
  for (const unit2 of GLOG_UNITS) sources.push(read(unit2));
37531
37595
  return sources;
37532
37596
  }
37533
- var import_node_child_process30, import_node_crypto25, import_node_fs51, import_node_path51, import_node_util8, run4, DOUBLE_CONVERSION_WASM64_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER2, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
37597
+ var import_node_child_process31, import_node_crypto25, import_node_fs51, import_node_path51, import_node_util8, run4, DOUBLE_CONVERSION_WASM64_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER2, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
37534
37598
  var init_nitro_dependencies = __esm({
37535
37599
  "src/nitro-dependencies.ts"() {
37536
37600
  "use strict";
37537
- import_node_child_process30 = require("node:child_process");
37601
+ import_node_child_process31 = require("node:child_process");
37538
37602
  import_node_crypto25 = require("node:crypto");
37539
37603
  import_node_fs51 = __toESM(require("node:fs"), 1);
37540
37604
  import_node_path51 = __toESM(require("node:path"), 1);
@@ -37544,7 +37608,7 @@ var init_nitro_dependencies = __esm({
37544
37608
  init_kotlin_toolchain();
37545
37609
  init_swift_source_file();
37546
37610
  init_swift_submit();
37547
- run4 = (0, import_node_util8.promisify)(import_node_child_process30.execFile);
37611
+ run4 = (0, import_node_util8.promisify)(import_node_child_process31.execFile);
37548
37612
  DOUBLE_CONVERSION_WASM64_BACKPORT = {
37549
37613
  upstreamCommit: "8857767d5b2f5a035321e3712e8cd0008840ba6b",
37550
37614
  originalSha256: "b495b11f7b61693486894f747add5b454894b8b3ca41aa1610d370ba16407ab7",
@@ -37852,18 +37916,18 @@ async function readAutolinkingConfig(appRoot, platform2) {
37852
37916
  })
37853
37917
  );
37854
37918
  }
37855
- var import_node_child_process31, import_node_fs52, import_node_module4, import_node_path52, import_node_util9, run5, CLI_TIMEOUT_MS, inFlight;
37919
+ var import_node_child_process32, import_node_fs52, import_node_module4, import_node_path52, import_node_util9, run5, CLI_TIMEOUT_MS, inFlight;
37856
37920
  var init_react_native_autolinking = __esm({
37857
37921
  "src/react-native-autolinking.ts"() {
37858
37922
  "use strict";
37859
- import_node_child_process31 = require("node:child_process");
37923
+ import_node_child_process32 = require("node:child_process");
37860
37924
  import_node_fs52 = __toESM(require("node:fs"), 1);
37861
37925
  import_node_module4 = require("node:module");
37862
37926
  import_node_path52 = __toESM(require("node:path"), 1);
37863
37927
  import_node_util9 = require("node:util");
37864
37928
  init_forked_script_contract();
37865
37929
  init_is_record();
37866
- run5 = (0, import_node_util9.promisify)(import_node_child_process31.execFile);
37930
+ run5 = (0, import_node_util9.promisify)(import_node_child_process32.execFile);
37867
37931
  CLI_TIMEOUT_MS = 12e4;
37868
37932
  inFlight = /* @__PURE__ */ new Map();
37869
37933
  }
@@ -38715,7 +38779,7 @@ async function preparedNativeInventory(app, selected, signal) {
38715
38779
  paths: [import_node_path54.default.dirname(require2.resolve("expo/package.json"))]
38716
38780
  });
38717
38781
  const cli = import_node_path54.default.join(import_node_path54.default.dirname(expo), "bin/expo-modules-autolinking.js");
38718
- const searched = await (0, import_node_util10.promisify)(import_node_child_process32.execFile)(
38782
+ const searched = await (0, import_node_util10.promisify)(import_node_child_process33.execFile)(
38719
38783
  process.execPath,
38720
38784
  [cli, "search", ...autolinkerAppleFlags(expo, app), "--json"],
38721
38785
  {
@@ -38774,11 +38838,11 @@ async function preparedNativeInventory(app, selected, signal) {
38774
38838
  }
38775
38839
  return result;
38776
38840
  }
38777
- var import_node_child_process32, import_node_crypto27, import_node_fs54, import_node_module6, import_node_path54, import_promises5, import_node_util10;
38841
+ var import_node_child_process33, import_node_crypto27, import_node_fs54, import_node_module6, import_node_path54, import_promises5, import_node_util10;
38778
38842
  var init_prepared_native_inventory = __esm({
38779
38843
  "src/prepared-native-inventory.ts"() {
38780
38844
  "use strict";
38781
- import_node_child_process32 = require("node:child_process");
38845
+ import_node_child_process33 = require("node:child_process");
38782
38846
  import_node_crypto27 = require("node:crypto");
38783
38847
  import_node_fs54 = __toESM(require("node:fs"), 1);
38784
38848
  import_node_module6 = require("node:module");
@@ -38891,12 +38955,12 @@ function compiledSwiftHelper(swift, name3) {
38891
38955
  try {
38892
38956
  import_node_fs56.default.mkdirSync(cacheDir(), { recursive: true });
38893
38957
  const source = import_node_path56.default.join(
38894
- import_node_fs56.default.mkdtempSync(import_node_path56.default.join(import_node_os14.default.tmpdir(), `${name3}-`)),
38958
+ import_node_fs56.default.mkdtempSync(import_node_path56.default.join(import_node_os15.default.tmpdir(), `${name3}-`)),
38895
38959
  "main.swift"
38896
38960
  );
38897
38961
  import_node_fs56.default.writeFileSync(source, swift);
38898
38962
  try {
38899
- (0, import_node_child_process33.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
38963
+ (0, import_node_child_process34.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
38900
38964
  } finally {
38901
38965
  import_node_fs56.default.rmSync(import_node_path56.default.dirname(source), { recursive: true, force: true });
38902
38966
  }
@@ -38908,14 +38972,14 @@ function compiledSwiftHelper(swift, name3) {
38908
38972
  );
38909
38973
  }
38910
38974
  }
38911
- var import_node_child_process33, import_node_crypto29, import_node_fs56, import_node_os14, import_node_path56;
38975
+ var import_node_child_process34, import_node_crypto29, import_node_fs56, import_node_os15, import_node_path56;
38912
38976
  var init_swift_helper = __esm({
38913
38977
  "src/swift-helper.ts"() {
38914
38978
  "use strict";
38915
- import_node_child_process33 = require("node:child_process");
38979
+ import_node_child_process34 = require("node:child_process");
38916
38980
  import_node_crypto29 = require("node:crypto");
38917
38981
  import_node_fs56 = __toESM(require("node:fs"), 1);
38918
- import_node_os14 = __toESM(require("node:os"), 1);
38982
+ import_node_os15 = __toESM(require("node:os"), 1);
38919
38983
  import_node_path56 = __toESM(require("node:path"), 1);
38920
38984
  init_home_paths();
38921
38985
  }
@@ -39076,40 +39140,67 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
39076
39140
  const steersNative = (relative4) => !relative4.includes(import_node_path58.default.sep) || relative4.startsWith(`patches${import_node_path58.default.sep}`) || nativeDirectories.some(
39077
39141
  (directory2) => directory2 === "" || relative4 === directory2 || relative4.startsWith(directory2 + import_node_path58.default.sep)
39078
39142
  );
39079
- const walk3 = async (directory2) => {
39080
- const entries = await import_node_fs58.default.promises.readdir(directory2, { withFileTypes: true });
39081
- for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
39143
+ const steps = [];
39144
+ const unread = [];
39145
+ const walk3 = (directory2) => {
39146
+ const entries = import_node_fs58.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
39147
+ for (const entry of entries) {
39082
39148
  signal?.throwIfAborted();
39083
39149
  const file = import_node_path58.default.join(directory2, entry.name);
39084
39150
  const relative4 = import_node_path58.default.relative(root, file);
39085
39151
  if (excluded(relative4, entry.isDirectory())) continue;
39086
- hash.update(`${relative4}\0`);
39152
+ steps.push(() => hash.update(`${relative4}\0`));
39087
39153
  if (entry.isSymbolicLink()) {
39088
- const link = `link\0${await import_node_fs58.default.promises.readlink(file)}\0`;
39089
- hash.update(link);
39090
- if (steersNative(relative4)) native.update(`${relative4}\0${link}`);
39154
+ const link = `link\0${import_node_fs58.default.readlinkSync(file)}\0`;
39155
+ steps.push(() => {
39156
+ hash.update(link);
39157
+ if (steersNative(relative4)) native.update(`${relative4}\0${link}`);
39158
+ });
39091
39159
  } else if (entry.isDirectory()) {
39092
- hash.update("directory\0");
39093
- await walk3(file);
39160
+ steps.push(() => hash.update("directory\0"));
39161
+ walk3(file);
39094
39162
  } else if (entry.isFile()) {
39095
39163
  const posix2 = relative4.split(import_node_path58.default.sep).join("/");
39096
39164
  if (NATIVE_CONFIG_FILE.test(posix2)) {
39097
- const bytes = await import_node_fs58.default.promises.readFile(file);
39098
- if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
39099
- if (steersNative(relative4))
39100
- native.update(`${posix2}\0`).update(nativeConfigBytes(posix2, bytes));
39101
- } else {
39102
- if (everyByte) {
39103
- const bytes = await import_node_fs58.default.promises.readFile(file);
39104
- hash.update(`file\0${bytes.length}\0`).update(bytes);
39105
- }
39106
- if (NATIVE_SOURCE_FILE.test(posix2) && steersNative(relative4))
39107
- native.update(`${posix2}\0`);
39165
+ const bytes = import_node_fs58.default.readFileSync(file);
39166
+ steps.push(() => {
39167
+ if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
39168
+ if (steersNative(relative4))
39169
+ native.update(`${posix2}\0`).update(nativeConfigBytes(posix2, bytes));
39170
+ });
39171
+ continue;
39108
39172
  }
39173
+ if (everyByte) {
39174
+ const stat = import_node_fs58.default.statSync(file);
39175
+ const known = fileDigests.get(file);
39176
+ const content = known?.ino === stat.ino && known.size === stat.size && known.mtimeMs === stat.mtimeMs && known.ctimeMs === stat.ctimeMs ? known : {
39177
+ ino: stat.ino,
39178
+ size: stat.size,
39179
+ mtimeMs: stat.mtimeMs,
39180
+ ctimeMs: stat.ctimeMs,
39181
+ digest: ""
39182
+ };
39183
+ if (content !== known) unread.push({ file, content });
39184
+ steps.push(() => hash.update(`file\0${content.size}\0${content.digest}`));
39185
+ }
39186
+ if (NATIVE_SOURCE_FILE.test(posix2) && steersNative(relative4))
39187
+ steps.push(() => native.update(`${posix2}\0`));
39109
39188
  }
39110
39189
  }
39111
39190
  };
39112
- await walk3(root);
39191
+ walk3(root);
39192
+ for (let start = 0; start < unread.length; start += 32) {
39193
+ signal?.throwIfAborted();
39194
+ await Promise.all(
39195
+ unread.slice(start, start + 32).map(async ({ file, content }) => {
39196
+ const bytes = await import_node_fs58.default.promises.readFile(file);
39197
+ content.size = bytes.length;
39198
+ content.digest = (0, import_node_crypto30.createHash)("sha256").update(bytes).digest("hex");
39199
+ fileDigests.set(file, content);
39200
+ })
39201
+ );
39202
+ }
39203
+ for (const step of steps) step();
39113
39204
  if (sourceOnly) {
39114
39205
  hash.update(`\0${appRelative}\0`);
39115
39206
  return {
@@ -39120,29 +39211,32 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
39120
39211
  excluded
39121
39212
  };
39122
39213
  }
39123
- const execFileAsync4 = (0, import_node_util11.promisify)(import_node_child_process34.execFile);
39124
- const mac = process.platform === "darwin" ? await Promise.all([
39125
- // runner-toolchain-platform: darwin
39126
- execFileAsync4("pod", ["--version"], { env: utf8Env, signal }).catch(
39127
- (cause) => {
39128
- throw new Error("CocoaPods is required to install source dependencies", {
39129
- cause
39130
- });
39131
- }
39132
- ),
39133
- // runner-toolchain-platform: darwin
39134
- execFileAsync4("xcodebuild", ["-version"], { env: utf8Env, signal })
39135
- ]).then(([pod, xcode]) => ({ podVersion: pod.stdout, xcode: xcode.stdout })) : {};
39214
+ const execFileAsync4 = (0, import_node_util11.promisify)(import_node_child_process35.execFile);
39136
39215
  const pinnedNode = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? `node@${manifest.engines.node}` : null;
39216
+ const [mac, node] = await Promise.all([
39217
+ process.platform === "darwin" ? Promise.all([
39218
+ // runner-toolchain-platform: darwin
39219
+ execFileAsync4("pod", ["--version"], { env: utf8Env, signal }).catch(
39220
+ (cause) => {
39221
+ throw new Error("CocoaPods is required to install source dependencies", {
39222
+ cause
39223
+ });
39224
+ }
39225
+ ),
39226
+ // runner-toolchain-platform: darwin
39227
+ execFileAsync4("xcodebuild", ["-version"], { env: utf8Env, signal })
39228
+ ]).then(([pod, xcode]) => ({ podVersion: pod.stdout, xcode: xcode.stdout })) : {},
39229
+ execFileAsync4(
39230
+ pinnedNode ? "mise" : "node",
39231
+ pinnedNode ? ["exec", pinnedNode, "--", "node", "--version"] : ["--version"],
39232
+ { cwd: root, signal }
39233
+ )
39234
+ ]);
39137
39235
  const toolchain = JSON.stringify({
39138
39236
  preparation: 7,
39139
39237
  appRelative,
39140
39238
  ...mac,
39141
- node: (await execFileAsync4(
39142
- pinnedNode ? "mise" : "node",
39143
- pinnedNode ? ["exec", pinnedNode, "--", "node", "--version"] : ["--version"],
39144
- { cwd: root, signal }
39145
- )).stdout.trim(),
39239
+ node: node.stdout.trim(),
39146
39240
  packageManager: workspacePackageManager(root, manifest.packageManager, excluded),
39147
39241
  podsEnvironment
39148
39242
  });
@@ -39321,7 +39415,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
39321
39415
  });
39322
39416
  if (process.platform === "darwin") {
39323
39417
  await new Promise((resolve4, reject) => {
39324
- const child = (0, import_node_child_process34.execFile)(
39418
+ const child = (0, import_node_child_process35.execFile)(
39325
39419
  compiledSwiftHelper(CLONE_SWIFT, "peach-clone-entries"),
39326
39420
  (error) => error ? reject(error) : resolve4()
39327
39421
  );
@@ -39337,7 +39431,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
39337
39431
  const clone = async () => {
39338
39432
  const relative4 = entries.pop();
39339
39433
  if (relative4 === void 0) return;
39340
- await (0, import_node_util11.promisify)(import_node_child_process34.execFile)("cp", [
39434
+ await (0, import_node_util11.promisify)(import_node_child_process35.execFile)("cp", [
39341
39435
  "-R",
39342
39436
  "-p",
39343
39437
  import_node_path58.default.join(root, relative4),
@@ -39361,7 +39455,7 @@ function nativeWorkspacesDir(root) {
39361
39455
  return import_node_path58.default.join(mount, ".peach-cache", "expo-native-workspaces");
39362
39456
  }
39363
39457
  function trackedSourceEntries(root, work) {
39364
- const listed = (0, import_node_child_process34.spawnSync)("git", ["ls-files", "--stage", "-z"], {
39458
+ const listed = (0, import_node_child_process35.spawnSync)("git", ["ls-files", "--stage", "-z"], {
39365
39459
  cwd: root,
39366
39460
  env: { ...process.env, ...isolatedGitEnv },
39367
39461
  maxBuffer: 256 * 1024 * 1024
@@ -39375,8 +39469,8 @@ function trackedSourceEntries(root, work) {
39375
39469
  function initializeWorkspaceGit(root, work) {
39376
39470
  requireNativeGit();
39377
39471
  const env = { ...process.env, ...isolatedGitEnv };
39378
- (0, import_node_child_process34.execFileSync)("git", ["init", "--quiet"], { cwd: work, env });
39379
- (0, import_node_child_process34.execFileSync)(
39472
+ (0, import_node_child_process35.execFileSync)("git", ["init", "--quiet"], { cwd: work, env });
39473
+ (0, import_node_child_process35.execFileSync)(
39380
39474
  "git",
39381
39475
  [
39382
39476
  "-c",
@@ -39396,7 +39490,7 @@ function initializeWorkspaceGit(root, work) {
39396
39490
  );
39397
39491
  const tracked = trackedSourceEntries(root, work);
39398
39492
  if (tracked.length > 0)
39399
- (0, import_node_child_process34.execFileSync)("git", ["update-index", "-z", "--index-info"], {
39493
+ (0, import_node_child_process35.execFileSync)("git", ["update-index", "-z", "--index-info"], {
39400
39494
  cwd: work,
39401
39495
  env,
39402
39496
  input: tracked.join("\0")
@@ -39452,7 +39546,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
39452
39546
  }
39453
39547
  const trustedConfigs = /* @__PURE__ */ new Set();
39454
39548
  for (const cwd of [root, app]) {
39455
- const result2 = (0, import_node_child_process34.spawnSync)("mise", ["config", "ls", "--json"], {
39549
+ const result2 = (0, import_node_child_process35.spawnSync)("mise", ["config", "ls", "--json"], {
39456
39550
  cwd,
39457
39551
  encoding: "utf8"
39458
39552
  });
@@ -39495,7 +39589,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
39495
39589
  const command = [...prefix, ...args];
39496
39590
  await run13(command[0], command.slice(1), cwd, env);
39497
39591
  };
39498
- const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process34.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
39592
+ const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process35.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
39499
39593
  if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
39500
39594
  await execute(
39501
39595
  [
@@ -39614,7 +39708,7 @@ function stageCachedQuickCryptoOpenSsl(app) {
39614
39708
  return;
39615
39709
  import_node_fs58.default.rmSync(opensslDir, { recursive: true, force: true });
39616
39710
  import_node_fs58.default.mkdirSync(opensslDir, { recursive: true });
39617
- (0, import_node_child_process34.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
39711
+ (0, import_node_child_process35.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
39618
39712
  }
39619
39713
  async function runAdmitted(lease, command, args, cwd, extraEnv) {
39620
39714
  const admitted = teamMachineInstalled();
@@ -39650,11 +39744,11 @@ ${failedOutputLine(command, cwd, bytes)}`
39650
39744
  });
39651
39745
  });
39652
39746
  }
39653
- var import_node_child_process34, import_node_crypto30, import_node_fs58, import_node_module7, import_node_path58, import_node_util11, isolatedGitEnv, utf8Env, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE, NATIVE_PACKAGE_ENTRY, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_SWIFT;
39747
+ var import_node_child_process35, import_node_crypto30, import_node_fs58, import_node_module7, import_node_path58, import_node_util11, isolatedGitEnv, utf8Env, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE, fileDigests, NATIVE_PACKAGE_ENTRY, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_SWIFT;
39654
39748
  var init_expo_native_workspace = __esm({
39655
39749
  "src/expo-native-workspace.ts"() {
39656
39750
  "use strict";
39657
- import_node_child_process34 = require("node:child_process");
39751
+ import_node_child_process35 = require("node:child_process");
39658
39752
  import_node_crypto30 = require("node:crypto");
39659
39753
  import_node_fs58 = __toESM(require("node:fs"), 1);
39660
39754
  import_node_module7 = require("node:module");
@@ -39681,6 +39775,7 @@ var init_expo_native_workspace = __esm({
39681
39775
  utf8Env = { ...process.env, LANG: "en_US.UTF-8", LC_ALL: "en_US.UTF-8" };
39682
39776
  NATIVE_CONFIG_FILE = /(^|\/)(package\.json|bun\.lockb?|package-lock\.json|pnpm-lock\.yaml|pnpm-workspace\.yaml|yarn\.lock|\.yarnrc\.yml|\.npmrc|app\.json|app\.config\.[cm]?[jt]s|Podfile(\.lock|\.properties)?|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|\.nvmrc|\.tool-versions|\.?mise(?:\.[^/]+)?\.toml)$|\.(podspec|patch|plist|entitlements|xcconfig|pbxproj|storyboard|xib|gradle|rb)$|(^|\/)(plugins|patches)\//;
39683
39777
  NATIVE_SOURCE_FILE = /\.(swift|mm?|hpp?|c|cc|cpp|kt|java)$/;
39778
+ fileDigests = /* @__PURE__ */ new Map();
39684
39779
  NATIVE_PACKAGE_ENTRY = /^(ios|android|.*\.podspec|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|app\.plugin\.[cm]?js)$/;
39685
39780
  KEPT_WORKSPACES = 2;
39686
39781
  WORKSPACE_GRACE_MS = 36e5;
@@ -41143,12 +41238,12 @@ function rustStaticLibrary(file, moduleRoot) {
41143
41238
  const flags = ["--no-sort", "--extern-only", "--defined-only", "--format=just-symbols"];
41144
41239
  const options = { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 };
41145
41240
  const symbols = (input) => {
41146
- const raw2 = (0, import_node_child_process35.execFileSync)(
41241
+ const raw2 = (0, import_node_child_process36.execFileSync)(
41147
41242
  import_node_path64.default.join(toolchain.toolchainBin, "llvm-nm"),
41148
41243
  [...flags, input],
41149
41244
  options
41150
41245
  ).trim().split("\n");
41151
- const demangled = (0, import_node_child_process35.execFileSync)(
41246
+ const demangled = (0, import_node_child_process36.execFileSync)(
41152
41247
  import_node_path64.default.join(toolchain.toolchainBin, "llvm-nm"),
41153
41248
  [...flags, "--demangle", input],
41154
41249
  options
@@ -41163,7 +41258,7 @@ function rustStaticLibrary(file, moduleRoot) {
41163
41258
  const stage = import_node_fs64.default.mkdtempSync(import_node_path64.default.join(directory2, "build-"));
41164
41259
  try {
41165
41260
  const object6 = import_node_path64.default.join(stage, "library.o");
41166
- (0, import_node_child_process35.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "wasm-ld"), [
41261
+ (0, import_node_child_process36.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "wasm-ld"), [
41167
41262
  "-mwasm64",
41168
41263
  "-r",
41169
41264
  "--whole-archive",
@@ -41179,7 +41274,7 @@ function rustStaticLibrary(file, moduleRoot) {
41179
41274
  );
41180
41275
  import_node_fs64.default.writeFileSync(object6, localizeDefinedWasmSymbols(import_node_fs64.default.readFileSync(object6), names));
41181
41276
  const output2 = import_node_path64.default.join(stage, "library.a");
41182
- (0, import_node_child_process35.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "llvm-ar"), ["rcsD", output2, object6]);
41277
+ (0, import_node_child_process36.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "llvm-ar"), ["rcsD", output2, object6]);
41183
41278
  import_node_fs64.default.renameSync(output2, archive);
41184
41279
  } finally {
41185
41280
  import_node_fs64.default.rmSync(stage, { recursive: true, force: true });
@@ -41198,7 +41293,7 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
41198
41293
  import_node_fs64.default.mkdirSync(directory2, { recursive: true });
41199
41294
  const temporary = import_node_path64.default.join(directory2, `combined-${(0, import_node_crypto31.randomUUID)()}.a`);
41200
41295
  try {
41201
- (0, import_node_child_process35.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "llvm-ar"), [
41296
+ (0, import_node_child_process36.execFileSync)(import_node_path64.default.join(toolchain.toolchainBin, "llvm-ar"), [
41202
41297
  "qcsDL",
41203
41298
  temporary,
41204
41299
  ...files2
@@ -41209,11 +41304,11 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
41209
41304
  }
41210
41305
  return archive;
41211
41306
  }
41212
- var import_node_child_process35, import_node_crypto31, import_node_fs64, import_node_path64, NATIVE_STATIC_LIBRARY_RECIPES;
41307
+ var import_node_child_process36, import_node_crypto31, import_node_fs64, import_node_path64, NATIVE_STATIC_LIBRARY_RECIPES;
41213
41308
  var init_native_static_libraries = __esm({
41214
41309
  "src/native-static-libraries.ts"() {
41215
41310
  "use strict";
41216
- import_node_child_process35 = require("node:child_process");
41311
+ import_node_child_process36 = require("node:child_process");
41217
41312
  import_node_crypto31 = require("node:crypto");
41218
41313
  import_node_fs64 = __toESM(require("node:fs"), 1);
41219
41314
  import_node_path64 = __toESM(require("node:path"), 1);
@@ -41734,7 +41829,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
41734
41829
  "--distribution",
41735
41830
  moduleRoot
41736
41831
  ];
41737
- const verified2 = import_node_fs66.default.existsSync(import_node_path66.default.join(dir, ADAPTER_MANIFEST)) && (0, import_node_child_process36.spawnSync)("bun", [script, "--verify", ...args(dir)], { stdio: "ignore" }).status === 0;
41832
+ const verified2 = import_node_fs66.default.existsSync(import_node_path66.default.join(dir, ADAPTER_MANIFEST)) && (0, import_node_child_process37.spawnSync)("bun", [script, "--verify", ...args(dir)], { stdio: "ignore" }).status === 0;
41738
41833
  if (!verified2) {
41739
41834
  process.stderr.write(
41740
41835
  `peach: building ${label} for private distribution ${distribution.id}\u2026
@@ -41742,7 +41837,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
41742
41837
  );
41743
41838
  const staged = `${dir}.${process.pid}`;
41744
41839
  import_node_fs66.default.rmSync(staged, { recursive: true, force: true });
41745
- (0, import_node_child_process36.execFileSync)("bun", [script, ...args(staged)], { stdio: ["ignore", 2, 2] });
41840
+ (0, import_node_child_process37.execFileSync)("bun", [script, ...args(staged)], { stdio: ["ignore", 2, 2] });
41746
41841
  import_node_fs66.default.rmSync(dir, { recursive: true, force: true });
41747
41842
  import_node_fs66.default.renameSync(staged, dir);
41748
41843
  }
@@ -41784,11 +41879,11 @@ async function resolveAdapterArchive(family, roots, moduleRoot, lock, signal) {
41784
41879
  base64: import_node_fs66.default.readFileSync(import_node_path66.default.join(dir, manifest.archive.path)).toString("base64")
41785
41880
  };
41786
41881
  }
41787
- var import_node_child_process36, import_node_fs66, import_node_path66, installedVersion;
41882
+ var import_node_child_process37, import_node_fs66, import_node_path66, installedVersion;
41788
41883
  var init_nitro_adapter = __esm({
41789
41884
  "src/nitro-adapter.ts"() {
41790
41885
  "use strict";
41791
- import_node_child_process36 = require("node:child_process");
41886
+ import_node_child_process37 = require("node:child_process");
41792
41887
  import_node_fs66 = __toESM(require("node:fs"), 1);
41793
41888
  import_node_path66 = __toESM(require("node:path"), 1);
41794
41889
  init_src();
@@ -44948,11 +45043,11 @@ function resolveSwiftPackages(options) {
44948
45043
  result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
44949
45044
  return result;
44950
45045
  }
44951
- var import_node_child_process37, import_node_crypto34, import_node_fs70, import_node_path70, import_promises6, import_node_util12, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
45046
+ var import_node_child_process38, import_node_crypto34, import_node_fs70, import_node_path70, import_promises6, import_node_util12, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
44952
45047
  var init_swift_packages = __esm({
44953
45048
  "src/swift-packages.ts"() {
44954
45049
  "use strict";
44955
- import_node_child_process37 = require("node:child_process");
45050
+ import_node_child_process38 = require("node:child_process");
44956
45051
  import_node_crypto34 = require("node:crypto");
44957
45052
  import_node_fs70 = __toESM(require("node:fs"), 1);
44958
45053
  import_node_path70 = __toESM(require("node:path"), 1);
@@ -44973,7 +45068,7 @@ var init_swift_packages = __esm({
44973
45068
  BINARY = "is a binary framework";
44974
45069
  blockers = (reasons) => [...new Set(reasons.flat())];
44975
45070
  verified = /* @__PURE__ */ new Set();
44976
- execFileAsync2 = (0, import_node_util12.promisify)(import_node_child_process37.execFile);
45071
+ execFileAsync2 = (0, import_node_util12.promisify)(import_node_child_process38.execFile);
44977
45072
  checkoutKey = (dir, pin2) => `${dir}\0${pin2.revision}`;
44978
45073
  }
44979
45074
  });
@@ -45031,7 +45126,7 @@ var init_swift_standin_digest = __esm({
45031
45126
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
45032
45127
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
45033
45128
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
45034
- STANDIN_SOURCE_DIGEST = true ? "8a800a5151c426f07ff690c34df9a6d538c005318051ef52635fc568c44736f6" : standinSourceDigest();
45129
+ STANDIN_SOURCE_DIGEST = true ? "7dd2fef3ceef6be07d22cfa2f397bda7721d34bc2ef8764f78e05b9637849f09" : standinSourceDigest();
45035
45130
  }
45036
45131
  });
45037
45132
 
@@ -45097,10 +45192,10 @@ function privateSentrySlice(entry, moduleRoot) {
45097
45192
  throw new Error(
45098
45193
  "the Sentry slice for a private Swift distribution builds from a Contrast source checkout"
45099
45194
  );
45100
- const staging = import_node_fs72.default.mkdtempSync(import_node_path72.default.join(import_node_fs72.default.realpathSync(import_node_os15.default.tmpdir()), "sentry-slice-"));
45195
+ const staging = import_node_fs72.default.mkdtempSync(import_node_path72.default.join(import_node_fs72.default.realpathSync(import_node_os16.default.tmpdir()), "sentry-slice-"));
45101
45196
  try {
45102
45197
  process.stderr.write("peach: building the Sentry slice for a private distribution\u2026\n");
45103
- (0, import_node_child_process38.execFileSync)("bun", [script, "--output", staging, "--module-root", moduleRoot], {
45198
+ (0, import_node_child_process39.execFileSync)("bun", [script, "--output", staging, "--module-root", moduleRoot], {
45104
45199
  cwd: import_node_path72.default.resolve(sourceSwiftCheckout(), "../.."),
45105
45200
  stdio: ["ignore", 2, 2]
45106
45201
  });
@@ -45175,14 +45270,14 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
45175
45270
  }
45176
45271
  };
45177
45272
  }
45178
- var import_node_child_process38, import_node_crypto36, import_node_fs72, import_node_os15, import_node_path72, SENTRY_SWIFT_SLICE;
45273
+ var import_node_child_process39, import_node_crypto36, import_node_fs72, import_node_os16, import_node_path72, SENTRY_SWIFT_SLICE;
45179
45274
  var init_native_swift_slices = __esm({
45180
45275
  "src/native-swift-slices.ts"() {
45181
45276
  "use strict";
45182
- import_node_child_process38 = require("node:child_process");
45277
+ import_node_child_process39 = require("node:child_process");
45183
45278
  import_node_crypto36 = require("node:crypto");
45184
45279
  import_node_fs72 = __toESM(require("node:fs"), 1);
45185
- import_node_os15 = __toESM(require("node:os"), 1);
45280
+ import_node_os16 = __toESM(require("node:os"), 1);
45186
45281
  import_node_path72 = __toESM(require("node:path"), 1);
45187
45282
  init_native_prebuilt();
45188
45283
  init_swift_compile();
@@ -45422,7 +45517,7 @@ async function emitCxxStandin(input) {
45422
45517
  "-I",
45423
45518
  input.headers
45424
45519
  ];
45425
- const includes = (0, import_node_child_process39.spawnSync)(input.clang, [...flags, "-M", "-MT", "peach", probe], {
45520
+ const includes = (0, import_node_child_process40.spawnSync)(input.clang, [...flags, "-M", "-MT", "peach", probe], {
45426
45521
  encoding: "utf8",
45427
45522
  env: swiftEnvironment(),
45428
45523
  maxBuffer: 16 * 1024 * 1024
@@ -45442,7 +45537,7 @@ async function emitCxxStandin(input) {
45442
45537
  const output2 = import_node_fs75.default.openSync(ast, "w");
45443
45538
  let parsed;
45444
45539
  try {
45445
- parsed = (0, import_node_child_process39.spawnSync)(
45540
+ parsed = (0, import_node_child_process40.spawnSync)(
45446
45541
  input.clang,
45447
45542
  [...flags, "-fsyntax-only", "-Xclang", "-ast-dump=json", probe],
45448
45543
  { stdio: ["ignore", output2, "pipe"], encoding: "utf8", env: swiftEnvironment() }
@@ -45500,7 +45595,7 @@ async function emitCxxStandin(input) {
45500
45595
  sourceFile,
45501
45596
  [...prelude, ...live.map((item) => item.text)].join("\n") + "\n"
45502
45597
  );
45503
- const checked = (0, import_node_child_process39.spawnSync)(
45598
+ const checked = (0, import_node_child_process40.spawnSync)(
45504
45599
  input.clang,
45505
45600
  [
45506
45601
  ...flags,
@@ -45534,11 +45629,11 @@ async function emitCxxStandin(input) {
45534
45629
  excluded
45535
45630
  };
45536
45631
  }
45537
- var import_node_child_process39, import_node_fs75, import_node_path74, QUALIFIERS, UNNAMEABLE;
45632
+ var import_node_child_process40, import_node_fs75, import_node_path74, QUALIFIERS, UNNAMEABLE;
45538
45633
  var init_swift_cxx_standin = __esm({
45539
45634
  "src/swift-cxx-standin.ts"() {
45540
45635
  "use strict";
45541
- import_node_child_process39 = require("node:child_process");
45636
+ import_node_child_process40 = require("node:child_process");
45542
45637
  import_node_fs75 = __toESM(require("node:fs"), 1);
45543
45638
  import_node_path74 = __toESM(require("node:path"), 1);
45544
45639
  init_swift_cxx_declarations();
@@ -45790,7 +45885,7 @@ var init_swift_standin_builtin_behavior = __esm({
45790
45885
 
45791
45886
  // src/swift-standins.ts
45792
45887
  function exec(file, args, cwd) {
45793
- return (0, import_node_child_process40.execFileSync)(file, args, {
45888
+ return (0, import_node_child_process41.execFileSync)(file, args, {
45794
45889
  cwd,
45795
45890
  encoding: "utf8",
45796
45891
  env: swiftEnvironment(),
@@ -46476,7 +46571,7 @@ function placeholderStandin(surface, binary2, toolchain, work, behavior, sibling
46476
46571
  const out = import_node_path75.default.join(work, "graphs");
46477
46572
  import_node_fs76.default.mkdirSync(import_node_path75.default.join(work, "interface"), { recursive: true });
46478
46573
  import_node_fs76.default.mkdirSync(out, { recursive: true });
46479
- const extracted = (0, import_node_child_process40.spawnSync)(
46574
+ const extracted = (0, import_node_child_process41.spawnSync)(
46480
46575
  import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
46481
46576
  [
46482
46577
  "-emit-module",
@@ -46877,7 +46972,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
46877
46972
  );
46878
46973
  }
46879
46974
  import_node_fs76.default.writeFileSync(file, source + trailer);
46880
- const check2 = (0, import_node_child_process40.spawnSync)(
46975
+ const check2 = (0, import_node_child_process41.spawnSync)(
46881
46976
  import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
46882
46977
  // emitting the module runs the diagnostics a typecheck skips, such as
46883
46978
  // literal overflow, which the app's build of the stand-in reaches
@@ -47245,7 +47340,7 @@ async function cxxStandin(surface, binary2, toolchain, work) {
47245
47340
  roots.map((root) => `#include ${JSON.stringify(root)}
47246
47341
  `).join("")
47247
47342
  );
47248
- const language = (0, import_node_child_process40.spawnSync)(
47343
+ const language = (0, import_node_child_process41.spawnSync)(
47249
47344
  import_node_path75.default.join(toolchain.toolchainBin, "clang"),
47250
47345
  [
47251
47346
  "-target",
@@ -47466,7 +47561,7 @@ function buildRustCrate(manifest, library, searchRoot, moduleRoot, entry = rustC
47466
47561
  import_node_path75.default.relative(common2, crateWorkspace(manifest)),
47467
47562
  "Cargo.lock"
47468
47563
  );
47469
- const result = (0, import_node_child_process40.spawnSync)(
47564
+ const result = (0, import_node_child_process41.spawnSync)(
47470
47565
  process.execPath,
47471
47566
  [
47472
47567
  runner,
@@ -47614,7 +47709,7 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
47614
47709
  })
47615
47710
  );
47616
47711
  const build = await new Promise((resolve4) => {
47617
- const child = (0, import_node_child_process40.spawn)(
47712
+ const child = (0, import_node_child_process41.spawn)(
47618
47713
  "bun",
47619
47714
  [
47620
47715
  import_node_path75.default.join(repo, "scripts/build/swift-standins-submit.ts"),
@@ -48143,11 +48238,11 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
48143
48238
  import_node_fs76.default.rmSync(modules, { recursive: true, force: true });
48144
48239
  }
48145
48240
  }
48146
- var import_node_child_process40, import_node_crypto37, import_node_fs76, import_node_path75, TRIPLE, cacheDir4, key, digests, isBinaryLibraryFile, REACH_STAGED_FRAMEWORKS, OBJC_IMPORT, files, OBJC, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
48241
+ var import_node_child_process41, import_node_crypto37, import_node_fs76, import_node_path75, TRIPLE, cacheDir4, key, digests, isBinaryLibraryFile, REACH_STAGED_FRAMEWORKS, OBJC_IMPORT, files, OBJC, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
48147
48242
  var init_swift_standins = __esm({
48148
48243
  "src/swift-standins.ts"() {
48149
48244
  "use strict";
48150
- import_node_child_process40 = require("node:child_process");
48245
+ import_node_child_process41 = require("node:child_process");
48151
48246
  import_node_crypto37 = require("node:crypto");
48152
48247
  import_node_fs76 = __toESM(require("node:fs"), 1);
48153
48248
  import_node_path75 = __toESM(require("node:path"), 1);
@@ -48872,7 +48967,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
48872
48967
  provided: [...providers.keys()]
48873
48968
  };
48874
48969
  try {
48875
- const lock = (0, import_node_child_process41.spawnSync)(
48970
+ const lock = (0, import_node_child_process42.spawnSync)(
48876
48971
  "perl",
48877
48972
  ["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
48878
48973
  { stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
@@ -49043,7 +49138,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
49043
49138
  import_node_path76.default.join(work, `${target.moduleName}.o`)
49044
49139
  ]
49045
49140
  ];
49046
- const result = (0, import_node_child_process41.spawnSync)(frontend, args, {
49141
+ const result = (0, import_node_child_process42.spawnSync)(frontend, args, {
49047
49142
  cwd: work,
49048
49143
  encoding: "utf8",
49049
49144
  env: swiftEnvironment(),
@@ -49163,7 +49258,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
49163
49258
  const work = import_node_path76.default.join(parent, key2);
49164
49259
  const descriptor = import_node_fs77.default.openSync(`${work}.lock`, "a");
49165
49260
  try {
49166
- const locked = (0, import_node_child_process41.spawnSync)(
49261
+ const locked = (0, import_node_child_process42.spawnSync)(
49167
49262
  "perl",
49168
49263
  ["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
49169
49264
  { stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
@@ -49411,7 +49506,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
49411
49506
  ...dependencies ? ["-MD", "-MF", dependencies, "-H"] : []
49412
49507
  ];
49413
49508
  const result = await new Promise((resolve4) => {
49414
- const child = (0, import_node_child_process41.spawn)(
49509
+ const child = (0, import_node_child_process42.spawn)(
49415
49510
  import_node_path76.default.join(toolchain.toolchainBin, cxx ? "clang++" : "clang"),
49416
49511
  args,
49417
49512
  {
@@ -49492,11 +49587,11 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
49492
49587
  import_node_fs77.default.closeSync(descriptor);
49493
49588
  }
49494
49589
  }
49495
- var import_node_child_process41, import_node_crypto38, import_node_fs77, import_node_path76, SwiftObjCCompilationError, isDirectory2, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
49590
+ var import_node_child_process42, import_node_crypto38, import_node_fs77, import_node_path76, SwiftObjCCompilationError, isDirectory2, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
49496
49591
  var init_swift_objc_compile = __esm({
49497
49592
  "src/swift-objc-compile.ts"() {
49498
49593
  "use strict";
49499
- import_node_child_process41 = require("node:child_process");
49594
+ import_node_child_process42 = require("node:child_process");
49500
49595
  import_node_crypto38 = require("node:crypto");
49501
49596
  import_node_fs77 = __toESM(require("node:fs"), 1);
49502
49597
  import_node_path76 = __toESM(require("node:path"), 1);
@@ -49637,7 +49732,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
49637
49732
  failed = captured.failed;
49638
49733
  reached = captured.reached;
49639
49734
  } else {
49640
- const result2 = (0, import_node_child_process42.spawnSync)(clang, [...cleaned, "-M", "-MT", "peach", "-H"], {
49735
+ const result2 = (0, import_node_child_process43.spawnSync)(clang, [...cleaned, "-M", "-MT", "peach", "-H"], {
49641
49736
  cwd: work,
49642
49737
  encoding: "utf8",
49643
49738
  env: swiftEnvironment(),
@@ -49760,11 +49855,11 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
49760
49855
  );
49761
49856
  return result;
49762
49857
  }
49763
- var import_node_child_process42, import_node_crypto39, import_node_fs78, import_node_path77, cachedInputs;
49858
+ var import_node_child_process43, import_node_crypto39, import_node_fs78, import_node_path77, cachedInputs;
49764
49859
  var init_swift_cxx_reachable = __esm({
49765
49860
  "src/swift-cxx-reachable.ts"() {
49766
49861
  "use strict";
49767
- import_node_child_process42 = require("node:child_process");
49862
+ import_node_child_process43 = require("node:child_process");
49768
49863
  import_node_crypto39 = require("node:crypto");
49769
49864
  import_node_fs78 = __toESM(require("node:fs"), 1);
49770
49865
  import_node_path77 = __toESM(require("node:path"), 1);
@@ -49853,19 +49948,19 @@ function rasterizePdfFile(diskPath, pdfSha256) {
49853
49948
  } catch {
49854
49949
  }
49855
49950
  const out = import_node_path79.default.join(
49856
- import_node_fs80.default.mkdtempSync(import_node_path79.default.join(import_node_os16.default.tmpdir(), "swift-pdf-png-")),
49951
+ import_node_fs80.default.mkdtempSync(import_node_path79.default.join(import_node_os17.default.tmpdir(), "swift-pdf-png-")),
49857
49952
  "out.png"
49858
49953
  );
49859
49954
  try {
49860
49955
  if (process.platform === "darwin") {
49861
- (0, import_node_child_process43.execFileSync)(
49956
+ (0, import_node_child_process44.execFileSync)(
49862
49957
  compiledSwiftHelper(RASTER_SWIFT, "swift-pdf-raster"),
49863
49958
  [diskPath, "3", out],
49864
49959
  { stdio: "pipe" }
49865
49960
  );
49866
49961
  } else {
49867
49962
  const { executable, prefixArgs } = rnxSelfInvocation();
49868
- (0, import_node_child_process43.execFileSync)(
49963
+ (0, import_node_child_process44.execFileSync)(
49869
49964
  executable,
49870
49965
  [
49871
49966
  ...prefixArgs,
@@ -49900,11 +49995,11 @@ function rasterizeSvgFile(diskPath, svgSha256) {
49900
49995
  const cached2 = import_node_path79.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
49901
49996
  if (import_node_fs80.default.existsSync(cached2)) return { bytes: import_node_fs80.default.readFileSync(cached2) };
49902
49997
  const out = import_node_path79.default.join(
49903
- import_node_fs80.default.mkdtempSync(import_node_path79.default.join(import_node_os16.default.tmpdir(), "swift-svg-png-")),
49998
+ import_node_fs80.default.mkdtempSync(import_node_path79.default.join(import_node_os17.default.tmpdir(), "swift-svg-png-")),
49904
49999
  "out.png"
49905
50000
  );
49906
50001
  try {
49907
- (0, import_node_child_process43.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
50002
+ (0, import_node_child_process44.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
49908
50003
  const bytes = import_node_fs80.default.readFileSync(out);
49909
50004
  import_node_fs80.default.mkdirSync(cacheDir(), { recursive: true });
49910
50005
  import_node_fs80.default.copyFileSync(out, cached2);
@@ -49917,14 +50012,14 @@ function rasterizeSvgFile(diskPath, svgSha256) {
49917
50012
  import_node_fs80.default.rmSync(import_node_path79.default.dirname(out), { recursive: true, force: true });
49918
50013
  }
49919
50014
  }
49920
- var import_node_child_process43, import_node_crypto40, import_node_fs80, import_node_os16, import_node_path79, RASTER_SWIFT, RASTER_SVG_SWIFT;
50015
+ var import_node_child_process44, import_node_crypto40, import_node_fs80, import_node_os17, import_node_path79, RASTER_SWIFT, RASTER_SVG_SWIFT;
49921
50016
  var init_swift_pdf_raster = __esm({
49922
50017
  "src/swift-pdf-raster.ts"() {
49923
50018
  "use strict";
49924
- import_node_child_process43 = require("node:child_process");
50019
+ import_node_child_process44 = require("node:child_process");
49925
50020
  import_node_crypto40 = require("node:crypto");
49926
50021
  import_node_fs80 = __toESM(require("node:fs"), 1);
49927
- import_node_os16 = __toESM(require("node:os"), 1);
50022
+ import_node_os17 = __toESM(require("node:os"), 1);
49928
50023
  import_node_path79 = __toESM(require("node:path"), 1);
49929
50024
  init_internal_child_contract();
49930
50025
  init_self_invocation();
@@ -50141,7 +50236,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
50141
50236
  const known = emptyWasmAssembly.get(key2);
50142
50237
  if (known) return known;
50143
50238
  const result = new Promise(
50144
- (resolve4) => (0, import_node_child_process44.execFile)(
50239
+ (resolve4) => (0, import_node_child_process45.execFile)(
50145
50240
  clang,
50146
50241
  [
50147
50242
  "-target",
@@ -51385,7 +51480,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
51385
51480
  }
51386
51481
  }
51387
51482
  if (xcode?.app.postBundleScripts.length) {
51388
- const dir = import_node_fs81.default.mkdtempSync(import_node_path80.default.join(import_node_os17.default.tmpdir(), "peach-xcode-bundle-"));
51483
+ const dir = import_node_fs81.default.mkdtempSync(import_node_path80.default.join(import_node_os18.default.tmpdir(), "peach-xcode-bundle-"));
51389
51484
  const wrapper = import_node_path80.default.basename(xcode.app.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")) || `${xcode.app.name}.app`;
51390
51485
  const bundle = import_node_path80.default.join(dir, wrapper);
51391
51486
  try {
@@ -51436,7 +51531,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
51436
51531
  });
51437
51532
  try {
51438
51533
  const [shell, ...args] = phase.command;
51439
- (0, import_node_child_process44.execFileSync)(shell, args, {
51534
+ (0, import_node_child_process45.execFileSync)(shell, args, {
51440
51535
  cwd: phase.directory,
51441
51536
  env,
51442
51537
  stdio: ["ignore", "pipe", "pipe"],
@@ -52123,15 +52218,15 @@ function scopedArtifact(project2, entry, moduleRoot, signal) {
52123
52218
  project2.building = { stamp, promise: fresh, signal };
52124
52219
  return fresh;
52125
52220
  }
52126
- var import_node_async_hooks2, import_node_child_process44, import_node_crypto41, import_node_fs81, import_node_os17, import_node_path80, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
52221
+ var import_node_async_hooks2, import_node_child_process45, import_node_crypto41, import_node_fs81, import_node_os18, import_node_path80, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
52127
52222
  var init_swift_host = __esm({
52128
52223
  "src/swift-host.ts"() {
52129
52224
  "use strict";
52130
52225
  import_node_async_hooks2 = require("node:async_hooks");
52131
- import_node_child_process44 = require("node:child_process");
52226
+ import_node_child_process45 = require("node:child_process");
52132
52227
  import_node_crypto41 = require("node:crypto");
52133
52228
  import_node_fs81 = __toESM(require("node:fs"), 1);
52134
- import_node_os17 = __toESM(require("node:os"), 1);
52229
+ import_node_os18 = __toESM(require("node:os"), 1);
52135
52230
  import_node_path80 = __toESM(require("node:path"), 1);
52136
52231
  init_bundleAssets();
52137
52232
  init_stringCatalog();
@@ -54570,11 +54665,11 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
54570
54665
  files: hashTree(generatedRoot)
54571
54666
  };
54572
54667
  }
54573
- var import_node_child_process45, import_node_crypto43, import_node_fs85, import_node_module9, import_node_path84, import_node_util13, run6, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
54668
+ var import_node_child_process46, import_node_crypto43, import_node_fs85, import_node_module9, import_node_path84, import_node_util13, run6, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
54574
54669
  var init_turbo_codegen_intake = __esm({
54575
54670
  "src/turbo-codegen-intake.ts"() {
54576
54671
  "use strict";
54577
- import_node_child_process45 = require("node:child_process");
54672
+ import_node_child_process46 = require("node:child_process");
54578
54673
  import_node_crypto43 = require("node:crypto");
54579
54674
  import_node_fs85 = __toESM(require("node:fs"), 1);
54580
54675
  import_node_module9 = require("node:module");
@@ -54584,7 +54679,7 @@ var init_turbo_codegen_intake = __esm({
54584
54679
  init_is_record();
54585
54680
  init_nitro_source();
54586
54681
  init_podspec_sources();
54587
- run6 = (0, import_node_util13.promisify)(import_node_child_process45.execFile);
54682
+ run6 = (0, import_node_util13.promisify)(import_node_child_process46.execFile);
54588
54683
  RENDERER_PODS = /* @__PURE__ */ new Set([
54589
54684
  "React-Fabric",
54590
54685
  "React-FabricComponents",
@@ -55303,7 +55398,8 @@ async function collectTurboSources(options) {
55303
55398
  reactNative,
55304
55399
  sources: [],
55305
55400
  externalPodSources: [],
55306
- rendererSwiftTargets: []
55401
+ rendererSwiftTargets: [],
55402
+ fabricComponents: []
55307
55403
  };
55308
55404
  const sharedLibrary = [...options.installedPods?.values() ?? []].find(
55309
55405
  (pod) => pod.sharedLibrary
@@ -55750,6 +55846,9 @@ async function collectTurboSources(options) {
55750
55846
  };
55751
55847
  let objc = Boolean(options.reactNativeProvider);
55752
55848
  let fabric = Boolean(options.reactNativeProvider);
55849
+ const fabricPackages = /* @__PURE__ */ new Set();
55850
+ const fabricViews = [];
55851
+ let fabricTarget = null;
55753
55852
  let legacyBridge = false;
55754
55853
  let hermesHeaders = null;
55755
55854
  const objcClasses = /* @__PURE__ */ new Set();
@@ -55773,7 +55872,11 @@ async function collectTurboSources(options) {
55773
55872
  { tool: "cxx", flags: pod.installed.preprocessorFlags.cxx }
55774
55873
  ];
55775
55874
  const root = pod.root;
55776
- fabric ||= fabricComponents(provider.root);
55875
+ if (fabricComponents(provider.root)) {
55876
+ fabric = true;
55877
+ fabricPackages.add(provider.name);
55878
+ fabricTarget ??= { targetName, label, root: provider.root };
55879
+ }
55777
55880
  if (pod.installed?.library) {
55778
55881
  result.libraries ??= {};
55779
55882
  result.libraries[targetName] = import_node_fs86.default.readFileSync(pod.installed.library).toString("base64");
@@ -56046,6 +56149,17 @@ async function collectTurboSources(options) {
56046
56149
  const owned = /* @__PURE__ */ new Set();
56047
56150
  walkFiles2(generated, "", owned);
56048
56151
  const spec = codegenConfig.name;
56152
+ let definedComponentNames;
56153
+ const getDefinedComponentNames = () => {
56154
+ if (definedComponentNames) return definedComponentNames;
56155
+ definedComponentNames = /* @__PURE__ */ new Set();
56156
+ const pattern = /\b(?:const\s+char|char\s+const)\s+(\w+ComponentName)\s*\[\s*\]\s*=/g;
56157
+ for (const sourceFile of sources) {
56158
+ const text6 = readPackageFile(root, import_node_path85.default.join(root, sourceFile), Infinity).toString("utf8").replace(/\/\/[^\n]*/g, "");
56159
+ for (const match of text6.matchAll(pattern)) definedComponentNames.add(match[1]);
56160
+ }
56161
+ return definedComponentNames;
56162
+ };
56049
56163
  for (const file of [...owned].sort()) {
56050
56164
  const base = import_node_path85.default.posix.basename(file);
56051
56165
  const objcSpec = providerObjC && file.startsWith(`${spec}/`);
@@ -56067,7 +56181,32 @@ async function collectTurboSources(options) {
56067
56181
  relative: file
56068
56182
  }
56069
56183
  );
56070
- else original(targetName, "ReactCodegen", generated, file);
56184
+ else {
56185
+ if (component && base === "ShadowNodes.cpp") {
56186
+ const defined = getDefinedComponentNames();
56187
+ if (defined.size) {
56188
+ const source = readPackageFile(
56189
+ generated,
56190
+ import_node_path85.default.join(generated, file),
56191
+ Infinity
56192
+ ).toString("utf8");
56193
+ const filtered = source.replace(
56194
+ /^[ \t]*(?:extern[ \t]+)?(?:const[ \t]+char|char[ \t]+const)[ \t]+(\w+ComponentName)[ \t]*\[[ \t]*\][ \t]*=[^;]*;[ \t]*\r?\n?/gm,
56195
+ (line, name3) => defined.has(name3) ? "" : line
56196
+ );
56197
+ if (filtered !== source) {
56198
+ if (!/\b(?:const\s+char|char\s+const)\s+\w+ComponentName\s*\[\s*\]\s*=/.test(
56199
+ filtered
56200
+ ))
56201
+ continue;
56202
+ const key2 = original(targetName, "ReactCodegen", generated, file);
56203
+ result.files[key2] = filtered;
56204
+ continue;
56205
+ }
56206
+ }
56207
+ }
56208
+ original(targetName, "ReactCodegen", generated, file);
56209
+ }
56071
56210
  }
56072
56211
  }
56073
56212
  for (const file of sources) original(targetName, label, root, file);
@@ -56128,7 +56267,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
56128
56267
  add(`${core}/include/PeachJsiRuntime.hpp`, TURBO_RUNTIME_HEADER);
56129
56268
  add(
56130
56269
  `${core}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`,
56131
- '#pragma once\nextern "C" void peachTurboInitialize();\n'
56270
+ '#pragma once\nextern "C" void peachTurboInitialize();\n// the +1 Fabric component view a root of the process shows, in an app with one\nextern "C" void *peach_fabric_view_content(int tag);\n'
56132
56271
  );
56133
56272
  add(
56134
56273
  `${core}/${TURBO_CORE_PUBLIC_HEADERS}/module.modulemap`,
@@ -56254,6 +56393,21 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
56254
56393
  original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.h")
56255
56394
  );
56256
56395
  }
56396
+ const thirdParty = import_node_path85.default.join(generated, "RCTThirdPartyComponentsProvider.mm");
56397
+ if (fabricPackages.size > 0 && import_node_fs86.default.existsSync(thirdParty)) {
56398
+ for (const [, name3, className2, owner] of import_node_fs86.default.readFileSync(thirdParty, "utf8").matchAll(/@"([^"]+)": NSClassFromString\(@"([^"]+)"\), \/\/ (\S+)/g))
56399
+ if (fabricPackages.has(owner))
56400
+ fabricViews.push({ name: name3, className: className2 });
56401
+ }
56402
+ if (fabricViews.length > 0 && fabricTarget) {
56403
+ result.fabricComponents = fabricViews.map(({ name: name3 }) => name3);
56404
+ const unit2 = `${targetPath(fabricTarget.targetName)}/PeachFabricHost.mm`;
56405
+ add(unit2, fabricHostSource(fabricViews));
56406
+ scanText(
56407
+ { key: unit2, ...fabricTarget, relative: "PeachFabricHost.mm" },
56408
+ result.files[unit2]
56409
+ );
56410
+ }
56257
56411
  }
56258
56412
  if (fabric || legacyBridge) {
56259
56413
  if (legacyBridge) {
@@ -56597,38 +56751,6 @@ void dispatchToJSThread(dispatch_block_t block) {
56597
56751
  }
56598
56752
  } // namespace
56599
56753
 
56600
- static CGFloat peachScreenBrightness = 0.5;
56601
-
56602
- @implementation UIScreen (PeachTurboRuntime)
56603
- + (UIScreen *)mainScreen {
56604
- static UIScreen *screen = nil;
56605
- if (!screen) screen = [[UIScreen alloc] init];
56606
- return screen;
56607
- }
56608
- - (CGFloat)brightness {
56609
- return peachScreenBrightness;
56610
- }
56611
- - (void)setBrightness:(CGFloat)value {
56612
- peachScreenBrightness = value;
56613
- }
56614
- @end
56615
-
56616
- static BOOL peachIdleTimerDisabled = NO;
56617
-
56618
- @implementation UIApplication (PeachTurboRuntime)
56619
- + (UIApplication *)sharedApplication {
56620
- static UIApplication *app = nil;
56621
- if (!app) app = [[UIApplication alloc] init];
56622
- return app;
56623
- }
56624
- - (BOOL)isIdleTimerDisabled {
56625
- return peachIdleTimerDisabled;
56626
- }
56627
- - (void)setIdleTimerDisabled:(BOOL)disabled {
56628
- peachIdleTimerDisabled = disabled;
56629
- }
56630
- @end
56631
-
56632
56754
  // React Native's own modules register before any provider's, and RCTBridge.mm
56633
56755
  // creates the registry's queue in the first RCTRegisterModule. the engine
56634
56756
  // supplies those modules, so a process whose providers register none (codegen
@@ -56745,6 +56867,12 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
56745
56867
 
56746
56868
  @end
56747
56869
 
56870
+ // an app's Fabric component views, which its own Fabric host defines
56871
+ extern "C" void peachInstallFabricViews(facebook::jsi::Runtime &runtime) __attribute__((weak));
56872
+
56873
+ // UIKitCore: the key window and root view controller an app delegate makes at launch
56874
+ extern "C" void PeachLaunchReactNativeWindow(void);
56875
+
56748
56876
  extern "C" void peachTurboInitialize() {
56749
56877
  objc_create_block_classes_as_subclasses_of([NSObject class]);
56750
56878
  if (Class blockClass = NSClassFromString(@"_NSBlock")) {
@@ -56758,6 +56886,7 @@ extern "C" void peachTurboInitialize() {
56758
56886
  static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
56759
56887
  *reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
56760
56888
  }
56889
+ PeachLaunchReactNativeWindow();
56761
56890
  auto& runtime = peach::jsi_runtime::create(
56762
56891
  [] { invoker->drain(); },
56763
56892
  [] {
@@ -56818,6 +56947,7 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
56818
56947
  }];
56819
56948
  [decorator.moduleRegistry setTurboModuleRegistry:manager];
56820
56949
  [manager installJSBindings:runtime];
56950
+ if (peachInstallFabricViews) peachInstallFabricViews(runtime);
56821
56951
  }
56822
56952
 
56823
56953
  // the screenshot the device took, as UIKit posts it to every observer in the
@@ -56863,11 +56993,133 @@ ${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProvi
56863
56993
  }
56864
56994
  `;
56865
56995
  }
56866
- var import_node_child_process46, import_node_crypto44, import_node_fs86, import_node_path85, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER;
56996
+ function fabricHostSource(views) {
56997
+ const entries = views.map(
56998
+ ({ name: name3, className: className2 }) => `@${JSON.stringify(name3)}: NSClassFromString(@${JSON.stringify(className2)})`
56999
+ ).join(", ");
57000
+ return `${FABRIC_HOST_INCLUDES}
57001
+ @interface PeachFabricComponents : NSObject <RCTComponentViewFactoryComponentProvider>
57002
+ @end
57003
+
57004
+ @implementation PeachFabricComponents
57005
+ - (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
57006
+ {
57007
+ return @{${entries}};
57008
+ }
57009
+ @end
57010
+
57011
+ namespace {
57012
+ struct PeachFabricView {
57013
+ react::ComponentHandle handle;
57014
+ const react::ComponentDescriptor *descriptor;
57015
+ react::Props::Shared props;
57016
+ react::LayoutMetrics layoutMetrics;
57017
+ };
57018
+ PeachFabricComponents *fabricComponents;
57019
+ RCTComponentViewRegistry *fabricRegistry;
57020
+ std::shared_ptr<const react::ContextContainer> fabricContext;
57021
+ react::ComponentDescriptorRegistry::Shared fabricDescriptors;
57022
+ std::unordered_map<int, PeachFabricView> fabricViews;
57023
+ int nextFabricView = 1;
57024
+ std::string fabricNames = ${JSON.stringify(views.map(({ name: name3 }) => name3).join("\n"))};
57025
+
57026
+ PeachFabricView &fabricView(int tag) {
57027
+ auto found = fabricViews.find(tag);
57028
+ if (found == fabricViews.end()) {
57029
+ std::fprintf(stderr, "no mounted Fabric view %d\\n", tag);
57030
+ std::abort();
57031
+ }
57032
+ return found->second;
57033
+ }
57034
+
57035
+ react::Props::Shared fabricCloneProps(jsi::Runtime &rt, const PeachFabricView &view, const jsi::Value &props) {
57036
+ react::PropsParserContext context{-1, *fabricContext};
57037
+ return view.descriptor->cloneProps(context, view.props, react::RawProps(rt, props));
57038
+ }
57039
+
57040
+ } // namespace
57041
+
57042
+ extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
57043
+ fabricComponents = [PeachFabricComponents new];
57044
+ RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
57045
+ factory.thirdPartyFabricComponentsProvider = fabricComponents;
57046
+ fabricRegistry = [RCTComponentViewRegistry new];
57047
+ fabricContext = std::make_shared<const react::ContextContainer>();
57048
+ react::ComponentDescriptorParameters parameters{{}, fabricContext, nullptr};
57049
+ fabricDescriptors = [factory createComponentDescriptorRegistryWithParameters:parameters];
57050
+ auto views = jsi::Object(rt);
57051
+ auto method = [&](const char *name, unsigned count, jsi::HostFunctionType body) {
57052
+ views.setProperty(rt, name, jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name), count, std::move(body)));
57053
+ };
57054
+ // Create then Insert: the first props, no event emitter or state, and the
57055
+ // layout the view has before the engine measures it
57056
+ method("create", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57057
+ const auto &descriptor = fabricDescriptors->at(args[0].asString(rt).utf8(rt));
57058
+ int tag = nextFabricView++;
57059
+ auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, nullptr, {}}).first->second;
57060
+ view.props = fabricCloneProps(rt, view, args[1]);
57061
+ UIView<RCTComponentViewProtocol> *componentView =
57062
+ [fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
57063
+ [componentView updateProps:view.props oldProps:nullptr];
57064
+ [componentView updateEventEmitter:nullptr];
57065
+ [componentView updateState:nullptr oldState:nullptr];
57066
+ [componentView updateLayoutMetrics:view.layoutMetrics oldLayoutMetrics:react::EmptyLayoutMetrics];
57067
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskAll];
57068
+ return jsi::Value(tag);
57069
+ });
57070
+ // Update with the props React changed since the last commit
57071
+ method("update", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57072
+ int tag = static_cast<int>(args[0].asNumber());
57073
+ auto &view = fabricView(tag);
57074
+ auto oldProps = view.props;
57075
+ view.props = fabricCloneProps(rt, view, args[1]);
57076
+ UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
57077
+ [componentView updateProps:view.props oldProps:oldProps];
57078
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
57079
+ return jsi::Value::undefined();
57080
+ });
57081
+ // Update with the size and scale the engine laid the view out at
57082
+ method("layout", 4, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57083
+ int tag = static_cast<int>(args[0].asNumber());
57084
+ auto &view = fabricView(tag);
57085
+ auto metrics = view.layoutMetrics;
57086
+ metrics.frame = react::Rect{{0, 0}, {static_cast<react::Float>(args[1].asNumber()), static_cast<react::Float>(args[2].asNumber())}};
57087
+ metrics.pointScaleFactor = static_cast<react::Float>(args[3].asNumber());
57088
+ if (metrics == view.layoutMetrics) return jsi::Value::undefined();
57089
+ UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
57090
+ [componentView updateLayoutMetrics:metrics oldLayoutMetrics:view.layoutMetrics];
57091
+ view.layoutMetrics = metrics;
57092
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
57093
+ return jsi::Value::undefined();
57094
+ });
57095
+ // Remove then Delete: the registry recycles the view
57096
+ method("drop", 1, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57097
+ int tag = static_cast<int>(args[0].asNumber());
57098
+ auto &view = fabricView(tag);
57099
+ RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
57100
+ [descriptor.view removeFromSuperview];
57101
+ [fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
57102
+ fabricViews.erase(tag);
57103
+ return jsi::Value::undefined();
57104
+ });
57105
+ rt.global().setProperty(rt, "peachFabricViews", std::move(views));
57106
+ }
57107
+
57108
+ extern "C" void *peach_fabric_view_content(int tag) {
57109
+ return (__bridge_retained void *)[fabricRegistry componentViewDescriptorWithTag:tag].view;
57110
+ }
57111
+
57112
+ // the component names the host registers as views, newline separated
57113
+ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const char *peachFabricComponentNames() {
57114
+ return fabricNames.c_str();
57115
+ }
57116
+ `;
57117
+ }
57118
+ var import_node_child_process47, import_node_crypto44, import_node_fs86, import_node_path85, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES;
56867
57119
  var init_turbo_source = __esm({
56868
57120
  "src/turbo-source.ts"() {
56869
57121
  "use strict";
56870
- import_node_child_process46 = require("node:child_process");
57122
+ import_node_child_process47 = require("node:child_process");
56871
57123
  import_node_crypto44 = require("node:crypto");
56872
57124
  import_node_fs86 = __toESM(require("node:fs"), 1);
56873
57125
  import_node_path85 = __toESM(require("node:path"), 1);
@@ -56884,7 +57136,7 @@ var init_turbo_source = __esm({
56884
57136
  init_swift_submit();
56885
57137
  init_turbo_codegen_intake();
56886
57138
  init_xcode_project();
56887
- execFileAsync3 = (0, import_node_util14.promisify)(import_node_child_process46.execFile);
57139
+ execFileAsync3 = (0, import_node_util14.promisify)(import_node_child_process47.execFile);
56888
57140
  TURBO_CORE_TARGET = "TurboCore";
56889
57141
  TURBO_FMT_TARGET = "TurboFmt";
56890
57142
  TURBO_ENTRY_HEADER = "PeachTurboEntry.hpp";
@@ -57026,6 +57278,22 @@ class JsCallInvoker final : public react::CallInvoker {
57026
57278
  std::deque<react::CallFunc> pending;
57027
57279
  };
57028
57280
 
57281
+ `;
57282
+ FABRIC_HOST_INCLUDES = `#import <Foundation/Foundation.h>
57283
+ #import <React/RCTComponentViewFactory.h>
57284
+ #import <React/RCTComponentViewProtocol.h>
57285
+ #import <React/RCTComponentViewRegistry.h>
57286
+ #include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
57287
+ #include <react/renderer/core/LayoutMetrics.h>
57288
+ #include <react/renderer/core/PropsParserContext.h>
57289
+ #include <react/renderer/core/RawProps.h>
57290
+ #include <react/utils/ContextContainer.h>
57291
+ #include <cstdio>
57292
+ #include <cstdlib>
57293
+ #include <unordered_map>
57294
+ #include <jsi/jsi.h>
57295
+
57296
+ using namespace facebook;
57029
57297
  `;
57030
57298
  }
57031
57299
  });
@@ -57105,7 +57373,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
57105
57373
  import_node_fs87.default.mkdirSync(members2, { recursive: true });
57106
57374
  const stripped2 = objects.map((file, index) => {
57107
57375
  const output2 = import_node_path86.default.join(members2, `${index}-${import_node_path86.default.basename(file)}`);
57108
- (0, import_node_child_process47.execFileSync)(import_node_path86.default.join(module2.toolchainBin, "llvm-objcopy"), [
57376
+ (0, import_node_child_process48.execFileSync)(import_node_path86.default.join(module2.toolchainBin, "llvm-objcopy"), [
57109
57377
  "--strip-debug",
57110
57378
  file,
57111
57379
  output2
@@ -57114,7 +57382,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
57114
57382
  });
57115
57383
  const archive = import_node_path86.default.join(work, `lib${target.name}.a`);
57116
57384
  import_node_fs87.default.rmSync(archive, { force: true });
57117
- (0, import_node_child_process47.execFileSync)(import_node_path86.default.join(module2.toolchainBin, "llvm-ar"), [
57385
+ (0, import_node_child_process48.execFileSync)(import_node_path86.default.join(module2.toolchainBin, "llvm-ar"), [
57118
57386
  "rcsD",
57119
57387
  archive,
57120
57388
  ...stripped2
@@ -57167,11 +57435,11 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
57167
57435
  return directory2;
57168
57436
  });
57169
57437
  }
57170
- var import_node_child_process47, import_node_fs87, import_node_path86;
57438
+ var import_node_child_process48, import_node_fs87, import_node_path86;
57171
57439
  var init_react_native_core_build = __esm({
57172
57440
  "src/react-native-core-build.ts"() {
57173
57441
  "use strict";
57174
- import_node_child_process47 = require("node:child_process");
57442
+ import_node_child_process48 = require("node:child_process");
57175
57443
  import_node_fs87 = __toESM(require("node:fs"), 1);
57176
57444
  import_node_path86 = __toESM(require("node:path"), 1);
57177
57445
  init_home_paths();
@@ -57355,7 +57623,7 @@ var init_react_native_core = __esm({
57355
57623
  init_swift_distribution();
57356
57624
  init_swift_package();
57357
57625
  init_swiftContract();
57358
- recipe = true ? "f30840269a1f4be9434de5fb0adcd21490990ef2b55e4f3e6c159fcb6752a29d" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57626
+ recipe = true ? "96416de7238919b274266f095ef4213211a2a26c133d0df7ab5e0459ded52ef1" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57359
57627
  strings3 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
57360
57628
  building = /* @__PURE__ */ new Map();
57361
57629
  }
@@ -57412,7 +57680,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
57412
57680
  dependencyTargets = dependencyTargets.filter(
57413
57681
  (_, index) => !providerNames.has(parsedTargets[index].name)
57414
57682
  );
57415
- const swift = Object.keys(files2).some((file) => file.endsWith(".swift"));
57683
+ const swift = collection.coreMode === "turbo" || Object.keys(files2).some((file) => file.endsWith(".swift"));
57416
57684
  const entry = `Sources/PeachTurboApp/main.${swift ? "swift" : "cpp"}`;
57417
57685
  const targetNames = targets.map(({ name: name3 }) => name3);
57418
57686
  const loadTargetNames = new Set(collection.loads.map(({ target }) => target));
@@ -57421,10 +57689,56 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
57421
57689
  (file) => file.startsWith(`${target.path}/`) && file.endsWith(".swift")
57422
57690
  )
57423
57691
  ).map(({ name: name3 }) => name3);
57424
- files2[entry] = swift ? "@_spi(Peach) import PeachFoundation\n" + swiftImportedTargetNames.map((target) => `import ${target}
57425
- `).join("") + `PeachHostDriver.installExecutor()
57426
- ${collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()
57427
- `).join("")}${runtime ? "peachTurboInitialize()\n" : ""}` : [
57692
+ const initialize = [
57693
+ "_PeachReactNativeWindow.launch()",
57694
+ ...collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()`),
57695
+ ...runtime ? ["peachTurboInitialize()"] : []
57696
+ ];
57697
+ const fabric = collection.fabricComponents.length > 0;
57698
+ files2[entry] = swift ? [
57699
+ "import SwiftUI",
57700
+ "import UIKit",
57701
+ "import PeachJSON",
57702
+ ...swiftImportedTargetNames.map((target) => `import ${target}`),
57703
+ "",
57704
+ "@main struct PeachTurboApp: PeachPackage {",
57705
+ ` init() { ${initialize.join("; ")} }`,
57706
+ ...fabric ? [
57707
+ " func view(props: JSON) -> PeachTurboRoot { PeachTurboRoot(props: props) }",
57708
+ "}",
57709
+ "",
57710
+ "struct PeachTurboRoot: View {",
57711
+ " let fabric: Int32?",
57712
+ "",
57713
+ " init(props: JSON) {",
57714
+ ' guard case .object(let fields) = props, let field = fields.first(where: { $0.0 == "fabric" }), case .number(let tag) = field.1 else {',
57715
+ " fabric = nil",
57716
+ " return",
57717
+ " }",
57718
+ " fabric = Int32(tag)",
57719
+ " }",
57720
+ "",
57721
+ " var body: some View {",
57722
+ " if let fabric { PeachFabricComponent(tag: fabric) } else { _PeachReactNativeWindow() }",
57723
+ " }",
57724
+ "}",
57725
+ "",
57726
+ "struct PeachFabricComponent: UIViewRepresentable {",
57727
+ " let tag: Int32",
57728
+ "",
57729
+ " func makeUIView(context: Context) -> UIView {",
57730
+ ' guard let view = peach_fabric_view_content(tag) else { fatalError("Fabric view \\(tag) is not mounted") }',
57731
+ " return Unmanaged<UIView>.fromOpaque(view).takeRetainedValue()",
57732
+ " }",
57733
+ "",
57734
+ " func updateUIView(_ view: UIView, context: Context) {}",
57735
+ "}"
57736
+ ] : [
57737
+ " func view(props: JSON) -> _PeachReactNativeWindow { _PeachReactNativeWindow() }",
57738
+ "}"
57739
+ ],
57740
+ ""
57741
+ ].join("\n") : [
57428
57742
  'extern "C" void peachTurboInitialize();',
57429
57743
  ...collection.loads.map(({ symbol: symbol2 }) => `extern "C" void ${symbol2}();`),
57430
57744
  "int main(int argc, char **argv) {",
@@ -57499,7 +57813,7 @@ ${collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()
57499
57813
  async function prepareTurboCompileInput(options) {
57500
57814
  await prepareTurboSourceDependencies(options.reactNativeRoot);
57501
57815
  const key2 = (0, import_node_crypto46.createHash)("sha256").update(options.providers.map(({ root }) => import_node_fs89.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs89.default.realpathSync(options.moduleRoot)).digest("hex");
57502
- const scratch2 = import_node_path88.default.join(import_node_os18.default.tmpdir(), "peach-turbo-swift", key2);
57816
+ const scratch2 = import_node_path88.default.join(import_node_os19.default.tmpdir(), "peach-turbo-swift", key2);
57503
57817
  import_node_fs89.default.mkdirSync(scratch2, { recursive: true });
57504
57818
  const codegenDir = import_node_fs89.default.mkdtempSync(import_node_path88.default.join(scratch2, "codegen-"));
57505
57819
  const collection = await collectTurboSources({
@@ -57713,14 +58027,14 @@ async function compileTurboModule(options) {
57713
58027
  collection
57714
58028
  };
57715
58029
  }
57716
- var import_node_crypto46, import_node_fs89, import_node_module11, import_node_os18, import_node_path88;
58030
+ var import_node_crypto46, import_node_fs89, import_node_module11, import_node_os19, import_node_path88;
57717
58031
  var init_turbo_compile = __esm({
57718
58032
  "src/turbo-compile.ts"() {
57719
58033
  "use strict";
57720
58034
  import_node_crypto46 = require("node:crypto");
57721
58035
  import_node_fs89 = __toESM(require("node:fs"), 1);
57722
58036
  import_node_module11 = require("node:module");
57723
- import_node_os18 = __toESM(require("node:os"), 1);
58037
+ import_node_os19 = __toESM(require("node:os"), 1);
57724
58038
  import_node_path88 = __toESM(require("node:path"), 1);
57725
58039
  init_native_app_identity_project();
57726
58040
  init_nitro_adapter();
@@ -58082,7 +58396,7 @@ async function prepareNitroCompileInput(options) {
58082
58396
  projectRoot: options.projectRoot,
58083
58397
  providers: reactProviders,
58084
58398
  reactNativeRoot: collection.reactNative.root,
58085
- codegenDir: import_node_fs90.default.mkdtempSync(import_node_path89.default.join(import_node_os19.default.tmpdir(), "peach-nitro-react-")),
58399
+ codegenDir: import_node_fs90.default.mkdtempSync(import_node_path89.default.join(import_node_os20.default.tmpdir(), "peach-nitro-react-")),
58086
58400
  configuration: options.configuration,
58087
58401
  installedPods: nativeLibraries
58088
58402
  });
@@ -58137,7 +58451,7 @@ async function prepareNitroCompileInput(options) {
58137
58451
  const key2 = (0, import_node_crypto47.createHash)("sha256").update(
58138
58452
  collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
58139
58453
  ).update("\0").update(import_node_fs90.default.realpathSync(options.moduleRoot)).update("\0").update(options.configuration).digest("hex");
58140
- const packagePath = import_node_path89.default.join(import_node_os19.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
58454
+ const packagePath = import_node_path89.default.join(import_node_os20.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
58141
58455
  const sharedLibrary = [...nativeLibraries.values()].find(
58142
58456
  (pod) => pod.sharedLibrary
58143
58457
  )?.sharedLibrary;
@@ -58190,13 +58504,13 @@ function nitrogenGeneratedSources(podDirectory) {
58190
58504
  ...sources(import_node_path89.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
58191
58505
  ];
58192
58506
  }
58193
- var import_node_crypto47, import_node_fs90, import_node_os19, import_node_path89, BUNDLED_CXX_NAMESPACES;
58507
+ var import_node_crypto47, import_node_fs90, import_node_os20, import_node_path89, BUNDLED_CXX_NAMESPACES;
58194
58508
  var init_nitro_compile = __esm({
58195
58509
  "src/nitro-compile.ts"() {
58196
58510
  "use strict";
58197
58511
  import_node_crypto47 = require("node:crypto");
58198
58512
  import_node_fs90 = __toESM(require("node:fs"), 1);
58199
- import_node_os19 = __toESM(require("node:os"), 1);
58513
+ import_node_os20 = __toESM(require("node:os"), 1);
58200
58514
  import_node_path89 = __toESM(require("node:path"), 1);
58201
58515
  init_installed_native_libraries();
58202
58516
  init_native_app_identity_project();
@@ -58398,7 +58712,7 @@ var init_nitro_superset = __esm({
58398
58712
  init_nitroContract();
58399
58713
  init_swift_standin_digest();
58400
58714
  NITRO_SUPERSET_ENTRY_NAME = "superset";
58401
- NITRO_COMPILER_DIGEST = true ? "9393367a8c7442a5ce3f6e81f9ff408f0afdbf5eeadaeed359561a348a6b1818" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58715
+ NITRO_COMPILER_DIGEST = true ? "f44c818b566c9e2f13cc675454c9e5c38d346e0fb6fc47d33d179495a14f8580" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58402
58716
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
58403
58717
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
58404
58718
  published = /* @__PURE__ */ new Map();
@@ -59190,7 +59504,7 @@ async function expoDiscoveryKey(options) {
59190
59504
  const key2 = (0, import_node_crypto50.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable2(JSON.parse(options.searchText))}\0`).update(`${stable2(options.configuration)}\0`).update(stable2(JSON.parse(options.resolveText))).digest("hex");
59191
59505
  return { key: key2, root };
59192
59506
  }
59193
- function sharedDir() {
59507
+ function expoDiscoveryCacheDir() {
59194
59508
  return import_node_path94.default.join(sharedCacheDir(import_node_path94.default.join(ambientHomeDir(), "cache")), "expo-discovery");
59195
59509
  }
59196
59510
  function vanished2(error) {
@@ -59227,7 +59541,7 @@ function isStoredUnit(value) {
59227
59541
  }
59228
59542
  function readExpoDiscovery(key2) {
59229
59543
  let parsed;
59230
- const record3 = import_node_path94.default.join(sharedDir(), `${key2}.json`);
59544
+ const record3 = import_node_path94.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
59231
59545
  try {
59232
59546
  parsed = JSON.parse(import_node_fs96.default.readFileSync(record3, "utf8"));
59233
59547
  } catch {
@@ -59256,7 +59570,7 @@ function readExpoDiscovery(key2) {
59256
59570
  const read = (digest4) => {
59257
59571
  const known = blobs.get(digest4);
59258
59572
  if (known !== void 0) return known;
59259
- const blob = import_node_path94.default.join(sharedDir(), "blobs", digest4);
59573
+ const blob = import_node_path94.default.join(expoDiscoveryCacheDir(), "blobs", digest4);
59260
59574
  const body = import_node_fs96.default.readFileSync(blob, "utf8");
59261
59575
  if ((0, import_node_crypto50.createHash)("sha256").update(body).digest("hex") !== digest4)
59262
59576
  throw new Error("discovery blob differs from its digest");
@@ -59300,7 +59614,7 @@ function readExpoDiscovery(key2) {
59300
59614
  }
59301
59615
  }
59302
59616
  function fileHashesPath() {
59303
- return import_node_path94.default.join(sharedDir(), "framework-file-hashes.json");
59617
+ return import_node_path94.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
59304
59618
  }
59305
59619
  function stampedFileHash(file) {
59306
59620
  if (!fileHashesLoaded) {
@@ -59478,7 +59792,7 @@ function rewritePreparedPaths(options) {
59478
59792
  frameworkDependencies[sourceDir] = sourceDigest;
59479
59793
  let portableDir = sourceDir;
59480
59794
  if (preparedDigest !== sourceDigest) {
59481
- const parent = import_node_path94.default.join(sharedDir(), "frameworks", preparedDigest);
59795
+ const parent = import_node_path94.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
59482
59796
  portableDir = import_node_path94.default.join(parent, import_node_path94.default.basename(dir));
59483
59797
  if (!import_node_fs96.default.existsSync(portableDir)) {
59484
59798
  import_node_fs96.default.mkdirSync(parent, { recursive: true });
@@ -59509,7 +59823,7 @@ function rewritePreparedPaths(options) {
59509
59823
  }
59510
59824
  function writeExpoDiscovery(options) {
59511
59825
  try {
59512
- const dir = sharedDir();
59826
+ const dir = expoDiscoveryCacheDir();
59513
59827
  import_node_fs96.default.mkdirSync(dir, { recursive: true });
59514
59828
  const tmp = import_node_path94.default.join(dir, `.${options.key}.${process.pid}.${(0, import_node_crypto50.randomUUID)()}.tmp`);
59515
59829
  if (options.units === null) {
@@ -59657,7 +59971,7 @@ var init_expo_native_compiler_digest = __esm({
59657
59971
 
59658
59972
  // src/expo-native-prebuilt.ts
59659
59973
  function expoNativeCompilerDigestValue() {
59660
- return true ? "14d88f98100ab2aa1697716b744e5a82c52ac4b234218a17662b547201295088" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59974
+ return true ? "2a7438510b7fddb608c748003fbaa32b5c765b3782603cb2e309e2729ddbb4aa" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59661
59975
  }
59662
59976
  function readSources(value) {
59663
59977
  const sources = isRecord(value) ? value.sources : null;
@@ -60582,7 +60896,9 @@ function installSwiftInputTrace() {
60582
60896
  import_node_path97.default.join(swiftCacheDir(), "swift-builds"),
60583
60897
  import_node_path97.default.join(swiftCacheDir(), "swift-sdk-views"),
60584
60898
  swiftRootLocksDir(),
60585
- import_node_path97.default.join(cacheDir(), "swift-tmp")
60899
+ import_node_path97.default.join(cacheDir(), "swift-tmp"),
60900
+ // content-addressed records whose reads renew their timestamps for expiry.
60901
+ expoDiscoveryCacheDir()
60586
60902
  ].filter((prefix, index, all) => all.indexOf(prefix) === index);
60587
60903
  ignoredRoots = prefixes.flatMap((root) => {
60588
60904
  try {
@@ -60688,11 +61004,13 @@ async function witnessMatches(witness) {
60688
61004
  return true;
60689
61005
  }
60690
61006
  async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget, moduleRoot) {
60691
- const [config, expoConfig] = await Promise.all([
61007
+ const preparesWorkspace = prepareNative && !installedWorkspace && nativeWorkspaceAvailable();
61008
+ const [config, expoConfig, workspace] = await Promise.all([
60692
61009
  loadRNXAppConfig(resolveAppProject(root)),
60693
- readExpoConfigAsync(root)
61010
+ readExpoConfigAsync(root),
61011
+ preparesWorkspace ? traceStore.exit(() => hashExpoWorkspace(root)) : null
60694
61012
  ]);
60695
- return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
61013
+ return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}\0${workspace?.hash ?? ""}`;
60696
61014
  }
60697
61015
  function cloneNativeTarget(target) {
60698
61016
  return {
@@ -61975,7 +62293,11 @@ function expoEntry(units, oneSDK = false) {
61975
62293
  (unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
61976
62294
  )
61977
62295
  );
61978
- const bridgeModules = units.flatMap((unit2) => unit2.bridgeModules);
62296
+ const bridgeModules = units.flatMap(
62297
+ (unit2) => unit2.bridgeModules.map(
62298
+ (registration) => registration === `${unit2.namespace}.__peachReactModule_${unit2.namespace}()` ? registration.slice(unit2.namespace.length + 1) : registration
62299
+ )
62300
+ );
61979
62301
  const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
61980
62302
  const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
61981
62303
  const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
@@ -62040,7 +62362,7 @@ function expoUnitAppPaths(unit2) {
62040
62362
  });
62041
62363
  }
62042
62364
  function expoSwiftPackage(appKey, name3) {
62043
- return import_node_path97.default.join(import_node_os20.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
62365
+ return import_node_path97.default.join(import_node_os21.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
62044
62366
  }
62045
62367
  function failureRecordPath(packagePath) {
62046
62368
  const app = import_node_path97.default.dirname(import_node_path97.default.dirname(packagePath));
@@ -62697,16 +63019,16 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
62697
63019
  throw failure2;
62698
63020
  }
62699
63021
  }
62700
- var import_node_async_hooks3, import_node_child_process48, import_node_crypto52, import_node_fs99, import_node_module15, import_node_os20, import_node_path97, import_node_url6, import_node_util17, run7, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
63022
+ var import_node_async_hooks3, import_node_child_process49, import_node_crypto52, import_node_fs99, import_node_module15, import_node_os21, import_node_path97, import_node_url6, import_node_util17, run7, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
62701
63023
  var init_expo_swift_host = __esm({
62702
63024
  "src/expo-swift-host.ts"() {
62703
63025
  "use strict";
62704
63026
  import_node_async_hooks3 = require("node:async_hooks");
62705
- import_node_child_process48 = require("node:child_process");
63027
+ import_node_child_process49 = require("node:child_process");
62706
63028
  import_node_crypto52 = require("node:crypto");
62707
63029
  import_node_fs99 = __toESM(require("node:fs"), 1);
62708
63030
  import_node_module15 = require("node:module");
62709
- import_node_os20 = __toESM(require("node:os"), 1);
63031
+ import_node_os21 = __toESM(require("node:os"), 1);
62710
63032
  import_node_path97 = __toESM(require("node:path"), 1);
62711
63033
  import_node_url6 = require("node:url");
62712
63034
  import_node_util17 = require("node:util");
@@ -62740,7 +63062,7 @@ var init_expo_swift_host = __esm({
62740
63062
  init_swift_submit();
62741
63063
  init_swift_toolchain();
62742
63064
  init_turbo_source();
62743
- run7 = (0, import_node_util17.promisify)(import_node_child_process48.execFile);
63065
+ run7 = (0, import_node_util17.promisify)(import_node_child_process49.execFile);
62744
63066
  scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
62745
63067
  EXPO_SWIFT_ENTRY = "Sources/PeachExpoApp/PeachExpoEntry.swift";
62746
63068
  WITNESS_BATCH = 200;
@@ -62996,11 +63318,11 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
62996
63318
  }
62997
63319
  return linked;
62998
63320
  }
62999
- var import_node_child_process49, import_node_fs100, import_node_module17, import_node_path99, import_node_util18, run8, resolving;
63321
+ var import_node_child_process50, import_node_fs100, import_node_module17, import_node_path99, import_node_util18, run8, resolving;
63000
63322
  var init_android_autolinking = __esm({
63001
63323
  "src/android-autolinking.ts"() {
63002
63324
  "use strict";
63003
- import_node_child_process49 = require("node:child_process");
63325
+ import_node_child_process50 = require("node:child_process");
63004
63326
  import_node_fs100 = __toESM(require("node:fs"), 1);
63005
63327
  import_node_module17 = require("node:module");
63006
63328
  import_node_path99 = __toESM(require("node:path"), 1);
@@ -63009,7 +63331,7 @@ var init_android_autolinking = __esm({
63009
63331
  init_forked_script_contract();
63010
63332
  init_is_record();
63011
63333
  init_react_native_autolinking();
63012
- run8 = (0, import_node_util18.promisify)(import_node_child_process49.execFile);
63334
+ run8 = (0, import_node_util18.promisify)(import_node_child_process50.execFile);
63013
63335
  resolving = /* @__PURE__ */ new Map();
63014
63336
  }
63015
63337
  });
@@ -63104,11 +63426,11 @@ async function resolveAndroidGradleSources(request) {
63104
63426
  import_node_fs101.default.rmSync(work, { recursive: true, force: true });
63105
63427
  }
63106
63428
  }
63107
- var import_node_child_process50, import_node_crypto53, import_node_fs101, import_node_path100, import_node_util19, run9, modelQuery;
63429
+ var import_node_child_process51, import_node_crypto53, import_node_fs101, import_node_path100, import_node_util19, run9, modelQuery;
63108
63430
  var init_android_gradle_sources = __esm({
63109
63431
  "src/android-gradle-sources.ts"() {
63110
63432
  "use strict";
63111
- import_node_child_process50 = require("node:child_process");
63433
+ import_node_child_process51 = require("node:child_process");
63112
63434
  import_node_crypto53 = require("node:crypto");
63113
63435
  import_node_fs101 = __toESM(require("node:fs"), 1);
63114
63436
  import_node_path100 = __toESM(require("node:path"), 1);
@@ -63116,7 +63438,7 @@ var init_android_gradle_sources = __esm({
63116
63438
  init_forked_script_contract();
63117
63439
  init_is_record();
63118
63440
  init_kotlin_toolchain();
63119
- run9 = (0, import_node_util19.promisify)(import_node_child_process50.execFile);
63441
+ run9 = (0, import_node_util19.promisify)(import_node_child_process51.execFile);
63120
63442
  modelQuery = `
63121
63443
  import groovy.json.JsonOutput
63122
63444
  import groovy.json.JsonSlurper
@@ -63489,11 +63811,11 @@ async function compileJavaModuleAbi(input) {
63489
63811
  );
63490
63812
  return library;
63491
63813
  }
63492
- var import_node_child_process51, import_node_crypto54, import_node_fs103, import_node_path102, import_node_util20, run10, JAVA_BINDINGS_INITIALIZER;
63814
+ var import_node_child_process52, import_node_crypto54, import_node_fs103, import_node_path102, import_node_util20, run10, JAVA_BINDINGS_INITIALIZER;
63493
63815
  var init_java_module_abi = __esm({
63494
63816
  "src/java-module-abi.ts"() {
63495
63817
  "use strict";
63496
- import_node_child_process51 = require("node:child_process");
63818
+ import_node_child_process52 = require("node:child_process");
63497
63819
  import_node_crypto54 = require("node:crypto");
63498
63820
  import_node_fs103 = __toESM(require("node:fs"), 1);
63499
63821
  import_node_path102 = __toESM(require("node:path"), 1);
@@ -63501,7 +63823,7 @@ var init_java_module_abi = __esm({
63501
63823
  init_android_bridge_packages();
63502
63824
  init_is_record();
63503
63825
  init_kotlin_toolchain();
63504
- run10 = (0, import_node_util20.promisify)(import_node_child_process51.execFile);
63826
+ run10 = (0, import_node_util20.promisify)(import_node_child_process52.execFile);
63505
63827
  JAVA_BINDINGS_INITIALIZER = "initializeJavaBindings";
63506
63828
  }
63507
63829
  });
@@ -63635,18 +63957,18 @@ async function installKotlinSdkArchive(archive, compilerSha256) {
63635
63957
  import_node_fs104.default.rmSync(work, { recursive: true, force: true });
63636
63958
  }
63637
63959
  }
63638
- var import_node_child_process52, import_node_crypto55, import_node_fs104, import_node_path103, import_node_util21, run11;
63960
+ var import_node_child_process53, import_node_crypto55, import_node_fs104, import_node_path103, import_node_util21, run11;
63639
63961
  var init_kotlin_sdk = __esm({
63640
63962
  "src/kotlin-sdk.ts"() {
63641
63963
  "use strict";
63642
- import_node_child_process52 = require("node:child_process");
63964
+ import_node_child_process53 = require("node:child_process");
63643
63965
  import_node_crypto55 = require("node:crypto");
63644
63966
  import_node_fs104 = __toESM(require("node:fs"), 1);
63645
63967
  import_node_path103 = __toESM(require("node:path"), 1);
63646
63968
  import_node_util21 = require("node:util");
63647
63969
  init_kotlin_toolchain();
63648
63970
  init_kotlinSdkContract();
63649
- run11 = (0, import_node_util21.promisify)(import_node_child_process52.execFile);
63971
+ run11 = (0, import_node_util21.promisify)(import_node_child_process53.execFile);
63650
63972
  }
63651
63973
  });
63652
63974
 
@@ -65251,11 +65573,11 @@ async function serveKotlinRequest(pathname, res, app) {
65251
65573
  }
65252
65574
  return true;
65253
65575
  }
65254
- var import_node_child_process53, import_node_crypto57, import_node_fs107, import_node_module18, import_node_path106, import_node_util22, import_acorn3, run12, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES, KOTLIN_PACKAGE_PATH;
65576
+ var import_node_child_process54, import_node_crypto57, import_node_fs107, import_node_module18, import_node_path106, import_node_util22, import_acorn3, run12, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES, KOTLIN_PACKAGE_PATH;
65255
65577
  var init_kotlin_host = __esm({
65256
65578
  "src/kotlin-host.ts"() {
65257
65579
  "use strict";
65258
- import_node_child_process53 = require("node:child_process");
65580
+ import_node_child_process54 = require("node:child_process");
65259
65581
  import_node_crypto57 = require("node:crypto");
65260
65582
  import_node_fs107 = __toESM(require("node:fs"), 1);
65261
65583
  import_node_module18 = require("node:module");
@@ -65271,7 +65593,7 @@ var init_kotlin_host = __esm({
65271
65593
  init_kotlin_toolchain();
65272
65594
  init_kotlin_view_models();
65273
65595
  init_kotlin_module();
65274
- run12 = (0, import_node_util22.promisify)(import_node_child_process53.execFile);
65596
+ run12 = (0, import_node_util22.promisify)(import_node_child_process54.execFile);
65275
65597
  KOTLIN_ARTIFACT_PREFIX = "/__peach/kotlin-artifact/";
65276
65598
  SKIP_DIRS = /* @__PURE__ */ new Set([
65277
65599
  "node_modules",
@@ -66419,7 +66741,7 @@ var import_node_path5 = require("node:path");
66419
66741
  init_src();
66420
66742
 
66421
66743
  // runtime-companion.json
66422
- var runtime_companion_default = { abi: 1, sha256: "60900a3af6e6213c855e6682baa0ebdb6a6865510e4e3a51a24d4c584b3fdec2", file: "node/cli-60900a3af6e6213c855e6682baa0ebdb6a6865510e4e3a51a24d4c584b3fdec2.cjs" };
66744
+ var runtime_companion_default = { abi: 1, sha256: "0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d", file: "node/cli-0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d.cjs" };
66423
66745
 
66424
66746
  // src/cli-runtime.ts
66425
66747
  init_answeredNativePackages();
@@ -69805,7 +70127,7 @@ init_node_http_fetch();
69805
70127
  init_process_group();
69806
70128
 
69807
70129
  // cli/app-catalog.ts
69808
- var import_node_child_process54 = require("node:child_process");
70130
+ var import_node_child_process55 = require("node:child_process");
69809
70131
  var import_node_fs110 = __toESM(require("node:fs"), 1);
69810
70132
  var import_node_module19 = require("node:module");
69811
70133
  var import_node_path110 = __toESM(require("node:path"), 1);
@@ -70093,7 +70415,7 @@ async function readProjectOneNativeAppCatalog(projectRoot, env, runtimeExecutabl
70093
70415
  const loader = (0, import_node_url8.pathToFileURL)(
70094
70416
  import_node_path110.default.join(import_node_path110.default.dirname(onePackage), "dist/esm/vite/loadConfig.mjs")
70095
70417
  ).href;
70096
- const { stdout } = await (0, import_node_util23.promisify)(import_node_child_process54.execFile)(
70418
+ const { stdout } = await (0, import_node_util23.promisify)(import_node_child_process55.execFile)(
70097
70419
  runtimeExecutable,
70098
70420
  [
70099
70421
  "--input-type=module",
@@ -70548,7 +70870,7 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
70548
70870
  return { platforms: snapshots };
70549
70871
  }
70550
70872
  async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
70551
- const { spawn: spawn9 } = await import("node:child_process");
70873
+ const { spawn: spawn10 } = await import("node:child_process");
70552
70874
  const { createServer } = await import("node:net");
70553
70875
  const { createRequire: createRequire20 } = await import("node:module");
70554
70876
  const onePackage = createRequire20((0, import_node_path113.join)(projectRoot, "package.json")).resolve(
@@ -70564,7 +70886,7 @@ async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable =
70564
70886
  server.close(() => resolve4(port2));
70565
70887
  }).on("error", reject);
70566
70888
  });
70567
- const child = spawn9(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
70889
+ const child = spawn10(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
70568
70890
  cwd: projectRoot,
70569
70891
  env: { ...process.env, ...env, CI: "1", PEACH_NO_OPEN: "1" },
70570
70892
  stdio: ["ignore", "inherit", "inherit"],