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
  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
 
@@ -355,7 +355,7 @@ var require_parse = __commonJS({
355
355
  var token;
356
356
  var key;
357
357
  var root;
358
- module2.exports = function parse4(text2, reviver) {
358
+ module2.exports = function parse7(text2, reviver) {
359
359
  source = String(text2);
360
360
  parseState = "start";
361
361
  stack = [];
@@ -538,15 +538,15 @@ var require_parse = __commonJS({
538
538
  return newToken("punctuator", read());
539
539
  case "n":
540
540
  read();
541
- literal("ull");
541
+ literal2("ull");
542
542
  return newToken("null", null);
543
543
  case "t":
544
544
  read();
545
- literal("rue");
545
+ literal2("rue");
546
546
  return newToken("boolean", true);
547
547
  case "f":
548
548
  read();
549
- literal("alse");
549
+ literal2("alse");
550
550
  return newToken("boolean", false);
551
551
  case "-":
552
552
  case "+":
@@ -577,11 +577,11 @@ var require_parse = __commonJS({
577
577
  return;
578
578
  case "I":
579
579
  read();
580
- literal("nfinity");
580
+ literal2("nfinity");
581
581
  return newToken("numeric", Infinity);
582
582
  case "N":
583
583
  read();
584
- literal("aN");
584
+ literal2("aN");
585
585
  return newToken("numeric", NaN);
586
586
  case '"':
587
587
  case "'":
@@ -675,11 +675,11 @@ var require_parse = __commonJS({
675
675
  return;
676
676
  case "I":
677
677
  read();
678
- literal("nfinity");
678
+ literal2("nfinity");
679
679
  return newToken("numeric", sign * Infinity);
680
680
  case "N":
681
681
  read();
682
- literal("aN");
682
+ literal2("aN");
683
683
  return newToken("numeric", NaN);
684
684
  }
685
685
  throw invalidChar(read());
@@ -912,7 +912,7 @@ var require_parse = __commonJS({
912
912
  column
913
913
  };
914
914
  }
915
- function literal(s) {
915
+ function literal2(s) {
916
916
  for (const c2 of s) {
917
917
  const p = peek();
918
918
  if (p !== c2) {
@@ -1210,12 +1210,12 @@ var require_stringify = __commonJS({
1210
1210
  replacerFunc = replacer;
1211
1211
  } else if (Array.isArray(replacer)) {
1212
1212
  propertyList = [];
1213
- for (const v of replacer) {
1213
+ for (const v5 of replacer) {
1214
1214
  let item;
1215
- if (typeof v === "string") {
1216
- item = v;
1217
- } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
1218
- item = String(v);
1215
+ if (typeof v5 === "string") {
1216
+ item = v5;
1217
+ } else if (typeof v5 === "number" || v5 instanceof String || v5 instanceof Number) {
1218
+ item = String(v5);
1219
1219
  }
1220
1220
  if (item !== void 0 && propertyList.indexOf(item) < 0) {
1221
1221
  propertyList.push(item);
@@ -1413,10 +1413,10 @@ var require_stringify = __commonJS({
1413
1413
  var require_lib = __commonJS({
1414
1414
  "../../node_modules/json5/lib/index.js"(exports2, module2) {
1415
1415
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1416
- var parse4 = require_parse();
1416
+ var parse7 = require_parse();
1417
1417
  var stringify4 = require_stringify();
1418
1418
  var JSON53 = {
1419
- parse: parse4,
1419
+ parse: parse7,
1420
1420
  stringify: stringify4
1421
1421
  };
1422
1422
  module2.exports = JSON53;
@@ -1862,7 +1862,7 @@ var init_applyReviver = __esm({
1862
1862
  // ../../node_modules/yaml/browser/dist/nodes/toJS.js
1863
1863
  function toJS(value, arg, ctx) {
1864
1864
  if (Array.isArray(value))
1865
- return value.map((v, i) => toJS(v, String(i), ctx));
1865
+ return value.map((v5, i) => toJS(v5, String(i), ctx));
1866
1866
  if (value && typeof value.toJSON === "function") {
1867
1867
  if (!ctx || !hasAnchor(value))
1868
1868
  return value.toJSON(arg, ctx);
@@ -2151,18 +2151,18 @@ var init_createNode = __esm({
2151
2151
 
2152
2152
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
2153
2153
  function collectionFromPath(schema4, path30, value) {
2154
- let v = value;
2154
+ let v5 = value;
2155
2155
  for (let i = path30.length - 1; i >= 0; --i) {
2156
2156
  const k = path30[i];
2157
2157
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
2158
2158
  const a = [];
2159
- a[k] = v;
2160
- v = a;
2159
+ a[k] = v5;
2160
+ v5 = a;
2161
2161
  } else {
2162
- v = /* @__PURE__ */ new Map([[k, v]]);
2162
+ v5 = /* @__PURE__ */ new Map([[k, v5]]);
2163
2163
  }
2164
2164
  }
2165
- return createNode(v, void 0, {
2165
+ return createNode(v5, void 0, {
2166
2166
  aliasDuplicateObjects: false,
2167
2167
  keepUndefined: false,
2168
2168
  onAnchor: () => {
@@ -2568,9 +2568,9 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
2568
2568
  return quotedString(value, ctx);
2569
2569
  }
2570
2570
  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
2571
- const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
2571
+ const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
2572
2572
  if (!value)
2573
- return literal ? "|\n" : ">\n";
2573
+ return literal2 ? "|\n" : ">\n";
2574
2574
  let chomp;
2575
2575
  let endStart;
2576
2576
  for (endStart = value.length; endStart > 0; --endStart) {
@@ -2619,7 +2619,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
2619
2619
  if (onComment)
2620
2620
  onComment();
2621
2621
  }
2622
- if (!literal) {
2622
+ if (!literal2) {
2623
2623
  const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
2624
2624
  let literalFallback = false;
2625
2625
  const foldOptions = getFoldOptions(ctx, true);
@@ -3110,8 +3110,8 @@ var init_addPairToJSMap = __esm({
3110
3110
  // ../../node_modules/yaml/browser/dist/nodes/Pair.js
3111
3111
  function createPair(key, value, ctx) {
3112
3112
  const k = createNode(key, void 0, ctx);
3113
- const v = createNode(value, void 0, ctx);
3114
- return new Pair(k, v);
3113
+ const v5 = createNode(value, void 0, ctx);
3114
+ return new Pair(k, v5);
3115
3115
  }
3116
3116
  var Pair;
3117
3117
  var init_Pair = __esm({
@@ -5828,7 +5828,7 @@ var init_nitro_dependencies = __esm({
5828
5828
  });
5829
5829
 
5830
5830
  // src/nitro-source.ts
5831
- function object(value) {
5831
+ function object3(value) {
5832
5832
  return value !== null && typeof value === "object" && !Array.isArray(value);
5833
5833
  }
5834
5834
  function readJson(root, relative3) {
@@ -5922,7 +5922,7 @@ function viewNames(root, classes) {
5922
5922
  for (const file of import_node_fs26.default.readdirSync(directory)) {
5923
5923
  if (!file.endsWith("Config.json")) continue;
5924
5924
  const config = readJson(root, import_node_path29.default.join("nitrogen/generated/shared/json", file));
5925
- const name2 = object(config) ? config.uiViewClassName : void 0;
5925
+ const name2 = object3(config) ? config.uiViewClassName : void 0;
5926
5926
  if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
5927
5927
  views.add(name2);
5928
5928
  }
@@ -6160,7 +6160,7 @@ function installedPackageDir(appDir, name2) {
6160
6160
  function isAndroidCheck(node) {
6161
6161
  if (node.type !== "BinaryExpression" || !["===", "=="].includes(node.operator))
6162
6162
  return false;
6163
- const side = (value, literal) => value.type === "MemberExpression" && !value.computed && nativeLookupName(value.object) === "Platform" && nativeLookupName(value) === "OS" && literal.type === "Literal" && literal.value === "android";
6163
+ const side = (value, literal2) => value.type === "MemberExpression" && !value.computed && nativeLookupName(value.object) === "Platform" && nativeLookupName(value) === "OS" && literal2.type === "Literal" && literal2.value === "android";
6164
6164
  return side(node.left, node.right) || side(node.right, node.left);
6165
6165
  }
6166
6166
  function nativeLookupName(node) {
@@ -6188,11 +6188,11 @@ function sourceNativeRequests(file, text2, includeLegacy = false) {
6188
6188
  const guard = (test, branch) => {
6189
6189
  if (isAndroidCheck(test)) androidRanges.push([branch.start, branch.end]);
6190
6190
  };
6191
- const add = (kind, name2, at, optional) => {
6191
+ const add = (kind, name2, at, optional3) => {
6192
6192
  found.push({
6193
6193
  kind,
6194
6194
  name: name2,
6195
- optional,
6195
+ optional: optional3,
6196
6196
  androidOnly: androidFile || androidRanges.some(([start, end]) => at >= start && at < end),
6197
6197
  line: code.slice(0, at).split("\n").length
6198
6198
  });
@@ -6290,7 +6290,7 @@ function dependencyNativeOwners(appDir, manifest) {
6290
6290
  if (!dir || visited.has(dir)) continue;
6291
6291
  visited.add(dir);
6292
6292
  const dependency = readProjectManifest(dir);
6293
- const optional = readPackageJson(dir)?.optionalDependencies;
6293
+ const optional3 = readPackageJson(dir)?.optionalDependencies;
6294
6294
  if (dir.split("/").includes("node_modules") && (from === appDir || hasNativeCode(dir, "ios"))) {
6295
6295
  for (const request of packageNativeRequests(dir))
6296
6296
  if (!owners.has(`${request.kind}:${request.name}`))
@@ -6298,7 +6298,7 @@ function dependencyNativeOwners(appDir, manifest) {
6298
6298
  }
6299
6299
  for (const child of Object.keys({
6300
6300
  ...dependency?.dependencies,
6301
- ...isRecord(optional) ? optional : {}
6301
+ ...isRecord(optional3) ? optional3 : {}
6302
6302
  }))
6303
6303
  pending.push({ from: dir, name: child });
6304
6304
  }
@@ -6449,11 +6449,11 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6449
6449
  return result;
6450
6450
  };
6451
6451
  const found = /* @__PURE__ */ new Map();
6452
- const add = (kind, name2, file, line, optional = false, declaration = false) => {
6452
+ const add = (kind, name2, file, line, optional3 = false, declaration = false) => {
6453
6453
  const key = `${kind}:${name2}`;
6454
6454
  const known = found.get(key);
6455
6455
  if (known) {
6456
- if (!declaration) known.optional &&= optional;
6456
+ if (!declaration) known.optional &&= optional3;
6457
6457
  else {
6458
6458
  const moduleDir2 = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`));
6459
6459
  if (moduleDir2 && (file.endsWith(".swift") || !known.expoModule)) {
@@ -6473,7 +6473,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6473
6473
  package: packageName,
6474
6474
  path: `${(0, import_node_path30.relative)(appDir, file)}:${line}`,
6475
6475
  expoModule: moduleDir ? (0, import_node_path30.relative)(appDir, moduleDir) || "." : null,
6476
- optional,
6476
+ optional: optional3,
6477
6477
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
6478
6478
  (path30) => path30.endsWith(".swift") && [...(readSmallFile(path30) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
6479
6479
  (match) => match[1] === name2
@@ -6485,13 +6485,13 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6485
6485
  for (const file of sourceFiles) {
6486
6486
  const text2 = readSmallFile(file);
6487
6487
  if (!text2) continue;
6488
- for (const { kind, name: name2, line, optional, androidOnly } of sourceNativeRequests(
6488
+ for (const { kind, name: name2, line, optional: optional3, androidOnly } of sourceNativeRequests(
6489
6489
  file,
6490
6490
  text2,
6491
6491
  includeLegacy
6492
6492
  )) {
6493
6493
  if (androidOnly && platform === "ios") continue;
6494
- add(kind, name2, file, line, optional);
6494
+ add(kind, name2, file, line, optional3);
6495
6495
  }
6496
6496
  }
6497
6497
  for (const [, files] of nativeFilesByModule) {
@@ -6922,7 +6922,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6922
6922
  init_version();
6923
6923
 
6924
6924
  // runtime-companion.json
6925
- var runtime_companion_default = { abi: 1, sha256: "f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467", file: "node/cli-f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467.cjs" };
6925
+ var runtime_companion_default = { abi: 1, sha256: "278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172", file: "node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs" };
6926
6926
 
6927
6927
  // src/answeredNativePackages.ts
6928
6928
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -8688,9 +8688,9 @@ function createBridge(wsPort, opts = {}) {
8688
8688
  lineageBySimId.get(payload.simId)?.hostPid
8689
8689
  );
8690
8690
  pending.set(id, {
8691
- resolve: (v) => {
8691
+ resolve: (v5) => {
8692
8692
  clearTimeoutFn();
8693
- resolve5(v);
8693
+ resolve5(v5);
8694
8694
  },
8695
8695
  reject: (e) => {
8696
8696
  clearTimeoutFn();
@@ -14983,11 +14983,11 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
14983
14983
  for (const [index, line] of lines.entries()) {
14984
14984
  const occurrences = [...line.matchAll(/\$UseRiveLegacy\b/g)];
14985
14985
  if (!occurrences.length) continue;
14986
- const literal = /^\$UseRiveLegacy = (true|false)\s*(?:#.*)?$/.exec(line);
14987
- if (file !== podfile || occurrences.length !== 1 || !literal || assigned)
14986
+ const literal2 = /^\$UseRiveLegacy = (true|false)\s*(?:#.*)?$/.exec(line);
14987
+ if (file !== podfile || occurrences.length !== 1 || !literal2 || assigned)
14988
14988
  unsupported(file, index + 1);
14989
14989
  assigned = true;
14990
- value = literal[1] === "true";
14990
+ value = literal2[1] === "true";
14991
14991
  }
14992
14992
  }
14993
14993
  return { [RIVE_PACKAGE]: { USE_RIVE_LEGACY: value } };
@@ -15903,6 +15903,8 @@ var FETCH_PROXY_FAILURE_HEADER = "x-peach-upstream-failure";
15903
15903
  var FETCH_PROXY_RESPONSE_URL_HEADER = "x-peach-response-url";
15904
15904
  var FETCH_PROXY_NATIVE_COOKIE_HEADER = "x-peach-native-cookie";
15905
15905
  var FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER = "x-peach-native-cookie-response";
15906
+ var FETCH_PROXY_TLS_MINIMUM_HEADER = "x-peach-tls-minimum";
15907
+ var FETCH_PROXY_TLS_ENFORCED_HEADER = "x-peach-tls-enforced";
15906
15908
  function nativeCookieHopHeader(hop) {
15907
15909
  return encodeURIComponent(JSON.stringify(hop));
15908
15910
  }
@@ -15981,7 +15983,9 @@ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
15981
15983
  "sec-ch-ua-platform",
15982
15984
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
15983
15985
  FETCH_PROXY_NATIVE_COOKIE_HEADER,
15984
- FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER
15986
+ FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER,
15987
+ FETCH_PROXY_TLS_MINIMUM_HEADER,
15988
+ FETCH_PROXY_TLS_ENFORCED_HEADER
15985
15989
  ]);
15986
15990
  function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
15987
15991
  const headers = {};
@@ -16018,6 +16022,44 @@ function nodeRequestHeaderEntries(headers) {
16018
16022
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
16019
16023
  var import_promises2 = require("node:dns/promises");
16020
16024
 
16025
+ // src/dns-over-https.ts
16026
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
16027
+ function parseIpLiteral(text2) {
16028
+ if (text2.includes(":")) return parseIpv6(text2);
16029
+ const parts = text2.split(".");
16030
+ if (parts.length !== 4 || !parts.every((part) => /^\d{1,3}$/.test(part))) return null;
16031
+ const bytes = parts.map(Number);
16032
+ return bytes.every((byte) => byte <= 255) ? bytes : null;
16033
+ }
16034
+ function parseIpv6(text2) {
16035
+ const halves = text2.split("::");
16036
+ if (halves.length > 2) return null;
16037
+ const words = (side) => {
16038
+ if (side === "") return [];
16039
+ const groups = side.split(":");
16040
+ const result = [];
16041
+ for (const [index, group] of groups.entries()) {
16042
+ if (group.includes(".")) {
16043
+ const isLast = index === groups.length - 1 && (side !== halves[0] || halves.length === 1);
16044
+ const v42 = isLast ? parseIpLiteral(group) : null;
16045
+ if (!v42) return null;
16046
+ result.push(v42[0] * 256 + v42[1], v42[2] * 256 + v42[3]);
16047
+ } else if (/^[0-9a-f]{1,4}$/i.test(group)) result.push(parseInt(group, 16));
16048
+ else return null;
16049
+ }
16050
+ return result;
16051
+ };
16052
+ const head = words(halves[0]);
16053
+ const tail = halves.length === 2 ? words(halves[1]) : [];
16054
+ if (!head || !tail) return null;
16055
+ const missing2 = 8 - head.length - tail.length;
16056
+ if (halves.length === 2 ? missing2 < 1 : missing2 !== 0) return null;
16057
+ return [...head, ...Array(missing2).fill(0), ...tail].flatMap((word) => [
16058
+ word >> 8,
16059
+ word & 255
16060
+ ]);
16061
+ }
16062
+
16021
16063
  // src/host/network-policy.ts
16022
16064
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
16023
16065
  var import_node_path11 = require("node:path");
@@ -16107,10 +16149,13 @@ async function handleHostnameResolutionRequest(req, res) {
16107
16149
  res.end();
16108
16150
  return;
16109
16151
  }
16110
- let resolved;
16152
+ let addresses;
16111
16153
  try {
16112
- await (0, import_promises2.lookup)(host2);
16113
- resolved = true;
16154
+ addresses = (await (0, import_promises2.lookup)(host2, { all: true })).map(({ address }) => {
16155
+ const bytes = parseIpLiteral(address);
16156
+ if (!bytes) throw new Error("system resolver returned an invalid address");
16157
+ return bytes;
16158
+ });
16114
16159
  } catch (error) {
16115
16160
  const code = error instanceof Error ? Reflect.get(error, "code") : null;
16116
16161
  if (code !== "ENOTFOUND" && code !== "EINVAL" && code !== "ERR_INVALID_ARG_VALUE") {
@@ -16118,14 +16163,14 @@ async function handleHostnameResolutionRequest(req, res) {
16118
16163
  res.end();
16119
16164
  return;
16120
16165
  }
16121
- resolved = false;
16166
+ addresses = [];
16122
16167
  }
16123
16168
  res.statusCode = 200;
16124
16169
  res.setHeader("content-type", "application/json");
16125
16170
  res.setHeader("cache-control", "no-store");
16126
16171
  res.setHeader("access-control-allow-origin", req.headers.origin || "*");
16127
16172
  res.setHeader("cross-origin-resource-policy", "cross-origin");
16128
- res.end(JSON.stringify(resolved));
16173
+ res.end(JSON.stringify(addresses));
16129
16174
  }
16130
16175
 
16131
16176
  // src/host/loopback-ports.ts
@@ -16212,6 +16257,13 @@ async function forwardRolldownBundleResponse(upstream, res) {
16212
16257
  // src/host/fetch-proxy-handler.ts
16213
16258
  var fetchProxyHttpAgent = new import_http.default.Agent({ keepAlive: true, maxSockets: 256 });
16214
16259
  var fetchProxyHttpsAgent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
16260
+ var tlsMinimumVersions = /* @__PURE__ */ new Map([
16261
+ ["769", "TLSv1"],
16262
+ ["770", "TLSv1.1"],
16263
+ ["771", "TLSv1.2"],
16264
+ ["772", "TLSv1.3"]
16265
+ ]);
16266
+ var tlsMinimumAgents = /* @__PURE__ */ new Map();
16215
16267
  function fetchProxyAgentFor(targetUrl) {
16216
16268
  return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
16217
16269
  }
@@ -16263,7 +16315,7 @@ function buildAppApiProxyHeaders(reqHeaders, targetUrl) {
16263
16315
  const headers = {};
16264
16316
  for (const [key, value] of Object.entries(reqHeaders)) {
16265
16317
  if (!value) continue;
16266
- 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()))
16318
+ 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()))
16267
16319
  continue;
16268
16320
  headers[key] = value;
16269
16321
  }
@@ -16298,6 +16350,8 @@ function isAppApiRequestUrl(rawUrl) {
16298
16350
  }
16299
16351
  async function handleFetchProxyRequest(req, res) {
16300
16352
  if (req.method === "OPTIONS") {
16353
+ if (new URL(req.url ?? "", "http://localhost").searchParams.has("peachTlsProbe"))
16354
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
16301
16355
  applyFetchProxyCors(req, res);
16302
16356
  res.statusCode = 204;
16303
16357
  res.end();
@@ -16330,7 +16384,7 @@ async function handleFetchProxyRequest(req, res) {
16330
16384
  respond: async (upstream, setCookies) => {
16331
16385
  for (const [key, value] of Object.entries(upstream.headers)) {
16332
16386
  const lowerKey = key.toLowerCase();
16333
- 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-")) {
16387
+ 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-")) {
16334
16388
  continue;
16335
16389
  }
16336
16390
  res.setHeader(key, value);
@@ -16348,6 +16402,13 @@ async function handleFetchProxyRequest(req, res) {
16348
16402
  }
16349
16403
  function handleAppApiRequest(req, res) {
16350
16404
  const reqUrl = req.url || "";
16405
+ if (req.method === "OPTIONS" && reqUrl.startsWith("/__app-api?") && new URL(reqUrl, "http://localhost").searchParams.has("peachTlsProbe")) {
16406
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
16407
+ applyFetchProxyCors(req, res);
16408
+ res.statusCode = 204;
16409
+ res.end();
16410
+ return true;
16411
+ }
16351
16412
  let targetPath = "";
16352
16413
  let targetOrigin = "";
16353
16414
  let reportFailure = false;
@@ -16390,7 +16451,7 @@ function handleAppApiRequest(req, res) {
16390
16451
  respond: (upstream, setCookies) => {
16391
16452
  for (const [key, value] of Object.entries(upstream.headers)) {
16392
16453
  const lowerKey = key.toLowerCase();
16393
- if (value === void 0 || lowerKey === "set-cookie" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER) {
16454
+ 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) {
16394
16455
  continue;
16395
16456
  }
16396
16457
  res.setHeader(key, value);
@@ -16425,6 +16486,8 @@ function serveBrowserProxyRoute(req, res) {
16425
16486
  }
16426
16487
  async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
16427
16488
  const originalMethod = req.method || "GET";
16489
+ const minimumHeader = req.headers[FETCH_PROXY_TLS_MINIMUM_HEADER];
16490
+ const minimumVersion = typeof minimumHeader === "string" ? tlsMinimumVersions.get(minimumHeader) : void 0;
16428
16491
  const proxy = async (targetUrl, method, nextBody, redirects, setCookies) => {
16429
16492
  const transport = targetUrl.protocol === "https:" ? import_https.default : import_http.default;
16430
16493
  const targetHeaders = route.requestHeaders(targetUrl);
@@ -16465,8 +16528,21 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
16465
16528
  path: targetUrl.pathname + targetUrl.search,
16466
16529
  method,
16467
16530
  headers: targetHeaders,
16468
- agent: fetchProxyAgentFor(targetUrl),
16469
- ...loopbackTlsOptions(targetUrl)
16531
+ ...minimumVersion && targetUrl.protocol === "https:" ? {
16532
+ agent: (() => {
16533
+ let agent = tlsMinimumAgents.get(minimumVersion);
16534
+ if (!agent) {
16535
+ agent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
16536
+ tlsMinimumAgents.set(minimumVersion, agent);
16537
+ }
16538
+ return agent;
16539
+ })(),
16540
+ minVersion: minimumVersion,
16541
+ rejectUnauthorized: true
16542
+ } : {
16543
+ agent: fetchProxyAgentFor(targetUrl),
16544
+ ...loopbackTlsOptions(targetUrl)
16545
+ }
16470
16546
  },
16471
16547
  (upstream) => {
16472
16548
  responded = true;
@@ -16501,6 +16577,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
16501
16577
  redirectLimit: 10
16502
16578
  };
16503
16579
  res.setHeader(FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER, nativeCookieHopHeader(hop));
16580
+ if (minimumVersion && targetUrl.protocol === "https:")
16581
+ res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, minimumHeader);
16504
16582
  await route.respond(proxyRes, hopCookies);
16505
16583
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
16506
16584
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
@@ -16537,6 +16615,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
16537
16615
  let upstreamAnswered = false;
16538
16616
  let body;
16539
16617
  try {
16618
+ if (minimumHeader !== void 0 && !minimumVersion)
16619
+ throw new TypeError("unsupported URLSession TLS minimum");
16540
16620
  if (req.method !== "GET" && req.method !== "HEAD") {
16541
16621
  const chunks = [];
16542
16622
  for await (const chunk of req) {
@@ -17434,12 +17514,12 @@ function readAndroidRootModuleFromActivitySource(source, simpleName) {
17434
17514
  if (declarations.length !== 1) return void 0;
17435
17515
  const rest = code.slice(declarations[0].index);
17436
17516
  const kotlin = code.slice(code.lastIndexOf("override", declarations[0].index));
17437
- const literal = (KOTLIN_LITERAL.exec(kotlin) ?? JAVA_LITERAL.exec(rest))?.[1];
17438
- if (literal === void 0) return void 0;
17517
+ const literal2 = (KOTLIN_LITERAL.exec(kotlin) ?? JAVA_LITERAL.exec(rest))?.[1];
17518
+ if (literal2 === void 0) return void 0;
17439
17519
  const delegate = /createReactActivityDelegate[\s\S]*/.exec(code)?.[0];
17440
17520
  if (delegate && !/\b(?:mainComponentName|getMainComponentName\s*\(\s*\))/.test(delegate))
17441
17521
  return void 0;
17442
- return literal;
17522
+ return literal2;
17443
17523
  }
17444
17524
  function launcherActivities(application) {
17445
17525
  return application.children.filter(
@@ -17646,10 +17726,10 @@ function androidMergedResourceValuesDirectory(manifestFile) {
17646
17726
  manifestFile
17647
17727
  );
17648
17728
  if (!match) return null;
17649
- const [, intermediates, variant] = match;
17650
- if (!variant) return null;
17651
- const taskVariant = variant[0].toUpperCase() + variant.slice(1);
17652
- return `${intermediates}incremental/${variant}/merge${taskVariant}Resources/merged.dir`;
17729
+ const [, intermediates, variant2] = match;
17730
+ if (!variant2) return null;
17731
+ const taskVariant = variant2[0].toUpperCase() + variant2.slice(1);
17732
+ return `${intermediates}incremental/${variant2}/merge${taskVariant}Resources/merged.dir`;
17653
17733
  }
17654
17734
 
17655
17735
  // src/native-app-identity.ts
@@ -17934,6 +18014,21 @@ function xcodeTargetMemberVisitor(objects) {
17934
18014
  }
17935
18015
 
17936
18016
  // src/native-app-identity.ts
18017
+ function readKeychainAccessGroups(dictionary, resolve5) {
18018
+ if (!isRecord(dictionary))
18019
+ throw new Error("native app entitlements are not a dictionary");
18020
+ const groups = dictionary["keychain-access-groups"];
18021
+ if (groups === void 0) return void 0;
18022
+ if (!Array.isArray(groups)) throw new Error("keychain-access-groups is not an array");
18023
+ return groups.map((group) => {
18024
+ if (typeof group !== "string")
18025
+ throw new Error("keychain access group is not a string");
18026
+ const value = resolve5(group);
18027
+ if (!value || /\$[({]/.test(value))
18028
+ throw new Error("keychain access group has unresolved signing settings");
18029
+ return value;
18030
+ });
18031
+ }
17937
18032
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
17938
18033
  var METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
17939
18034
  function nonEmptyString(value) {
@@ -18134,8 +18229,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18134
18229
  if (typeof configId === "string") {
18135
18230
  const configObj = objects[configId];
18136
18231
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
18137
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
18138
- if (typeof v === "string") settings[k] = v;
18232
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
18233
+ if (typeof v5 === "string") settings[k] = v5;
18139
18234
  }
18140
18235
  }
18141
18236
  }
@@ -18150,8 +18245,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18150
18245
  if (typeof configId === "string") {
18151
18246
  const configObj = objects[configId];
18152
18247
  if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
18153
- for (const [k, v] of Object.entries(configObj.buildSettings)) {
18154
- if (typeof v === "string") settings[k] = v;
18248
+ for (const [k, v5] of Object.entries(configObj.buildSettings)) {
18249
+ if (typeof v5 === "string") settings[k] = v5;
18155
18250
  }
18156
18251
  }
18157
18252
  }
@@ -18201,6 +18296,19 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18201
18296
  const applicationName = identityFieldFrom(settings, plistString(plist3, "CFBundleDisplayName"), void 0) ?? bundleName;
18202
18297
  const dictionary = parseInfoPlist(plist3);
18203
18298
  if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
18299
+ let keychainAccessGroups;
18300
+ if (settings.CODE_SIGN_ENTITLEMENTS) {
18301
+ const entitlementPath = resolveBuildSetting(settings.CODE_SIGN_ENTITLEMENTS, settings);
18302
+ if (!entitlementPath)
18303
+ throw new Error("CODE_SIGN_ENTITLEMENTS has unresolved build settings");
18304
+ const source = files[`ios/${entitlementPath}`] ?? files[entitlementPath];
18305
+ if (source === void 0)
18306
+ throw new Error(`missing selected entitlement input ${entitlementPath}`);
18307
+ keychainAccessGroups = readKeychainAccessGroups(
18308
+ parseInfoPlist(source),
18309
+ (value) => resolveBuildSetting(value, settings)
18310
+ );
18311
+ }
18204
18312
  const declaredDisplayName = dictionary.CFBundleDisplayName;
18205
18313
  const applicationDisplayName = typeof declaredDisplayName === "string" ? resolveBuildSetting(declaredDisplayName, settings) : void 0;
18206
18314
  if (applicationDisplayName === null)
@@ -18319,7 +18427,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18319
18427
  return `${base.startsWith("/") ? "/" : ""}${segments.join("/")}`;
18320
18428
  };
18321
18429
  const project = Object.values(objects).find(
18322
- (object2) => isRecord(object2) && object2.isa === "PBXProject"
18430
+ (object4) => isRecord(object4) && object4.isa === "PBXProject"
18323
18431
  );
18324
18432
  const projectDir = join9(
18325
18433
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
@@ -18392,6 +18500,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18392
18500
  permissionUsageDescriptions,
18393
18501
  infoPlistStrings,
18394
18502
  urlQuerySchemes,
18503
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
18395
18504
  ...shareIntoAppGroupId === void 0 ? {} : { shareIntoAppGroupId },
18396
18505
  ...rtcAppGroupIdentifier === void 0 ? {} : { rtcAppGroupIdentifier },
18397
18506
  ...screenShareExtensionBundleId === void 0 ? {} : { screenShareExtensionBundleId },
@@ -18456,6 +18565,24 @@ function peachsimPackageRoot() {
18456
18565
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
18457
18566
  var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
18458
18567
  var compilerArchives = {
18568
+ "swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
18569
+ identity: "45bb46301c86fe73",
18570
+ archive: "tar.gz",
18571
+ hosts: {
18572
+ "darwin-arm64": {
18573
+ checksum: "102dfbbb7b451be0685763b7a427284b75a8078874543f091b1c4b3db86e6565",
18574
+ manifest: "fb6c4d75ef6f4b3c094ae5a4d5d1e6bdfd85431f3fe25d514f3e7a0b4add60ef"
18575
+ },
18576
+ "linux-x64": {
18577
+ checksum: "d3c040e042e12ff787b64bfde1d85238254365036ce093f3b20ff86e8ff996f0",
18578
+ manifest: "7c7144be591692e563396fe3c987c5aa56fbaea4faacaad62283c0c6e5c04ae2"
18579
+ },
18580
+ "linux-arm64": {
18581
+ checksum: "604e6fc5fc0f5a93cee3ca6dfa9616244a2a49ef517caa3155a12ae4a0ecf72b",
18582
+ manifest: "075fd53d03ecf099954f1d023bb4bb67a5c5ee946537466d6c105022bdf8ecde"
18583
+ }
18584
+ }
18585
+ },
18459
18586
  "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
18460
18587
  identity: "0b2d0a9011c88e66",
18461
18588
  archive: "tar.gz",
@@ -19151,37 +19278,130 @@ init_is_record();
19151
19278
  // src/swift-foundation.ts
19152
19279
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19153
19280
 
19154
- // src/swift-icu.ts
19155
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19156
- var import_node_child_process5 = require("node:child_process");
19157
- var import_node_util3 = require("node:util");
19158
- var import_node_zlib2 = require("node:zlib");
19159
- var run3 = (0, import_node_util3.promisify)(import_node_child_process5.execFile);
19160
- var deflate = (0, import_node_util3.promisify)(import_node_zlib2.gzip);
19161
- var compressBrotli = (0, import_node_util3.promisify)(import_node_zlib2.brotliCompress);
19162
- var inflateGzip = (0, import_node_util3.promisify)(import_node_zlib2.gunzip);
19163
-
19164
- // src/swift-link-roots.ts
19281
+ // src/swift-guest-compile.ts
19165
19282
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19166
19283
 
19167
- // src/swift-objc-import.ts
19284
+ // src/swift-guest-archive.ts
19168
19285
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19169
19286
 
19170
- // src/swift-project-user.ts
19171
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19172
-
19173
- // src/swift-reproducible.ts
19174
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19175
-
19176
- // src/swift-root-lock.ts
19287
+ // src/swift-wasm-prune.ts
19177
19288
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19178
- init_home_paths();
19289
+ var v2 = __toESM(require("valibot"), 1);
19179
19290
 
19180
- // src/swift-uniform-type-constants.ts
19291
+ // src/swiftRuntimeProductContract.ts
19181
19292
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19293
+ var v = __toESM(require("valibot"), 1);
19294
+ var swiftFrameworkProductSchema = v.object({
19295
+ version: v.literal(1),
19296
+ packageName: v.string(),
19297
+ manifestSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
19298
+ product: v.object({
19299
+ name: v.string(),
19300
+ linkage: v.picklist(["static", "dynamic", "automatic"]),
19301
+ targets: v.array(v.string())
19302
+ }),
19303
+ // framework names are distinct from SDK library linkNames. they identify
19304
+ // the packaged owner, not an observed native image dependency.
19305
+ frameworkAliases: v.array(
19306
+ v.object({
19307
+ kind: v.literal("framework"),
19308
+ name: v.string(),
19309
+ targets: v.array(v.string()),
19310
+ moduleMap: v.string(),
19311
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
19312
+ wasmSdkId: v.string(),
19313
+ wasmSdkChecksum: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
19314
+ })
19315
+ ),
19316
+ targets: v.array(
19317
+ v.object({
19318
+ name: v.string(),
19319
+ path: v.string(),
19320
+ kind: v.picklist(["regular", "system"]),
19321
+ dependencies: v.array(v.string())
19322
+ })
19323
+ ),
19324
+ objects: v.array(v.object({ path: v.string(), target: v.string() })),
19325
+ autolink: v.array(v.string())
19326
+ });
19327
+ var swiftSdkProductSchema = v.pipe(
19328
+ v.object({
19329
+ id: v.string(),
19330
+ installName: v.string(),
19331
+ target: v.literal("wasm32-unknown-wasip1"),
19332
+ linkNames: v.array(v.string()),
19333
+ // absent records declare no framework namespace, even when a library name matches.
19334
+ frameworkAliases: v.optional(
19335
+ v.array(
19336
+ v.object({
19337
+ name: v.string(),
19338
+ moduleMap: v.string(),
19339
+ moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
19340
+ })
19341
+ ),
19342
+ []
19343
+ ),
19344
+ buildDependencies: v.array(v.string()),
19345
+ linkOwnership: v.picklist(["image", "containing-image"]),
19346
+ linkDependencies: v.nullable(v.array(v.string())),
19347
+ autolink: v.array(v.string()),
19348
+ sources: v.array(
19349
+ v.object({
19350
+ path: v.string(),
19351
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
19352
+ })
19353
+ ),
19354
+ artifacts: v.array(
19355
+ v.variant("kind", [
19356
+ v.object({
19357
+ kind: v.literal("archive"),
19358
+ path: v.string(),
19359
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
19360
+ members: v.array(
19361
+ v.object({
19362
+ name: v.string(),
19363
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
19364
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
19365
+ sources: v.array(v.string())
19366
+ })
19367
+ )
19368
+ }),
19369
+ v.object({
19370
+ kind: v.literal("object"),
19371
+ path: v.string(),
19372
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
19373
+ sources: v.array(v.string()),
19374
+ input: v.optional(
19375
+ v.object({
19376
+ product: v.string(),
19377
+ artifact: v.object({
19378
+ path: v.string(),
19379
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
19380
+ }),
19381
+ member: v.optional(
19382
+ v.object({
19383
+ name: v.string(),
19384
+ ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
19385
+ sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
19386
+ })
19387
+ )
19388
+ })
19389
+ )
19390
+ })
19391
+ ])
19392
+ )
19393
+ }),
19394
+ v.check(
19395
+ (product) => product.linkOwnership === "image" || product.linkDependencies === null,
19396
+ "containing-image products cannot declare an image scope"
19397
+ )
19398
+ );
19399
+ var swiftSdkProductsSchema = v.object({
19400
+ version: v.literal(1),
19401
+ products: v.array(swiftSdkProductSchema)
19402
+ });
19182
19403
 
19183
19404
  // src/swift-wasm-prune.ts
19184
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19185
19405
  var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
19186
19406
  "libFoundation",
19187
19407
  "lib_FoundationCollections",
@@ -19201,8 +19421,66 @@ var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
19201
19421
  "-lswift_Concurrency"
19202
19422
  ]);
19203
19423
 
19204
- // src/swift-compile.ts
19205
- init_swiftContract();
19424
+ // src/swift-guest-link.ts
19425
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19426
+
19427
+ // src/swift-guest-image-ledger.ts
19428
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19429
+
19430
+ // src/swift-guest-link-plan.ts
19431
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19432
+
19433
+ // src/swift-guest-manifest.ts
19434
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19435
+
19436
+ // src/swift-guest-projection-storage.ts
19437
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19438
+
19439
+ // src/swift-guest-linked-spans.ts
19440
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19441
+
19442
+ // src/swift-guest-projection.ts
19443
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19444
+
19445
+ // src/swiftGuestImageContract.ts
19446
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19447
+ init_is_record();
19448
+
19449
+ // src/swift-guest-projection-storage.ts
19450
+ var maxProjectionRegions = 1 << 20;
19451
+
19452
+ // src/swift-guest-runtime-plan.ts
19453
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19454
+ var v4 = __toESM(require("valibot"), 1);
19455
+
19456
+ // src/swift-guest-source-plan.ts
19457
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19458
+
19459
+ // src/swift-runtime-products.ts
19460
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19461
+ var v3 = __toESM(require("valibot"), 1);
19462
+ init_is_record();
19463
+ var packageSchema = v3.object({
19464
+ name: v3.string(),
19465
+ products: v3.array(
19466
+ v3.object({
19467
+ name: v3.string(),
19468
+ targets: v3.array(v3.string()),
19469
+ type: v3.unknown()
19470
+ })
19471
+ ),
19472
+ targets: v3.array(
19473
+ v3.object({
19474
+ name: v3.string(),
19475
+ type: v3.string(),
19476
+ path: v3.optional(v3.string()),
19477
+ dependencies: v3.array(v3.unknown())
19478
+ })
19479
+ )
19480
+ });
19481
+
19482
+ // src/swift-guest-source-inputs.ts
19483
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19206
19484
 
19207
19485
  // src/wasm-optimize.ts
19208
19486
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -19221,6 +19499,51 @@ var FEATURES = [
19221
19499
  ];
19222
19500
  var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
19223
19501
 
19502
+ // src/swift-icu.ts
19503
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19504
+ var import_node_child_process5 = require("node:child_process");
19505
+ var import_node_util3 = require("node:util");
19506
+ var import_node_zlib2 = require("node:zlib");
19507
+
19508
+ // ../sootsim-swift/src/icuData.ts
19509
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19510
+
19511
+ // ../peach-compat/src/stubs/wasm-memory.ts
19512
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19513
+
19514
+ // ../sootsim-swift/src/icuData.ts
19515
+ var PACK_BYTES = 64 * 1024;
19516
+ var VERSION = 1;
19517
+ var SWIFT_ICU_PACKED = `picu${VERSION}`;
19518
+
19519
+ // src/swift-icu.ts
19520
+ var run3 = (0, import_node_util3.promisify)(import_node_child_process5.execFile);
19521
+ var deflate = (0, import_node_util3.promisify)(import_node_zlib2.gzip);
19522
+ var compressBrotli = (0, import_node_util3.promisify)(import_node_zlib2.brotliCompress);
19523
+ var inflateGzip = (0, import_node_util3.promisify)(import_node_zlib2.gunzip);
19524
+
19525
+ // src/swift-link-roots.ts
19526
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19527
+
19528
+ // src/swift-objc-import.ts
19529
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19530
+
19531
+ // src/swift-project-user.ts
19532
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19533
+
19534
+ // src/swift-reproducible.ts
19535
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19536
+
19537
+ // src/swift-root-lock.ts
19538
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19539
+ init_home_paths();
19540
+
19541
+ // src/swift-uniform-type-constants.ts
19542
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19543
+
19544
+ // src/swift-compile.ts
19545
+ init_swiftContract();
19546
+
19224
19547
  // src/write-build-file.ts
19225
19548
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19226
19549
 
@@ -19307,7 +19630,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
19307
19630
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
19308
19631
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
19309
19632
  ).join("");
19310
- var compilerSourceDigest = true ? "86990d3bb695dc1b9f0c4cd7f4db499ad1f3e86d93eb50b44f1cb72a69322840" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
19633
+ var compilerSourceDigest = true ? "d46232537a993bc7418818ab7d2dc159518328882280b8b4bfd459cffd910921" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
19311
19634
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
19312
19635
  "CFAllocator",
19313
19636
  "CFArray",
@@ -19753,6 +20076,16 @@ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
19753
20076
  ]);
19754
20077
  var APPLICATION = "com.apple.product-type.application";
19755
20078
  var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
20079
+ var PRODUCT_MACH_O_TYPES = {
20080
+ "com.apple.product-type.application": "mh_execute",
20081
+ "com.apple.product-type.app-extension": "mh_execute",
20082
+ "com.apple.product-type.tool": "mh_execute",
20083
+ "com.apple.product-type.framework": "mh_dylib",
20084
+ "com.apple.product-type.framework.static": "staticlib",
20085
+ "com.apple.product-type.library.dynamic": "mh_dylib",
20086
+ "com.apple.product-type.library.static": "staticlib",
20087
+ "com.apple.product-type.bundle": "mh_bundle"
20088
+ };
19756
20089
  var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
19757
20090
  "com.apple.product-type.framework",
19758
20091
  "com.apple.product-type.framework.static"
@@ -19925,11 +20258,11 @@ function loadProject(xcodeproj) {
19925
20258
  throw new Error(`${projectFile} has no objects table`);
19926
20259
  }
19927
20260
  const objects = root.objects;
19928
- const object2 = (id) => {
20261
+ const object4 = (id) => {
19929
20262
  const found = id === void 0 ? void 0 : objects[id];
19930
20263
  return isDict(found) ? found : void 0;
19931
20264
  };
19932
- const project = object2(str(root.rootObject));
20265
+ const project = object4(str(root.rootObject));
19933
20266
  if (!project || project.isa !== "PBXProject") {
19934
20267
  throw new Error(`${projectFile} has no PBXProject root`);
19935
20268
  }
@@ -19943,7 +20276,7 @@ function loadProject(xcodeproj) {
19943
20276
  objects,
19944
20277
  project,
19945
20278
  projectDir,
19946
- object: object2,
20279
+ object: object4,
19947
20280
  resolvePath,
19948
20281
  visitMembers: xcodeTargetMemberVisitor(objects)
19949
20282
  };
@@ -20028,6 +20361,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
20028
20361
  PRODUCT_NAME: () => get("TARGET_NAME"),
20029
20362
  PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
20030
20363
  EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
20364
+ MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str(target.productType) ?? ""] ?? "",
20365
+ // the native defaults of CoreBuildSystem.xcspec for a dynamic framework
20366
+ EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
20367
+ DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
20368
+ LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
20031
20369
  // the native default of CoreBuildSystem.xcspec
20032
20370
  EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () => "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
20033
20371
  };
@@ -20708,16 +21046,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20708
21046
  (ref) => ref.id === remote || str(ref.target.productReference) === remote
20709
21047
  );
20710
21048
  };
20711
- const dependenciesOf = (ref) => {
21049
+ const linkedTargets = (ref) => {
20712
21050
  const { project, target } = ref;
20713
21051
  const found = [];
20714
- for (const dependencyId of list(target.dependencies)) {
20715
- const dependency = project.object(dependencyId);
20716
- if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
20717
- const direct = str(dependency.target);
20718
- const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
20719
- if (resolved) found.push(resolved);
20720
- }
20721
21052
  for (const phaseId of list(target.buildPhases)) {
20722
21053
  const phase = project.object(phaseId);
20723
21054
  if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
@@ -20726,10 +21057,37 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20726
21057
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
20727
21058
  const file = project.object(str(buildFile.fileRef));
20728
21059
  const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path26.default.basename(str(file.path) ?? "")) : void 0;
20729
- if (resolved) found.push(resolved);
21060
+ if (resolved)
21061
+ found.push({
21062
+ target: resolved,
21063
+ attributes: list(
21064
+ isDict(buildFile.settings) ? buildFile.settings.ATTRIBUTES : void 0
21065
+ )
21066
+ });
20730
21067
  }
20731
21068
  }
20732
- return found.filter(
21069
+ return found;
21070
+ };
21071
+ const frameworkFlagLinks = (ref, flags) => {
21072
+ const words = settingList(flags);
21073
+ const linked = new Set(linkedTargets(ref).map((link) => link.target));
21074
+ return words.flatMap((word, index) => {
21075
+ const target = words[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
21076
+ if (!target || target === ref || linked.has(target)) return [];
21077
+ linked.add(target);
21078
+ return [{ target, attributes: [] }];
21079
+ });
21080
+ };
21081
+ const dependenciesOf = (ref) => {
21082
+ const { project, target } = ref;
21083
+ const found = list(target.dependencies).flatMap((dependencyId) => {
21084
+ const dependency = project.object(dependencyId);
21085
+ if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
21086
+ const direct = str(dependency.target);
21087
+ const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
21088
+ return resolved ? [resolved] : [];
21089
+ });
21090
+ return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
20733
21091
  (candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
20734
21092
  );
20735
21093
  };
@@ -20946,13 +21304,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20946
21304
  );
20947
21305
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
20948
21306
  const [major, minor] = version.split(".");
20949
- const number = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
21307
+ const number2 = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
20950
21308
  const unit = [
20951
21309
  ` extern const unsigned char ${symbol}VersionString[];`,
20952
21310
  ` extern const double ${symbol}VersionNumber;`,
20953
21311
  "",
20954
21312
  ` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings2("PROJECT_NAME")}-${version}" "\\n";`,
20955
- ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
21313
+ ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
20956
21314
  ""
20957
21315
  ].join("\n");
20958
21316
  if (!import_node_fs23.default.existsSync(versioning) || import_node_fs23.default.readFileSync(versioning, "utf8") !== unit) {
@@ -21054,6 +21412,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21054
21412
  settings: settings2,
21055
21413
  keys,
21056
21414
  module: {
21415
+ id: `${ref.project.projectFile}#${ref.id}`,
21057
21416
  name: name2,
21058
21417
  targetIdentity: JSON.stringify([ref.project.xcodeproj, ref.id]),
21059
21418
  targetDependencies: Array(),
@@ -21314,6 +21673,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21314
21673
  }
21315
21674
  }
21316
21675
  const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path26.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
21676
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path26.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
21677
+ const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
21678
+ import_plist3.default.parse(import_node_fs23.default.readFileSync(entitlementsFile, "utf8")),
21679
+ (value) => expand(value, (key) => {
21680
+ const resolved = settings(key);
21681
+ if (!resolved) throw new Error(`missing signing build setting ${key}`);
21682
+ return resolved;
21683
+ })
21684
+ ) : void 0;
21317
21685
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
21318
21686
  const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs23.default.readFileSync(infoPlistFile, "utf8")) : {};
21319
21687
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
@@ -21473,6 +21841,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21473
21841
  productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
21474
21842
  return builds ? [ref2] : [];
21475
21843
  };
21844
+ const productAttributes = /* @__PURE__ */ new Map();
21845
+ for (const phaseId of list(target.buildPhases)) {
21846
+ const phase = project.object(phaseId);
21847
+ if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
21848
+ for (const id of list(phase.files)) {
21849
+ const file = project.object(id);
21850
+ const product = str(file?.productRef);
21851
+ if (file && product && xcodeBuildFileBuildsForIos(file))
21852
+ productAttributes.set(
21853
+ product,
21854
+ list(isDict(file.settings) ? file.settings.ATTRIBUTES : void 0)
21855
+ );
21856
+ }
21857
+ }
21476
21858
  const referencedProducts = [
21477
21859
  ...list(target.dependencies).flatMap(productRef),
21478
21860
  ...list(target.buildPhases).flatMap((id) => {
@@ -21481,6 +21863,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21481
21863
  })
21482
21864
  ];
21483
21865
  const productDependencies = [
21866
+ ...productAttributes.keys(),
21484
21867
  ...list(target.packageProductDependencies).filter(
21485
21868
  (id) => productPlatforms.get(id) !== false
21486
21869
  ),
@@ -21498,6 +21881,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21498
21881
  const reference = project.object(str(dependency.package));
21499
21882
  const linked = {
21500
21883
  product,
21884
+ ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
21501
21885
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
21502
21886
  kind: "local",
21503
21887
  dir: import_node_path26.default.resolve(
@@ -21571,6 +21955,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21571
21955
  const used = order.map((ref) => ref.project);
21572
21956
  return {
21573
21957
  ...module2,
21958
+ sourceLinkGraph: {
21959
+ entry: module2.id,
21960
+ targets: builtTargets.filter(
21961
+ ({ ref }) => ref === app || MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")
21962
+ ).map(({ ref, module: module3, settings: settings2 }) => ({
21963
+ id: module3.id,
21964
+ sourceTarget: module3.allSources.length > 0 ? module3.moduleName : null,
21965
+ productName: settings2("FULL_PRODUCT_NAME") || str(ref.project.object(str(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
21966
+ productType: str(ref.target.productType),
21967
+ installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
21968
+ buildVersion: {
21969
+ platform: settings2("PLATFORM_NAME") || null,
21970
+ minimumOS: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
21971
+ sdk: settings2("SDK_VERSION") || null
21972
+ },
21973
+ machOType: settings2("MACH_O_TYPE") || null,
21974
+ linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
21975
+ dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
21976
+ (dependency) => MODULE_PRODUCTS.has(str(dependency.target.target.productType) ?? "")
21977
+ ).map(({ target, attributes }) => ({
21978
+ target: `${target.project.projectFile}#${target.id}`,
21979
+ attributes
21980
+ }))
21981
+ }))
21982
+ },
21574
21983
  moduleMapSources: Object.fromEntries(
21575
21984
  builtTargets.flatMap(({ module: module3 }) => {
21576
21985
  const compatibility = module3.swift?.compatibility;
@@ -21599,6 +22008,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21599
22008
  .../* @__PURE__ */ new Set([
21600
22009
  ...used.map((project) => project.projectFile),
21601
22010
  ...xcconfigs,
22011
+ ...entitlementsFile ? [entitlementsFile] : [],
21602
22012
  ...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
21603
22013
  ])
21604
22014
  ].sort(),
@@ -21606,6 +22016,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21606
22016
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
21607
22017
  infoPlist: infoPlistPending ? null : import_plist3.default.build(info),
21608
22018
  infoPlistFile,
22019
+ ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
21609
22020
  postBundleScripts,
21610
22021
  developmentRegion: str(app.project.project.developmentRegion) ?? "en",
21611
22022
  frameworks,
@@ -21691,14 +22102,14 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
21691
22102
  const querySchemes = dictionary.LSApplicationQueriesSchemes;
21692
22103
  const urlQuerySchemes = Array.isArray(querySchemes) ? querySchemes : [];
21693
22104
  const intentIds = dictionary.OneAppIntentIdentifiers;
21694
- const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v) => typeof v === "string") ? intentIds : [];
22105
+ const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v5) => typeof v5 === "string") ? intentIds : [];
21695
22106
  const backgroundIds = dictionary.BGTaskSchedulerPermittedIdentifiers;
21696
- const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v) => typeof v === "string") ? backgroundIds : [];
22107
+ const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v5) => typeof v5 === "string") ? backgroundIds : [];
21697
22108
  const declaredModes = dictionary.UIBackgroundModes;
21698
- const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v) => typeof v === "string") ? declaredModes : [];
21699
- const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v) => typeof v === "string") ? dictionary.UISupportedInterfaceOrientations : [];
22109
+ const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v5) => typeof v5 === "string") ? declaredModes : [];
22110
+ const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v5) => typeof v5 === "string") ? dictionary.UISupportedInterfaceOrientations : [];
21700
22111
  const ipadSupportedInterfaceOrientations = Array.isArray(dictionary["UISupportedInterfaceOrientations~ipad"]) && dictionary["UISupportedInterfaceOrientations~ipad"].every(
21701
- (v) => typeof v === "string"
22112
+ (v5) => typeof v5 === "string"
21702
22113
  ) ? dictionary["UISupportedInterfaceOrientations~ipad"] : [];
21703
22114
  const defaultScreenOrientationMask = nonEmptyString2(
21704
22115
  dictionary.EXDefaultScreenOrientationMask
@@ -21710,6 +22121,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
21710
22121
  app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs24.default.existsSync(file)).map((file) => import_node_fs24.default.readFileSync(file, "utf8"))
21711
22122
  );
21712
22123
  return stampNativeBuildSdk({
22124
+ ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
21713
22125
  applicationName,
21714
22126
  ...applicationDisplayName ? { applicationDisplayName } : {},
21715
22127
  ...rootModuleName ? { rootModuleName } : {},
@@ -21777,13 +22189,19 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
21777
22189
  for (const entry of import_node_fs24.default.readdirSync(iosRoot, { withFileTypes: true })) {
21778
22190
  if (entry.name === "Pods") continue;
21779
22191
  if (entry.isDirectory()) {
21780
- const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
22192
+ const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
22193
+ "Info.plist",
22194
+ "AppDelegate.swift",
22195
+ "AppDelegate.mm",
22196
+ "AppDelegate.m",
22197
+ ...import_node_fs24.default.readdirSync(import_node_path27.default.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
22198
+ ];
21781
22199
  for (const name2 of names) {
21782
22200
  const relative3 = `${prefix2}${entry.name}/${name2}`;
21783
22201
  const file = import_node_path27.default.join(projectRoot, relative3);
21784
22202
  if (import_node_fs24.default.existsSync(file)) files[relative3] = import_node_fs24.default.readFileSync(file, "utf8");
21785
22203
  }
21786
- } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
22204
+ } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
21787
22205
  const relative3 = `${prefix2}${entry.name}`;
21788
22206
  const file = import_node_path27.default.join(projectRoot, relative3);
21789
22207
  if (import_node_fs24.default.existsSync(file)) files[relative3] = import_node_fs24.default.readFileSync(file, "utf8");
@@ -22117,7 +22535,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
22117
22535
  (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
22118
22536
  );
22119
22537
  const variables = /* @__PURE__ */ new Map();
22120
- const literal = (text2) => {
22538
+ const literal2 = (text2) => {
22121
22539
  const quoted = /^@"([^"]*)"$/.exec(text2.trim());
22122
22540
  return quoted ? quoted[1] : constants.get(text2.trim());
22123
22541
  };
@@ -22152,7 +22570,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
22152
22570
  const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
22153
22571
  if (bundle && bundlePath) variables.set(name2, "main bundle");
22154
22572
  else if (bundle && resource) {
22155
- if (literal(resource[1]) !== "GoogleService-Info" || literal(resource[2]) !== "plist")
22573
+ if (literal2(resource[1]) !== "GoogleService-Info" || literal2(resource[2]) !== "plist")
22156
22574
  return null;
22157
22575
  variables.set(name2, plists.length === 1 ? plists[0] : void 0);
22158
22576
  } else if (dictionary && variables.has(dictionary[1])) {
@@ -22160,7 +22578,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
22160
22578
  const parsed = typeof file === "string" ? parsePlistSource(import_node_fs25.default.readFileSync(file, "utf8")) : void 0;
22161
22579
  variables.set(name2, isRecord(parsed) ? parsed : void 0);
22162
22580
  } else if (entry && variables.has(entry[1])) {
22163
- const key = literal(entry[2]);
22581
+ const key = literal2(entry[2]);
22164
22582
  const source = variables.get(entry[1]);
22165
22583
  if (key === void 0) return null;
22166
22584
  variables.set(name2, isRecord(source) ? source[key] : void 0);