peachsim 0.1.1880 → 0.1.1886

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 (154) hide show
  1. package/cli/commands/control.ts +11 -10
  2. package/cli/commands/reset.ts +1 -1
  3. package/cli/outbound-endpoints.ts +1 -1
  4. package/detox/index.ts +62 -1
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +8980 -4279
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +1 -1
  28. package/dist-lib/detox/index.cjs +35 -2
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +8500 -3912
  31. package/dist-lib/expo-swift-metadata.cjs +5 -1
  32. package/dist-lib/expo-swift-metadata.mjs +5 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +9744 -5071
  35. package/dist-lib/host/fetch-proxy-handler.cjs +93 -13
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +10 -2
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +8 -2
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +525 -120
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +523 -118
  51. package/dist-lib/native-app-identity-project.cjs +395 -72
  52. package/dist-lib/native-app-identity-project.mjs +723 -375
  53. package/dist-lib/native-app-identity.cjs +37 -1
  54. package/dist-lib/native-app-identity.mjs +36 -1
  55. package/dist-lib/native-firebase-metadata.cjs +1 -1
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/pdfium-raster.cjs +1 -1
  58. package/dist-lib/pdfium-raster.mjs +1 -1
  59. package/dist-lib/plist.cjs +1 -1
  60. package/dist-lib/plist.mjs +1 -1
  61. package/dist-lib/profiles.cjs +1 -1
  62. package/dist-lib/public-brand.cjs +1 -1
  63. package/dist-lib/public-origins-lib-esm.json +58 -28
  64. package/dist-lib/public-origins-lib.json +233 -92
  65. package/dist-lib/react-native-host-modules.cjs +1 -1
  66. package/dist-lib/react-native-host-modules.mjs +1 -1
  67. package/dist-lib/reap-browser.cjs +1 -1
  68. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  69. package/dist-lib/sdk.cjs +1 -1
  70. package/dist-lib/sdk.mjs +1 -1
  71. package/dist-lib/skills.cjs +30639 -25833
  72. package/dist-lib/swift-compile.cjs +6823 -2525
  73. package/dist-lib/swift-compile.mjs +6809 -2509
  74. package/dist-lib/swift-package.cjs +20 -3
  75. package/dist-lib/swift-package.mjs +20 -3
  76. package/dist-lib/swift-submit.cjs +2 -2
  77. package/dist-lib/swift-submit.mjs +2 -2
  78. package/dist-lib/swift-toolchain.cjs +19 -1
  79. package/dist-lib/swift.cjs +1 -1
  80. package/dist-lib/vite-swift.cjs +8704 -4124
  81. package/dist-lib/vite.cjs +93 -13
  82. package/dist-lib/worklet-executable.cjs +1 -1
  83. package/dist-lib/worklet-executable.mjs +1 -1
  84. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  85. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +2 -0
  86. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
  88. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -1
  89. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +2 -1
  90. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  91. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +10 -1
  92. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  93. package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +1 -1
  94. package/dist-types/packages/sootsim-swift/src/securityHostContract.d.ts +10 -0
  95. package/package.json +1 -1
  96. package/runtime-companion.json +1 -1
  97. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHost.h +555 -0
  98. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  99. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +6 -0
  100. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtocol.h +0 -1
  101. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +6 -0
  102. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarButtonItemBadge.h +1 -1
  103. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarMinimization.h +1 -1
  104. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
  105. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISearchTab.h +1 -1
  106. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITab.h +1 -1
  107. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabAccessory.h +2 -2
  108. package/sdk/ios/usr/include/os/activity.h +534 -0
  109. package/sdk/ios/usr/include/os.modulemap +15 -0
  110. package/sdk/ios/wasm/include/fcntl.h +16 -0
  111. package/sdk/ios/wasm/include/string.h +5 -0
  112. package/sdk/native-hashes.json +1 -1
  113. package/src/dns-over-https.ts +61 -9
  114. package/src/expo-swift-host.ts +11 -3
  115. package/src/host/fetch-proxy-handler.ts +51 -2
  116. package/src/host/fetch-proxy-overrides.ts +4 -0
  117. package/src/host/hostname-resolver.ts +9 -5
  118. package/src/native-app-identity-project.ts +13 -2
  119. package/src/native-app-identity.ts +47 -0
  120. package/src/nitro-adapter.lock.json +260 -260
  121. package/src/nitro-superset.lock.json +4 -4
  122. package/src/storageSnapshotContract.ts +20 -1
  123. package/src/swift-compile.ts +534 -136
  124. package/src/swift-compiler-digest.ts +15 -0
  125. package/src/swift-coverage/xcode-packages.ts +3 -2
  126. package/src/swift-distribution.lock.json +12 -12
  127. package/src/swift-guest-archive.ts +153 -0
  128. package/src/swift-guest-compile.ts +449 -0
  129. package/src/swift-guest-image-ledger.ts +656 -0
  130. package/src/swift-guest-link-plan.ts +52 -0
  131. package/src/swift-guest-link.ts +1414 -0
  132. package/src/swift-guest-linked-spans.ts +338 -0
  133. package/src/swift-guest-manifest.ts +141 -0
  134. package/src/swift-guest-projection-storage.ts +310 -0
  135. package/src/swift-guest-projection.ts +252 -0
  136. package/src/swift-guest-runtime-plan.ts +834 -0
  137. package/src/swift-guest-source-inputs.ts +427 -0
  138. package/src/swift-guest-source-plan.ts +279 -0
  139. package/src/swift-host.ts +125 -17
  140. package/src/swift-link-roots.ts +27 -50
  141. package/src/swift-package-manifest.ts +34 -18
  142. package/src/swift-package.ts +32 -2
  143. package/src/swift-packages.ts +138 -17
  144. package/src/swift-runtime-products.ts +73 -0
  145. package/src/swift-shared-sdk.ts +1 -1
  146. package/src/swift-submit.ts +13 -3
  147. package/src/swift-toolchain.ts +18 -0
  148. package/src/swift-wasm-prune.ts +313 -14
  149. package/src/swiftContract.ts +83 -0
  150. package/src/swiftRuntimeProductContract.ts +85 -45
  151. package/src/turbo-runtime.lock.json +23 -23
  152. package/src/turbo-source.ts +4 -1
  153. package/src/wasm-optimize.ts +16 -4
  154. package/src/xcode-project.ts +142 -14
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1880 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1886 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
39
39
  var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
40
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
41
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
- 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" };
42
+ 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" };
43
43
  }
44
44
  });
45
45
 
