peachsim 0.1.1881 → 0.1.1887

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 (160) hide show
  1. package/cli/commands/control.ts +11 -10
  2. package/cli/commands/reset.ts +1 -1
  3. package/cli/native-input.ts +1 -1
  4. package/cli/outbound-endpoints.ts +1 -1
  5. package/detox/index.ts +62 -1
  6. package/dist-lib/agent-daemon-client.cjs +1 -1
  7. package/dist-lib/agent-events.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/bundle-channel.cjs +9079 -4305
  19. package/dist-lib/capture-contract.cjs +1 -1
  20. package/dist-lib/capture-contract.mjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/config.mjs +1 -1
  29. package/dist-lib/detox/index.cjs +35 -2
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/expo-swift-bundle.cjs +8609 -3976
  32. package/dist-lib/expo-swift-metadata.cjs +5 -1
  33. package/dist-lib/expo-swift-metadata.mjs +5 -1
  34. package/dist-lib/home-paths.cjs +1 -1
  35. package/dist-lib/host/bridge-host.cjs +9894 -5149
  36. package/dist-lib/host/fetch-proxy-handler.cjs +93 -13
  37. package/dist-lib/host/fetch-proxy-overrides.cjs +10 -2
  38. package/dist-lib/host/fetch-proxy-overrides.mjs +8 -2
  39. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  40. package/dist-lib/host/websocket-proxy.cjs +1 -1
  41. package/dist-lib/index.cjs +538 -120
  42. package/dist-lib/jump-to-source-babel.cjs +1 -1
  43. package/dist-lib/jump-to-source-native.cjs +1 -1
  44. package/dist-lib/kotlin-host.cjs +1 -1
  45. package/dist-lib/menu.cjs +1 -1
  46. package/dist-lib/menu.mjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  49. package/dist-lib/metro-production-bundle.cjs +1 -1
  50. package/dist-lib/metro-production-bundle.mjs +1 -1
  51. package/dist-lib/metro.cjs +536 -118
  52. package/dist-lib/native-app-identity-project.cjs +408 -72
  53. package/dist-lib/native-app-identity-project.mjs +739 -375
  54. package/dist-lib/native-app-identity.cjs +37 -1
  55. package/dist-lib/native-app-identity.mjs +36 -1
  56. package/dist-lib/native-firebase-metadata.cjs +1 -1
  57. package/dist-lib/native-firebase-metadata.mjs +1 -1
  58. package/dist-lib/pdfium-raster.cjs +1 -1
  59. package/dist-lib/pdfium-raster.mjs +1 -1
  60. package/dist-lib/plist.cjs +1 -1
  61. package/dist-lib/plist.mjs +1 -1
  62. package/dist-lib/profiles.cjs +1 -1
  63. package/dist-lib/public-brand.cjs +1 -1
  64. package/dist-lib/public-origins-lib-esm.json +61 -28
  65. package/dist-lib/public-origins-lib.json +250 -92
  66. package/dist-lib/react-native-host-modules.cjs +1 -1
  67. package/dist-lib/react-native-host-modules.mjs +1 -1
  68. package/dist-lib/reap-browser.cjs +1 -1
  69. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  70. package/dist-lib/sdk.cjs +1 -1
  71. package/dist-lib/sdk.mjs +1 -1
  72. package/dist-lib/skills.cjs +16568 -11674
  73. package/dist-lib/swift-compile.cjs +6874 -2537
  74. package/dist-lib/swift-compile.mjs +6207 -1866
  75. package/dist-lib/swift-package.cjs +20 -3
  76. package/dist-lib/swift-package.mjs +20 -3
  77. package/dist-lib/swift-submit.cjs +2 -2
  78. package/dist-lib/swift-submit.mjs +2 -2
  79. package/dist-lib/swift-toolchain.cjs +19 -1
  80. package/dist-lib/swift.cjs +1 -1
  81. package/dist-lib/vite-swift.cjs +8753 -4124
  82. package/dist-lib/vite.cjs +93 -13
  83. package/dist-lib/worklet-executable.cjs +1 -1
  84. package/dist-lib/worklet-executable.mjs +1 -1
  85. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  86. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +2 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  88. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
  89. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -1
  90. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +2 -1
  91. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  92. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +10 -1
  93. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  94. package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +1 -1
  95. package/dist-types/packages/sootsim-swift/src/securityHostContract.d.ts +10 -0
  96. package/package.json +1 -1
  97. package/runtime-companion.json +1 -1
  98. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHost.h +555 -0
  99. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  100. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +6 -0
  101. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtocol.h +0 -1
  102. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +6 -0
  103. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarButtonItemBadge.h +1 -1
  104. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarMinimization.h +1 -1
  105. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
  106. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISearchTab.h +1 -1
  107. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITab.h +1 -1
  108. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabAccessory.h +2 -2
  109. package/sdk/ios/usr/include/os/activity.h +534 -0
  110. package/sdk/ios/usr/include/os.modulemap +15 -0
  111. package/sdk/ios/wasm/include/fcntl.h +16 -0
  112. package/sdk/ios/wasm/include/string.h +5 -0
  113. package/sdk/native-hashes.json +1 -1
  114. package/src/dns-over-https.ts +61 -9
  115. package/src/expo-swift-bundle.ts +2 -7
  116. package/src/expo-swift-host.ts +11 -3
  117. package/src/host/fetch-proxy-handler.ts +51 -2
  118. package/src/host/fetch-proxy-overrides.ts +4 -0
  119. package/src/host/hostname-resolver.ts +9 -5
  120. package/src/native-app-identity-project.ts +13 -2
  121. package/src/native-app-identity.ts +47 -0
  122. package/src/nitro-adapter.lock.json +260 -260
  123. package/src/nitro-bundle.ts +7 -10
  124. package/src/nitro-superset.lock.json +4 -4
  125. package/src/podspec-sources.ts +20 -0
  126. package/src/storageSnapshotContract.ts +20 -1
  127. package/src/swift-compile.ts +409 -77
  128. package/src/swift-compiler-digest.ts +15 -0
  129. package/src/swift-coverage/xcode-packages.ts +3 -2
  130. package/src/swift-distribution.lock.json +12 -12
  131. package/src/swift-guest-archive.ts +153 -0
  132. package/src/swift-guest-compile.ts +449 -0
  133. package/src/swift-guest-image-ledger.ts +656 -0
  134. package/src/swift-guest-link-plan.ts +52 -0
  135. package/src/swift-guest-link.ts +1414 -0
  136. package/src/swift-guest-linked-spans.ts +338 -0
  137. package/src/swift-guest-manifest.ts +141 -0
  138. package/src/swift-guest-projection-storage.ts +310 -0
  139. package/src/swift-guest-projection.ts +252 -0
  140. package/src/swift-guest-runtime-plan.ts +834 -0
  141. package/src/swift-guest-source-inputs.ts +427 -0
  142. package/src/swift-guest-source-plan.ts +279 -0
  143. package/src/swift-host.ts +157 -36
  144. package/src/swift-icu.ts +60 -18
  145. package/src/swift-link-roots.ts +27 -50
  146. package/src/swift-package-manifest.ts +34 -18
  147. package/src/swift-package.ts +32 -2
  148. package/src/swift-packages.ts +138 -17
  149. package/src/swift-runtime-products.ts +73 -0
  150. package/src/swift-shared-sdk.ts +1 -1
  151. package/src/swift-submit.ts +15 -3
  152. package/src/swift-toolchain.ts +18 -0
  153. package/src/swift-wasm-prune.ts +313 -14
  154. package/src/swiftContract.ts +83 -0
  155. package/src/swiftRuntimeProductContract.ts +85 -45
  156. package/src/turbo-bundle.ts +1 -1
  157. package/src/turbo-codegen-intake.ts +10 -3
  158. package/src/turbo-runtime.lock.json +23 -23
  159. package/src/wasm-optimize.ts +16 -4
  160. package/src/xcode-project.ts +142 -14
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1887 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -32,7 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
33
33
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
34
34
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
35
- define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "02dac6951dc7dd8465a421670901c932ac320fc9f8fe277885b2916149d40182", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
35
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "e66452b430a7dc749e0db64e21a2f3cd969ba48fa1ae31cd5de5c366c3783bf7", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "6bf3eed98e77aac803f3015787d461af79f549c57a5773a83e13b46633a871c6", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "0669e4cca53dc8db00059018d7f93ff9139915fc0f4fb0c82a938febb7862dfe", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
36
36
  }
37
37
  });
38
38
 