@@ -1373,7 +1373,7 @@ var require_parse = __commonJS({
1373
1373
  var token;
1374
1374
  var key;
1375
1375
  var root;
1376
- module2.exports = function parse4(text2, reviver) {
1376
+ module2.exports = function parse7(text2, reviver) {
1377
1377
  source = String(text2);
1378
1378
  parseState = "start";
1379
1379
  stack = [];
@@ -1556,15 +1556,15 @@ var require_parse = __commonJS({
1556
1556
  return newToken("punctuator", read());
1557
1557
  case "n":
1558
1558
  read();
1559
- literal("ull");
1559
+ literal2("ull");
1560
1560
  return newToken("null", null);
1561
1561
  case "t":
1562
1562
  read();
1563
- literal("rue");
1563
+ literal2("rue");
1564
1564
  return newToken("boolean", true);
1565
1565
  case "f":
1566
1566
  read();
1567
- literal("alse");
1567
+ literal2("alse");
1568
1568
  return newToken("boolean", false);
1569
1569
  case "-":
1570
1570
  case "+":
@@ -1595,11 +1595,11 @@ var require_parse = __commonJS({
1595
1595
  return;
1596
1596
  case "I":
1597
1597
  read();
1598
- literal("nfinity");
1598
+ literal2("nfinity");
1599
1599
  return newToken("numeric", Infinity);
1600
1600
  case "N":
1601
1601
  read();
1602
- literal("aN");
1602
+ literal2("aN");
1603
1603
  return newToken("numeric", NaN);
1604
1604
  case '"':
1605
1605
  case "'":
@@ -1693,11 +1693,11 @@ var require_parse = __commonJS({
1693
1693
  return;
1694
1694
  case "I":
1695
1695
  read();
1696
- literal("nfinity");
1696
+ literal2("nfinity");
1697
1697
  return newToken("numeric", sign * Infinity);
1698
1698
  case "N":
1699
1699
  read();
1700
- literal("aN");
1700
+ literal2("aN");
1701
1701
  return newToken("numeric", NaN);
1702
1702
  }
1703
1703
  throw invalidChar(read());
@@ -1930,7 +1930,7 @@ var require_parse = __commonJS({
1930
1930
  column
1931
1931
  };
1932
1932
  }
1933
- function literal(s) {
1933
+ function literal2(s) {
1934
1934
  for (const c2 of s) {
1935
1935
  const p = peek();
1936
1936
  if (p !== c2) {
@@ -2228,12 +2228,12 @@ var require_stringify = __commonJS({
2228
2228
  replacerFunc = replacer;
2229
2229
  } else if (Array.isArray(replacer)) {
2230
2230
  propertyList = [];
2231
- for (const v of replacer) {
2231
+ for (const v5 of replacer) {
2232
2232
  let item;
2233
- if (typeof v === "string") {
2234
- item = v;
2235
- } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
2236
- item = String(v);
2233
+ if (typeof v5 === "string") {
2234
+ item = v5;
2235
+ } else if (typeof v5 === "number" || v5 instanceof String || v5 instanceof Number) {
2236
+ item = String(v5);
2237
2237
  }
2238
2238
  if (item !== void 0 && propertyList.indexOf(item) < 0) {
2239
2239
  propertyList.push(item);
@@ -2431,10 +2431,10 @@ var require_stringify = __commonJS({
2431
2431
  var require_lib = __commonJS({
2432
2432
  "../../node_modules/json5/lib/index.js"(exports2, module2) {
2433
2433
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2434
- var parse4 = require_parse();
2434
+ var parse7 = require_parse();
2435
2435
  var stringify4 = require_stringify();
2436
2436
  var JSON53 = {
2437
- parse: parse4,
2437
+ parse: parse7,
2438
2438
  stringify: stringify4
2439
2439
  };
2440
2440
  module2.exports = JSON53;
@@ -2616,7 +2616,7 @@ var init_nitro_dependencies = __esm({
2616
2616
  });
2617
2617
 
2618
2618
  // src/nitro-source.ts
2619
- function object(value) {
2619
+ function object3(value) {
2620
2620
  return value !== null && typeof value === "object" && !Array.isArray(value);
2621
2621
  }
2622
2622
  function readJson(root, relative3) {
@@ -2710,7 +2710,7 @@ function viewNames(root, classes) {
2710
2710
  for (const file of import_node_fs19.default.readdirSync(directory)) {
2711
2711
  if (!file.endsWith("Config.json")) continue;
2712
2712
  const config = readJson(root, import_node_path22.default.join("nitrogen/generated/shared/json", file));
2713
- const name2 = object(config) ? config.uiViewClassName : void 0;
2713
+ const name2 = object3(config) ? config.uiViewClassName : void 0;
2714
2714
  if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
2715
2715
  views.add(name2);
2716
2716
  }
@@ -3209,7 +3209,7 @@ var init_applyReviver = __esm({
3209
3209
  // ../../node_modules/yaml/browser/dist/nodes/toJS.js
3210
3210
  function toJS(value, arg, ctx) {
3211
3211
  if (Array.isArray(value))
3212
- return value.map((v, i) => toJS(v, String(i), ctx));
3212
+ return value.map((v5, i) => toJS(v5, String(i), ctx));
3213
3213
  if (value && typeof value.toJSON === "function") {
3214
3214
  if (!ctx || !hasAnchor(value))
3215
3215
  return value.toJSON(arg, ctx);
@@ -3498,18 +3498,18 @@ var init_createNode = __esm({
3498
3498
 
3499
3499
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
3500
3500
  function collectionFromPath(schema4, path25, value) {
3501
- let v = value;
3501
+ let v5 = value;
3502
3502
  for (let i = path25.length - 1; i >= 0; --i) {
3503
3503
  const k = path25[i];
3504
3504
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
3505
3505
  const a = [];
3506
- a[k] = v;
3507
- v = a;
3506
+ a[k] = v5;
3507
+ v5 = a;
3508
3508
  } else {
3509
- v = /* @__PURE__ */ new Map([[k, v]]);
3509
+ v5 = /* @__PURE__ */ new Map([[k, v5]]);
3510
3510
  }
3511
3511
  }
3512
- return createNode(v, void 0, {
3512
+ return createNode(v5, void 0, {
3513
3513
  aliasDuplicateObjects: false,
3514
3514
  keepUndefined: false,
3515
3515
  onAnchor: () => {
@@ -3915,9 +3915,9 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
3915
3915
  return quotedString(value, ctx);
3916
3916
  }
3917
3917
  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
3918
- const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
3918
+ const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
3919
3919
  if (!value)
3920
- return literal ? "|\n" : ">\n";
3920
+ return literal2 ? "|\n" : ">\n";
3921
3921
  let chomp;
3922
3922
  let endStart;
3923
3923
  for (endStart = value.length; endStart > 0; --endStart) {
@@ -3966,7 +3966,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
3966
3966
  if (onComment)
3967
3967
  onComment();
3968
3968
  }
3969
- if (!literal) {
3969
+ if (!literal2) {
3970
3970
  const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
3971
3971
  let literalFallback = false;
3972
3972
  const foldOptions = getFoldOptions(ctx, true);
@@ -4457,8 +4457,8 @@ var init_addPairToJSMap = __esm({
4457
4457
  // ../../node_modules/yaml/browser/dist/nodes/Pair.js
4458
4458
  function createPair(key, value, ctx) {
4459
4459
  const k = createNode(key, void 0, ctx);
4460
- const v = createNode(value, void 0, ctx);
4461
- return new Pair(k, v);
4460
+ const v5 = createNode(value, void 0, ctx);
4461
+ return new Pair(k, v5);
4462
4462
  }
4463
4463
  var Pair;
4464
4464
  var init_Pair = __esm({
@@ -6069,7 +6069,7 @@ function installedPackageDir(appDir, name2) {
6069
6069
  function isAndroidCheck(node) {
6070
6070
  if (node.type !== "BinaryExpression" || !["===", "=="].includes(node.operator))
6071
6071
  return false;
6072
- const side = (value, literal) => value.type === "MemberExpression" && !value.computed && nativeLookupName(value.object) === "Platform" && nativeLookupName(value) === "OS" && literal.type === "Literal" && literal.value === "android";
6072
+ const side = (value, literal2) => value.type === "MemberExpression" && !value.computed && nativeLookupName(value.object) === "Platform" && nativeLookupName(value) === "OS" && literal2.type === "Literal" && literal2.value === "android";
6073
6073
  return side(node.left, node.right) || side(node.right, node.left);
6074
6074
  }
6075
6075
  function nativeLookupName(node) {
@@ -6097,11 +6097,11 @@ function sourceNativeRequests(file, text2, includeLegacy = false) {
6097
6097
  const guard = (test, branch) => {
6098
6098
  if (isAndroidCheck(test)) androidRanges.push([branch.start, branch.end]);
6099
6099
  };
6100
- const add = (kind, name2, at, optional) => {
6100
+ const add = (kind, name2, at, optional3) => {
6101
6101
  found.push({
6102
6102
  kind,
6103
6103
  name: name2,
6104
- optional,
6104
+ optional: optional3,
6105
6105
  androidOnly: androidFile || androidRanges.some(([start, end]) => at >= start && at < end),
6106
6106
  line: code.slice(0, at).split("\n").length
6107
6107
  });
@@ -6199,7 +6199,7 @@ function dependencyNativeOwners(appDir, manifest) {
6199
6199
  if (!dir || visited.has(dir)) continue;
6200
6200
  visited.add(dir);
6201
6201
  const dependency = readProjectManifest(dir);
6202
- const optional = readPackageJson(dir)?.optionalDependencies;
6202
+ const optional3 = readPackageJson(dir)?.optionalDependencies;
6203
6203
  if (dir.split("/").includes("node_modules") && (from === appDir || hasNativeCode(dir, "ios"))) {
6204
6204
  for (const request of packageNativeRequests(dir))
6205
6205
  if (!owners.has(`${request.kind}:${request.name}`))
@@ -6207,7 +6207,7 @@ function dependencyNativeOwners(appDir, manifest) {
6207
6207
  }
6208
6208
  for (const child of Object.keys({
6209
6209
  ...dependency?.dependencies,
6210
- ...isRecord(optional) ? optional : {}
6210
+ ...isRecord(optional3) ? optional3 : {}
6211
6211
  }))
6212
6212
  pending.push({ from: dir, name: child });
6213
6213
  }
@@ -6358,11 +6358,11 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6358
6358
  return result;
6359
6359
  };
6360
6360
  const found = /* @__PURE__ */ new Map();
6361
- const add = (kind, name2, file, line, optional = false, declaration = false) => {
6361
+ const add = (kind, name2, file, line, optional3 = false, declaration = false) => {
6362
6362
  const key = `${kind}:${name2}`;
6363
6363
  const known = found.get(key);
6364
6364
  if (known) {
6365
- if (!declaration) known.optional &&= optional;
6365
+ if (!declaration) known.optional &&= optional3;
6366
6366
  else {
6367
6367
  const moduleDir2 = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`));
6368
6368
  if (moduleDir2 && (file.endsWith(".swift") || !known.expoModule)) {
@@ -6382,7 +6382,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6382
6382
  package: packageName,
6383
6383
  path: `${(0, import_node_path24.relative)(appDir, file)}:${line}`,
6384
6384
  expoModule: moduleDir ? (0, import_node_path24.relative)(appDir, moduleDir) || "." : null,
6385
- optional,
6385
+ optional: optional3,
6386
6386
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
6387
6387
  (path25) => path25.endsWith(".swift") && [...(readSmallFile(path25) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
6388
6388
  (match) => match[1] === name2
@@ -6394,13 +6394,13 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6394
6394
  for (const file of sourceFiles) {
6395
6395
  const text2 = readSmallFile(file);
6396
6396
  if (!text2) continue;
6397
- for (const { kind, name: name2, line, optional, androidOnly } of sourceNativeRequests(
6397
+ for (const { kind, name: name2, line, optional: optional3, androidOnly } of sourceNativeRequests(
6398
6398
  file,
6399
6399
  text2,
6400
6400
  includeLegacy
6401
6401
  )) {
6402
6402
  if (androidOnly && platform === "ios") continue;
6403
- add(kind, name2, file, line, optional);
6403
+ add(kind, name2, file, line, optional3);
6404
6404
  }
6405
6405
  }
6406
6406
  for (const [, files] of nativeFilesByModule) {
@@ -6920,12 +6920,12 @@ function readAndroidRootModuleFromActivitySource(source, simpleName) {
6920
6920
  if (declarations.length !== 1) return void 0;
6921
6921
  const rest = code.slice(declarations[0].index);
6922
6922
  const kotlin = code.slice(code.lastIndexOf("override", declarations[0].index));
6923
- const literal = (KOTLIN_LITERAL.exec(kotlin) ?? JAVA_LITERAL.exec(rest))?.[1];
6924
- if (literal === void 0) return void 0;
6923
+ const literal2 = (KOTLIN_LITERAL.exec(kotlin) ?? JAVA_LITERAL.exec(rest))?.[1];
6924
+ if (literal2 === void 0) return void 0;
6925
6925
  const delegate = /createReactActivityDelegate[\s\S]*/.exec(code)?.[0];
6926
6926
  if (delegate && !/\b(?:mainComponentName|getMainComponentName\s*\(\s*\))/.test(delegate))
6927
6927
  return void 0;
6928
- return literal;
6928
+ return literal2;
6929
6929
  }
6930
6930
  function launcherActivities(application) {
6931
6931
  return application.children.filter(
@@ -10006,11 +10006,11 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
10006
10006
  for (const [index, line] of lines.entries()) {
10007
10007
  const occurrences = [...line.matchAll(/\$UseRiveLegacy\b/g)];
10008
10008
  if (!occurrences.length) continue;
10009
- const literal = /^\$UseRiveLegacy = (true|false)\s*(?:#.*)?$/.exec(line);
10010
- if (file !== podfile || occurrences.length !== 1 || !literal || assigned)
10009
+ const literal2 = /^\$UseRiveLegacy = (true|false)\s*(?:#.*)?$/.exec(line);
10010
+ if (file !== podfile || occurrences.length !== 1 || !literal2 || assigned)
10011
10011
  unsupported(file, index + 1);
10012
10012
  assigned = true;
10013
- value = literal[1] === "true";
10013
+ value = literal2[1] === "true";
10014
10014
  }
10015
10015
  }
10016
10016
  return { [RIVE_PACKAGE]: { USE_RIVE_LEGACY: value } };
@@ -10910,6 +10910,8 @@ var FETCH_PROXY_FAILURE_HEADER = "x-peach-upstream-failure";
10910
10910
  var FETCH_PROXY_RESPONSE_URL_HEADER = "x-peach-response-url";
10911
10911
  var FETCH_PROXY_NATIVE_COOKIE_HEADER = "x-peach-native-cookie";
10912
10912
  var FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER = "x-peach-native-cookie-response";
10913
+ var FETCH_PROXY_TLS_MINIMUM_HEADER = "x-peach-tls-minimum";
10914
+ var FETCH_PROXY_TLS_ENFORCED_HEADER = "x-peach-tls-enforced";
10913
10915
  function nativeCookieHopHeader(hop) {
10914
10916
  return encodeURIComponent(JSON.stringify(hop));
10915
10917
  }
@@ -10988,7 +10990,9 @@ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
10988
10990
  "sec-ch-ua-platform",
10989
10991
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
10990
10992
  FETCH_PROXY_NATIVE_COOKIE_HEADER,
10991
- FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER
10993
+ FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER,
10994
+ FETCH_PROXY_TLS_MINIMUM_HEADER,
10995
+ FETCH_PROXY_TLS_ENFORCED_HEADER
10992
10996
  ]);
10993
10997
  function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
10994
10998
  const headers = {};
@@ -11025,6 +11029,44 @@ function nodeRequestHeaderEntries(headers) {
11025
11029
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11026
11030
  var import_promises2 = require("node:dns/promises");
11027
11031
 
11032
+ // src/dns-over-https.ts
11033
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11034
+ function parseIpLiteral(text2) {
11035
+ if (text2.includes(":")) return parseIpv6(text2);
11036
+ const parts = text2.split(".");
11037
+ if (parts.length !== 4 || !parts.every((part) => /^\d{1,3}$/.test(part))) return null;
11038
+ const bytes = parts.map(Number);
11039
+ return bytes.every((byte) => byte <= 255) ? bytes : null;
11040
+ }
11041
+ function parseIpv6(text2) {
11042
+ const halves = text2.split("::");
11043
+ if (halves.length > 2) return null;
11044
+ const words = (side) => {
11045
+ if (side === "") return [];
11046
+ const groups = side.split(":");
11047
+ const result = [];
11048
+ for (const [index, group] of groups.entries()) {
11049
+ if (group.includes(".")) {
11050
+ const isLast = index === groups.length - 1 && (side !== halves[0] || halves.length === 1);
11051
+ const v42 = isLast ? parseIpLiteral(group) : null;
11052
+ if (!v42) return null;
11053
+ result.push(v42[0] * 256 + v42[1], v42[2] * 256 + v42[3]);
11054
+ } else if (/^[0-9a-f]{1,4}$/i.test(group)) result.push(parseInt(group, 16));
11055
+ else return null;
11056
+ }
11057
+ return result;
11058
+ };
11059
+ const head = words(halves[0]);
11060
+ const tail = halves.length === 2 ? words(halves[1]) : [];
11061
+ if (!head || !tail) return null;
11062
+ const missing2 = 8 - head.length - tail.length;
11063
+ if (halves.length === 2 ? missing2 < 1 : missing2 !== 0) return null;
11064
+ return [...head, ...Array(missing2).fill(0), ...tail].flatMap((word) => [
11065
+ word >> 8,
11066
+ word & 255
11067
+ ]);
11068
+ }
11069
+
11028
11070
  // src/host/network-policy.ts
11029
11071
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11030
11072
  var import_node_path6 = require("node:path");
@@ -11114,10 +11156,13 @@ async function handleHostnameResolutionRequest(req, res) {
11114
11156
  res.end();
11115
11157
  return;
11116
11158
  }
11117
- let resolved;
11159
+ let addresses;
11118
11160
  try {
11119
- await (0, import_promises2.lookup)(host2);
11120
- resolved = true;
11161
+ addresses = (await (0, import_promises2.lookup)(host2, { all: true })).map(({ address }) => {
11162
+ const bytes = parseIpLiteral(address);
11163
+ if (!bytes) throw new Error("system resolver returned an invalid address");
11164
+ return bytes;
11165
+ });
11121
11166
  } catch (error) {
11122
11167
  const code = error instanceof Error ? Reflect.get(error, "code") : null;
11123
11168
  if (code !== "ENOTFOUND" && code !== "EINVAL" && code !== "ERR_INVALID_ARG_VALUE") {
@@ -11125,14 +11170,14 @@ async function handleHostnameResolutionRequest(req, res) {
11125
11170
  res.end();
11126
11171
  return;
11127
11172
  }
11128
- resolved = false;
11173
+ addresses = [];
11129
11174
  }
11130
11175
  res.statusCode = 200;
11131
11176
  res.setHeader("content-type", "application/json");
11132
11177
  res.setHeader("cache-control", "no-store");
11133
11178
  res.setHeader("access-control-allow-origin", req.headers.origin || "*");
11134
11179
  res.setHeader("cross-origin-resource-policy", "cross-origin");
11135
- res.end(JSON.stringify(resolved));
11180
+ res.end(JSON.stringify(addresses));
11136
11181
  }
11137
11182
 
11138
11183
  // src/host/loopback-ports.ts
@@ -11189,7 +11234,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11189
11234
  init_version();
11190
11235
 
11191
11236
  // runtime-companion.json
11192
- var runtime_companion_default = { abi: 1, sha256: "f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467", file: "node/cli-f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467.cjs" };
11237
+ var runtime_companion_default = { abi: 1, sha256: "278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172", file: "node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs" };
11193
11238
 
11194
11239
  // src/answeredNativePackages.ts
11195
11240
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -11506,6 +11551,13 @@ async function forwardRolldownBundleResponse(upstream, res) {
11506
11551
  // src/host/fetch-proxy-handler.ts
11507
11552
  var fetchProxyHttpAgent = new import_http.default.Agent({ keepAlive: true, maxSockets: 256 });
11508
11553
  var fetchProxyHttpsAgent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
11554
+ var tlsMinimumVersions = /* @__PURE__ */ new Map([
11555
+ ["769", "TLSv1"],
11556
+ ["770", "TLSv1.1"],
11557
+ ["771", "TLSv1.2"],
11558
+ ["772", "TLSv1.3"]
11559
+ ]);
11560
+ var tlsMinimumAgents = /* @__PURE__ */ new Map();
11509
11561
  function fetchProxyAgentFor(targetUrl) {
11510
11562
  return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
11511
11563
  }
@@ -11557,7 +11609,7 @@ function buildAppApiProxyHeaders(reqHeaders, targetUrl) {
11557
11609
  const headers = {};
11558
11610
  for (const [key, value] of Object.entries(reqHeaders)) {
11559
11611
  if (!value) continue;
11560
- if (key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_HEADER || key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || reqHeaders[FETCH_PROXY_NATIVE_COOKIE_HEADER] !== void 0 && key.toLowerCase() === "cookie" || APP_API_HEADER_REWRITES.has(key.toLowerCase()))
11612
+ if (key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_HEADER || key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || key.toLowerCase() === FETCH_PROXY_TLS_MINIMUM_HEADER || key.toLowerCase() === FETCH_PROXY_TLS_ENFORCED_HEADER || reqHeaders[FETCH_PROXY_NATIVE_COOKIE_HEADER] !== void 0 && key.toLowerCase() === "cookie" || APP_API_HEADER_REWRITES.has(key.toLowerCase()))
11561
11613
  continue;
11562
11614
  headers[key] = value;
11563
11615
  }
@@ -11592,6 +11644,8 @@ function isAppApiRequestUrl(rawUrl) {
11592
11644
  }
11593
11645
  async function handleFetchProxyRequest(req, res) {
11594
11646
  if (req.method === "OPTIONS") {
11647
+ if (new URL(req.url ?? "", "http://localhost").searchParams.has("peachTlsProbe"))
11648
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
11595
11649
  applyFetchProxyCors(req, res);
11596
11650
  res.statusCode = 204;
11597
11651
  res.end();
@@ -11624,7 +11678,7 @@ async function handleFetchProxyRequest(req, res) {
11624
11678
  respond: async (upstream, setCookies) => {
11625
11679
  for (const [key, value] of Object.entries(upstream.headers)) {
11626
11680
  const lowerKey = key.toLowerCase();
11627
- if (value === void 0 || lowerKey === "set-cookie" || lowerKey === "connection" || lowerKey === "keep-alive" || lowerKey === "proxy-authenticate" || lowerKey === "proxy-authorization" || lowerKey === "te" || lowerKey === "trailer" || lowerKey === "transfer-encoding" || lowerKey === "upgrade" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER || lowerKey.startsWith("access-control-")) {
11681
+ if (value === void 0 || lowerKey === "set-cookie" || lowerKey === "connection" || lowerKey === "keep-alive" || lowerKey === "proxy-authenticate" || lowerKey === "proxy-authorization" || lowerKey === "te" || lowerKey === "trailer" || lowerKey === "transfer-encoding" || lowerKey === "upgrade" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_TLS_ENFORCED_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER || lowerKey.startsWith("access-control-")) {
11628
11682
  continue;
11629
11683
  }
11630
11684
  res.setHeader(key, value);
@@ -11642,6 +11696,13 @@ async function handleFetchProxyRequest(req, res) {
11642
11696
  }
11643
11697
  function handleAppApiRequest(req, res) {
11644
11698
  const reqUrl = req.url || "";
11699
+ if (req.method === "OPTIONS" && reqUrl.startsWith("/__app-api?") && new URL(reqUrl, "http://localhost").searchParams.has("peachTlsProbe")) {
11700
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
11701
+ applyFetchProxyCors(req, res);
11702
+ res.statusCode = 204;
11703
+ res.end();
11704
+ return true;
11705
+ }
11645
11706
  let targetPath = "";
11646
11707
  let targetOrigin = "";
11647
11708
  let reportFailure = false;
@@ -11684,7 +11745,7 @@ function handleAppApiRequest(req, res) {
11684
11745
  respond: (upstream, setCookies) => {
11685
11746
  for (const [key, value] of Object.entries(upstream.headers)) {
11686
11747
  const lowerKey = key.toLowerCase();
11687
- if (value === void 0 || lowerKey === "set-cookie" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER) {
11748
+ if (value === void 0 || lowerKey === "set-cookie" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_TLS_ENFORCED_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER) {
11688
11749
  continue;
11689
11750
  }
11690
11751
  res.setHeader(key, value);
@@ -11719,6 +11780,8 @@ function serveBrowserProxyRoute(req, res) {
11719
11780
  }
11720
11781
  async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11721
11782
  const originalMethod = req.method || "GET";
11783
+ const minimumHeader = req.headers[FETCH_PROXY_TLS_MINIMUM_HEADER];
11784
+ const minimumVersion = typeof minimumHeader === "string" ? tlsMinimumVersions.get(minimumHeader) : void 0;
11722
11785
  const proxy = async (targetUrl, method, nextBody, redirects, setCookies) => {
11723
11786
  const transport = targetUrl.protocol === "https:" ? import_https.default : import_http.default;
11724
11787
  const targetHeaders = route.requestHeaders(targetUrl);
@@ -11759,8 +11822,21 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11759
11822
  path: targetUrl.pathname + targetUrl.search,
11760
11823
  method,
11761
11824
  headers: targetHeaders,
11762
- agent: fetchProxyAgentFor(targetUrl),
11763
- ...loopbackTlsOptions(targetUrl)
11825
+ ...minimumVersion && targetUrl.protocol === "https:" ? {
11826
+ agent: (() => {
11827
+ let agent = tlsMinimumAgents.get(minimumVersion);
11828
+ if (!agent) {
11829
+ agent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
11830
+ tlsMinimumAgents.set(minimumVersion, agent);
11831
+ }
11832
+ return agent;
11833
+ })(),
11834
+ minVersion: minimumVersion,
11835
+ rejectUnauthorized: true
11836
+ } : {
11837
+ agent: fetchProxyAgentFor(targetUrl),
11838
+ ...loopbackTlsOptions(targetUrl)
11839
+ }
11764
11840
  },
11765
11841
  (upstream) => {
11766
11842
  responded = true;
@@ -11795,6 +11871,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11795
11871
  redirectLimit: 10
11796
11872
  };
11797
11873
  res.setHeader(FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER, nativeCookieHopHeader(hop));
11874
+ if (minimumVersion && targetUrl.protocol === "https:")
11875
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, minimumHeader);
11798
11876
  await route.respond(proxyRes, hopCookies);
11799
11877
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
11800
11878
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
@@ -11831,6 +11909,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11831
11909
  let upstreamAnswered = false;
11832
11910
  let body;
11833
11911
  try {
11912
+ if (minimumHeader !== void 0 && !minimumVersion)
11913
+ throw new TypeError("unsupported URLSession TLS minimum");
11834
11914
  if (req.method !== "GET" && req.method !== "HEAD") {
11835
11915
  const chunks = [];
11836
11916
  for await (const chunk of req) {
@@ -12060,10 +12140,10 @@ function androidMergedResourceValuesDirectory(manifestFile) {
12060
12140
  manifestFile
12061
12141
  );
12062
12142
  if (!match) return null;
12063
- const [, intermediates, variant] = match;
12064
- if (!variant) return null;
12065
- const taskVariant = variant[0].toUpperCase() + variant.slice(1);
12066
- return `${intermediates}incremental/${variant}/merge${taskVariant}Resources/merged.dir`;
12143
+ const [, intermediates, variant2] = match;
12144
+ if (!variant2) return null;
12145
+ const taskVariant = variant2[0].toUpperCase() + variant2.slice(1);
12146
+ return `${intermediates}incremental/${variant2}/merge${taskVariant}Resources/merged.dir`;
12067
12147
  }
12068
12148
 
12069
12149
  // src/native-app-identity.ts
@@ -12348,6 +12428,21 @@ function xcodeTargetMemberVisitor(objects) {
12348
12428
  }
12349
12429
 
12350
12430
  // src/native-app-identity.ts
12431
+ function readKeychainAccessGroups(dictionary, resolve4) {
12432
+ if (!isRecord(dictionary))
12433
+ throw new Error("native app entitlements are not a dictionary");
12434
+ const groups = dictionary["keychain-access-groups"];
12435
+ if (groups === void 0) return void 0;
12436
+ if (!Array.isArray(groups)) throw new Error("keychain-access-groups is not an array");
12437
+ return groups.map((group) => {
12438
+ if (typeof group !== "string")
12439
+ throw new Error("keychain access group is not a string");
12440
+ const value = resolve4(group);
12441
+ if (!value || /\$[({]/.test(value))
12442
+ throw new Error("keychain access group has unresolved signing settings");
12443
+ return value;
12444
+ });
12445
+ }
12351
12446
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
12352
12447
  var METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
12353
12448
  function nonEmptyString(value) {
@@ -12548,8 +12643,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12548
12643
  if (typeof configId === "string") {
12549
12644
  const configObj = objects[configId];
12550
12645
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
12551
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
12552
- if (typeof v === "string") settings[k] = v;
12646
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
12647
+ if (typeof v5 === "string") settings[k] = v5;
12553
12648
  }
12554
12649
  }
12555
12650
  }
@@ -12564,8 +12659,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12564
12659
  if (typeof configId === "string") {
12565
12660
  const configObj = objects[configId];
12566
12661
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
12567
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
12568
- if (typeof v === "string") settings[k] = v;
12662
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
12663
+ if (typeof v5 === "string") settings[k] = v5;
12569
12664
  }
12570
12665
  }
12571
12666
  }
@@ -12615,6 +12710,19 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12615
12710
  const applicationName = identityFieldFrom(settings, plistString(plist3, "CFBundleDisplayName"), void 0) ?? bundleName;
12616
12711
  const dictionary = parseInfoPlist(plist3);
12617
12712
  if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
12713
+ let keychainAccessGroups;
12714
+ if (settings.CODE_SIGN_ENTITLEMENTS) {
12715
+ const entitlementPath = resolveBuildSetting(settings.CODE_SIGN_ENTITLEMENTS, settings);
12716
+ if (!entitlementPath)
12717
+ throw new Error("CODE_SIGN_ENTITLEMENTS has unresolved build settings");
12718
+ const source = files[`ios/${entitlementPath}`] ?? files[entitlementPath];
12719
+ if (source === void 0)
12720
+ throw new Error(`missing selected entitlement input ${entitlementPath}`);
12721
+ keychainAccessGroups = readKeychainAccessGroups(
12722
+ parseInfoPlist(source),
12723
+ (value) => resolveBuildSetting(value, settings)
12724
+ );
12725
+ }
12618
12726
  const declaredDisplayName = dictionary.CFBundleDisplayName;
12619
12727
  const applicationDisplayName = typeof declaredDisplayName === "string" ? resolveBuildSetting(declaredDisplayName, settings) : void 0;
12620
12728
  if (applicationDisplayName === null)
@@ -12733,7 +12841,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12733
12841
  return `${base.startsWith("/") ? "/" : ""}${segments.join("/")}`;
12734
12842
  };
12735
12843
  const project = Object.values(objects).find(
12736
- (object2) => isRecord(object2) && object2.isa === "PBXProject"
12844
+ (object4) => isRecord(object4) && object4.isa === "PBXProject"
12737
12845
  );
12738
12846
  const projectDir = join7(
12739
12847
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
@@ -12806,6 +12914,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12806
12914
  permissionUsageDescriptions,
12807
12915
  infoPlistStrings,
12808
12916
  urlQuerySchemes,
12917
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
12809
12918
  ...shareIntoAppGroupId === void 0 ? {} : { shareIntoAppGroupId },
12810
12919
  ...rtcAppGroupIdentifier === void 0 ? {} : { rtcAppGroupIdentifier },
12811
12920
  ...screenShareExtensionBundleId === void 0 ? {} : { screenShareExtensionBundleId },
@@ -12870,6 +12979,24 @@ function peachsimPackageRoot() {
12870
12979
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
12871
12980
  var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
12872
12981
  var compilerArchives = {
12982
+ "swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
12983
+ identity: "45bb46301c86fe73",
12984
+ archive: "tar.gz",
12985
+ hosts: {
12986
+ "darwin-arm64": {
12987
+ checksum: "102dfbbb7b451be0685763b7a427284b75a8078874543f091b1c4b3db86e6565",
12988
+ manifest: "fb6c4d75ef6f4b3c094ae5a4d5d1e6bdfd85431f3fe25d514f3e7a0b4add60ef"
12989
+ },
12990
+ "linux-x64": {
12991
+ checksum: "d3c040e042e12ff787b64bfde1d85238254365036ce093f3b20ff86e8ff996f0",
12992
+ manifest: "7c7144be591692e563396fe3c987c5aa56fbaea4faacaad62283c0c6e5c04ae2"
12993
+ },
12994
+ "linux-arm64": {
12995
+ checksum: "604e6fc5fc0f5a93cee3ca6dfa9616244a2a49ef517caa3155a12ae4a0ecf72b",
12996
+ manifest: "075fd53d03ecf099954f1d023bb4bb67a5c5ee946537466d6c105022bdf8ecde"
12997
+ }
12998
+ }
12999
+ },
12873
13000
  "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
12874
13001
  identity: "0b2d0a9011c88e66",
12875
13002
  archive: "tar.gz",
@@ -13565,37 +13692,130 @@ init_is_record();
13565
13692
  // src/swift-foundation.ts
13566
13693
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13567
13694
 
13568
- // src/swift-icu.ts
13569
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13570
- var import_node_child_process2 = require("node:child_process");
13571
- var import_node_util2 = require("node:util");
13572
- var import_node_zlib2 = require("node:zlib");
13573
- var run2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
13574
- var deflate = (0, import_node_util2.promisify)(import_node_zlib2.gzip);
13575
- var compressBrotli = (0, import_node_util2.promisify)(import_node_zlib2.brotliCompress);
13576
- var inflateGzip = (0, import_node_util2.promisify)(import_node_zlib2.gunzip);
13577
-
13578
- // src/swift-link-roots.ts
13579
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13580
-
13581
- // src/swift-objc-import.ts
13695
+ // src/swift-guest-compile.ts
13582
13696
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13583
13697
 
13584
- // src/swift-project-user.ts
13698
+ // src/swift-guest-archive.ts
13585
13699
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13586
13700
 
13587
- // src/swift-reproducible.ts
13701
+ // src/swift-wasm-prune.ts
13588
13702
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13703
+ var v2 = __toESM(require("valibot"), 1);
13589
13704
 
13590
- // src/swift-root-lock.ts
13591
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13592
- init_home_paths();
13593
-
13594
- // src/swift-uniform-type-constants.ts
13705
+ // src/swiftRuntimeProductContract.ts
13595
13706
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13707
+ var v = __toESM(require("valibot"), 1);
13708
+ var swiftFrameworkProductSchema = v.object({
13709
+ version: v.literal(1),
13710
+ packageName: v.string(),
13711
+ manifestSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
13712
+ product: v.object({
13713
+ name: v.string(),
13714
+ linkage: v.picklist(["static", "dynamic", "automatic"]),
13715
+ targets: v.array(v.string())
13716
+ }),
13717
+ // framework names are distinct from SDK library linkNames. they identify
13718
+ // the packaged owner, not an observed native image dependency.
13719
+ frameworkAliases: v.array(
13720
+ v.object({
13721
+ kind: v.literal("framework"),
13722
+ name: v.string(),
13723
+ targets: v.array(v.string()),
13724
+ moduleMap: v.string(),
13725
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
13726
+ wasmSdkId: v.string(),
13727
+ wasmSdkChecksum: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
13728
+ })
13729
+ ),
13730
+ targets: v.array(
13731
+ v.object({
13732
+ name: v.string(),
13733
+ path: v.string(),
13734
+ kind: v.picklist(["regular", "system"]),
13735
+ dependencies: v.array(v.string())
13736
+ })
13737
+ ),
13738
+ objects: v.array(v.object({ path: v.string(), target: v.string() })),
13739
+ autolink: v.array(v.string())
13740
+ });
13741
+ var swiftSdkProductSchema = v.pipe(
13742
+ v.object({
13743
+ id: v.string(),
13744
+ installName: v.string(),
13745
+ target: v.literal("wasm32-unknown-wasip1"),
13746
+ linkNames: v.array(v.string()),
13747
+ // absent records declare no framework namespace, even when a library name matches.
13748
+ frameworkAliases: v.optional(
13749
+ v.array(
13750
+ v.object({
13751
+ name: v.string(),
13752
+ moduleMap: v.string(),
13753
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
13754
+ })
13755
+ ),
13756
+ []
13757
+ ),
13758
+ buildDependencies: v.array(v.string()),
13759
+ linkOwnership: v.picklist(["image", "containing-image"]),
13760
+ linkDependencies: v.nullable(v.array(v.string())),
13761
+ autolink: v.array(v.string()),
13762
+ sources: v.array(
13763
+ v.object({
13764
+ path: v.string(),
13765
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
13766
+ })
13767
+ ),
13768
+ artifacts: v.array(
13769
+ v.variant("kind", [
13770
+ v.object({
13771
+ kind: v.literal("archive"),
13772
+ path: v.string(),
13773
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
13774
+ members: v.array(
13775
+ v.object({
13776
+ name: v.string(),
13777
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
13778
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
13779
+ sources: v.array(v.string())
13780
+ })
13781
+ )
13782
+ }),
13783
+ v.object({
13784
+ kind: v.literal("object"),
13785
+ path: v.string(),
13786
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
13787
+ sources: v.array(v.string()),
13788
+ input: v.optional(
13789
+ v.object({
13790
+ product: v.string(),
13791
+ artifact: v.object({
13792
+ path: v.string(),
13793
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
13794
+ }),
13795
+ member: v.optional(
13796
+ v.object({
13797
+ name: v.string(),
13798
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
13799
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
13800
+ })
13801
+ )
13802
+ })
13803
+ )
13804
+ })
13805
+ ])
13806
+ )
13807
+ }),
13808
+ v.check(
13809
+ (product) => product.linkOwnership === "image" || product.linkDependencies === null,
13810
+ "containing-image products cannot declare an image scope"
13811
+ )
13812
+ );
13813
+ var swiftSdkProductsSchema = v.object({
13814
+ version: v.literal(1),
13815
+ products: v.array(swiftSdkProductSchema)
13816
+ });
13596
13817
 
13597
13818
  // src/swift-wasm-prune.ts
13598
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13599
13819
  var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
13600
13820
  "libFoundation",
13601
13821
  "lib_FoundationCollections",
@@ -13615,8 +13835,66 @@ var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
13615
13835
  "-lswift_Concurrency"
13616
13836
  ]);
13617
13837
 
13618
- // src/swift-compile.ts
13619
- init_swiftContract();
13838
+ // src/swift-guest-link.ts
13839
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13840
+
13841
+ // src/swift-guest-image-ledger.ts
13842
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13843
+
13844
+ // src/swift-guest-link-plan.ts
13845
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13846
+
13847
+ // src/swift-guest-manifest.ts
13848
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13849
+
13850
+ // src/swift-guest-projection-storage.ts
13851
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13852
+
13853
+ // src/swift-guest-linked-spans.ts
13854
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13855
+
13856
+ // src/swift-guest-projection.ts
13857
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13858
+
13859
+ // src/swiftGuestImageContract.ts
13860
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13861
+ init_is_record();
13862
+
13863
+ // src/swift-guest-projection-storage.ts
13864
+ var maxProjectionRegions = 1 << 20;
13865
+
13866
+ // src/swift-guest-runtime-plan.ts
13867
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13868
+ var v4 = __toESM(require("valibot"), 1);
13869
+
13870
+ // src/swift-guest-source-plan.ts
13871
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13872
+
13873
+ // src/swift-runtime-products.ts
13874
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13875
+ var v3 = __toESM(require("valibot"), 1);
13876
+ init_is_record();
13877
+ var packageSchema = v3.object({
13878
+ name: v3.string(),
13879
+ products: v3.array(
13880
+ v3.object({
13881
+ name: v3.string(),
13882
+ targets: v3.array(v3.string()),
13883
+ type: v3.unknown()
13884
+ })
13885
+ ),
13886
+ targets: v3.array(
13887
+ v3.object({
13888
+ name: v3.string(),
13889
+ type: v3.string(),
13890
+ path: v3.optional(v3.string()),
13891
+ dependencies: v3.array(v3.unknown())
13892
+ })
13893
+ )
13894
+ });
13895
+
13896
+ // src/swift-guest-source-inputs.ts
13897
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13620
13898
 
13621
13899
  // src/wasm-optimize.ts
13622
13900
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -13635,6 +13913,38 @@ var FEATURES = [
13635
13913
  ];
13636
13914
  var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
13637
13915
 
13916
+ // src/swift-icu.ts
13917
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13918
+ var import_node_child_process2 = require("node:child_process");
13919
+ var import_node_util2 = require("node:util");
13920
+ var import_node_zlib2 = require("node:zlib");
13921
+ var run2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
13922
+ var deflate = (0, import_node_util2.promisify)(import_node_zlib2.gzip);
13923
+ var compressBrotli = (0, import_node_util2.promisify)(import_node_zlib2.brotliCompress);
13924
+ var inflateGzip = (0, import_node_util2.promisify)(import_node_zlib2.gunzip);
13925
+
13926
+ // src/swift-link-roots.ts
13927
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13928
+
13929
+ // src/swift-objc-import.ts
13930
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13931
+
13932
+ // src/swift-project-user.ts
13933
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13934
+
13935
+ // src/swift-reproducible.ts
13936
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13937
+
13938
+ // src/swift-root-lock.ts
13939
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13940
+ init_home_paths();
13941
+
13942
+ // src/swift-uniform-type-constants.ts
13943
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13944
+
13945
+ // src/swift-compile.ts
13946
+ init_swiftContract();
13947
+
13638
13948
  // src/write-build-file.ts
13639
13949
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13640
13950
 
@@ -13721,7 +14031,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
13721
14031
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
13722
14032
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
13723
14033
  ).join("");
13724
- var compilerSourceDigest = true ? "abe4d1a74b7a23d3207ef860184654de7a5bd61ad8d782291ac1c577c7863c9f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
14034
+ var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
13725
14035
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
13726
14036
  "CFAllocator",
13727
14037
  "CFArray",
@@ -14167,6 +14477,16 @@ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
14167
14477
  ]);
14168
14478
  var APPLICATION = "com.apple.product-type.application";
14169
14479
  var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
14480
+ var PRODUCT_MACH_O_TYPES = {
14481
+ "com.apple.product-type.application": "mh_execute",
14482
+ "com.apple.product-type.app-extension": "mh_execute",
14483
+ "com.apple.product-type.tool": "mh_execute",
14484
+ "com.apple.product-type.framework": "mh_dylib",
14485
+ "com.apple.product-type.framework.static": "staticlib",
14486
+ "com.apple.product-type.library.dynamic": "mh_dylib",
14487
+ "com.apple.product-type.library.static": "staticlib",
14488
+ "com.apple.product-type.bundle": "mh_bundle"
14489
+ };
14170
14490
  var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
14171
14491
  "com.apple.product-type.framework",
14172
14492
  "com.apple.product-type.framework.static"
@@ -14339,11 +14659,11 @@ function loadProject(xcodeproj) {
14339
14659
  throw new Error(`${projectFile} has no objects table`);
14340
14660
  }
14341
14661
  const objects = root.objects;
14342
- const object2 = (id) => {
14662
+ const object4 = (id) => {
14343
14663
  const found = id === void 0 ? void 0 : objects[id];
14344
14664
  return isDict(found) ? found : void 0;
14345
14665
  };
14346
- const project = object2(str(root.rootObject));
14666
+ const project = object4(str(root.rootObject));
14347
14667
  if (!project || project.isa !== "PBXProject") {
14348
14668
  throw new Error(`${projectFile} has no PBXProject root`);
14349
14669
  }
@@ -14357,7 +14677,7 @@ function loadProject(xcodeproj) {
14357
14677
  objects,
14358
14678
  project,
14359
14679
  projectDir,
14360
- object: object2,
14680
+ object: object4,
14361
14681
  resolvePath,
14362
14682
  visitMembers: xcodeTargetMemberVisitor(objects)
14363
14683
  };
@@ -14442,6 +14762,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
14442
14762
  PRODUCT_NAME: () => get("TARGET_NAME"),
14443
14763
  PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
14444
14764
  EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
14765
+ MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str(target.productType) ?? ""] ?? "",
14766
+ // the native defaults of CoreBuildSystem.xcspec for a dynamic framework
14767
+ EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
14768
+ DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
14769
+ LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
14445
14770
  // the native default of CoreBuildSystem.xcspec
14446
14771
  EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () => "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
14447
14772
  };
@@ -15122,16 +15447,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15122
15447
  (ref) => ref.id === remote || str(ref.target.productReference) === remote
15123
15448
  );
15124
15449
  };
15125
- const dependenciesOf = (ref) => {
15450
+ const linkedTargets = (ref) => {
15126
15451
  const { project, target } = ref;
15127
15452
  const found = [];
15128
- for (const dependencyId of list(target.dependencies)) {
15129
- const dependency = project.object(dependencyId);
15130
- if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
15131
- const direct = str(dependency.target);
15132
- const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
15133
- if (resolved) found.push(resolved);
15134
- }
15135
15453
  for (const phaseId of list(target.buildPhases)) {
15136
15454
  const phase = project.object(phaseId);
15137
15455
  if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
@@ -15140,10 +15458,37 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15140
15458
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
15141
15459
  const file = project.object(str(buildFile.fileRef));
15142
15460
  const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path18.default.basename(str(file.path) ?? "")) : void 0;
15143
- if (resolved) found.push(resolved);
15461
+ if (resolved)
15462
+ found.push({
15463
+ target: resolved,
15464
+ attributes: list(
15465
+ isDict(buildFile.settings) ? buildFile.settings.ATTRIBUTES : void 0
15466
+ )
15467
+ });
15144
15468
  }
15145
15469
  }
15146
- return found.filter(
15470
+ return found;
15471
+ };
15472
+ const frameworkFlagLinks = (ref, flags) => {
15473
+ const words = settingList(flags);
15474
+ const linked = new Set(linkedTargets(ref).map((link) => link.target));
15475
+ return words.flatMap((word, index) => {
15476
+ const target = words[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
15477
+ if (!target || target === ref || linked.has(target)) return [];
15478
+ linked.add(target);
15479
+ return [{ target, attributes: [] }];
15480
+ });
15481
+ };
15482
+ const dependenciesOf = (ref) => {
15483
+ const { project, target } = ref;
15484
+ const found = list(target.dependencies).flatMap((dependencyId) => {
15485
+ const dependency = project.object(dependencyId);
15486
+ if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
15487
+ const direct = str(dependency.target);
15488
+ const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
15489
+ return resolved ? [resolved] : [];
15490
+ });
15491
+ return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
15147
15492
  (candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
15148
15493
  );
15149
15494
  };
@@ -15360,13 +15705,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15360
15705
  );
15361
15706
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
15362
15707
  const [major, minor] = version.split(".");
15363
- const number = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
15708
+ const number2 = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
15364
15709
  const unit = [
15365
15710
  ` extern const unsigned char ${symbol}VersionString[];`,
15366
15711
  ` extern const double ${symbol}VersionNumber;`,
15367
15712
  "",
15368
15713
  ` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings2("PROJECT_NAME")}-${version}" "\\n";`,
15369
- ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
15714
+ ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
15370
15715
  ""
15371
15716
  ].join("\n");
15372
15717
  if (!import_node_fs15.default.existsSync(versioning) || import_node_fs15.default.readFileSync(versioning, "utf8") !== unit) {
@@ -15468,6 +15813,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15468
15813
  settings: settings2,
15469
15814
  keys,
15470
15815
  module: {
15816
+ id: `${ref.project.projectFile}#${ref.id}`,
15471
15817
  name: name2,
15472
15818
  targetIdentity: JSON.stringify([ref.project.xcodeproj, ref.id]),
15473
15819
  targetDependencies: Array(),
@@ -15728,6 +16074,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15728
16074
  }
15729
16075
  }
15730
16076
  const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path18.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
16077
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path18.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
16078
+ const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
16079
+ import_plist3.default.parse(import_node_fs15.default.readFileSync(entitlementsFile, "utf8")),
16080
+ (value) => expand(value, (key) => {
16081
+ const resolved = settings(key);
16082
+ if (!resolved) throw new Error(`missing signing build setting ${key}`);
16083
+ return resolved;
16084
+ })
16085
+ ) : void 0;
15731
16086
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
15732
16087
  const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs15.default.readFileSync(infoPlistFile, "utf8")) : {};
15733
16088
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
@@ -15887,6 +16242,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15887
16242
  productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
15888
16243
  return builds ? [ref2] : [];
15889
16244
  };
16245
+ const productAttributes = /* @__PURE__ */ new Map();
16246
+ for (const phaseId of list(target.buildPhases)) {
16247
+ const phase = project.object(phaseId);
16248
+ if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
16249
+ for (const id of list(phase.files)) {
16250
+ const file = project.object(id);
16251
+ const product = str(file?.productRef);
16252
+ if (file && product && xcodeBuildFileBuildsForIos(file))
16253
+ productAttributes.set(
16254
+ product,
16255
+ list(isDict(file.settings) ? file.settings.ATTRIBUTES : void 0)
16256
+ );
16257
+ }
16258
+ }
15890
16259
  const referencedProducts = [
15891
16260
  ...list(target.dependencies).flatMap(productRef),
15892
16261
  ...list(target.buildPhases).flatMap((id) => {
@@ -15895,6 +16264,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15895
16264
  })
15896
16265
  ];
15897
16266
  const productDependencies = [
16267
+ ...productAttributes.keys(),
15898
16268
  ...list(target.packageProductDependencies).filter(
15899
16269
  (id) => productPlatforms.get(id) !== false
15900
16270
  ),
@@ -15912,6 +16282,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15912
16282
  const reference = project.object(str(dependency.package));
15913
16283
  const linked = {
15914
16284
  product,
16285
+ ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
15915
16286
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
15916
16287
  kind: "local",
15917
16288
  dir: import_node_path18.default.resolve(
@@ -15985,6 +16356,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
15985
16356
  const used = order.map((ref) => ref.project);
15986
16357
  return {
15987
16358
  ...module2,
16359
+ sourceLinkGraph: {
16360
+ entry: module2.id,
16361
+ targets: builtTargets.filter(
16362
+ ({ ref }) => ref === app || MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")
16363
+ ).map(({ ref, module: module3, settings: settings2 }) => ({
16364
+ id: module3.id,
16365
+ sourceTarget: module3.allSources.length > 0 ? module3.moduleName : null,
16366
+ productName: settings2("FULL_PRODUCT_NAME") || str(ref.project.object(str(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
16367
+ productType: str(ref.target.productType),
16368
+ installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
16369
+ buildVersion: {
16370
+ platform: settings2("PLATFORM_NAME") || null,
16371
+ minimumOS: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
16372
+ sdk: settings2("SDK_VERSION") || null
16373
+ },
16374
+ machOType: settings2("MACH_O_TYPE") || null,
16375
+ linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
16376
+ dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
16377
+ (dependency) => MODULE_PRODUCTS.has(str(dependency.target.target.productType) ?? "")
16378
+ ).map(({ target, attributes }) => ({
16379
+ target: `${target.project.projectFile}#${target.id}`,
16380
+ attributes
16381
+ }))
16382
+ }))
16383
+ },
15988
16384
  moduleMapSources: Object.fromEntries(
15989
16385
  builtTargets.flatMap(({ module: module3 }) => {
15990
16386
  const compatibility = module3.swift?.compatibility;
@@ -16013,6 +16409,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
16013
16409
  .../* @__PURE__ */ new Set([
16014
16410
  ...used.map((project) => project.projectFile),
16015
16411
  ...xcconfigs,
16412
+ ...entitlementsFile ? [entitlementsFile] : [],
16016
16413
  ...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
16017
16414
  ])
16018
16415
  ].sort(),
@@ -16020,6 +16417,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
16020
16417
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
16021
16418
  infoPlist: infoPlistPending ? null : import_plist3.default.build(info),
16022
16419
  infoPlistFile,
16420
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
16023
16421
  postBundleScripts,
16024
16422
  developmentRegion: str(app.project.project.developmentRegion) ?? "en",
16025
16423
  frameworks,
@@ -16105,14 +16503,14 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
16105
16503
  const querySchemes = dictionary.LSApplicationQueriesSchemes;
16106
16504
  const urlQuerySchemes = Array.isArray(querySchemes) ? querySchemes : [];
16107
16505
  const intentIds = dictionary.OneAppIntentIdentifiers;
16108
- const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v) => typeof v === "string") ? intentIds : [];
16506
+ const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v5) => typeof v5 === "string") ? intentIds : [];
16109
16507
  const backgroundIds = dictionary.BGTaskSchedulerPermittedIdentifiers;
16110
- const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v) => typeof v === "string") ? backgroundIds : [];
16508
+ const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v5) => typeof v5 === "string") ? backgroundIds : [];
16111
16509
  const declaredModes = dictionary.UIBackgroundModes;
16112
- const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v) => typeof v === "string") ? declaredModes : [];
16113
- const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v) => typeof v === "string") ? dictionary.UISupportedInterfaceOrientations : [];
16510
+ const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v5) => typeof v5 === "string") ? declaredModes : [];
16511
+ const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v5) => typeof v5 === "string") ? dictionary.UISupportedInterfaceOrientations : [];
16114
16512
  const ipadSupportedInterfaceOrientations = Array.isArray(dictionary["UISupportedInterfaceOrientations~ipad"]) && dictionary["UISupportedInterfaceOrientations~ipad"].every(
16115
- (v) => typeof v === "string"
16513
+ (v5) => typeof v5 === "string"
16116
16514
  ) ? dictionary["UISupportedInterfaceOrientations~ipad"] : [];
16117
16515
  const defaultScreenOrientationMask = nonEmptyString2(
16118
16516
  dictionary.EXDefaultScreenOrientationMask
@@ -16124,6 +16522,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
16124
16522
  app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs16.default.existsSync(file)).map((file) => import_node_fs16.default.readFileSync(file, "utf8"))
16125
16523
  );
16126
16524
  return stampNativeBuildSdk({
16525
+ ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
16127
16526
  applicationName,
16128
16527
  ...applicationDisplayName ? { applicationDisplayName } : {},
16129
16528
  ...rootModuleName ? { rootModuleName } : {},
@@ -16191,13 +16590,19 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
16191
16590
  for (const entry of import_node_fs16.default.readdirSync(iosRoot, { withFileTypes: true })) {
16192
16591
  if (entry.name === "Pods") continue;
16193
16592
  if (entry.isDirectory()) {
16194
- const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
16593
+ const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
16594
+ "Info.plist",
16595
+ "AppDelegate.swift",
16596
+ "AppDelegate.mm",
16597
+ "AppDelegate.m",
16598
+ ...import_node_fs16.default.readdirSync(import_node_path19.default.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
16599
+ ];
16195
16600
  for (const name2 of names) {
16196
16601
  const relative3 = `${prefix2}${entry.name}/${name2}`;
16197
16602
  const file = import_node_path19.default.join(projectRoot, relative3);
16198
16603
  if (import_node_fs16.default.existsSync(file)) files[relative3] = import_node_fs16.default.readFileSync(file, "utf8");
16199
16604
  }
16200
- } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
16605
+ } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
16201
16606
  const relative3 = `${prefix2}${entry.name}`;
16202
16607
  const file = import_node_path19.default.join(projectRoot, relative3);
16203
16608
  if (import_node_fs16.default.existsSync(file)) files[relative3] = import_node_fs16.default.readFileSync(file, "utf8");
@@ -16531,7 +16936,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
16531
16936
  (file) => import_node_path20.default.basename(file) === "GoogleService-Info.plist"
16532
16937
  );
16533
16938
  const variables = /* @__PURE__ */ new Map();
16534
- const literal = (text2) => {
16939
+ const literal2 = (text2) => {
16535
16940
  const quoted = /^@"([^"]*)"$/.exec(text2.trim());
16536
16941
  return quoted ? quoted[1] : constants.get(text2.trim());
16537
16942
  };
@@ -16566,7 +16971,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
16566
16971
  const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
16567
16972
  if (bundle && bundlePath) variables.set(name2, "main bundle");
16568
16973
  else if (bundle && resource) {
16569
- if (literal(resource[1]) !== "GoogleService-Info" || literal(resource[2]) !== "plist")
16974
+ if (literal2(resource[1]) !== "GoogleService-Info" || literal2(resource[2]) !== "plist")
16570
16975
  return null;
16571
16976
  variables.set(name2, plists.length === 1 ? plists[0] : void 0);
16572
16977
  } else if (dictionary && variables.has(dictionary[1])) {
@@ -16574,7 +16979,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
16574
16979
  const parsed = typeof file === "string" ? parsePlistSource(import_node_fs17.default.readFileSync(file, "utf8")) : void 0;
16575
16980
  variables.set(name2, isRecord(parsed) ? parsed : void 0);
16576
16981
  } else if (entry && variables.has(entry[1])) {
16577
- const key = literal(entry[2]);
16982
+ const key = literal2(entry[2]);
16578
16983
  const source = variables.get(entry[1]);
16579
16984
  if (key === void 0) return null;
16580
16985
  variables.set(name2, isRecord(source) ? source[key] : void 0);