@@ -85,7 +85,7 @@ var require_parse = __commonJS({
85
85
  var token;
86
86
  var key;
87
87
  var root;
88
- module.exports = function parse(text2, reviver) {
88
+ module.exports = function parse4(text2, reviver) {
89
89
  source = String(text2);
90
90
  parseState = "start";
91
91
  stack = [];
@@ -268,15 +268,15 @@ var require_parse = __commonJS({
268
268
  return newToken("punctuator", read());
269
269
  case "n":
270
270
  read();
271
- literal("ull");
271
+ literal2("ull");
272
272
  return newToken("null", null);
273
273
  case "t":
274
274
  read();
275
- literal("rue");
275
+ literal2("rue");
276
276
  return newToken("boolean", true);
277
277
  case "f":
278
278
  read();
279
- literal("alse");
279
+ literal2("alse");
280
280
  return newToken("boolean", false);
281
281
  case "-":
282
282
  case "+":
@@ -307,11 +307,11 @@ var require_parse = __commonJS({
307
307
  return;
308
308
  case "I":
309
309
  read();
310
- literal("nfinity");
310
+ literal2("nfinity");
311
311
  return newToken("numeric", Infinity);
312
312
  case "N":
313
313
  read();
314
- literal("aN");
314
+ literal2("aN");
315
315
  return newToken("numeric", NaN);
316
316
  case '"':
317
317
  case "'":
@@ -405,11 +405,11 @@ var require_parse = __commonJS({
405
405
  return;
406
406
  case "I":
407
407
  read();
408
- literal("nfinity");
408
+ literal2("nfinity");
409
409
  return newToken("numeric", sign * Infinity);
410
410
  case "N":
411
411
  read();
412
- literal("aN");
412
+ literal2("aN");
413
413
  return newToken("numeric", NaN);
414
414
  }
415
415
  throw invalidChar(read());
@@ -642,7 +642,7 @@ var require_parse = __commonJS({
642
642
  column
643
643
  };
644
644
  }
645
- function literal(s) {
645
+ function literal2(s) {
646
646
  for (const c2 of s) {
647
647
  const p = peek();
648
648
  if (p !== c2) {
@@ -940,12 +940,12 @@ var require_stringify = __commonJS({
940
940
  replacerFunc = replacer;
941
941
  } else if (Array.isArray(replacer)) {
942
942
  propertyList = [];
943
- for (const v of replacer) {
943
+ for (const v5 of replacer) {
944
944
  let item;
945
- if (typeof v === "string") {
946
- item = v;
947
- } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
948
- item = String(v);
945
+ if (typeof v5 === "string") {
946
+ item = v5;
947
+ } else if (typeof v5 === "number" || v5 instanceof String || v5 instanceof Number) {
948
+ item = String(v5);
949
949
  }
950
950
  if (item !== void 0 && propertyList.indexOf(item) < 0) {
951
951
  propertyList.push(item);
@@ -1143,10 +1143,10 @@ var require_stringify = __commonJS({
1143
1143
  var require_lib = __commonJS({
1144
1144
  "../../node_modules/json5/lib/index.js"(exports, module) {
1145
1145
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1146
- var parse = require_parse();
1146
+ var parse4 = require_parse();
1147
1147
  var stringify = require_stringify();
1148
1148
  var JSON52 = {
1149
- parse,
1149
+ parse: parse4,
1150
1150
  stringify
1151
1151
  };
1152
1152
  module.exports = JSON52;
@@ -1155,9 +1155,9 @@ var require_lib = __commonJS({
1155
1155
 
1156
1156
  // src/native-app-identity-project.ts
1157
1157
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1158
- import fs17 from "node:fs";
1158
+ import fs18 from "node:fs";
1159
1159
  import { createRequire } from "node:module";
1160
- import path31 from "node:path";
1160
+ import path37 from "node:path";
1161
1161
 
1162
1162
  // src/android-app-identity.ts
1163
1163
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1348,10 +1348,10 @@ function androidMergedResourceValuesDirectory(manifestFile) {
1348
1348
  manifestFile
1349
1349
  );
1350
1350
  if (!match) return null;
1351
- const [, intermediates, variant] = match;
1352
- if (!variant) return null;
1353
- const taskVariant = variant[0].toUpperCase() + variant.slice(1);
1354
- return `${intermediates}incremental/${variant}/merge${taskVariant}Resources/merged.dir`;
1351
+ const [, intermediates, variant2] = match;
1352
+ if (!variant2) return null;
1353
+ const taskVariant = variant2[0].toUpperCase() + variant2.slice(1);
1354
+ return `${intermediates}incremental/${variant2}/merge${taskVariant}Resources/merged.dir`;
1355
1355
  }
1356
1356
 
1357
1357
  // src/is-record.ts
@@ -1647,6 +1647,21 @@ function xcodeTargetMemberVisitor(objects) {
1647
1647
  }
1648
1648
 
1649
1649
  // src/native-app-identity.ts
1650
+ function readKeychainAccessGroups(dictionary, resolve) {
1651
+ if (!isRecord(dictionary))
1652
+ throw new Error("native app entitlements are not a dictionary");
1653
+ const groups = dictionary["keychain-access-groups"];
1654
+ if (groups === void 0) return void 0;
1655
+ if (!Array.isArray(groups)) throw new Error("keychain-access-groups is not an array");
1656
+ return groups.map((group) => {
1657
+ if (typeof group !== "string")
1658
+ throw new Error("keychain access group is not a string");
1659
+ const value = resolve(group);
1660
+ if (!value || /\$[({]/.test(value))
1661
+ throw new Error("keychain access group has unresolved signing settings");
1662
+ return value;
1663
+ });
1664
+ }
1650
1665
  function nonEmptyString(value) {
1651
1666
  return typeof value === "string" && value.length > 0 ? value : null;
1652
1667
  }
@@ -1757,10 +1772,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
1757
1772
  var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
1758
1773
  function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
1759
1774
  const pbxprojPath = Object.keys(files).find(
1760
- (path32) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path32)
1775
+ (path38) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path38)
1761
1776
  ) ?? Object.keys(files).find(
1762
- (path32) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path32)
1763
- ) ?? Object.keys(files).find((path32) => /(?:^|\/)project\.pbxproj$/.test(path32));
1777
+ (path38) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path38)
1778
+ ) ?? Object.keys(files).find((path38) => /(?:^|\/)project\.pbxproj$/.test(path38));
1764
1779
  if (!pbxprojPath) return null;
1765
1780
  const pbxproj = files[pbxprojPath];
1766
1781
  let objects = {};
@@ -1802,7 +1817,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1802
1817
  } else if (applicationTargetNames.size === 1) {
1803
1818
  targetName = [...applicationTargetNames][0];
1804
1819
  } else if (applicationTargetNames.size > 1) {
1805
- const delegateTargets = Object.keys(files).filter((path32) => !path32.includes("/Pods/")).map((path32) => path32.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
1820
+ const delegateTargets = Object.keys(files).filter((path38) => !path38.includes("/Pods/")).map((path38) => path38.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
1806
1821
  (name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
1807
1822
  );
1808
1823
  if (delegateTargets.length === 1) {
@@ -1826,8 +1841,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1826
1841
  if (typeof configId === "string") {
1827
1842
  const configObj = objects[configId];
1828
1843
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
1829
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
1830
- if (typeof v === "string") settings[k] = v;
1844
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
1845
+ if (typeof v5 === "string") settings[k] = v5;
1831
1846
  }
1832
1847
  }
1833
1848
  }
@@ -1842,8 +1857,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1842
1857
  if (typeof configId === "string") {
1843
1858
  const configObj = objects[configId];
1844
1859
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
1845
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
1846
- if (typeof v === "string") settings[k] = v;
1860
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
1861
+ if (typeof v5 === "string") settings[k] = v5;
1847
1862
  }
1848
1863
  }
1849
1864
  }
@@ -1893,6 +1908,19 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1893
1908
  const applicationName = identityFieldFrom(settings, plistString(plist3, "CFBundleDisplayName"), void 0) ?? bundleName;
1894
1909
  const dictionary = parseInfoPlist(plist3);
1895
1910
  if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
1911
+ let keychainAccessGroups;
1912
+ if (settings.CODE_SIGN_ENTITLEMENTS) {
1913
+ const entitlementPath = resolveBuildSetting(settings.CODE_SIGN_ENTITLEMENTS, settings);
1914
+ if (!entitlementPath)
1915
+ throw new Error("CODE_SIGN_ENTITLEMENTS has unresolved build settings");
1916
+ const source = files[`ios/${entitlementPath}`] ?? files[entitlementPath];
1917
+ if (source === void 0)
1918
+ throw new Error(`missing selected entitlement input ${entitlementPath}`);
1919
+ keychainAccessGroups = readKeychainAccessGroups(
1920
+ parseInfoPlist(source),
1921
+ (value) => resolveBuildSetting(value, settings)
1922
+ );
1923
+ }
1896
1924
  const declaredDisplayName = dictionary.CFBundleDisplayName;
1897
1925
  const applicationDisplayName = typeof declaredDisplayName === "string" ? resolveBuildSetting(declaredDisplayName, settings) : void 0;
1898
1926
  if (applicationDisplayName === null)
@@ -2011,7 +2039,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2011
2039
  return `${base.startsWith("/") ? "/" : ""}${segments.join("/")}`;
2012
2040
  };
2013
2041
  const project = Object.values(objects).find(
2014
- (object) => isRecord(object) && object.isa === "PBXProject"
2042
+ (object3) => isRecord(object3) && object3.isa === "PBXProject"
2015
2043
  );
2016
2044
  const projectDir = join8(
2017
2045
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
@@ -2025,7 +2053,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2025
2053
  if (Object.hasOwn(files, file)) return [file];
2026
2054
  const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
2027
2055
  return paths.filter(
2028
- (path32) => path32.startsWith(prefix) && !/(?:^|\/)\./.test(path32.slice(prefix.length))
2056
+ (path38) => path38.startsWith(prefix) && !/(?:^|\/)\./.test(path38.slice(prefix.length))
2029
2057
  );
2030
2058
  },
2031
2059
  join8,
@@ -2036,7 +2064,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2036
2064
  }
2037
2065
  const rootModuleName = readRootModuleName(
2038
2066
  Object.entries(files).filter(
2039
- ([path32]) => !path32.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path32) || path32.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
2067
+ ([path38]) => !path38.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path38) || path38.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
2040
2068
  ).map(([, source]) => source)
2041
2069
  );
2042
2070
  return {
@@ -2084,6 +2112,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2084
2112
  permissionUsageDescriptions,
2085
2113
  infoPlistStrings,
2086
2114
  urlQuerySchemes,
2115
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
2087
2116
  ...shareIntoAppGroupId === void 0 ? {} : { shareIntoAppGroupId },
2088
2117
  ...rtcAppGroupIdentifier === void 0 ? {} : { rtcAppGroupIdentifier },
2089
2118
  ...screenShareExtensionBundleId === void 0 ? {} : { screenShareExtensionBundleId },
@@ -2159,6 +2188,24 @@ function peachsimPackageRoot() {
2159
2188
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
2160
2189
  var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
2161
2190
  var compilerArchives = {
2191
+ "swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
2192
+ identity: "45bb46301c86fe73",
2193
+ archive: "tar.gz",
2194
+ hosts: {
2195
+ "darwin-arm64": {
2196
+ checksum: "102dfbbb7b451be0685763b7a427284b75a8078874543f091b1c4b3db86e6565",
2197
+ manifest: "fb6c4d75ef6f4b3c094ae5a4d5d1e6bdfd85431f3fe25d514f3e7a0b4add60ef"
2198
+ },
2199
+ "linux-x64": {
2200
+ checksum: "d3c040e042e12ff787b64bfde1d85238254365036ce093f3b20ff86e8ff996f0",
2201
+ manifest: "7c7144be591692e563396fe3c987c5aa56fbaea4faacaad62283c0c6e5c04ae2"
2202
+ },
2203
+ "linux-arm64": {
2204
+ checksum: "604e6fc5fc0f5a93cee3ca6dfa9616244a2a49ef517caa3155a12ae4a0ecf72b",
2205
+ manifest: "075fd53d03ecf099954f1d023bb4bb67a5c5ee946537466d6c105022bdf8ecde"
2206
+ }
2207
+ }
2208
+ },
2162
2209
  "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
2163
2210
  identity: "0b2d0a9011c88e66",
2164
2211
  archive: "tar.gz",
@@ -2442,10 +2489,10 @@ var NATIVE_GRAPH_ID = createHash2("sha256").update(JSON.stringify(NATIVE_GRAPH_I
2442
2489
 
2443
2490
  // src/xcode-project.ts
2444
2491
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2445
- import { execFileSync as execFileSync11 } from "node:child_process";
2446
- import { createHash as createHash15 } from "node:crypto";
2447
- import fs16 from "node:fs";
2448
- import path30 from "node:path";
2492
+ import { execFileSync as execFileSync15 } from "node:child_process";
2493
+ import { createHash as createHash20 } from "node:crypto";
2494
+ import fs17 from "node:fs";
2495
+ import path36 from "node:path";
2449
2496
  import plist2 from "plist";
2450
2497
 
2451
2498
  // src/prepared-xcode-phases.ts
@@ -2810,19 +2857,19 @@ var assetSymbolSettingKeys = [
2810
2857
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2811
2858
  import {
2812
2859
  execFile as execFile3,
2813
- execFileSync as execFileSync10
2860
+ execFileSync as execFileSync14
2814
2861
  } from "node:child_process";
2815
- import { createHash as createHash14 } from "node:crypto";
2816
- import fs15 from "node:fs";
2862
+ import { createHash as createHash19 } from "node:crypto";
2863
+ import fs16 from "node:fs";
2817
2864
  import os8 from "node:os";
2818
- import path28 from "node:path";
2865
+ import path34 from "node:path";
2819
2866
  import { promisify as promisify3 } from "node:util";
2820
2867
 
2821
2868
  // src/swift-distribution.ts
2822
2869
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2823
- import fs14 from "node:fs";
2870
+ import fs15 from "node:fs";
2824
2871
  import os7 from "node:os";
2825
- import path27 from "node:path";
2872
+ import path33 from "node:path";
2826
2873
 
2827
2874
  // ../contrast-runtime-delivery/src/index.ts
2828
2875
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -2909,29 +2956,29 @@ var CLI_UPDATE_NOTIFICATION_COOLDOWN_MS = 7 * 24 * 60 * 60 * 1e3;
2909
2956
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2910
2957
  import {
2911
2958
  spawn as spawn5,
2912
- execFileSync as execFileSync9
2959
+ execFileSync as execFileSync13
2913
2960
  } from "node:child_process";
2914
- import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
2961
+ import { createHash as createHash17, randomUUID as randomUUID5 } from "node:crypto";
2915
2962
  import {
2916
2963
  copyFileSync,
2917
2964
  cpSync,
2918
2965
  existsSync as existsSync7,
2919
2966
  lstatSync,
2920
- mkdirSync as mkdirSync4,
2967
+ mkdirSync as mkdirSync6,
2921
2968
  mkdtempSync as mkdtempSync3,
2922
- readFileSync as readFileSync15,
2969
+ readFileSync as readFileSync20,
2923
2970
  readdirSync as readdirSync10,
2924
2971
  readlinkSync,
2925
- realpathSync as realpathSync3,
2972
+ realpathSync as realpathSync5,
2926
2973
  renameSync as renameSync2,
2927
- rmSync as rmSync5,
2974
+ rmSync as rmSync6,
2928
2975
  statSync as statSync3,
2929
2976
  symlinkSync as symlinkSync2,
2930
2977
  utimesSync,
2931
- writeFileSync as writeFileSync5
2978
+ writeFileSync as writeFileSync8
2932
2979
  } from "node:fs";
2933
2980
  import os6 from "node:os";
2934
- import path24 from "node:path";
2981
+ import path30 from "node:path";
2935
2982
 
2936
2983
  // src/admitted-mac-build.ts
2937
2984
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -2980,78 +3027,142 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2980
3027
  // src/swift-foundation.ts
2981
3028
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2982
3029
 
2983
- // src/swift-icu.ts
3030
+ // src/swift-guest-compile.ts
2984
3031
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2985
- import { execFile as execFile2 } from "node:child_process";
2986
- import { createHash as createHash9, randomUUID as randomUUID3 } from "node:crypto";
2987
- import { existsSync as existsSync4, readFileSync as readFileSync11 } from "node:fs";
2988
- import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
2989
- import os3 from "node:os";
2990
- import path16 from "node:path";
2991
- import { promisify as promisify2 } from "node:util";
2992
- import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
2993
- var run = promisify2(execFile2);
2994
- var deflate = promisify2(gzip);
2995
- var compressBrotli = promisify2(brotliCompress);
2996
- var inflateGzip = promisify2(gunzip);
3032
+ import { execFileSync as execFileSync10 } from "node:child_process";
3033
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync15, writeFileSync as writeFileSync5 } from "node:fs";
3034
+ import path22 from "node:path";
2997
3035
 
2998
- // src/swift-link-roots.ts
3036
+ // src/swift-guest-archive.ts
2999
3037
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3000
- import fs10 from "node:fs";
3038
+ import { execFileSync as execFileSync6 } from "node:child_process";
3039
+ import { createHash as createHash10 } from "node:crypto";
3040
+ import { mkdirSync, readFileSync as readFileSync11, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
3001
3041
  import path17 from "node:path";
3002
3042
 
3003
- // src/swift-objc-import.ts
3004
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3005
-
3006
- // src/swift-project-user.ts
3043
+ // src/swift-wasm-prune.ts
3007
3044
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3008
3045
  import { execFileSync as execFileSync5 } from "node:child_process";
3009
- import {
3010
- chmodSync,
3011
- existsSync as existsSync5,
3012
- mkdirSync,
3013
- readdirSync as readdirSync8,
3014
- readFileSync as readFileSync12,
3015
- realpathSync,
3016
- rmSync as rmSync3,
3017
- statSync as statSync2
3018
- } from "node:fs";
3019
- import path18 from "node:path";
3020
-
3021
- // src/swift-reproducible.ts
3022
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3023
- import { realpathSync as realpathSync2 } from "node:fs";
3024
- import os4 from "node:os";
3025
-
3026
- // src/swift-root-lock.ts
3027
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3028
- import {
3029
- spawn as spawn4
3030
- } from "node:child_process";
3031
- import { createHash as createHash10, randomUUID as randomUUID4 } from "node:crypto";
3032
- import {
3033
- linkSync,
3034
- mkdirSync as mkdirSync2,
3035
- readdirSync as readdirSync9,
3036
- readFileSync as readFileSync13,
3037
- rmSync as rmSync4,
3038
- writeFileSync as writeFileSync3
3039
- } from "node:fs";
3040
- import { homedir as homedir2 } from "node:os";
3041
- import path19 from "node:path";
3046
+ import { createHash as createHash9 } from "node:crypto";
3047
+ import fs10 from "node:fs";
3048
+ import os3 from "node:os";
3049
+ import path16 from "node:path";
3050
+ import * as v2 from "valibot";
3042
3051
 
3043
- // src/swift-uniform-type-constants.ts
3052
+ // src/swiftRuntimeProductContract.ts
3044
3053
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3045
- import { execFileSync as execFileSync6 } from "node:child_process";
3046
- import path20 from "node:path";
3054
+ import * as v from "valibot";
3055
+ var swiftFrameworkProductSchema = v.object({
3056
+ version: v.literal(1),
3057
+ packageName: v.string(),
3058
+ manifestSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
3059
+ product: v.object({
3060
+ name: v.string(),
3061
+ linkage: v.picklist(["static", "dynamic", "automatic"]),
3062
+ targets: v.array(v.string())
3063
+ }),
3064
+ // framework names are distinct from SDK library linkNames. they identify
3065
+ // the packaged owner, not an observed native image dependency.
3066
+ frameworkAliases: v.array(
3067
+ v.object({
3068
+ kind: v.literal("framework"),
3069
+ name: v.string(),
3070
+ targets: v.array(v.string()),
3071
+ moduleMap: v.string(),
3072
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
3073
+ wasmSdkId: v.string(),
3074
+ wasmSdkChecksum: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
3075
+ })
3076
+ ),
3077
+ targets: v.array(
3078
+ v.object({
3079
+ name: v.string(),
3080
+ path: v.string(),
3081
+ kind: v.picklist(["regular", "system"]),
3082
+ dependencies: v.array(v.string())
3083
+ })
3084
+ ),
3085
+ objects: v.array(v.object({ path: v.string(), target: v.string() })),
3086
+ autolink: v.array(v.string())
3087
+ });
3088
+ var swiftSdkProductSchema = v.pipe(
3089
+ v.object({
3090
+ id: v.string(),
3091
+ installName: v.string(),
3092
+ target: v.literal("wasm32-unknown-wasip1"),
3093
+ linkNames: v.array(v.string()),
3094
+ // absent records declare no framework namespace, even when a library name matches.
3095
+ frameworkAliases: v.optional(
3096
+ v.array(
3097
+ v.object({
3098
+ name: v.string(),
3099
+ moduleMap: v.string(),
3100
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
3101
+ })
3102
+ ),
3103
+ []
3104
+ ),
3105
+ buildDependencies: v.array(v.string()),
3106
+ linkOwnership: v.picklist(["image", "containing-image"]),
3107
+ linkDependencies: v.nullable(v.array(v.string())),
3108
+ autolink: v.array(v.string()),
3109
+ sources: v.array(
3110
+ v.object({
3111
+ path: v.string(),
3112
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
3113
+ })
3114
+ ),
3115
+ artifacts: v.array(
3116
+ v.variant("kind", [
3117
+ v.object({
3118
+ kind: v.literal("archive"),
3119
+ path: v.string(),
3120
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
3121
+ members: v.array(
3122
+ v.object({
3123
+ name: v.string(),
3124
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
3125
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
3126
+ sources: v.array(v.string())
3127
+ })
3128
+ )
3129
+ }),
3130
+ v.object({
3131
+ kind: v.literal("object"),
3132
+ path: v.string(),
3133
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
3134
+ sources: v.array(v.string()),
3135
+ input: v.optional(
3136
+ v.object({
3137
+ product: v.string(),
3138
+ artifact: v.object({
3139
+ path: v.string(),
3140
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
3141
+ }),
3142
+ member: v.optional(
3143
+ v.object({
3144
+ name: v.string(),
3145
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
3146
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
3147
+ })
3148
+ )
3149
+ })
3150
+ )
3151
+ })
3152
+ ])
3153
+ )
3154
+ }),
3155
+ v.check(
3156
+ (product) => product.linkOwnership === "image" || product.linkDependencies === null,
3157
+ "containing-image products cannot declare an image scope"
3158
+ )
3159
+ );
3160
+ var swiftSdkProductsSchema = v.object({
3161
+ version: v.literal(1),
3162
+ products: v.array(swiftSdkProductSchema)
3163
+ });
3047
3164
 
3048
3165
  // src/swift-wasm-prune.ts
3049
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3050
- import { execFileSync as execFileSync7 } from "node:child_process";
3051
- import { createHash as createHash11 } from "node:crypto";
3052
- import fs11 from "node:fs";
3053
- import os5 from "node:os";
3054
- import path21 from "node:path";
3055
3166
  var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
3056
3167
  "libFoundation",
3057
3168
  "lib_FoundationCollections",
@@ -3071,12 +3182,83 @@ var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
3071
3182
  "-lswift_Concurrency"
3072
3183
  ]);
3073
3184
 
3074
- // src/swiftContract.ts
3185
+ // src/swift-guest-link.ts
3186
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3187
+ import { execFileSync as execFileSync7 } from "node:child_process";
3188
+ import fs11 from "node:fs";
3189
+ import path20 from "node:path";
3190
+ import { StringDecoder } from "node:string_decoder";
3191
+
3192
+ // src/swift-guest-image-ledger.ts
3075
3193
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3076
3194
 
3077
- // src/wasm-optimize.ts
3195
+ // src/swift-guest-link-plan.ts
3196
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3197
+
3198
+ // src/swift-guest-manifest.ts
3199
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3200
+ import { createHash as createHash11 } from "node:crypto";
3201
+ import { readFileSync as readFileSync12 } from "node:fs";
3202
+
3203
+ // src/swift-guest-projection-storage.ts
3204
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3205
+
3206
+ // src/swift-guest-linked-spans.ts
3207
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3208
+
3209
+ // src/swift-guest-projection.ts
3210
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3211
+
3212
+ // src/swiftGuestImageContract.ts
3213
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3214
+
3215
+ // src/swift-guest-projection-storage.ts
3216
+ var maxProjectionRegions = 1 << 20;
3217
+
3218
+ // src/swift-guest-runtime-plan.ts
3219
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3220
+ import { createHash as createHash13 } from "node:crypto";
3221
+ import { readFileSync as readFileSync13, realpathSync } from "node:fs";
3222
+ import path19 from "node:path";
3223
+ import * as v4 from "valibot";
3224
+
3225
+ // src/swift-guest-source-plan.ts
3226
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3227
+ import path18 from "node:path";
3228
+
3229
+ // src/swift-runtime-products.ts
3230
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3231
+ import { createHash as createHash12 } from "node:crypto";
3232
+ import * as v3 from "valibot";
3233
+ var packageSchema = v3.object({
3234
+ name: v3.string(),
3235
+ products: v3.array(
3236
+ v3.object({
3237
+ name: v3.string(),
3238
+ targets: v3.array(v3.string()),
3239
+ type: v3.unknown()
3240
+ })
3241
+ ),
3242
+ targets: v3.array(
3243
+ v3.object({
3244
+ name: v3.string(),
3245
+ type: v3.string(),
3246
+ path: v3.optional(v3.string()),
3247
+ dependencies: v3.array(v3.unknown())
3248
+ })
3249
+ )
3250
+ });
3251
+
3252
+ // src/swift-guest-source-inputs.ts
3078
3253
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3079
3254
  import { execFileSync as execFileSync8 } from "node:child_process";
3255
+ import { createHash as createHash14 } from "node:crypto";
3256
+ import { readFileSync as readFileSync14, realpathSync as realpathSync2, writeFileSync as writeFileSync4 } from "node:fs";
3257
+ import path21 from "node:path";
3258
+
3259
+ // src/wasm-optimize.ts
3260
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3261
+ import { execFileSync as execFileSync9 } from "node:child_process";
3080
3262
  import { BinaryNotFoundError, BINARYEN_VERSION, wasmOpt } from "wasm-opt";
3081
3263
  var FEATURES = [
3082
3264
  "threads",
@@ -3092,15 +3274,102 @@ var FEATURES = [
3092
3274
  ];
3093
3275
  var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
3094
3276
 
3277
+ // src/swift-icu.ts
3278
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3279
+ import { execFile as execFile2 } from "node:child_process";
3280
+ import { createHash as createHash15, randomUUID as randomUUID3 } from "node:crypto";
3281
+ import { existsSync as existsSync4, readFileSync as readFileSync16 } from "node:fs";
3282
+ import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
3283
+ import os4 from "node:os";
3284
+ import path23 from "node:path";
3285
+ import { promisify as promisify2 } from "node:util";
3286
+ import {
3287
+ brotliCompress,
3288
+ constants as zlibConstants,
3289
+ deflateRawSync,
3290
+ gunzip,
3291
+ gzip
3292
+ } from "node:zlib";
3293
+
3294
+ // ../sootsim-swift/src/icuData.ts
3295
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3296
+
3297
+ // ../peach-compat/src/stubs/wasm-memory.ts
3298
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3299
+
3300
+ // ../sootsim-swift/src/icuData.ts
3301
+ var PACK_BYTES = 64 * 1024;
3302
+ var VERSION = 1;
3303
+ var SWIFT_ICU_PACKED = `picu${VERSION}`;
3304
+
3305
+ // src/swift-icu.ts
3306
+ var run = promisify2(execFile2);
3307
+ var deflate = promisify2(gzip);
3308
+ var compressBrotli = promisify2(brotliCompress);
3309
+ var inflateGzip = promisify2(gunzip);
3310
+
3311
+ // src/swift-link-roots.ts
3312
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3313
+ import fs12 from "node:fs";
3314
+ import path24 from "node:path";
3315
+
3316
+ // src/swift-objc-import.ts
3317
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3318
+
3319
+ // src/swift-project-user.ts
3320
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3321
+ import { execFileSync as execFileSync11 } from "node:child_process";
3322
+ import {
3323
+ chmodSync,
3324
+ existsSync as existsSync5,
3325
+ mkdirSync as mkdirSync3,
3326
+ readdirSync as readdirSync8,
3327
+ readFileSync as readFileSync17,
3328
+ realpathSync as realpathSync3,
3329
+ rmSync as rmSync4,
3330
+ statSync as statSync2
3331
+ } from "node:fs";
3332
+ import path25 from "node:path";
3333
+
3334
+ // src/swift-reproducible.ts
3335
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3336
+ import { realpathSync as realpathSync4 } from "node:fs";
3337
+ import os5 from "node:os";
3338
+
3339
+ // src/swift-root-lock.ts
3340
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3341
+ import {
3342
+ spawn as spawn4
3343
+ } from "node:child_process";
3344
+ import { createHash as createHash16, randomUUID as randomUUID4 } from "node:crypto";
3345
+ import {
3346
+ linkSync,
3347
+ mkdirSync as mkdirSync4,
3348
+ readdirSync as readdirSync9,
3349
+ readFileSync as readFileSync18,
3350
+ rmSync as rmSync5,
3351
+ writeFileSync as writeFileSync6
3352
+ } from "node:fs";
3353
+ import { homedir as homedir2 } from "node:os";
3354
+ import path26 from "node:path";
3355
+
3356
+ // src/swift-uniform-type-constants.ts
3357
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3358
+ import { execFileSync as execFileSync12 } from "node:child_process";
3359
+ import path27 from "node:path";
3360
+
3361
+ // src/swiftContract.ts
3362
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3363
+
3095
3364
  // src/write-build-file.ts
3096
3365
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3097
- import { existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync14, writeFileSync as writeFileSync4 } from "node:fs";
3098
- import path22 from "node:path";
3366
+ import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync19, writeFileSync as writeFileSync7 } from "node:fs";
3367
+ import path28 from "node:path";
3099
3368
 
3100
3369
  // src/xcode-header-search.ts
3101
3370
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3102
- import fs12 from "node:fs";
3103
- import path23 from "node:path";
3371
+ import fs13 from "node:fs";
3372
+ import path29 from "node:path";
3104
3373
 
3105
3374
  // src/swift-compile.ts
3106
3375
  var admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
@@ -3182,7 +3451,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
3182
3451
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
3183
3452
  (module) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module}"`
3184
3453
  ).join("");
3185
- var compilerSourceDigest = true ? "86990d3bb695dc1b9f0c4cd7f4db499ad1f3e86d93eb50b44f1cb72a69322840" : swiftCompilerSourceDigest(import.meta.dirname);
3454
+ var compilerSourceDigest = true ? "d46232537a993bc7418818ab7d2dc159518328882280b8b4bfd459cffd910921" : swiftCompilerSourceDigest(import.meta.dirname);
3186
3455
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
3187
3456
  "CFAllocator",
3188
3457
  "CFArray",
@@ -3212,32 +3481,32 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3212
3481
 
3213
3482
  // src/answeredNativePackages.ts
3214
3483
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3215
- import { readFileSync as readFileSync16 } from "node:fs";
3484
+ import { readFileSync as readFileSync21 } from "node:fs";
3216
3485
  import { join as join7 } from "node:path";
3217
3486
 
3218
3487
  // src/runtime-assets.ts
3219
3488
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3220
- import fs13 from "fs";
3221
- import path25 from "path";
3489
+ import fs14 from "fs";
3490
+ import path31 from "path";
3222
3491
  import { fileURLToPath as fileURLToPath3 } from "url";
3223
3492
 
3224
3493
  // src/nitroAdapterContract.ts
3225
3494
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3226
- import { createHash as createHash13 } from "node:crypto";
3227
- import { readdirSync as readdirSync11, readFileSync as readFileSync17 } from "node:fs";
3228
- import path26 from "node:path";
3495
+ import { createHash as createHash18 } from "node:crypto";
3496
+ import { readdirSync as readdirSync11, readFileSync as readFileSync22 } from "node:fs";
3497
+ import path32 from "node:path";
3229
3498
 
3230
3499
  // src/swiftNativePinContract.ts
3231
3500
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3232
3501
 
3233
3502
  // src/swift-package-manifest.ts
3234
- var cacheDir3 = path28.join(cacheDir(), "swift-manifests");
3503
+ var cacheDir3 = path34.join(cacheDir(), "swift-manifests");
3235
3504
  var execFileAsync = promisify3(execFile3);
3236
3505
 
3237
3506
  // src/xcode-json-project.ts
3238
3507
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3239
3508
  var import_json5 = __toESM(require_lib(), 1);
3240
- import path29 from "node:path";
3509
+ import path35 from "node:path";
3241
3510
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3242
3511
  var text = (value) => typeof value === "string" ? value : void 0;
3243
3512
  var items = (value) => Array.isArray(value) ? value : [];
@@ -3294,7 +3563,7 @@ var PHASE_ISA = {
3294
3563
  function readXcodeJsonProject(xcodeproj, source) {
3295
3564
  const json = import_json5.default.parse(source);
3296
3565
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
3297
- const projectDir = path29.dirname(xcodeproj);
3566
+ const projectDir = path35.dirname(xcodeproj);
3298
3567
  const objects = {};
3299
3568
  let next = 0;
3300
3569
  const add = (entry, id) => {
@@ -3307,7 +3576,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3307
3576
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
3308
3577
  if (base) {
3309
3578
  if (base[1] === "PROJECT")
3310
- return { sourceTree: "<absolute>", path: path29.join(projectDir, base[2]) };
3579
+ return { sourceTree: "<absolute>", path: path35.join(projectDir, base[2]) };
3311
3580
  if (base[1] === "PRODUCTS")
3312
3581
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
3313
3582
  return null;
@@ -3315,7 +3584,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3315
3584
  const unescaped = raw.replaceAll("\\<", "<");
3316
3585
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
3317
3586
  if (unescaped.startsWith("~")) return null;
3318
- return groupDir === null ? null : { sourceTree: "<absolute>", path: path29.join(groupDir, unescaped) };
3587
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: path35.join(groupDir, unescaped) };
3319
3588
  };
3320
3589
  const memberships = [];
3321
3590
  const folders = [];
@@ -3326,7 +3595,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3326
3595
  const kind = text(entry.kind) ?? "file-reference";
3327
3596
  const raw = text(entry.path) ?? "";
3328
3597
  const located = raw === "" ? null : locate(raw, parent.dir);
3329
- const name2 = text(entry.name) ?? path29.basename(raw);
3598
+ const name2 = text(entry.name) ?? path35.basename(raw);
3330
3599
  const node = { id: "", name: name2, dir: null, parent, children: [] };
3331
3600
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
3332
3601
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -3447,7 +3716,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3447
3716
  if (!isObject(entry)) continue;
3448
3717
  const repository = text(entry.repository);
3449
3718
  const local = text(entry.path);
3450
- const name2 = local !== void 0 ? path29.basename(path29.resolve(path29.dirname(xcodeproj), local)) : path29.basename(repository ?? "").replace(/\.git$/, "");
3719
+ const name2 = local !== void 0 ? path35.basename(path35.resolve(path35.dirname(xcodeproj), local)) : path35.basename(repository ?? "").replace(/\.git$/, "");
3451
3720
  const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
3452
3721
  isa: "XCRemoteSwiftPackageReference",
3453
3722
  repositoryURL: repository ?? "",
@@ -3640,6 +3909,16 @@ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
3640
3909
  ]);
3641
3910
  var APPLICATION = "com.apple.product-type.application";
3642
3911
  var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
3912
+ var PRODUCT_MACH_O_TYPES = {
3913
+ "com.apple.product-type.application": "mh_execute",
3914
+ "com.apple.product-type.app-extension": "mh_execute",
3915
+ "com.apple.product-type.tool": "mh_execute",
3916
+ "com.apple.product-type.framework": "mh_dylib",
3917
+ "com.apple.product-type.framework.static": "staticlib",
3918
+ "com.apple.product-type.library.dynamic": "mh_dylib",
3919
+ "com.apple.product-type.library.static": "staticlib",
3920
+ "com.apple.product-type.bundle": "mh_bundle"
3921
+ };
3643
3922
  var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
3644
3923
  "com.apple.product-type.framework",
3645
3924
  "com.apple.product-type.framework.static"
@@ -3657,28 +3936,28 @@ var CONDITIONS = {
3657
3936
  variant: "normal"
3658
3937
  };
3659
3938
  function walkFiles(dir) {
3660
- if (!fs16.existsSync(dir)) return [];
3939
+ if (!fs17.existsSync(dir)) return [];
3661
3940
  const out = [];
3662
- for (const entry of fs16.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
3941
+ for (const entry of fs17.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
3663
3942
  if (entry.name.startsWith(".")) continue;
3664
- const full = path30.join(dir, entry.name);
3943
+ const full = path36.join(dir, entry.name);
3665
3944
  if (entry.isDirectory()) out.push(...walkFiles(full));
3666
3945
  else if (entry.isFile()) out.push(full);
3667
3946
  }
3668
3947
  return out;
3669
3948
  }
3670
- var isDirectory = (dir) => fs16.existsSync(dir) && fs16.statSync(dir).isDirectory();
3949
+ var isDirectory = (dir) => fs17.existsSync(dir) && fs17.statSync(dir).isDirectory();
3671
3950
  function readXcconfig(file, read) {
3672
- if (read.includes(file) || !fs16.existsSync(file)) return {};
3951
+ if (read.includes(file) || !fs17.existsSync(file)) return {};
3673
3952
  read.push(file);
3674
3953
  const settings = {};
3675
- for (const raw of fs16.readFileSync(file, "utf8").split("\n")) {
3954
+ for (const raw of fs17.readFileSync(file, "utf8").split("\n")) {
3676
3955
  const line = raw.replace(/\/\/.*$/, "").trim();
3677
3956
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
3678
3957
  if (include) {
3679
3958
  Object.assign(
3680
3959
  settings,
3681
- readXcconfig(path30.resolve(path30.dirname(file), include[1]), read)
3960
+ readXcconfig(path36.resolve(path36.dirname(file), include[1]), read)
3682
3961
  );
3683
3962
  continue;
3684
3963
  }
@@ -3728,22 +4007,22 @@ function decodeXml(text2) {
3728
4007
  return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
3729
4008
  }
3730
4009
  function workspaceReferences(workspace) {
3731
- const data = path30.join(workspace, "contents.xcworkspacedata");
3732
- if (!fs16.existsSync(data))
4010
+ const data = path36.join(workspace, "contents.xcworkspacedata");
4011
+ if (!fs17.existsSync(data))
3733
4012
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
3734
- const container = path30.dirname(workspace);
4013
+ const container = path36.dirname(workspace);
3735
4014
  const locate = (location, base) => {
3736
4015
  const colon = location.indexOf(":");
3737
4016
  const kind = location.slice(0, colon);
3738
4017
  const rest = location.slice(colon + 1);
3739
- if (kind === "group") return path30.resolve(base, rest);
3740
- if (kind === "container" || kind === "self") return path30.resolve(container, rest);
3741
- if (kind === "absolute") return path30.resolve(rest);
3742
- throw new Error(`${path30.basename(workspace)} has an unsupported location ${location}`);
4018
+ if (kind === "group") return path36.resolve(base, rest);
4019
+ if (kind === "container" || kind === "self") return path36.resolve(container, rest);
4020
+ if (kind === "absolute") return path36.resolve(rest);
4021
+ throw new Error(`${path36.basename(workspace)} has an unsupported location ${location}`);
3743
4022
  };
3744
4023
  const groups = [container];
3745
4024
  const references = [];
3746
- for (const [, closing, tag, attributes, selfClosing] of fs16.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
4025
+ for (const [, closing, tag, attributes, selfClosing] of fs17.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
3747
4026
  if (closing) {
3748
4027
  if (tag === "Group") groups.pop();
3749
4028
  continue;
@@ -3794,8 +4073,8 @@ function remotePackageRequirements(projects) {
3794
4073
  var loaded = /* @__PURE__ */ new Map();
3795
4074
  function xcodeProjectFile(xcodeproj) {
3796
4075
  for (const name2 of ["project.pbxproj", "project.xcproj"]) {
3797
- const file = path30.join(xcodeproj, name2);
3798
- if (fs16.existsSync(file)) return file;
4076
+ const file = path36.join(xcodeproj, name2);
4077
+ if (fs17.existsSync(file)) return file;
3799
4078
  }
3800
4079
  return null;
3801
4080
  }
@@ -3803,8 +4082,8 @@ function loadProject(xcodeproj) {
3803
4082
  const projectFile = xcodeProjectFile(xcodeproj);
3804
4083
  if (!projectFile)
3805
4084
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
3806
- const source = fs16.readFileSync(projectFile, "utf8");
3807
- const digest = createHash15("sha256").update(source).digest("hex");
4085
+ const source = fs17.readFileSync(projectFile, "utf8");
4086
+ const digest = createHash20("sha256").update(source).digest("hex");
3808
4087
  const cached = loaded.get(projectFile);
3809
4088
  if (cached?.digest === digest) return cached.project;
3810
4089
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -3812,25 +4091,25 @@ function loadProject(xcodeproj) {
3812
4091
  throw new Error(`${projectFile} has no objects table`);
3813
4092
  }
3814
4093
  const objects = root.objects;
3815
- const object = (id) => {
4094
+ const object3 = (id) => {
3816
4095
  const found = id === void 0 ? void 0 : objects[id];
3817
4096
  return isDict(found) ? found : void 0;
3818
4097
  };
3819
- const project = object(str(root.rootObject));
4098
+ const project = object3(str(root.rootObject));
3820
4099
  if (!project || project.isa !== "PBXProject") {
3821
4100
  throw new Error(`${projectFile} has no PBXProject root`);
3822
4101
  }
3823
- const projectDir = fs16.realpathSync(
3824
- path30.resolve(path30.dirname(xcodeproj), str(project.projectDirPath) ?? "")
4102
+ const projectDir = fs17.realpathSync(
4103
+ path36.resolve(path36.dirname(xcodeproj), str(project.projectDirPath) ?? "")
3825
4104
  );
3826
- const resolvePath = xcodePathResolver(objects, projectDir, path30.join);
4105
+ const resolvePath = xcodePathResolver(objects, projectDir, path36.join);
3827
4106
  const result = {
3828
4107
  xcodeproj,
3829
4108
  projectFile,
3830
4109
  objects,
3831
4110
  project,
3832
4111
  projectDir,
3833
- object,
4112
+ object: object3,
3834
4113
  resolvePath,
3835
4114
  visitMembers: xcodeTargetMemberVisitor(objects)
3836
4115
  };
@@ -3860,8 +4139,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3860
4139
  const relative2 = str(config.baseConfigurationReferenceRelativePath);
3861
4140
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
3862
4141
  const directory = anchor ? project.resolvePath(anchor) : null;
3863
- const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path30.resolve(directory, relative2) : null;
3864
- if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs16.existsSync(baseFile)))
4142
+ const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path36.resolve(directory, relative2) : null;
4143
+ if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs17.existsSync(baseFile)))
3865
4144
  throw new Error(
3866
4145
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
3867
4146
  );
@@ -3907,7 +4186,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3907
4186
  const derivedSettings = {
3908
4187
  DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (developerDir ?? (developerDir = process.platform === "darwin" ? (
3909
4188
  // runner-toolchain-platform: darwin
3910
- execFileSync11("xcode-select", ["-p"], {
4189
+ execFileSync15("xcode-select", ["-p"], {
3911
4190
  encoding: "utf8",
3912
4191
  stdio: ["ignore", "pipe", "pipe"]
3913
4192
  }).trim()
@@ -3915,6 +4194,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3915
4194
  PRODUCT_NAME: () => get("TARGET_NAME"),
3916
4195
  PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
3917
4196
  EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
4197
+ MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str(target.productType) ?? ""] ?? "",
4198
+ // the native defaults of CoreBuildSystem.xcspec for a dynamic framework
4199
+ EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
4200
+ DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
4201
+ LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
3918
4202
  // the native default of CoreBuildSystem.xcspec
3919
4203
  EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () => "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
3920
4204
  };
@@ -3954,26 +4238,26 @@ function scriptCommand(shell, script) {
3954
4238
  return [executable, ...args, "-c", script];
3955
4239
  }
3956
4240
  function expandSearchPath(directory, rules2) {
3957
- if (path30.basename(directory) !== "**") return [directory];
4241
+ if (path36.basename(directory) !== "**") return [directory];
3958
4242
  const expanded = [];
3959
4243
  const seen = /* @__PURE__ */ new Set();
3960
- const queue = [path30.dirname(directory)];
4244
+ const queue = [path36.dirname(directory)];
3961
4245
  for (let at = 0; at < queue.length; at++) {
3962
4246
  const current = queue[at];
3963
4247
  let real;
3964
4248
  try {
3965
- real = fs16.realpathSync(current);
4249
+ real = fs17.realpathSync(current);
3966
4250
  } catch {
3967
4251
  continue;
3968
4252
  }
3969
- if (!fs16.statSync(real).isDirectory() || seen.has(real)) continue;
4253
+ if (!fs17.statSync(real).isDirectory() || seen.has(real)) continue;
3970
4254
  seen.add(real);
3971
4255
  expanded.push(current);
3972
- for (const entry of fs16.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
4256
+ for (const entry of fs17.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
3973
4257
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
3974
4258
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
3975
4259
  continue;
3976
- queue.push(path30.join(current, entry.name));
4260
+ queue.push(path36.join(current, entry.name));
3977
4261
  }
3978
4262
  }
3979
4263
  return expanded;
@@ -4044,7 +4328,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
4044
4328
  for (const token of tokens) {
4045
4329
  if (token.startsWith("-")) break;
4046
4330
  const file = resolve(token);
4047
- if (file?.endsWith(".xcassets")) catalogs.push(path30.resolve(projectDir, file));
4331
+ if (file?.endsWith(".xcassets")) catalogs.push(path36.resolve(projectDir, file));
4048
4332
  }
4049
4333
  }
4050
4334
  return catalogs;
@@ -4089,14 +4373,14 @@ function shellCopies(script, settings, projectDir) {
4089
4373
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
4090
4374
  return [];
4091
4375
  copies.push({
4092
- from: path30.resolve(projectDir, operands[0]),
4093
- to: path30.resolve(projectDir, operands[1])
4376
+ from: path36.resolve(projectDir, operands[0]),
4377
+ to: path36.resolve(projectDir, operands[1])
4094
4378
  });
4095
4379
  }
4096
4380
  return copies;
4097
4381
  }
4098
4382
  function fileListEntries(file, absolute) {
4099
- return fs16.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
4383
+ return fs17.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
4100
4384
  }
4101
4385
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4102
4386
  const { project, target, id: targetId } = ref;
@@ -4109,7 +4393,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4109
4393
  const copiedFiles = [];
4110
4394
  let generatedInfoPlist = false;
4111
4395
  const declaredInfoPlist = settings("INFOPLIST_FILE");
4112
- const infoPlistOutput = declaredInfoPlist ? path30.resolve(project.projectDir, declaredInfoPlist) : null;
4396
+ const infoPlistOutput = declaredInfoPlist ? path36.resolve(project.projectDir, declaredInfoPlist) : null;
4113
4397
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
4114
4398
  for (const phaseId of list(target.buildPhases)) {
4115
4399
  const phase = project.object(phaseId);
@@ -4124,7 +4408,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4124
4408
  copiedFiles.push(
4125
4409
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
4126
4410
  );
4127
- const absolute = (raw) => path30.resolve(project.projectDir, expand(raw, settings));
4411
+ const absolute = (raw) => path36.resolve(project.projectDir, expand(raw, settings));
4128
4412
  const inputs = list(phase.inputPaths).map(absolute);
4129
4413
  const outputs = list(phase.outputPaths).map(absolute);
4130
4414
  const fileLists = /* @__PURE__ */ new Map();
@@ -4133,7 +4417,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4133
4417
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
4134
4418
  ).map((raw) => {
4135
4419
  const file = absolute(raw);
4136
- if (!fs16.existsSync(file)) {
4420
+ if (!fs17.existsSync(file)) {
4137
4421
  return { file, entries: [] };
4138
4422
  }
4139
4423
  return { file, entries: fileListEntries(file, absolute) };
@@ -4154,7 +4438,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4154
4438
  ...fileLists.get("OUTPUT").map((item) => item.file)
4155
4439
  ];
4156
4440
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
4157
- for (const file of inputFiles) if (fs16.existsSync(file)) projectInputs.add(file);
4441
+ for (const file of inputFiles) if (fs17.existsSync(file)) projectInputs.add(file);
4158
4442
  }
4159
4443
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
4160
4444
  const configuration = settings("CONFIGURATION");
@@ -4167,10 +4451,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4167
4451
  false
4168
4452
  ))
4169
4453
  continue;
4170
- const phaseDir = path30.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
4454
+ const phaseDir = path36.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
4171
4455
  for (const lists of fileLists.values())
4172
4456
  for (const { file } of lists)
4173
- if (!fs16.existsSync(file))
4457
+ if (!fs17.existsSync(file))
4174
4458
  throw new Error(
4175
4459
  `${targetName}: Run Script "${script}" missing file list ${file}`
4176
4460
  );
@@ -4189,25 +4473,25 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4189
4473
  const lists = fileLists.get(kind);
4190
4474
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
4191
4475
  lists.forEach((_item, index) => {
4192
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path30.join(
4476
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path36.join(
4193
4477
  phaseDir,
4194
4478
  `${kind}-${index}.xcfilelist`
4195
4479
  );
4196
4480
  });
4197
4481
  }
4198
- const signature = createHash15("sha256").update(
4482
+ const signature = createHash20("sha256").update(
4199
4483
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
4200
4484
  );
4201
4485
  for (const file of inputFiles) {
4202
4486
  signature.update(file);
4203
- if (fs16.existsSync(file)) {
4204
- const stat = fs16.statSync(file);
4487
+ if (fs17.existsSync(file)) {
4488
+ const stat = fs17.statSync(file);
4205
4489
  signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
4206
4490
  } else signature.update("missing");
4207
4491
  }
4208
4492
  const stamp = signature.digest("hex");
4209
4493
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
4210
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs16.existsSync(file))) {
4494
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs17.existsSync(file))) {
4211
4495
  preparedXcodePhase(
4212
4496
  project.projectFile,
4213
4497
  targetId,
@@ -4218,14 +4502,14 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4218
4502
  );
4219
4503
  continue;
4220
4504
  }
4221
- fs16.mkdirSync(phaseDir, { recursive: true });
4222
- fs16.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
4223
- fs16.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
4505
+ fs17.mkdirSync(phaseDir, { recursive: true });
4506
+ fs17.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
4507
+ fs17.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
4224
4508
  for (const output2 of allOutputs)
4225
- fs16.mkdirSync(path30.dirname(output2), { recursive: true });
4509
+ fs17.mkdirSync(path36.dirname(output2), { recursive: true });
4226
4510
  for (const [kind, lists] of fileLists)
4227
4511
  lists.forEach((item, index) => {
4228
- fs16.writeFileSync(
4512
+ fs17.writeFileSync(
4229
4513
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
4230
4514
  `${item.entries.join("\n")}
4231
4515
  `
@@ -4236,7 +4520,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
4236
4520
  str(phase.shellPath) ?? "/bin/sh",
4237
4521
  str(phase.shellScript) ?? ""
4238
4522
  );
4239
- execFileSync11(shell, args, {
4523
+ execFileSync15(shell, args, {
4240
4524
  cwd: project.projectDir,
4241
4525
  env,
4242
4526
  stdio: ["ignore", "pipe", "pipe"],
@@ -4252,7 +4536,7 @@ ${output2}`
4252
4536
  );
4253
4537
  }
4254
4538
  const missing = allOutputs.filter(
4255
- (file) => file === infoPlistOutput && !fs16.existsSync(file)
4539
+ (file) => file === infoPlistOutput && !fs17.existsSync(file)
4256
4540
  );
4257
4541
  if (missing.length > 0)
4258
4542
  throw new Error(
@@ -4272,8 +4556,8 @@ ${output2}`
4272
4556
  project.visitMembers(
4273
4557
  targetId,
4274
4558
  project.resolvePath,
4275
- (file) => isDirectory(file) ? walkFiles(file) : fs16.existsSync(file) ? [file] : [],
4276
- path30.join,
4559
+ (file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
4560
+ path36.join,
4277
4561
  (file, kind) => {
4278
4562
  if (kind === "header") {
4279
4563
  headers.add(file);
@@ -4283,9 +4567,9 @@ ${output2}`
4283
4567
  resources.add(file);
4284
4568
  return;
4285
4569
  }
4286
- if (!fs16.existsSync(file)) {
4570
+ if (!fs17.existsSync(file)) {
4287
4571
  if (options.requireSources === false) return;
4288
- const script = scriptForOutput.get(path30.normalize(file));
4572
+ const script = scriptForOutput.get(path36.normalize(file));
4289
4573
  throw new Error(
4290
4574
  script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
4291
4575
  );
@@ -4306,37 +4590,37 @@ ${output2}`
4306
4590
  function commonAncestor(dirs) {
4307
4591
  let common = dirs[0];
4308
4592
  for (const dir of dirs) {
4309
- while (common !== path30.dirname(common) && path30.relative(common, dir).startsWith(".."))
4310
- common = path30.dirname(common);
4593
+ while (common !== path36.dirname(common) && path36.relative(common, dir).startsWith(".."))
4594
+ common = path36.dirname(common);
4311
4595
  }
4312
4596
  return common;
4313
4597
  }
4314
- var isPodsProject = (xcodeproj) => path30.basename(xcodeproj) === "Pods.xcodeproj" && path30.basename(path30.dirname(xcodeproj)) === "Pods";
4598
+ var isPodsProject = (xcodeproj) => path36.basename(xcodeproj) === "Pods.xcodeproj" && path36.basename(path36.dirname(xcodeproj)) === "Pods";
4315
4599
  function installedPodsSandbox(pods) {
4316
- const podfileLock = path30.join(path30.dirname(pods), "Podfile.lock");
4317
- const manifestLock = path30.join(pods, "Manifest.lock");
4318
- if (!fs16.existsSync(podfileLock))
4600
+ const podfileLock = path36.join(path36.dirname(pods), "Podfile.lock");
4601
+ const manifestLock = path36.join(pods, "Manifest.lock");
4602
+ if (!fs17.existsSync(podfileLock))
4319
4603
  throw new Error(
4320
- `${pods} has no ${podfileLock}: run \`pod install\` in ${path30.dirname(pods)}`
4604
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${path36.dirname(pods)}`
4321
4605
  );
4322
- if (!fs16.existsSync(manifestLock) || !fs16.readFileSync(manifestLock).equals(fs16.readFileSync(podfileLock)))
4606
+ if (!fs17.existsSync(manifestLock) || !fs17.readFileSync(manifestLock).equals(fs17.readFileSync(podfileLock)))
4323
4607
  throw new Error(
4324
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path30.dirname(pods)}`
4608
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path36.dirname(pods)}`
4325
4609
  );
4326
4610
  const specChecksums = {};
4327
- const lines = fs16.readFileSync(manifestLock, "utf8").split("\n");
4611
+ const lines = fs17.readFileSync(manifestLock, "utf8").split("\n");
4328
4612
  const start = lines.indexOf("SPEC CHECKSUMS:");
4329
4613
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
4330
4614
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
4331
4615
  if (!entry) break;
4332
4616
  specChecksums[entry[1]] = entry[2];
4333
4617
  }
4334
- const specs = path30.join(pods, "Local Podspecs");
4618
+ const specs = path36.join(pods, "Local Podspecs");
4335
4619
  return {
4336
4620
  podfileLock,
4337
4621
  manifestLock,
4338
4622
  specChecksums,
4339
- localPodspecs: isDirectory(specs) ? fs16.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => path30.join(specs, name2)) : []
4623
+ localPodspecs: isDirectory(specs) ? fs17.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => path36.join(specs, name2)) : []
4340
4624
  };
4341
4625
  }
4342
4626
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -4348,14 +4632,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
4348
4632
  if (!xcodeProjectFile(xcodeproj)) {
4349
4633
  if (installedPods && isPodsProject(xcodeproj))
4350
4634
  throw new Error(
4351
- `${path30.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path30.dirname(path30.dirname(xcodeproj))}`
4635
+ `${path36.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path36.dirname(path36.dirname(xcodeproj))}`
4352
4636
  );
4353
4637
  return;
4354
4638
  }
4355
- const key = fs16.realpathSync(xcodeproj);
4356
- if (projectAt.has(key) || !installedPods && key.split(path30.sep).includes("Pods"))
4639
+ const key = fs17.realpathSync(xcodeproj);
4640
+ if (projectAt.has(key) || !installedPods && key.split(path36.sep).includes("Pods"))
4357
4641
  return;
4358
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(path30.dirname(key));
4642
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(path36.dirname(key));
4359
4643
  const project = loadProject(key);
4360
4644
  projectAt.set(key, project);
4361
4645
  projects.push(project);
@@ -4371,12 +4655,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
4371
4655
  for (const reference of listed)
4372
4656
  if (reference.endsWith(".xcodeproj")) addProject(reference);
4373
4657
  if (projects.length === 0) {
4374
- throw new Error(`${path30.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
4658
+ throw new Error(`${path36.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
4375
4659
  }
4376
- const podfile = path30.join(path30.dirname(xcodeprojOrWorkspace), "Podfile");
4377
- if (installedPods && !cocoapods && fs16.existsSync(podfile))
4660
+ const podfile = path36.join(path36.dirname(xcodeprojOrWorkspace), "Podfile");
4661
+ if (installedPods && !cocoapods && fs17.existsSync(podfile))
4378
4662
  throw new Error(
4379
- `${podfile} is not installed into ${path30.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path30.dirname(podfile)} and open the workspace it writes`
4663
+ `${podfile} is not installed into ${path36.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path36.dirname(podfile)} and open the workspace it writes`
4380
4664
  );
4381
4665
  return { listed, projects, projectAt, cocoapods };
4382
4666
  }
@@ -4412,7 +4696,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
4412
4696
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
4413
4697
  }
4414
4698
  function defaultXcodeAppTarget(xcodeproj) {
4415
- const project = loadProject(fs16.realpathSync(xcodeproj));
4699
+ const project = loadProject(fs17.realpathSync(xcodeproj));
4416
4700
  for (const [id, target] of Object.entries(project.objects)) {
4417
4701
  if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
4418
4702
  if (isIosAppTarget({ project, id, target }, { requireSources: false }))
@@ -4420,30 +4704,30 @@ function defaultXcodeAppTarget(xcodeproj) {
4420
4704
  }
4421
4705
  }
4422
4706
  function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4423
- const container = fs16.realpathSync(xcodeprojOrWorkspace);
4707
+ const container = fs17.realpathSync(xcodeprojOrWorkspace);
4424
4708
  const { projects } = workspaceProjects(container);
4425
4709
  const containers = [
4426
4710
  .../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
4427
4711
  ];
4428
4712
  const found = containers.flatMap(
4429
4713
  (dir) => [
4430
- path30.join(dir, "xcshareddata"),
4431
- ...isDirectory(path30.join(dir, "xcuserdata")) ? fs16.readdirSync(path30.join(dir, "xcuserdata")).sort().map((user) => path30.join(dir, "xcuserdata", user)) : []
4714
+ path36.join(dir, "xcshareddata"),
4715
+ ...isDirectory(path36.join(dir, "xcuserdata")) ? fs17.readdirSync(path36.join(dir, "xcuserdata")).sort().map((user) => path36.join(dir, "xcuserdata", user)) : []
4432
4716
  ].map((data) => ({
4433
4717
  dir,
4434
- file: path30.join(data, "xcschemes", `${scheme}.xcscheme`)
4718
+ file: path36.join(data, "xcschemes", `${scheme}.xcscheme`)
4435
4719
  }))
4436
- ).find((candidate) => fs16.existsSync(candidate.file));
4720
+ ).find((candidate) => fs17.existsSync(candidate.file));
4437
4721
  if (!found) {
4438
4722
  const known = containers.flatMap(
4439
- (dir) => fs16.existsSync(path30.join(dir, "xcshareddata", "xcschemes")) ? fs16.readdirSync(path30.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
4723
+ (dir) => fs17.existsSync(path36.join(dir, "xcshareddata", "xcschemes")) ? fs17.readdirSync(path36.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
4440
4724
  );
4441
4725
  throw new Error(
4442
- `${path30.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
4726
+ `${path36.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
4443
4727
  );
4444
4728
  }
4445
4729
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
4446
- fs16.readFileSync(found.file, "utf8")
4730
+ fs17.readFileSync(found.file, "utf8")
4447
4731
  );
4448
4732
  const attribute = (text2, name3) => {
4449
4733
  const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
@@ -4456,12 +4740,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4456
4740
  if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
4457
4741
  throw new Error(`scheme ${scheme} runs no application target`);
4458
4742
  }
4459
- const projectPath = path30.resolve(
4460
- path30.dirname(found.dir),
4743
+ const projectPath = path36.resolve(
4744
+ path36.dirname(found.dir),
4461
4745
  referenced.slice("container:".length)
4462
4746
  );
4463
4747
  const project = projects.find(
4464
- (candidate) => fs16.existsSync(projectPath) && candidate.xcodeproj === fs16.realpathSync(projectPath)
4748
+ (candidate) => fs17.existsSync(projectPath) && candidate.xcodeproj === fs17.realpathSync(projectPath)
4465
4749
  );
4466
4750
  const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
4467
4751
  const name2 = target && str(target.target.name);
@@ -4471,26 +4755,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4471
4755
  var NativeAppTargetSelectionError = class extends Error {
4472
4756
  };
4473
4757
  function selectIosAppTarget(projectRoot, iosTarget) {
4474
- const nested = path30.join(projectRoot, "ios");
4475
- const iosRoot = fs16.existsSync(nested) ? nested : projectRoot;
4476
- const entries = fs16.readdirSync(iosRoot, { withFileTypes: true });
4758
+ const nested = path36.join(projectRoot, "ios");
4759
+ const iosRoot = fs17.existsSync(nested) ? nested : projectRoot;
4760
+ const entries = fs17.readdirSync(iosRoot, { withFileTypes: true });
4477
4761
  const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
4478
- xcodeproj: path30.join(iosRoot, entry.name),
4762
+ xcodeproj: path36.join(iosRoot, entry.name),
4479
4763
  workspace: null
4480
4764
  })) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
4481
- const workspace = path30.join(iosRoot, entry.name);
4765
+ const workspace = path36.join(iosRoot, entry.name);
4482
4766
  return workspaceReferences(workspace).map((xcodeproj2) => ({
4483
4767
  xcodeproj: xcodeproj2,
4484
4768
  workspace
4485
4769
  }));
4486
4770
  }).filter(
4487
- ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path30.sep).includes("Pods") && fs16.existsSync(xcodeproj2)
4771
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path36.sep).includes("Pods") && fs17.existsSync(xcodeproj2)
4488
4772
  ).filter(
4489
4773
  ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
4490
4774
  )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
4491
4775
  xcodeproj: xcodeproj2,
4492
4776
  workspace,
4493
- name: path30.basename(xcodeproj2)
4777
+ name: path36.basename(xcodeproj2)
4494
4778
  }));
4495
4779
  if (projects.length === 0) return null;
4496
4780
  if (projects.length > 1 && !iosTarget) {
@@ -4519,13 +4803,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
4519
4803
  if (!target) throw new Error("native app identity has no iOS application target");
4520
4804
  if (!iosTarget) {
4521
4805
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
4522
- const container = fs16.existsSync(workspace) ? workspace : xcodeproj;
4806
+ const container = fs17.existsSync(workspace) ? workspace : xcodeproj;
4523
4807
  const hasScheme = [container, xcodeproj].some((dir) => {
4524
- if (fs16.existsSync(path30.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
4808
+ if (fs17.existsSync(path36.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
4525
4809
  return true;
4526
- const users = path30.join(dir, "xcuserdata");
4527
- return fs16.existsSync(users) && fs16.readdirSync(users).some(
4528
- (user) => fs16.existsSync(path30.join(users, user, "xcschemes", `${target}.xcscheme`))
4810
+ const users = path36.join(dir, "xcuserdata");
4811
+ return fs17.existsSync(users) && fs17.readdirSync(users).some(
4812
+ (user) => fs17.existsSync(path36.join(users, user, "xcschemes", `${target}.xcscheme`))
4529
4813
  );
4530
4814
  });
4531
4815
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -4534,8 +4818,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
4534
4818
  throw new Error(`native app identity has no application target ${target}`);
4535
4819
  return { xcodeproj, target, workspace: project.workspace };
4536
4820
  }
4537
- var workspaceResolvedFile = (xcodeprojOrWorkspace) => path30.join(
4538
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path30.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4821
+ var workspaceResolvedFile = (xcodeprojOrWorkspace) => path36.join(
4822
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path36.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4539
4823
  "xcshareddata",
4540
4824
  "swiftpm",
4541
4825
  "Package.resolved"
@@ -4550,7 +4834,7 @@ var SwiftPackageResolutionRequired = class extends Error {
4550
4834
  }
4551
4835
  };
4552
4836
  function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
4553
- const xcodeprojOrWorkspace = fs16.realpathSync(input);
4837
+ const xcodeprojOrWorkspace = fs17.realpathSync(input);
4554
4838
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
4555
4839
  const { listed, projects, projectAt, cocoapods } = workspaceProjects(
4556
4840
  xcodeprojOrWorkspace,
@@ -4559,7 +4843,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4559
4843
  const allTargets = projects.flatMap(projectTargets);
4560
4844
  const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
4561
4845
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
4562
- const container = path30.basename(xcodeprojOrWorkspace);
4846
+ const container = path36.basename(xcodeprojOrWorkspace);
4563
4847
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
4564
4848
  if (named.length !== 1) {
4565
4849
  if (appTargets.length === 0)
@@ -4580,31 +4864,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4580
4864
  for (const ref of allTargets) {
4581
4865
  const product = ref.project.object(str(ref.target.productReference));
4582
4866
  const file = str(product?.path);
4583
- if (file && !byProduct.has(path30.basename(file)))
4584
- byProduct.set(path30.basename(file), ref);
4867
+ if (file && !byProduct.has(path36.basename(file)))
4868
+ byProduct.set(path36.basename(file), ref);
4585
4869
  }
4586
4870
  const proxied = (project, proxyId) => {
4587
4871
  const proxy = project.object(proxyId);
4588
4872
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
4589
4873
  const portal = str(proxy.containerPortal);
4590
4874
  const portalPath = project.resolvePath(portal ?? "");
4591
- const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && fs16.existsSync(portalPath) ? projectAt.get(fs16.realpathSync(portalPath)) : void 0;
4875
+ const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && fs17.existsSync(portalPath) ? projectAt.get(fs17.realpathSync(portalPath)) : void 0;
4592
4876
  const remote = str(proxy.remoteGlobalIDString);
4593
4877
  if (!owner || !remote) return void 0;
4594
4878
  return projectTargets(owner).find(
4595
4879
  (ref) => ref.id === remote || str(ref.target.productReference) === remote
4596
4880
  );
4597
4881
  };
4598
- const dependenciesOf = (ref) => {
4882
+ const linkedTargets = (ref) => {
4599
4883
  const { project, target } = ref;
4600
4884
  const found = [];
4601
- for (const dependencyId of list(target.dependencies)) {
4602
- const dependency = project.object(dependencyId);
4603
- if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
4604
- const direct = str(dependency.target);
4605
- const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
4606
- if (resolved) found.push(resolved);
4607
- }
4608
4885
  for (const phaseId of list(target.buildPhases)) {
4609
4886
  const phase = project.object(phaseId);
4610
4887
  if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
@@ -4612,11 +4889,38 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4612
4889
  const buildFile = project.object(buildFileId);
4613
4890
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
4614
4891
  const file = project.object(str(buildFile.fileRef));
4615
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path30.basename(str(file.path) ?? "")) : void 0;
4616
- if (resolved) found.push(resolved);
4892
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path36.basename(str(file.path) ?? "")) : void 0;
4893
+ if (resolved)
4894
+ found.push({
4895
+ target: resolved,
4896
+ attributes: list(
4897
+ isDict(buildFile.settings) ? buildFile.settings.ATTRIBUTES : void 0
4898
+ )
4899
+ });
4617
4900
  }
4618
4901
  }
4619
- return found.filter(
4902
+ return found;
4903
+ };
4904
+ const frameworkFlagLinks = (ref, flags) => {
4905
+ const words = settingList(flags);
4906
+ const linked = new Set(linkedTargets(ref).map((link) => link.target));
4907
+ return words.flatMap((word, index) => {
4908
+ const target = words[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
4909
+ if (!target || target === ref || linked.has(target)) return [];
4910
+ linked.add(target);
4911
+ return [{ target, attributes: [] }];
4912
+ });
4913
+ };
4914
+ const dependenciesOf = (ref) => {
4915
+ const { project, target } = ref;
4916
+ const found = list(target.dependencies).flatMap((dependencyId) => {
4917
+ const dependency = project.object(dependencyId);
4918
+ if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
4919
+ const direct = str(dependency.target);
4920
+ const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
4921
+ return resolved ? [resolved] : [];
4922
+ });
4923
+ return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
4620
4924
  (candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
4621
4925
  );
4622
4926
  };
@@ -4669,8 +4973,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4669
4973
  ref.project.visitMembers(
4670
4974
  ref.id,
4671
4975
  ref.project.resolvePath,
4672
- (file) => isDirectory(file) ? walkFiles(file) : fs16.existsSync(file) ? [file] : [],
4673
- path30.join,
4976
+ (file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
4977
+ path36.join,
4674
4978
  (file, kind) => {
4675
4979
  if (kind === "header") found.push(file);
4676
4980
  }
@@ -4686,12 +4990,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4686
4990
  for (const ref of projectTargets(project)) {
4687
4991
  const product = productName(ref);
4688
4992
  for (const { file, visibility } of headerPhase(ref)) {
4689
- const name2 = path30.basename(file);
4993
+ const name2 = path36.basename(file);
4690
4994
  if (!entries.has(name2))
4691
4995
  entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
4692
4996
  }
4693
4997
  for (const file of synchronizedHeaders(ref)) {
4694
- const name2 = path30.basename(file);
4998
+ const name2 = path36.basename(file);
4695
4999
  if (!entries.has(name2)) entries.set(name2, file);
4696
5000
  }
4697
5001
  }
@@ -4701,7 +5005,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4701
5005
  if (folder === null) continue;
4702
5006
  for (const file of walkFiles(folder)) {
4703
5007
  if (!HEADER_FILE.test(file)) continue;
4704
- const name2 = path30.basename(file);
5008
+ const name2 = path36.basename(file);
4705
5009
  if (!entries.has(name2)) entries.set(name2, file);
4706
5010
  }
4707
5011
  }
@@ -4709,18 +5013,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4709
5013
  for (const id of Object.keys(project.objects)) {
4710
5014
  if (project.object(id)?.isa !== "PBXFileReference") continue;
4711
5015
  const file = project.resolvePath(id);
4712
- if (file && HEADER_FILE.test(file) && !entries.has(path30.basename(file)))
4713
- entries.set(path30.basename(file), file);
5016
+ if (file && HEADER_FILE.test(file) && !entries.has(path36.basename(file)))
5017
+ entries.set(path36.basename(file), file);
4714
5018
  }
4715
5019
  const map = [...entries];
4716
5020
  projectHeaderMaps.set(project, map);
4717
5021
  return map;
4718
5022
  };
4719
5023
  const xcconfigs = /* @__PURE__ */ new Set();
4720
- const buildDir = (project) => path30.join(project.projectDir, ".build/peach-xcode/Build");
5024
+ const buildDir = (project) => path36.join(project.projectDir, ".build/peach-xcode/Build");
4721
5025
  const workspaceBuild = {
4722
- SYMROOT: path30.join(buildDir(app.project), "Products"),
4723
- OBJROOT: path30.join(buildDir(app.project), "Intermediates.noindex")
5026
+ SYMROOT: path36.join(buildDir(app.project), "Products"),
5027
+ OBJROOT: path36.join(buildDir(app.project), "Intermediates.noindex")
4724
5028
  };
4725
5029
  const moduleTarget = (ref) => {
4726
5030
  const name2 = str(ref.target.name) ?? ref.id;
@@ -4735,15 +5039,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4735
5039
  TARGET_NAME: name2,
4736
5040
  TARGETNAME: "$(TARGET_NAME)",
4737
5041
  PROJECT: "$(PROJECT_NAME)",
4738
- PROJECT_NAME: path30.basename(ref.project.xcodeproj, ".xcodeproj"),
5042
+ PROJECT_NAME: path36.basename(ref.project.xcodeproj, ".xcodeproj"),
4739
5043
  PROJECT_FILE_PATH: ref.project.xcodeproj,
4740
5044
  SRCROOT: ref.project.projectDir,
4741
5045
  SOURCE_ROOT: ref.project.projectDir,
4742
5046
  PROJECT_DIR: ref.project.projectDir,
4743
- SYMROOT: path30.join(buildDir(ref.project), "Products"),
5047
+ SYMROOT: path36.join(buildDir(ref.project), "Products"),
4744
5048
  BUILD_DIR: "$(SYMROOT)",
4745
5049
  BUILD_ROOT: "$(SYMROOT)",
4746
- OBJROOT: path30.join(buildDir(ref.project), "Intermediates.noindex"),
5050
+ OBJROOT: path36.join(buildDir(ref.project), "Intermediates.noindex"),
4747
5051
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
4748
5052
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
4749
5053
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -4785,7 +5089,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4785
5089
  xcconfigs
4786
5090
  );
4787
5091
  const searchRules = recursiveSearchRules(settings2);
4788
- const absolute = (file) => path30.resolve(ref.project.projectDir, file);
5092
+ const absolute = (file) => path36.resolve(ref.project.projectDir, file);
4789
5093
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
4790
5094
  const product = settings2("PRODUCT_NAME");
4791
5095
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -4816,7 +5120,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4816
5120
  `${name2}: Swift compatibility header phase has no Swift producer sources`
4817
5121
  );
4818
5122
  const building = options.prepareGeneratedSources && options.requireSources !== false;
4819
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path30.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
5123
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path36.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
4820
5124
  if (versioning) {
4821
5125
  const version = settings2("CURRENT_PROJECT_VERSION");
4822
5126
  const custom = [
@@ -4829,22 +5133,22 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4829
5133
  ].filter((key) => settings2(key));
4830
5134
  if (custom.length)
4831
5135
  throw new Error(
4832
- `${name2}: Xcode generates ${path30.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
5136
+ `${name2}: Xcode generates ${path36.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
4833
5137
  );
4834
5138
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
4835
5139
  const [major, minor] = version.split(".");
4836
- const number = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
5140
+ const number2 = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
4837
5141
  const unit = [
4838
5142
  ` extern const unsigned char ${symbol}VersionString[];`,
4839
5143
  ` extern const double ${symbol}VersionNumber;`,
4840
5144
  "",
4841
5145
  ` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings2("PROJECT_NAME")}-${version}" "\\n";`,
4842
- ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
5146
+ ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
4843
5147
  ""
4844
5148
  ].join("\n");
4845
- if (!fs16.existsSync(versioning) || fs16.readFileSync(versioning, "utf8") !== unit) {
4846
- fs16.mkdirSync(path30.dirname(versioning), { recursive: true });
4847
- fs16.writeFileSync(versioning, unit);
5149
+ if (!fs17.existsSync(versioning) || fs17.readFileSync(versioning, "utf8") !== unit) {
5150
+ fs17.mkdirSync(path36.dirname(versioning), { recursive: true });
5151
+ fs17.writeFileSync(versioning, unit);
4848
5152
  }
4849
5153
  allSources.push(versioning);
4850
5154
  }
@@ -4863,7 +5167,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4863
5167
  const headerFiles = headerPhase(ref);
4864
5168
  const ownHeaders = /* @__PURE__ */ new Map();
4865
5169
  for (const { file, visibility } of headerFiles) {
4866
- const name3 = path30.basename(file);
5170
+ const name3 = path36.basename(file);
4867
5171
  const published = visibility !== "Project";
4868
5172
  if (!ownHeaders.has(name3))
4869
5173
  ownHeaders.set(name3, published ? `${product}/${name3}` : file);
@@ -4871,7 +5175,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4871
5175
  ownHeaders.set(`${product}/${name3}`, file);
4872
5176
  }
4873
5177
  for (const file of synchronizedHeaders(ref)) {
4874
- const name3 = path30.basename(file);
5178
+ const name3 = path36.basename(file);
4875
5179
  if (ownHeaders.has(name3)) continue;
4876
5180
  ownHeaders.set(name3, file);
4877
5181
  const qualified = `${product}/${name3}`;
@@ -4883,24 +5187,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4883
5187
  const otherProduct = productName(other);
4884
5188
  for (const { file, visibility } of headerPhase(other)) {
4885
5189
  if (visibility === "Project") continue;
4886
- const key = `${otherProduct}/${path30.basename(file)}`;
5190
+ const key = `${otherProduct}/${path36.basename(file)}`;
4887
5191
  if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
4888
5192
  }
4889
5193
  }
4890
- const wrapper = path30.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
5194
+ const wrapper = path36.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
4891
5195
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
4892
- const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path30.join(path30.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
4893
- const frameworkCompatibility = frameworkUmbrella && moduleMap && fs16.existsSync(moduleMap) && fs16.existsSync(frameworkUmbrella) ? {
5196
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path36.join(path36.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
5197
+ const frameworkCompatibility = frameworkUmbrella && moduleMap && fs17.existsSync(moduleMap) && fs17.existsSync(frameworkUmbrella) ? {
4894
5198
  framework: true,
4895
5199
  moduleMap,
4896
5200
  umbrella: frameworkUmbrella,
4897
- outputModuleMap: path30.join(wrapper, "Modules", "module.modulemap"),
4898
- outputUmbrella: path30.join(
5201
+ outputModuleMap: path36.join(wrapper, "Modules", "module.modulemap"),
5202
+ outputUmbrella: path36.join(
4899
5203
  wrapper,
4900
5204
  "Headers",
4901
- path30.basename(frameworkUmbrella)
5205
+ path36.basename(frameworkUmbrella)
4902
5206
  ),
4903
- outputHeader: path30.join(
5207
+ outputHeader: path36.join(
4904
5208
  wrapper,
4905
5209
  "Headers",
4906
5210
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
@@ -4914,10 +5218,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4914
5218
  outputUmbrella: compatibility.outputUmbrella,
4915
5219
  outputHeader: compatibility.outputHeader
4916
5220
  } : frameworkCompatibility;
4917
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path30.relative(path30.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path30.sep)[0] !== ".." && fs16.existsSync(moduleMap) ? fs16.readdirSync(path30.dirname(moduleMap)).flatMap((entry) => {
5221
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path36.relative(path36.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path36.sep)[0] !== ".." && fs17.existsSync(moduleMap) ? fs17.readdirSync(path36.dirname(moduleMap)).flatMap((entry) => {
4918
5222
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
4919
- const file = path30.join(path30.dirname(moduleMap), entry);
4920
- return fs16.existsSync(file) ? [file] : [];
5223
+ const file = path36.join(path36.dirname(moduleMap), entry);
5224
+ return fs17.existsSync(file) ? [file] : [];
4921
5225
  }) : [];
4922
5226
  const fileFlags = {};
4923
5227
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -4941,6 +5245,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4941
5245
  settings: settings2,
4942
5246
  keys,
4943
5247
  module: {
5248
+ id: `${ref.project.projectFile}#${ref.id}`,
4944
5249
  name: name2,
4945
5250
  targetIdentity: JSON.stringify([ref.project.xcodeproj, ref.id]),
4946
5251
  targetDependencies: Array(),
@@ -4989,15 +5294,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4989
5294
  // xcode searches its products' include directory before
4990
5295
  // HEADER_SEARCH_PATHS and the target's derived sources after.
4991
5296
  headerSearchPaths: [
4992
- path30.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
5297
+ path36.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
4993
5298
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
4994
5299
  (raw) => expandSearchPath(absolute(raw), searchRules)
4995
5300
  ),
4996
- path30.join(
5301
+ path36.join(
4997
5302
  `${settings2("DERIVED_FILE_DIR")}-normal`,
4998
5303
  settings2("CURRENT_ARCH")
4999
5304
  ),
5000
- path30.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
5305
+ path36.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
5001
5306
  settings2("DERIVED_FILE_DIR")
5002
5307
  ],
5003
5308
  userHeaderSearchPaths: settingList(
@@ -5047,10 +5352,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5047
5352
  ...headerFiles.flatMap(
5048
5353
  ({ file, visibility }) => visibility === "Project" ? [] : [
5049
5354
  [
5050
- path30.join(
5355
+ path36.join(
5051
5356
  wrapper,
5052
5357
  visibility === "Public" ? "Headers" : "PrivateHeaders",
5053
- path30.basename(file)
5358
+ path36.basename(file)
5054
5359
  ),
5055
5360
  file
5056
5361
  ]
@@ -5064,7 +5369,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5064
5369
  return [];
5065
5370
  const destination = expand(
5066
5371
  str(phase.dstPath) ?? "",
5067
- (name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? path30.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? path30.join(wrapper, "PrivateHeaders") : settings2(name3)
5372
+ (name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? path36.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? path36.join(wrapper, "PrivateHeaders") : settings2(name3)
5068
5373
  );
5069
5374
  return list(phase.files).flatMap((id) => {
5070
5375
  const file = ref.project.resolvePath(
@@ -5072,17 +5377,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5072
5377
  );
5073
5378
  return file && HEADER_FILE.test(file) ? [
5074
5379
  [
5075
- path30.resolve(
5380
+ path36.resolve(
5076
5381
  settings2("BUILT_PRODUCTS_DIR"),
5077
5382
  destination,
5078
- path30.basename(file)
5383
+ path36.basename(file)
5079
5384
  ),
5080
5385
  file
5081
5386
  ]
5082
5387
  ] : [];
5083
5388
  });
5084
5389
  }),
5085
- ...moduleMap ? [[path30.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
5390
+ ...moduleMap ? [[path36.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
5086
5391
  ]) : Object.fromEntries([
5087
5392
  ...podHeaders.map((file) => [file, file]),
5088
5393
  ...moduleMap ? [[moduleMap, moduleMap]] : []
@@ -5114,7 +5419,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5114
5419
  const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
5115
5420
  const frameworks = frameworkTargets.map(({ framework }) => framework);
5116
5421
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
5117
- ({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path30.dirname(file)).filter((dir) => fs16.existsSync(dir)) : []
5422
+ ({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path36.dirname(file)).filter((dir) => fs17.existsSync(dir)) : []
5118
5423
  );
5119
5424
  const expandValue = (value, settings2) => {
5120
5425
  if (typeof value === "string") return expand(value, settings2);
@@ -5135,7 +5440,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5135
5440
  const phase = owner.ref.project.object(phaseId);
5136
5441
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
5137
5442
  continue;
5138
- const absolute = (raw) => path30.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
5443
+ const absolute = (raw) => path36.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
5139
5444
  const entries = (paths) => paths.flatMap((raw) => {
5140
5445
  const file = absolute(raw);
5141
5446
  xcconfigs.add(file);
@@ -5151,7 +5456,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5151
5456
  ].filter((file) => file.endsWith(".bundle"));
5152
5457
  if (inputs.length !== outputs.length)
5153
5458
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
5154
- const destinationRoot = path30.join(
5459
+ const destinationRoot = path36.join(
5155
5460
  owner.settings("TARGET_BUILD_DIR"),
5156
5461
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
5157
5462
  );
@@ -5160,24 +5465,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5160
5465
  const file = str(
5161
5466
  target.ref.project.object(str(target.ref.target.productReference))?.path
5162
5467
  );
5163
- return file && path30.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
5468
+ return file && path36.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
5164
5469
  });
5165
5470
  if (!product && !isDirectory(input2))
5166
5471
  throw new Error(
5167
5472
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
5168
5473
  );
5169
- const destination = path30.relative(destinationRoot, outputs[index]);
5170
- if (destination === ".." || destination.startsWith(`..${path30.sep}`) || path30.isAbsolute(destination) || path30.basename(input2) !== path30.basename(destination))
5474
+ const destination = path36.relative(destinationRoot, outputs[index]);
5475
+ if (destination === ".." || destination.startsWith(`..${path36.sep}`) || path36.isAbsolute(destination) || path36.basename(input2) !== path36.basename(destination))
5171
5476
  throw new Error(
5172
5477
  `${owner.module.name}: invalid resource bundle copy destination`
5173
5478
  );
5174
- const infoFile = product ? path30.resolve(
5479
+ const infoFile = product ? path36.resolve(
5175
5480
  product.ref.project.projectDir,
5176
5481
  product.settings("INFOPLIST_FILE")
5177
5482
  ) : null;
5178
5483
  if (infoFile) xcconfigs.add(infoFile);
5179
5484
  const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
5180
- const bundlePath = prefix + destination.split(path30.sep).join("/");
5485
+ const bundlePath = prefix + destination.split(path36.sep).join("/");
5181
5486
  if (resourceProducts.some((resource) => resource.path === bundlePath))
5182
5487
  throw new Error(
5183
5488
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -5188,21 +5493,30 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5188
5493
  resources: product.module.resources,
5189
5494
  infoPlist: plist2.build(
5190
5495
  expandValue(
5191
- plist2.parse(fs16.readFileSync(infoFile, "utf8")),
5496
+ plist2.parse(fs17.readFileSync(infoFile, "utf8")),
5192
5497
  product.settings
5193
5498
  )
5194
5499
  )
5195
5500
  } : {
5196
- resources: fs16.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path30.join(entry.parentPath, entry.name)).sort(),
5501
+ resources: fs17.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path36.join(entry.parentPath, entry.name)).sort(),
5197
5502
  sourceRoot: input2
5198
5503
  }
5199
5504
  });
5200
5505
  }
5201
5506
  }
5202
5507
  }
5203
- const infoPlistFile = settings("INFOPLIST_FILE") ? path30.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
5508
+ const infoPlistFile = settings("INFOPLIST_FILE") ? path36.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
5509
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? path36.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
5510
+ const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
5511
+ plist2.parse(fs17.readFileSync(entitlementsFile, "utf8")),
5512
+ (value) => expand(value, (key) => {
5513
+ const resolved = settings(key);
5514
+ if (!resolved) throw new Error(`missing signing build setting ${key}`);
5515
+ return resolved;
5516
+ })
5517
+ ) : void 0;
5204
5518
  const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
5205
- const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs16.readFileSync(infoPlistFile, "utf8")) : {};
5519
+ const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs17.readFileSync(infoPlistFile, "utf8")) : {};
5206
5520
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
5207
5521
  throw new Error(`${module.name} Info.plist must contain a dictionary`);
5208
5522
  }
@@ -5248,7 +5562,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5248
5562
  };
5249
5563
  }
5250
5564
  const localPackageDirs = [
5251
- ...listed.filter((reference) => fs16.existsSync(path30.join(reference, "Package.swift"))),
5565
+ ...listed.filter((reference) => fs17.existsSync(path36.join(reference, "Package.swift"))),
5252
5566
  ...projects.flatMap(
5253
5567
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
5254
5568
  if (!isDict(entry)) return [];
@@ -5258,19 +5572,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5258
5572
  const packages = [];
5259
5573
  while (pending.length > 0) {
5260
5574
  const dir = pending.pop();
5261
- if (fs16.existsSync(path30.join(dir, "Package.swift"))) {
5575
+ if (fs17.existsSync(path36.join(dir, "Package.swift"))) {
5262
5576
  packages.push(dir);
5263
5577
  continue;
5264
5578
  }
5265
5579
  if (!isDirectory(dir)) continue;
5266
- for (const child of fs16.readdirSync(dir, { withFileTypes: true }))
5580
+ for (const child of fs17.readdirSync(dir, { withFileTypes: true }))
5267
5581
  if (child.isDirectory() && !child.name.startsWith("."))
5268
- pending.push(path30.join(dir, child.name));
5582
+ pending.push(path36.join(dir, child.name));
5269
5583
  }
5270
5584
  return packages;
5271
5585
  }
5272
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path30.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
5273
- return candidate && fs16.existsSync(path30.join(candidate, "Package.swift")) ? [candidate] : [];
5586
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path36.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
5587
+ return candidate && fs17.existsSync(path36.join(candidate, "Package.swift")) ? [candidate] : [];
5274
5588
  })
5275
5589
  )
5276
5590
  ];
@@ -5300,7 +5614,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5300
5614
  if ((flag === "-framework" || flag === "-weak_framework") && name2)
5301
5615
  sdkFrameworks.add(name2);
5302
5616
  });
5303
- const absolute = (raw) => path30.resolve(ref.project.projectDir, expand(raw, settings2));
5617
+ const absolute = (raw) => path36.resolve(ref.project.projectDir, expand(raw, settings2));
5304
5618
  const requested = options.nativeModules;
5305
5619
  const includeBinary = (name2, dir) => {
5306
5620
  if (!requested || nativeTargets.has(ref) || requested.includes(name2) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module2) => requested.includes(module2)))
@@ -5312,14 +5626,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5312
5626
  for (const directory of expandSearchPath(absolute(raw), searchRules)) {
5313
5627
  if (frameworkSearchDirectories.has(directory)) continue;
5314
5628
  frameworkSearchDirectories.add(directory);
5315
- if (!fs16.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
5629
+ if (!fs17.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
5316
5630
  continue;
5317
- for (const entry of fs16.readdirSync(directory, { withFileTypes: true })) {
5631
+ for (const entry of fs17.readdirSync(directory, { withFileTypes: true })) {
5318
5632
  const name2 = /^(.+)\.framework$/.exec(entry.name)?.[1];
5319
5633
  if (!name2 || byProduct.has(entry.name) || searchedFrameworks.has(name2))
5320
5634
  continue;
5321
- const file = path30.join(directory, entry.name);
5322
- if (fs16.statSync(file, { throwIfNoEntry: false })?.isDirectory())
5635
+ const file = path36.join(directory, entry.name);
5636
+ if (fs17.statSync(file, { throwIfNoEntry: false })?.isDirectory())
5323
5637
  searchedFrameworks.set(name2, file);
5324
5638
  }
5325
5639
  }
@@ -5327,9 +5641,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5327
5641
  }
5328
5642
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
5329
5643
  const dir = absolute(raw);
5330
- const modulemap = path30.join(dir, "module.modulemap");
5331
- if (!fs16.existsSync(modulemap)) continue;
5332
- const name2 = moduleMapName(fs16.readFileSync(modulemap, "utf8"));
5644
+ const modulemap = path36.join(dir, "module.modulemap");
5645
+ if (!fs17.existsSync(modulemap)) continue;
5646
+ const name2 = moduleMapName(fs17.readFileSync(modulemap, "utf8"));
5333
5647
  if (name2 && !binaryFrameworks.has(name2)) includeBinary(name2, dir);
5334
5648
  }
5335
5649
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -5338,7 +5652,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5338
5652
  const inputs = list(phase.inputPaths).map(absolute);
5339
5653
  for (const raw of list(phase.inputFileListPaths)) {
5340
5654
  const file = absolute(raw);
5341
- if (!fs16.existsSync(file)) continue;
5655
+ if (!fs17.existsSync(file)) continue;
5342
5656
  xcconfigs.add(file);
5343
5657
  inputs.push(...fileListEntries(file, absolute));
5344
5658
  }
@@ -5360,6 +5674,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5360
5674
  productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
5361
5675
  return builds ? [ref2] : [];
5362
5676
  };
5677
+ const productAttributes = /* @__PURE__ */ new Map();
5678
+ for (const phaseId of list(target.buildPhases)) {
5679
+ const phase = project.object(phaseId);
5680
+ if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
5681
+ for (const id of list(phase.files)) {
5682
+ const file = project.object(id);
5683
+ const product = str(file?.productRef);
5684
+ if (file && product && xcodeBuildFileBuildsForIos(file))
5685
+ productAttributes.set(
5686
+ product,
5687
+ list(isDict(file.settings) ? file.settings.ATTRIBUTES : void 0)
5688
+ );
5689
+ }
5690
+ }
5363
5691
  const referencedProducts = [
5364
5692
  ...list(target.dependencies).flatMap(productRef),
5365
5693
  ...list(target.buildPhases).flatMap((id) => {
@@ -5368,6 +5696,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5368
5696
  })
5369
5697
  ];
5370
5698
  const productDependencies = [
5699
+ ...productAttributes.keys(),
5371
5700
  ...list(target.packageProductDependencies).filter(
5372
5701
  (id) => productPlatforms.get(id) !== false
5373
5702
  ),
@@ -5385,9 +5714,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5385
5714
  const reference = project.object(str(dependency.package));
5386
5715
  const linked = {
5387
5716
  product,
5717
+ ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
5388
5718
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
5389
5719
  kind: "local",
5390
- dir: path30.resolve(
5720
+ dir: path36.resolve(
5391
5721
  project.projectDir,
5392
5722
  str(reference.relativePath) ?? ""
5393
5723
  )
@@ -5421,10 +5751,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5421
5751
  continue;
5422
5752
  }
5423
5753
  if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
5424
- byProduct.has(path30.basename(rawPath)))
5754
+ byProduct.has(path36.basename(rawPath)))
5425
5755
  continue;
5426
5756
  const resolved = fileId ? project.resolvePath(fileId) : null;
5427
- if (fileId && resolved !== null && !fs16.existsSync(resolved))
5757
+ if (fileId && resolved !== null && !fs17.existsSync(resolved))
5428
5758
  throw new Error(
5429
5759
  `${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
5430
5760
  );
@@ -5447,7 +5777,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5447
5777
  ({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
5448
5778
  );
5449
5779
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
5450
- let packageResolved = fs16.existsSync(resolvedFile) ? [fs16.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path30.join(dir, "Package.resolved")))].filter((file) => fs16.existsSync(file)).map((file) => fs16.realpathSync(file)).sort();
5780
+ let packageResolved = fs17.existsSync(resolvedFile) ? [fs17.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path36.join(dir, "Package.resolved")))].filter((file) => fs17.existsSync(file)).map((file) => fs17.realpathSync(file)).sort();
5451
5781
  if (packageResolved.length === 0) {
5452
5782
  const requirements = remotePackageRequirements(projects);
5453
5783
  if (requirements.length > 0) {
@@ -5458,6 +5788,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5458
5788
  const used = order.map((ref) => ref.project);
5459
5789
  return {
5460
5790
  ...module,
5791
+ sourceLinkGraph: {
5792
+ entry: module.id,
5793
+ targets: builtTargets.filter(
5794
+ ({ ref }) => ref === app || MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")
5795
+ ).map(({ ref, module: module2, settings: settings2 }) => ({
5796
+ id: module2.id,
5797
+ sourceTarget: module2.allSources.length > 0 ? module2.moduleName : null,
5798
+ productName: settings2("FULL_PRODUCT_NAME") || str(ref.project.object(str(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
5799
+ productType: str(ref.target.productType),
5800
+ installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
5801
+ buildVersion: {
5802
+ platform: settings2("PLATFORM_NAME") || null,
5803
+ minimumOS: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
5804
+ sdk: settings2("SDK_VERSION") || null
5805
+ },
5806
+ machOType: settings2("MACH_O_TYPE") || null,
5807
+ linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
5808
+ dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
5809
+ (dependency) => MODULE_PRODUCTS.has(str(dependency.target.target.productType) ?? "")
5810
+ ).map(({ target, attributes }) => ({
5811
+ target: `${target.project.projectFile}#${target.id}`,
5812
+ attributes
5813
+ }))
5814
+ }))
5815
+ },
5461
5816
  moduleMapSources: Object.fromEntries(
5462
5817
  builtTargets.flatMap(({ module: module2 }) => {
5463
5818
  const compatibility = module2.swift?.compatibility;
@@ -5473,19 +5828,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5473
5828
  } : {},
5474
5829
  rootDir: commonAncestor(
5475
5830
  [
5476
- workspace ? path30.dirname(workspace) : app.project.projectDir,
5831
+ workspace ? path36.dirname(workspace) : app.project.projectDir,
5477
5832
  ...used.map((project) => project.projectDir),
5478
5833
  ...localPackageDirs,
5479
5834
  ...linkedProducts.flatMap(
5480
- ({ source }) => source.kind === "local" && fs16.existsSync(source.dir) ? [source.dir] : []
5835
+ ({ source }) => source.kind === "local" && fs17.existsSync(source.dir) ? [source.dir] : []
5481
5836
  ),
5482
5837
  ...new Set(podSourceDirs)
5483
- ].map((dir) => fs16.realpathSync(dir))
5838
+ ].map((dir) => fs17.realpathSync(dir))
5484
5839
  ),
5485
5840
  projectFiles: [
5486
5841
  .../* @__PURE__ */ new Set([
5487
5842
  ...used.map((project) => project.projectFile),
5488
5843
  ...xcconfigs,
5844
+ ...entitlementsFile ? [entitlementsFile] : [],
5489
5845
  ...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
5490
5846
  ])
5491
5847
  ].sort(),
@@ -5493,13 +5849,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5493
5849
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
5494
5850
  infoPlist: infoPlistPending ? null : plist2.build(info),
5495
5851
  infoPlistFile,
5852
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
5496
5853
  postBundleScripts,
5497
5854
  developmentRegion: str(app.project.project.developmentRegion) ?? "en",
5498
5855
  frameworks,
5499
5856
  resourceProducts,
5500
5857
  linkedProducts,
5501
5858
  localPackageDirs: [
5502
- ...new Set(localPackageDirs.map((dir) => fs16.realpathSync(dir)))
5859
+ ...new Set(localPackageDirs.map((dir) => fs17.realpathSync(dir)))
5503
5860
  ].sort(),
5504
5861
  binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
5505
5862
  sdkFrameworks: [...sdkFrameworks].filter(
@@ -5578,14 +5935,14 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5578
5935
  const querySchemes = dictionary.LSApplicationQueriesSchemes;
5579
5936
  const urlQuerySchemes = Array.isArray(querySchemes) ? querySchemes : [];
5580
5937
  const intentIds = dictionary.OneAppIntentIdentifiers;
5581
- const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v) => typeof v === "string") ? intentIds : [];
5938
+ const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v5) => typeof v5 === "string") ? intentIds : [];
5582
5939
  const backgroundIds = dictionary.BGTaskSchedulerPermittedIdentifiers;
5583
- const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v) => typeof v === "string") ? backgroundIds : [];
5940
+ const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v5) => typeof v5 === "string") ? backgroundIds : [];
5584
5941
  const declaredModes = dictionary.UIBackgroundModes;
5585
- const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v) => typeof v === "string") ? declaredModes : [];
5586
- const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v) => typeof v === "string") ? dictionary.UISupportedInterfaceOrientations : [];
5942
+ const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v5) => typeof v5 === "string") ? declaredModes : [];
5943
+ const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v5) => typeof v5 === "string") ? dictionary.UISupportedInterfaceOrientations : [];
5587
5944
  const ipadSupportedInterfaceOrientations = Array.isArray(dictionary["UISupportedInterfaceOrientations~ipad"]) && dictionary["UISupportedInterfaceOrientations~ipad"].every(
5588
- (v) => typeof v === "string"
5945
+ (v5) => typeof v5 === "string"
5589
5946
  ) ? dictionary["UISupportedInterfaceOrientations~ipad"] : [];
5590
5947
  const defaultScreenOrientationMask = nonEmptyString2(
5591
5948
  dictionary.EXDefaultScreenOrientationMask
@@ -5594,9 +5951,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5594
5951
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
5595
5952
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
5596
5953
  const rootModuleName = readRootModuleName(
5597
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && fs17.existsSync(file)).map((file) => fs17.readFileSync(file, "utf8"))
5954
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && fs18.existsSync(file)).map((file) => fs18.readFileSync(file, "utf8"))
5598
5955
  );
5599
5956
  return stampNativeBuildSdk({
5957
+ ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
5600
5958
  applicationName,
5601
5959
  ...applicationDisplayName ? { applicationDisplayName } : {},
5602
5960
  ...rootModuleName ? { rootModuleName } : {},
@@ -5615,7 +5973,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5615
5973
  googleSignIn: readGoogleSignInConfiguration(
5616
5974
  dictionary,
5617
5975
  Object.fromEntries(
5618
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(fs17.readFileSync(file, "utf8"))])
5976
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(fs18.readFileSync(file, "utf8"))])
5619
5977
  )
5620
5978
  ),
5621
5979
  supportedInterfaceOrientations,
@@ -5624,11 +5982,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5624
5982
  alternateIconNames: [...alternateIconNames],
5625
5983
  appIconArtwork: resolveNativeAppIconArtwork(
5626
5984
  app.resources,
5627
- (file) => fs17.readFileSync(file, "utf8"),
5985
+ (file) => fs18.readFileSync(file, "utf8"),
5628
5986
  (file) => {
5629
- const extension = path31.extname(file).toLowerCase();
5987
+ const extension = path37.extname(file).toLowerCase();
5630
5988
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
5631
- return `data:${contentType};base64,${fs17.readFileSync(file).toString("base64")}`;
5989
+ return `data:${contentType};base64,${fs18.readFileSync(file).toString("base64")}`;
5632
5990
  },
5633
5991
  icons,
5634
5992
  app.appIconName,
@@ -5657,23 +6015,29 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
5657
6015
  const read = selectNativeAppIdentityReader(platform, {
5658
6016
  android: () => null,
5659
6017
  ios: () => {
5660
- const nested = path31.join(projectRoot, "ios");
5661
- const iosRoot = fs17.existsSync(nested) ? nested : projectRoot;
6018
+ const nested = path37.join(projectRoot, "ios");
6019
+ const iosRoot = fs18.existsSync(nested) ? nested : projectRoot;
5662
6020
  const prefix = iosRoot === nested ? "ios/" : "";
5663
6021
  const files = {};
5664
- for (const entry of fs17.readdirSync(iosRoot, { withFileTypes: true })) {
6022
+ for (const entry of fs18.readdirSync(iosRoot, { withFileTypes: true })) {
5665
6023
  if (entry.name === "Pods") continue;
5666
6024
  if (entry.isDirectory()) {
5667
- const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
6025
+ const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
6026
+ "Info.plist",
6027
+ "AppDelegate.swift",
6028
+ "AppDelegate.mm",
6029
+ "AppDelegate.m",
6030
+ ...fs18.readdirSync(path37.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
6031
+ ];
5668
6032
  for (const name2 of names) {
5669
6033
  const relative2 = `${prefix}${entry.name}/${name2}`;
5670
- const file = path31.join(projectRoot, relative2);
5671
- if (fs17.existsSync(file)) files[relative2] = fs17.readFileSync(file, "utf8");
6034
+ const file = path37.join(projectRoot, relative2);
6035
+ if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
5672
6036
  }
5673
- } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
6037
+ } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
5674
6038
  const relative2 = `${prefix}${entry.name}`;
5675
- const file = path31.join(projectRoot, relative2);
5676
- if (fs17.existsSync(file)) files[relative2] = fs17.readFileSync(file, "utf8");
6039
+ const file = path37.join(projectRoot, relative2);
6040
+ if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
5677
6041
  }
5678
6042
  }
5679
6043
  const identity = extractNativeAppIdentityFromFiles(
@@ -5690,41 +6054,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
5690
6054
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
5691
6055
  const files = {};
5692
6056
  if (androidMergedManifest) {
5693
- const file = path31.resolve(projectRoot, androidMergedManifest);
5694
- if (!fs17.existsSync(file)) return null;
5695
- files[androidMergedManifest] = fs17.readFileSync(file, "utf8");
6057
+ const file = path37.resolve(projectRoot, androidMergedManifest);
6058
+ if (!fs18.existsSync(file)) return null;
6059
+ files[androidMergedManifest] = fs18.readFileSync(file, "utf8");
5696
6060
  } else {
5697
- const androidRoot = path31.join(projectRoot, "android");
5698
- if (!fs17.existsSync(androidRoot)) return null;
6061
+ const androidRoot = path37.join(projectRoot, "android");
6062
+ if (!fs18.existsSync(androidRoot)) return null;
5699
6063
  const collect = (directory) => {
5700
- for (const entry of fs17.readdirSync(directory, { withFileTypes: true })) {
5701
- const file = path31.join(directory, entry.name);
6064
+ for (const entry of fs18.readdirSync(directory, { withFileTypes: true })) {
6065
+ const file = path37.join(directory, entry.name);
5702
6066
  if (entry.isDirectory()) collect(file);
5703
6067
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
5704
- files[path31.relative(projectRoot, file).split(path31.sep).join("/")] = fs17.readFileSync(file, "utf8");
6068
+ files[path37.relative(projectRoot, file).split(path37.sep).join("/")] = fs18.readFileSync(file, "utf8");
5705
6069
  }
5706
6070
  };
5707
- for (const module of fs17.readdirSync(androidRoot, { withFileTypes: true })) {
6071
+ for (const module of fs18.readdirSync(androidRoot, { withFileTypes: true })) {
5708
6072
  if (!module.isDirectory()) continue;
5709
- const outputs = path31.join(
6073
+ const outputs = path37.join(
5710
6074
  androidRoot,
5711
6075
  module.name,
5712
6076
  "build/intermediates/merged_manifests"
5713
6077
  );
5714
- if (fs17.existsSync(outputs)) collect(outputs);
6078
+ if (fs18.existsSync(outputs)) collect(outputs);
5715
6079
  }
5716
6080
  }
5717
6081
  for (const manifest of Object.keys(files)) {
5718
6082
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
5719
6083
  if (!resourceDirectory) continue;
5720
- const absolute = path31.resolve(projectRoot, resourceDirectory);
5721
- if (!fs17.existsSync(absolute)) continue;
5722
- for (const entry of fs17.readdirSync(absolute, { withFileTypes: true })) {
6084
+ const absolute = path37.resolve(projectRoot, resourceDirectory);
6085
+ if (!fs18.existsSync(absolute)) continue;
6086
+ for (const entry of fs18.readdirSync(absolute, { withFileTypes: true })) {
5723
6087
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
5724
- for (const resource of fs17.readdirSync(path31.join(absolute, entry.name))) {
6088
+ for (const resource of fs18.readdirSync(path37.join(absolute, entry.name))) {
5725
6089
  if (!resource.endsWith(".xml")) continue;
5726
6090
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
5727
- files[file] = fs17.readFileSync(path31.resolve(projectRoot, file), "utf8");
6091
+ files[file] = fs18.readFileSync(path37.resolve(projectRoot, file), "utf8");
5728
6092
  }
5729
6093
  }
5730
6094
  }
@@ -5741,7 +6105,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
5741
6105
  const app = readIosAppTarget(projectRoot, iosTarget, environment);
5742
6106
  if (!app) return null;
5743
6107
  const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
5744
- const projectManifestPath = path31.join(projectRoot, "package.json");
6108
+ const projectManifestPath = path37.join(projectRoot, "package.json");
5745
6109
  const projectRequire = createRequire(projectManifestPath);
5746
6110
  let reanimatedManifestPath;
5747
6111
  try {
@@ -5755,22 +6119,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
5755
6119
  throw error;
5756
6120
  }
5757
6121
  const installedManifest = JSON.parse(
5758
- fs17.readFileSync(reanimatedManifestPath, "utf8")
6122
+ fs18.readFileSync(reanimatedManifestPath, "utf8")
5759
6123
  );
5760
6124
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
5761
6125
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
5762
6126
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
5763
6127
  const defaults = JSON.parse(
5764
- fs17.readFileSync(
5765
- path31.join(
5766
- path31.dirname(reanimatedManifestPath),
6128
+ fs18.readFileSync(
6129
+ path37.join(
6130
+ path37.dirname(reanimatedManifestPath),
5767
6131
  "src/featureFlags/staticFlags.json"
5768
6132
  ),
5769
6133
  "utf8"
5770
6134
  )
5771
6135
  );
5772
6136
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
5773
- const manifest = JSON.parse(fs17.readFileSync(projectManifestPath, "utf8"));
6137
+ const manifest = JSON.parse(fs18.readFileSync(projectManifestPath, "utf8"));
5774
6138
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
5775
6139
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
5776
6140
  if (overrides !== void 0 && !isRecord(overrides)) {