peachsim 0.1.2411 → 0.1.2421

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 (146) hide show
  1. package/README.md +1 -1
  2. package/cli/catalog/content.ts +6 -3
  3. package/cli/catalog/meta.ts +63 -17
  4. package/cli/catalog/routes.ts +4 -0
  5. package/cli/cloud-box-artifact.ts +45 -24
  6. package/cli/cloud-client.ts +6 -2
  7. package/cli/command-registry.ts +3 -1
  8. package/cli/commands/control.ts +74 -55
  9. package/cli/commands/desktop.ts +3 -3
  10. package/cli/commands/electron.ts +7 -5
  11. package/cli/commands/kotlin.ts +8 -1
  12. package/cli/commands/platform.ts +5 -7
  13. package/cli/commands/profile.ts +2 -2
  14. package/cli/commands/settings.ts +90 -0
  15. package/cli/commands/shell-url.ts +18 -10
  16. package/cli/commands/swift.ts +3 -1
  17. package/cli/main.ts +6 -0
  18. package/cli/outbound-endpoints.ts +17 -15
  19. package/cli/settings-flags.ts +115 -0
  20. package/dist-lib/agent-daemon-client.cjs +1 -1
  21. package/dist-lib/agent-events.cjs +1 -1
  22. package/dist-lib/attached-projects.cjs +1 -1
  23. package/dist-lib/auth/shared-session.cjs +1 -1
  24. package/dist-lib/backend-origin.cjs +1 -1
  25. package/dist-lib/beta.cjs +1 -1
  26. package/dist-lib/beta.mjs +1 -1
  27. package/dist-lib/bridge-constants.cjs +1 -1
  28. package/dist-lib/bridge-contract-input.cjs +1 -1
  29. package/dist-lib/bridge-contract-input.mjs +1 -1
  30. package/dist-lib/bridge-contract.cjs +1 -1
  31. package/dist-lib/bridge-contract.mjs +1 -1
  32. package/dist-lib/bundle-channel.cjs +3706 -1818
  33. package/dist-lib/capture-contract.cjs +1 -1
  34. package/dist-lib/capture-contract.mjs +1 -1
  35. package/dist-lib/cloud-contract.cjs +1 -1
  36. package/dist-lib/cloud-contract.mjs +1 -1
  37. package/dist-lib/cloud-test-args.cjs +1 -1
  38. package/dist-lib/cloud-test-args.mjs +1 -1
  39. package/dist-lib/cloud.cjs +1 -1
  40. package/dist-lib/cloud.mjs +1 -1
  41. package/dist-lib/config.cjs +3 -7
  42. package/dist-lib/config.mjs +3 -7
  43. package/dist-lib/detox/index.cjs +4 -4
  44. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  45. package/dist-lib/expo-swift-bundle.cjs +17144 -15295
  46. package/dist-lib/expo-swift-metadata.cjs +1 -1
  47. package/dist-lib/expo-swift-metadata.mjs +1 -1
  48. package/dist-lib/home-paths.cjs +1 -1
  49. package/dist-lib/host/bridge-host.cjs +63288 -62269
  50. package/dist-lib/host/fetch-proxy-handler.cjs +1598 -211
  51. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  52. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  53. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  54. package/dist-lib/host/websocket-proxy.cjs +1 -1
  55. package/dist-lib/index.cjs +3007 -1512
  56. package/dist-lib/jump-to-source-babel.cjs +1 -1
  57. package/dist-lib/jump-to-source-native.cjs +1 -1
  58. package/dist-lib/kotlin-host.cjs +972 -246
  59. package/dist-lib/menu.cjs +1 -1
  60. package/dist-lib/menu.mjs +1 -1
  61. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  62. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  63. package/dist-lib/metro-production-bundle.cjs +1 -1
  64. package/dist-lib/metro-production-bundle.mjs +1 -1
  65. package/dist-lib/metro.cjs +1742 -247
  66. package/dist-lib/native-app-identity-project.cjs +40 -204
  67. package/dist-lib/native-app-identity-project.mjs +40 -204
  68. package/dist-lib/native-app-identity.cjs +1 -1
  69. package/dist-lib/native-app-identity.mjs +1 -1
  70. package/dist-lib/native-firebase-metadata.cjs +1 -1
  71. package/dist-lib/native-firebase-metadata.mjs +1 -1
  72. package/dist-lib/pdfium-raster.cjs +1 -1
  73. package/dist-lib/pdfium-raster.mjs +1 -1
  74. package/dist-lib/plist.cjs +1 -1
  75. package/dist-lib/plist.mjs +1 -1
  76. package/dist-lib/profiles.cjs +1 -1
  77. package/dist-lib/public-brand.cjs +1 -1
  78. package/dist-lib/public-origins-lib-esm.json +26 -24
  79. package/dist-lib/public-origins-lib.json +198 -117
  80. package/dist-lib/react-native-host-modules.cjs +1 -1
  81. package/dist-lib/react-native-host-modules.mjs +1 -1
  82. package/dist-lib/reap-browser.cjs +1 -1
  83. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  84. package/dist-lib/sdk.cjs +1 -1
  85. package/dist-lib/sdk.mjs +1 -1
  86. package/dist-lib/skills.cjs +21765 -20511
  87. package/dist-lib/swift-compile.cjs +48 -228
  88. package/dist-lib/swift-compile.mjs +48 -228
  89. package/dist-lib/swift-package.cjs +1 -1
  90. package/dist-lib/swift-package.mjs +1 -1
  91. package/dist-lib/swift-submit.cjs +1 -1
  92. package/dist-lib/swift-submit.mjs +1 -1
  93. package/dist-lib/swift-toolchain.cjs +1 -199
  94. package/dist-lib/swift.cjs +1 -1
  95. package/dist-lib/vite-swift.cjs +227 -251
  96. package/dist-lib/vite.cjs +5240 -3788
  97. package/dist-lib/worklet-executable.cjs +1 -1
  98. package/dist-lib/worklet-executable.mjs +1 -1
  99. package/dist-types/packages/peach-engine/src/config.d.ts +1 -4
  100. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
  101. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
  102. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
  103. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
  104. package/kotlin/README.md +4 -3
  105. package/kotlin/sdk.tar.gz +0 -0
  106. package/kotlin/toolchain.json +3 -6
  107. package/package.json +1 -1
  108. package/runtime-companion.json +1 -1
  109. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1 -43
  110. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayerContents.h +55 -0
  111. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +3 -3
  112. package/sdk/ios/usr/include/ObjectiveC.apinotes +0 -24
  113. package/sdk/ios/usr/include/grp.h +93 -0
  114. package/sdk/ios/usr/include/netinet/tcp.h +299 -0
  115. package/sdk/ios/wasm/include/netinet/tcp.h +6 -0
  116. package/sdk/ios/wasm/include/stdlib.h +1 -0
  117. package/sdk/ios/wasm/include/unistd.h +2 -0
  118. package/skills/contrast/SKILL.md +1 -0
  119. package/skills/peach-setup/SKILL.md +11 -1
  120. package/src/android-bridge-dependencies.ts +1 -1
  121. package/src/app-config.ts +7 -0
  122. package/src/binaryen.lock.json +21 -0
  123. package/src/cocoapods-trunk.ts +52 -0
  124. package/src/config.ts +21 -31
  125. package/src/expo-native-workspace.ts +4 -0
  126. package/src/kotlin-host.ts +1 -1
  127. package/src/kotlin-sdk.ts +7 -7
  128. package/src/kotlin-toolchain.ts +28 -24
  129. package/src/kotlinSdkContract.ts +2 -2
  130. package/src/native-bundles.ts +5 -2
  131. package/src/native-static-libraries.ts +38 -5
  132. package/src/podfile-cocoapods.ts +1473 -0
  133. package/src/podspec-cocoapods.ts +331 -106
  134. package/src/podspec-ruby-stdlib.ts +134 -19
  135. package/src/podspec-ruby.ts +199 -46
  136. package/src/settingsContract.ts +74 -0
  137. package/src/swift-compile.ts +1 -1
  138. package/src/swift-compiler-digest.ts +1 -0
  139. package/src/swift-host.ts +107 -15
  140. package/src/swift-objc-compile.ts +5 -0
  141. package/src/swift-packages.ts +75 -0
  142. package/src/swift-shared-sdk.ts +19 -0
  143. package/src/swift-toolchain.ts +2 -201
  144. package/src/turbo-source.ts +7 -37
  145. package/src/wasm-optimize.ts +4 -27
  146. package/src/xcode-project.ts +22 -7
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2411 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2421 | (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;
@@ -4493,24 +4493,6 @@ var compilerArchives = {
4493
4493
  }
4494
4494
  }
4495
4495
  },
4496
- "swift-6.4.0-RELEASE-custom-44ecd25f163bb359": {
4497
- identity: "44ecd25f163bb359",
4498
- archive: "tar.zst",
4499
- hosts: {
4500
- "darwin-arm64": {
4501
- checksum: "d06dda4435f99d8376179cc7a3804907aa7305513135ece6288fd8e6d4695ae6",
4502
- manifest: "bc0d8b955f923f096dda2aa8bbb1d56176a73f3d4a4df4cc9a1f59d31417061a"
4503
- },
4504
- "linux-x64": {
4505
- checksum: "f95b56440693c5de7995f10ea14c57fc7e659a161018a17f17a74b61a98e88a4",
4506
- manifest: "c18a60b14d5c89a8b2e1dbb2b4b52342c5fb92c7f3069fdc55c985bce61683a7"
4507
- },
4508
- "linux-arm64": {
4509
- checksum: "afb74ae60df2b5bd7792bfbcf29bcea03675a5c814b758dd6cb91a760c220cd2",
4510
- manifest: "ac037f6b0fdc4a6ae582eebc22bcf811fa2becdc30d083057137fc857f3c456a"
4511
- }
4512
- }
4513
- },
4514
4496
  "swift-6.4.0-RELEASE-custom-11345d60dca47496": {
4515
4497
  identity: "11345d60dca47496",
4516
4498
  archive: "tar.zst",
@@ -4529,186 +4511,6 @@ var compilerArchives = {
4529
4511
  }
4530
4512
  }
4531
4513
  },
4532
- "swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
4533
- identity: "45bb46301c86fe73",
4534
- archive: "tar.gz",
4535
- hosts: {
4536
- "darwin-arm64": {
4537
- checksum: "102dfbbb7b451be0685763b7a427284b75a8078874543f091b1c4b3db86e6565",
4538
- manifest: "fb6c4d75ef6f4b3c094ae5a4d5d1e6bdfd85431f3fe25d514f3e7a0b4add60ef"
4539
- },
4540
- "linux-x64": {
4541
- checksum: "d3c040e042e12ff787b64bfde1d85238254365036ce093f3b20ff86e8ff996f0",
4542
- manifest: "7c7144be591692e563396fe3c987c5aa56fbaea4faacaad62283c0c6e5c04ae2"
4543
- },
4544
- "linux-arm64": {
4545
- checksum: "604e6fc5fc0f5a93cee3ca6dfa9616244a2a49ef517caa3155a12ae4a0ecf72b",
4546
- manifest: "075fd53d03ecf099954f1d023bb4bb67a5c5ee946537466d6c105022bdf8ecde"
4547
- }
4548
- }
4549
- },
4550
- "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
4551
- identity: "0b2d0a9011c88e66",
4552
- archive: "tar.gz",
4553
- hosts: {
4554
- "darwin-arm64": {
4555
- checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
4556
- manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
4557
- },
4558
- "linux-x64": {
4559
- checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
4560
- manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
4561
- },
4562
- "linux-arm64": {
4563
- checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
4564
- manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
4565
- }
4566
- }
4567
- },
4568
- "swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
4569
- identity: "f7c03c3f59ec5d83",
4570
- archive: "tar.gz",
4571
- hosts: {
4572
- "darwin-arm64": {
4573
- checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
4574
- manifest: "2a7754e6e365bf71ae6b6aefbbd810123795c73d43fb902a8a972d009d72790f"
4575
- },
4576
- "linux-x64": {
4577
- checksum: "5ffa3b54d54583c1d6a38b708693072db4d088ba4bf5966b17014c068b2db641",
4578
- manifest: "1b23ea52c5570de4697481a54bd0b0a0bcd6b54feccb7b0bb940d3643dec82cb"
4579
- },
4580
- "linux-arm64": {
4581
- checksum: "29b0b97b7b0db4475dbe55f7011e57f493fed9f3482a6705becebd8b68c90bab",
4582
- manifest: "3fdab1132715f5899de1bb1d7ddcd52cf540295ab86586c72f49502f37a403a1"
4583
- }
4584
- }
4585
- },
4586
- "swift-6.4.0-RELEASE-custom-3e3dca8fd1d82975": {
4587
- identity: "3e3dca8fd1d82975",
4588
- archive: "tar.gz",
4589
- hosts: {
4590
- "darwin-arm64": {
4591
- checksum: "dfad56454f5e1e465071ff708bf485be65b438cf55d02b04d26d17d26df9f54a",
4592
- manifest: "82c35e43ed81101bea500100356a555d8266e1987d5ca7605aaa4df747c38f81"
4593
- },
4594
- "linux-x64": {
4595
- checksum: "d3f5908d097fdc1337ff979114e605bcc758052e32f9d5d760574153d58ce6db",
4596
- manifest: "a03caf181177f3d68a45b5246d0f0a26d8a5fa9ff33cf44c44e6942b73363bae"
4597
- },
4598
- "linux-arm64": {
4599
- checksum: "8fceafca152dd0692aa6bb51236fc362a4caeeef37fc22cb5ef6aa3d0d5b3df3",
4600
- manifest: "3115bc496fd8e907a16992dfc5c85b3e0798d3b58ddf1d6dace63842aed8e53b"
4601
- }
4602
- }
4603
- },
4604
- "swift-6.4.0-RELEASE-custom-b082ac5437336790": {
4605
- identity: "b082ac5437336790",
4606
- archive: "tar.gz",
4607
- hosts: {
4608
- "darwin-arm64": {
4609
- checksum: "85e601982321d3a6f81f05928bc9bbe7a61bc75b27ce24508e79f6b5b537254d",
4610
- manifest: "c889a70c6bba48eb0e5e218a5c0077eb557082fed5c5c58d10f07a941975080e"
4611
- },
4612
- "linux-x64": {
4613
- checksum: "54c7988622d201e4ba6c83ca75e7b28c658b39cf1ea8b95ea88807afe33aa465",
4614
- manifest: "bfd725c3b07a3624bb44c8e3a1b7ddf1eddde4fc9565e23740a9cee832c94583"
4615
- },
4616
- "linux-arm64": {
4617
- checksum: "bd729fd73dc9953306eafd87eda79462b836b3cb127c73108327d7256b15f501",
4618
- manifest: "e7f8827cca0f249a5b4a4750f6324f75633b374985fa0b93e650ee8bfcabeb39"
4619
- }
4620
- }
4621
- },
4622
- "swift-6.4.0-RELEASE-custom-9cdaffdb6b37fb47": {
4623
- identity: "9cdaffdb6b37fb47",
4624
- archive: "tar.gz",
4625
- hosts: {
4626
- "darwin-arm64": {
4627
- checksum: "fdd3f88cf76a8dc2083275d4253255030068a25b5ba68acbf59e0407c45677dd",
4628
- manifest: "f50c68faf91f7d2a6ea5bcd4da4573a49dd00ad9f334b27d3f9ddb08b65e46cc"
4629
- },
4630
- "linux-x64": {
4631
- checksum: "f29f9efc598b17f33d802467676ba282441a8c3c6fa67e307c4a1e6130509d73",
4632
- manifest: "f907727c5a4af58ccad7ccbb043a21289d7eb37d166536a90b3c3848f95df816"
4633
- },
4634
- "linux-arm64": {
4635
- checksum: "7d4a8a1f90dd6c86804ceb43f8b9cf680b9778d4640a2eb6da5cb333a599f23a",
4636
- manifest: "a3224cd5c09a92f66cacd0395058b2c43fa103a92bb168280132bbd0febd1575"
4637
- }
4638
- }
4639
- },
4640
- "swift-6.4.0-RELEASE-custom-bd49e2f77434e7b1": {
4641
- identity: "bd49e2f77434e7b1",
4642
- archive: "tar.gz",
4643
- hosts: {
4644
- "darwin-arm64": {
4645
- checksum: "e815b06394566e8125475afc8f1807f7f465318c845549c5831043cdc28eca64",
4646
- manifest: "6e3ae00102c67f2f9761b1462aab63580f2ca010469300a7c4a620765573e4e0"
4647
- },
4648
- "linux-x64": {
4649
- checksum: "9336e0b0aefaa0171799d4b5d4215c711a24c79ac9e91baa362ba100fc22534f",
4650
- manifest: "3802c631f593eda1d79dc4af55a8667356eece954d2ea59b62b1f8f981fa538e"
4651
- },
4652
- "linux-arm64": {
4653
- checksum: "851b5a756472ad53d833e8f0ab3ae55c05d3e6b49871bb982c977b7582cc117f",
4654
- manifest: "4162656192a2881e5ccc763e3e66ce46646a84ff42cdf2de50bd6424ebac5e34"
4655
- }
4656
- }
4657
- },
4658
- "swift-6.4.0-RELEASE-custom-13450179a7e01c81": {
4659
- identity: "13450179a7e01c81",
4660
- archive: "tar.gz",
4661
- hosts: {
4662
- "darwin-arm64": {
4663
- checksum: "a29be6b722f15c7aafac26ba5703a7392f49ce7ea5e1c56548846b7e458290f7",
4664
- manifest: "9d89bc39d80d13c8bdb93ad5c306bb87e83bac34090f9bcec57476fd90a6a115"
4665
- },
4666
- "linux-x64": {
4667
- checksum: "b9e9e3ed855f6a8c85f5fe24016b83792a0088e2d0ea632482426c4dc6031b98",
4668
- manifest: "5de3bb6bf131e68862539195fbb4fce9d4de2b528fa882495b27fd4bdd02e5ab"
4669
- },
4670
- "linux-arm64": {
4671
- checksum: "844f5ead2854d4ac2d1fc9fb13c366450a2ed4b8fa641719822d74f9150575b4",
4672
- manifest: "1fcfb353679186a3e631b83085e5e8c3dde8cb32d25052b3c8b7896339a4378b"
4673
- }
4674
- }
4675
- },
4676
- "swift-6.4.0-RELEASE-custom-f6868fa6054e83d6": {
4677
- identity: "f6868fa6054e83d6",
4678
- archive: "tar.gz",
4679
- hosts: {
4680
- "darwin-arm64": {
4681
- checksum: "bd80c2f35864ec29883dd22001d0165821e80d78002fc12f92406c3c708694a4",
4682
- manifest: "daad0da2a296084307769b59719dbe83e45755871438fad129b20421b111657b"
4683
- },
4684
- "linux-x64": {
4685
- checksum: "39707ef599835ae2d9ce5aea026b7a96d43e51b4c4dcd2ca62d5fc11c520e871",
4686
- manifest: "065405edd9b02a84ce01c09e68531834dbe190232e6387b056a481354c44fe81"
4687
- },
4688
- "linux-arm64": {
4689
- checksum: "a91f2947d560b49b56334938d0efdcb22286557da63d65389129030b2a4e146d",
4690
- manifest: "4dfbc167c96f30c7de19cc280948786fb79a888b666ca200b0788803902361ce"
4691
- }
4692
- }
4693
- },
4694
- "swift-6.4.0-RELEASE-custom-a560ff35bf882b5c": {
4695
- identity: "a560ff35bf882b5c",
4696
- archive: "tar.zst",
4697
- hosts: {
4698
- "darwin-arm64": {
4699
- checksum: "36c50bcdfba88a4c0989af0bd60371497eb4403aa7b80644b479fa509a2187a9",
4700
- manifest: "253e891527d2213f54eace768b902de89de5e9495a3c5f4018de1985516bd553"
4701
- },
4702
- "linux-x64": {
4703
- checksum: "ba25da9182314fc7b7dd2fc041280e1c7b409f80a1fbccdfa5c342669d164c8e",
4704
- manifest: "6f951cc4071dd0d6054d85711a7c5fe272273658847831b477a8b24be7254ca0"
4705
- },
4706
- "linux-arm64": {
4707
- checksum: "5f0f4456e9fe22b5486025db9f679c865841660797d71761245291c2c6811c20",
4708
- manifest: "b6f62fca2ec37593e274ee5bac474f21ffc5db14cd82f492ccbc774f8e9b75d8"
4709
- }
4710
- }
4711
- },
4712
4514
  [SWIFT_HOST_COMPILER_RELEASE]: {
4713
4515
  identity: SWIFT_HOST_COMPILER_ID,
4714
4516
  archive: "tar.gz",
@@ -9344,6 +9146,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
9344
9146
  );
9345
9147
  const overlay = import_node_path10.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
9346
9148
  const overlayFiles = (0, import_node_fs10.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path10.default.join(entry.parentPath, entry.name)).sort();
9149
+ const hasDarwinTcp = overlayFiles.includes(import_node_path10.default.join(overlay, "netinet/tcp.h"));
9347
9150
  const key2 = JSON.stringify([
9348
9151
  // bump the recipe when the transformation changes; bundling changes function text.
9349
9152
  "v25",
@@ -9352,7 +9155,8 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
9352
9155
  sdk2,
9353
9156
  frameworks,
9354
9157
  overlayFiles,
9355
- swiftSdkOptions()
9158
+ swiftSdkOptions(),
9159
+ ...hasDarwinTcp ? ["darwin-tcp-module"] : []
9356
9160
  ]);
9357
9161
  const cached = sdkViews.get(key2);
9358
9162
  if (cached && import_node_fs10.default.existsSync(cached.manifest)) return touchSdkView(cached.options);
@@ -9452,6 +9256,22 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
9452
9256
  import_node_fs10.default.mkdirSync(import_node_path10.default.dirname(destination), { recursive: true });
9453
9257
  import_node_fs10.default.symlinkSync(shared, destination);
9454
9258
  }
9259
+ if (hasDarwinTcp) {
9260
+ const moduleMap = import_node_path10.default.join(
9261
+ staging,
9262
+ import_node_path10.default.relative(realRoot, sysroot),
9263
+ "darwin/wasm/include/module.modulemap"
9264
+ );
9265
+ const original = import_node_fs10.default.readFileSync(moduleMap, "utf8");
9266
+ const updated = original.replace(
9267
+ '"../../../include/wasm64-wasip1/netinet/tcp.h"',
9268
+ '"netinet/tcp.h"'
9269
+ );
9270
+ if (updated !== original) {
9271
+ import_node_fs10.default.unlinkSync(moduleMap);
9272
+ import_node_fs10.default.writeFileSync(moduleMap, updated);
9273
+ }
9274
+ }
9455
9275
  const foundationArchive = import_node_path10.default.join(
9456
9276
  import_node_path10.default.dirname(sysroot),
9457
9277
  "swift.xctoolchain/usr/lib/swift_static/wasi/libFoundation.a"
@@ -16029,6 +15849,29 @@ async function runExtractor(command, args, signal, input) {
16029
15849
  }
16030
15850
  }
16031
15851
 
15852
+ // src/binaryen.lock.json
15853
+ var binaryen_lock_default = {
15854
+ version: "132",
15855
+ licenseSha256: "64c0d02491e16eced74826440ecd2bcf7722d37fa586faf457b2494293afbffe",
15856
+ platforms: {
15857
+ "linux-x64": {
15858
+ asset: "x86_64-linux",
15859
+ upstreamSha256: "195ddc94f9bc89f45abdabb0b9eea86023d727ba90eac8b35b80f2544fc30572",
15860
+ sha256: "0396b1a540e9f97f30eb6a378d829305c218c821a0bd88c74e83d3d6923dad0b"
15861
+ },
15862
+ "linux-arm64": {
15863
+ asset: "aarch64-linux",
15864
+ upstreamSha256: "c58562417836c5d0493d89bdefc434933bdc097db641b483df86bcfa557a107f",
15865
+ sha256: "25e3747f19614b0281a28b9a909ddc602b546ccdfacebc8cae2f7165665328fa"
15866
+ },
15867
+ "darwin-arm64": {
15868
+ asset: "arm64-macos",
15869
+ upstreamSha256: "98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa",
15870
+ sha256: "34281566fe32df71337aaf0b60aa265dc853587d92bda0b5b1fac8aed8c2f8ab"
15871
+ }
15872
+ }
15873
+ };
15874
+
16032
15875
  // src/home-paths.ts
16033
15876
  var import_node_fs19 = __toESM(require("node:fs"), 1);
16034
15877
  var import_node_os6 = require("node:os");
@@ -16315,32 +16158,10 @@ var FEATURES = [
16315
16158
  ];
16316
16159
  var KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
16317
16160
  var LOWERING = ["--memory64-lowering", "--table64-lowering"];
16318
- var BINARYEN_VERSION = "132";
16161
+ var BINARYEN_VERSION = binaryen_lock_default.version;
16319
16162
  var runBinaryen = (0, import_node_util2.promisify)(import_node_child_process14.execFile);
16320
16163
  var WASM_LOWER_IDENTITY = `binaryen ${BINARYEN_VERSION} narrow ${LOWERING.join(" ")} ${FEATURES.join(",")} unoptimized-names`;
16321
- var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
16322
- [
16323
- "linux-x64",
16324
- {
16325
- asset: "x86_64-linux",
16326
- sha256: "195ddc94f9bc89f45abdabb0b9eea86023d727ba90eac8b35b80f2544fc30572"
16327
- }
16328
- ],
16329
- [
16330
- "linux-arm64",
16331
- {
16332
- asset: "aarch64-linux",
16333
- sha256: "c58562417836c5d0493d89bdefc434933bdc097db641b483df86bcfa557a107f"
16334
- }
16335
- ],
16336
- [
16337
- "darwin-arm64",
16338
- {
16339
- asset: "arm64-macos",
16340
- sha256: "98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa"
16341
- }
16342
- ]
16343
- ]);
16164
+ var BINARYEN_RELEASES = new Map(Object.entries(binaryen_lock_default.platforms));
16344
16165
  async function runWasmOpt(file, output2, optimize, skipPasses, binary) {
16345
16166
  const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
16346
16167
  const requestedCores = Number(process.env.BINARYEN_CORES);
@@ -16403,11 +16224,10 @@ async function installWasmOpt() {
16403
16224
  const binary = (0, import_node_path20.join)(destDir, "bin", "wasm-opt");
16404
16225
  if (!(0, import_node_fs20.existsSync)(binary))
16405
16226
  await installVerifiedTarball({
16406
- url: `https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-${release.asset}.tar.gz`,
16227
+ url: `https://r2.rnxsim.com/peach/binaryen/${release.sha256}/${platform}.tar.gz`,
16407
16228
  digest: { algorithm: "sha256", encoding: "hex", value: release.sha256 },
16408
16229
  destDir,
16409
16230
  installedMarker: "bin/wasm-opt",
16410
- stripComponents: 1,
16411
16231
  label: `Binaryen ${BINARYEN_VERSION}`
16412
16232
  });
16413
16233
  return binary;
@@ -18756,7 +18576,7 @@ var PRECONCURRENCY_FOUNDATION_IMPORT = /^[ \t]*@preconcurrency[ \t]+(?:(?:public
18756
18576
  function withPreconcurrencyFoundationModules(source) {
18757
18577
  if (!PRECONCURRENCY_FOUNDATION_IMPORT.test(source)) return source;
18758
18578
  return `${source}${source.endsWith("\n") ? "" : "\n"}#if canImport(PeachObjC)
18759
- ${["ObjectiveC", ...FOUNDATION_IMPLICIT_MODULES].map((module2) => `@preconcurrency import ${module2}
18579
+ ${["CoreFoundation", "ObjectiveC", ...FOUNDATION_IMPLICIT_MODULES].map((module2) => `@preconcurrency import ${module2}
18760
18580
  `).join("")}#endif
18761
18581
  `;
18762
18582
  }
@@ -18781,7 +18601,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
18781
18601
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
18782
18602
  var MULTI_MANIFEST_VERSION = 71;
18783
18603
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
18784
- var compilerSourceDigest = true ? "5bdda04d424b3a504c042269bf0bebf701fc0435974970611138a79db9b959cd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18604
+ var compilerSourceDigest = true ? "558e865561d0b74b1a3016abec937fd19f725375fe7e014dc1f140a17a31bc68" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18785
18605
  function swiftArtifactHash(input, release, moduleRoot) {
18786
18606
  const hash = (0, import_node_crypto14.createHash)("sha256");
18787
18607
  hash.update(`swift-compile
@@ -27148,7 +26968,7 @@ var import_node_fs35 = require("node:fs");
27148
26968
  var import_node_path35 = require("node:path");
27149
26969
 
27150
26970
  // src/swift-coverage/provenance.ts
27151
- var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"b0da81ab133ad067978e174c2f62f5a9655dfe6b5639bc4b884f3137a8136144","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
26971
+ var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"a0ef7c20a2bc2b7dbd98b9006a8b000b9b4f9708f1bcf0adad8aaf79ef253022","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"3e44efffa6b26d05b7390b6d0215ad36141fb9c7c46d2d51cd100ab85008fca4","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
27152
26972
 
27153
26973
  // src/swift-coverage/xcode-asset-symbols.ts
27154
26974
  var import_node_fs34 = require("node:fs");
@@ -32152,12 +31972,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
32152
31972
  );
32153
31973
  const allTargets = projects2.flatMap(projectTargets);
32154
31974
  const appTargets = allTargets.filter(
32155
- (ref) => isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
31975
+ (ref) => options.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
32156
31976
  );
32157
31977
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
32158
31978
  const container = import_node_path41.default.basename(xcodeprojOrWorkspace);
32159
31979
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
32160
31980
  if (named.length !== 1) {
31981
+ if (options.frameworkMachOType)
31982
+ throw new Error(
31983
+ `${container} must declare one framework target named ${targetName}`
31984
+ );
32161
31985
  if (appTargets.length === 0)
32162
31986
  throw new Error(
32163
31987
  `${container} has no application targets; open a project or workspace that contains one`
@@ -32420,7 +32244,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
32420
32244
  DEVELOPMENT_LANGUAGE: str(ref.project.project.developmentRegion) ?? "en"
32421
32245
  },
32422
32246
  options,
32423
- workspaceBuild
32247
+ ref === app && options.frameworkMachOType ? {
32248
+ ...workspaceBuild,
32249
+ ...options.frameworkBuildSettings,
32250
+ MACH_O_TYPE: options.frameworkMachOType
32251
+ } : workspaceBuild
32424
32252
  );
32425
32253
  for (const file of read) xcconfigs.add(file);
32426
32254
  const swiftVersion = Number.parseFloat(settings2("SWIFT_VERSION") || "5");
@@ -33735,6 +33563,42 @@ function shippedBinaryDiffers(target, checksum) {
33735
33563
  var swiftBinaryOnDisk = (binary) => binary.url !== null || import_node_fs43.default.existsSync(binary.dir);
33736
33564
  var SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
33737
33565
  var placeholderPackage = (pkg) => SWIFT_PLACEHOLDER_PACKAGES.get(swiftPackageIdentity(pkg.manifest.dir));
33566
+ var sourceFrameworkRecipes = /* @__PURE__ */ new Map([
33567
+ [
33568
+ "438de2c5afb7dde20b640af35dd841961aa2aa4d2719e40c92d48bd2aa5dca56",
33569
+ {
33570
+ revision: "a49e7c2148ac9e38bd35ef4f13bc9d6ea3ff0b81",
33571
+ project: "Sentry.xcodeproj",
33572
+ target: "Sentry",
33573
+ module: "Sentry",
33574
+ configuration: "Release",
33575
+ machOType: "staticlib"
33576
+ }
33577
+ ],
33578
+ [
33579
+ "780558374b95d370e8b604097f9ccb2cac328fdd18c4b8542a58ece83d2548d2",
33580
+ {
33581
+ revision: "5421f94cc859eb65f5ae3866165a053aa634431e",
33582
+ project: "Sentry.xcodeproj",
33583
+ target: "Sentry",
33584
+ module: "Sentry",
33585
+ configuration: "Release",
33586
+ machOType: "staticlib",
33587
+ settings: { CARTHAGE: "YES" }
33588
+ }
33589
+ ],
33590
+ [
33591
+ "159842b63ab14ed1615fcace752c57b2633b3d3be6fadd4f643a1c8323b70e48",
33592
+ {
33593
+ revision: "5561a15a4836efe5d068a366b60599b7b794af70",
33594
+ project: "Simperium.xcodeproj",
33595
+ target: "Simperium_iOS",
33596
+ module: "Simperium",
33597
+ configuration: "Release",
33598
+ machOType: "mh_dylib"
33599
+ }
33600
+ ]
33601
+ ]);
33738
33602
  function remoteSwiftCheckouts(root) {
33739
33603
  const prepared = preparedSwiftCheckouts(root);
33740
33604
  if (prepared) return prepared;
@@ -33834,6 +33698,7 @@ function resolveSwiftPackages(options) {
33834
33698
  targets: [],
33835
33699
  nativePackages: [],
33836
33700
  nativeProducts: [],
33701
+ sourceFrameworks: [],
33837
33702
  unavailable: /* @__PURE__ */ new Map(),
33838
33703
  modules: /* @__PURE__ */ new Map(),
33839
33704
  binaries: [],
@@ -33842,6 +33707,7 @@ function resolveSwiftPackages(options) {
33842
33707
  const pins = resolved.length > 0 ? readPins(resolved) : null;
33843
33708
  const checkouts = remoteSwiftCheckouts(rootDir);
33844
33709
  const packages = /* @__PURE__ */ new Map();
33710
+ const sourceFrameworks = /* @__PURE__ */ new Map();
33845
33711
  const packageKey = (source) => import_node_path44.default.isAbsolute(source) ? source : swiftPackageIdentity(source);
33846
33712
  const sourceKey = (source) => packageKey(source.kind === "local" ? import_node_path44.default.resolve(source.dir) : source.url);
33847
33713
  const load2 = (source) => {
@@ -33865,6 +33731,7 @@ function resolveSwiftPackages(options) {
33865
33731
  loaded2 = {
33866
33732
  source: source.url,
33867
33733
  remote: true,
33734
+ revision: pin2.revision,
33868
33735
  manifest: swiftPackageManifest(
33869
33736
  fetchedCheckout(checkouts, identity2, pin2),
33870
33737
  void 0,
@@ -33916,6 +33783,7 @@ function resolveSwiftPackages(options) {
33916
33783
  const targetOutcomes = /* @__PURE__ */ new Map();
33917
33784
  const resolveTarget = (pkg, name3) => {
33918
33785
  const key2 = `${pkg.manifest.dir}\0${name3}`;
33786
+ if (sourceFrameworks.has(key2)) return [];
33919
33787
  if (targetOutcomes.has(key2)) return targetOutcomes.get(key2);
33920
33788
  targetOutcomes.set(key2, []);
33921
33789
  const outcome = (() => {
@@ -34011,6 +33879,20 @@ function resolveSwiftPackages(options) {
34011
33879
  if (!binaryOnly && claimed.has(key2)) return true;
34012
33880
  const target = pkg.manifest.targets.get(name3);
34013
33881
  if (target?.type === "binary") {
33882
+ const recipe = target.checksum ? sourceFrameworkRecipes.get(target.checksum) : void 0;
33883
+ if (recipe && pkg.revision === recipe.revision && name3 === recipe.module) {
33884
+ sourceFrameworks.set(key2, {
33885
+ packageTarget: import_node_path44.default.join(pkg.manifest.dir, "#target", name3),
33886
+ project: import_node_path44.default.join(pkg.manifest.dir, recipe.project),
33887
+ target: recipe.target,
33888
+ module: recipe.module,
33889
+ configuration: recipe.configuration,
33890
+ machOType: recipe.machOType,
33891
+ settings: recipe.settings
33892
+ });
33893
+ providedTargets.delete(name3);
33894
+ return true;
33895
+ }
34014
33896
  const changed = !options.standinTargets?.has(name3) && shippedBinaryDiffers(name3, target.checksum);
34015
33897
  if (changed) providedTargets.delete(name3);
34016
33898
  return changed;
@@ -34055,6 +33937,7 @@ function resolveSwiftPackages(options) {
34055
33937
  for (const pkg of packages.values()) {
34056
33938
  if (typeof pkg === "string") continue;
34057
33939
  for (const [name3, target] of pkg.manifest.targets) {
33940
+ if (sourceFrameworks.has(`${pkg.manifest.dir}\0${name3}`)) continue;
34058
33941
  if (target.type === "test" || target.type === "plugin" || target.type === "macro")
34059
33942
  continue;
34060
33943
  if (target.type === "executable") continue;
@@ -34272,6 +34155,8 @@ function resolveSwiftPackages(options) {
34272
34155
  const id = targetId(pkg, name3);
34273
34156
  if (emitted.has(id)) return id;
34274
34157
  emitted.add(id);
34158
+ const framework = sourceFrameworks.get(`${pkg.manifest.dir}\0${name3}`);
34159
+ if (framework) result.sourceFrameworks.push(framework);
34275
34160
  const target = pkg.manifest.targets.get(name3);
34276
34161
  if (!target) throw new Error(`missing resolved package target ${name3}`);
34277
34162
  const dependencies = target.type === "macro" ? [] : target.dependencies.flatMap((dependency) => {
@@ -34369,7 +34254,7 @@ function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
34369
34254
  return hash.digest("hex");
34370
34255
  }
34371
34256
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
34372
- var STANDIN_SOURCE_DIGEST = true ? "2d765e977c08a74dad452d5ca662fba6baa967ccf18a7456e60717372076300b" : standinSourceDigest();
34257
+ var STANDIN_SOURCE_DIGEST = true ? "04ba039a95b639d89097dcef7220bd64a4c48578e05e150dafb66cf9195294a2" : standinSourceDigest();
34373
34258
 
34374
34259
  // src/swift-standins.ts
34375
34260
  var import_node_child_process32 = require("node:child_process");
@@ -34563,14 +34448,21 @@ var NATIVE_STATIC_LIBRARY_RECIPES = [
34563
34448
  name: "libsodium",
34564
34449
  nativeSha256: "a7e8af90a9d712ce8a2474f310e21682b690cb57c7ef74ce4b02dbfeeca62aa8",
34565
34450
  upstream: "9e4285c7a419e82dedb0be63a72eea357d6943bc3e28e6735bf600dd4883feaf",
34566
- recipe: "13f9f1ab1d44e93d80c819bb0d1be7ae1845d9aa5b267cce45a5b2913cec217e",
34451
+ recipe: "56c6b6b1efb99664e1e6df169387c4859a2887ae913b9e558314974575e564e7",
34452
+ archive: "libsodium.a"
34453
+ },
34454
+ {
34455
+ name: "libsodium_1_0_18",
34456
+ nativeSha256: "0c3210c5ef0fe234065913732c1da7853a492d68702158c77d8d94cd703fb556",
34457
+ upstream: "a08a945c589462f524efddbc8d62427bb002bb6a",
34458
+ recipe: "56c6b6b1efb99664e1e6df169387c4859a2887ae913b9e558314974575e564e7",
34567
34459
  archive: "libsodium.a"
34568
34460
  },
34569
34461
  {
34570
34462
  name: "libsodium_1_0_22",
34571
34463
  nativeSha256: "b59ff5ecd5d00674d1dd52c8155b613ebbcaf630cf6a7b29e0710dff7dd38e17",
34572
34464
  upstream: "8cda270b3b18ca103c57085752cece1ebbf5abee",
34573
- recipe: "13f9f1ab1d44e93d80c819bb0d1be7ae1845d9aa5b267cce45a5b2913cec217e",
34465
+ recipe: "56c6b6b1efb99664e1e6df169387c4859a2887ae913b9e558314974575e564e7",
34574
34466
  archive: "libsodium.a"
34575
34467
  },
34576
34468
  {
@@ -34594,7 +34486,7 @@ var NATIVE_STATIC_LIBRARY_RECIPES = [
34594
34486
  runtime: "rust",
34595
34487
  nativeSha256: "03b721dd9e98ec2767f7952aa65cde57d0c33d7ec80c9aaf7ab5ba77e055a25c",
34596
34488
  upstream: "e41ad6375fd80b64c4183d1a3f901d1f640a7953",
34597
- recipe: "44223da08838fdac1403e4a8e3613f6bf611688facfbb637d0ec0c495c5332ec",
34489
+ recipe: "58ff1780697f345f416a3295e76aa150155bd050fff2b0a439d32db2df3764ee",
34598
34490
  archive: "libanydoc_mobile.a"
34599
34491
  },
34600
34492
  {
@@ -34603,7 +34495,7 @@ var NATIVE_STATIC_LIBRARY_RECIPES = [
34603
34495
  nativeSha256: "8c41abcd8dd4e562e65cf5b88467a3493089c359d0863360dc65a5b88149e837",
34604
34496
  upstream: "a4296fa21cd40a56543602511bcf417014f4fee7cf5e1eaab58e0ac9610e3f63",
34605
34497
  // the unchanged source build, pinned Rust release and committed Cargo.lock.
34606
- recipe: "c3af2e331a793ef683d80b5b0e55269475cc8963534bee9328435cdf042f4b80",
34498
+ recipe: "bb11c20e8fff731891345aacd97e7f520561b4be2d0a6f0db36275e86712bc39",
34607
34499
  archive: "libratex_ffi.a"
34608
34500
  },
34609
34501
  {
@@ -34611,7 +34503,7 @@ var NATIVE_STATIC_LIBRARY_RECIPES = [
34611
34503
  runtime: "rust",
34612
34504
  nativeSha256: "bdd2bf679fcc981d98d36733b3bd083225a7397bb82bbd462c89088c6e0580a8",
34613
34505
  upstream: "2da907eb5dfcb464c7eef3b4c657fbdee144e3c6633e81efb1e56dcf1c76e01b",
34614
- recipe: "a2ae44140141a8d76cd735a6b73ac9e43f0020e9ca58e13cef8d2ba2929b4355",
34506
+ recipe: "8559a7f6c289af27a9a93e92b8a9b93026884d19efdb9ffc0e7137556370f164",
34615
34507
  archive: "libratex_ffi.a"
34616
34508
  },
34617
34509
  // react-native-skia 2.14.0 (apple-ios 154.0.0), then 3.8.0 (157): installed apps pin either.
@@ -38599,6 +38491,11 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
38599
38491
  }
38600
38492
  return regular ? source : null;
38601
38493
  };
38494
+ for (const directory of target.objc.headerSearchPaths) {
38495
+ if (isSdkInclude(directory)) continue;
38496
+ const file = availableHeader(import_node_path53.default.join(directory, "module.modulemap"));
38497
+ if (file) queue.push({ file, origin: directory });
38498
+ }
38602
38499
  for (const name3 of forced) {
38603
38500
  const file = [...quoted2, ...includes].filter((directory) => !isSdkInclude(directory)).map((directory) => availableHeader(import_node_path53.default.resolve(directory, name3))).find((candidate) => candidate !== null);
38604
38501
  if (file) queue.push({ file });
@@ -40249,17 +40146,15 @@ var XCODE_FRAMEWORKS_DIR = "__frameworks__";
40249
40146
  var XCODE_PACKAGES_DIR = SWIFT_REMOTE_PACKAGES_DIR;
40250
40147
  function xcodeInputKey(layout2, file, relative2) {
40251
40148
  const owner = layout2.targetDirs.get(file);
40149
+ const checkouts = layout2.checkouts;
40150
+ const checkoutPath = file.startsWith(`${checkouts}${import_node_path58.default.sep}`) ? import_node_path58.default.relative(checkouts, file).split(import_node_path58.default.sep).join("/") : null;
40252
40151
  if (owner) {
40253
- const input = file.endsWith(".swift") ? relative2.split("/").map(
40152
+ const input = file.endsWith(".swift") ? (checkoutPath ?? relative2).split("/").map(
40254
40153
  (part) => part === "." || part === ".." ? part : part.replaceAll("%", "%25").replace(/^\./, "%2E")
40255
- ).join("/") : relative2;
40154
+ ).join("/") : checkoutPath ?? relative2;
40256
40155
  return import_node_path58.default.posix.join(owner, input);
40257
40156
  }
40258
- const checkouts = layout2.checkouts;
40259
- return file.startsWith(`${checkouts}${import_node_path58.default.sep}`) ? import_node_path58.default.posix.join(
40260
- XCODE_PACKAGES_DIR,
40261
- import_node_path58.default.relative(checkouts, file).split(import_node_path58.default.sep).join("/")
40262
- ) : relative2 === ".." || relative2.startsWith("../") ? import_node_path58.default.posix.join("external", file.split(import_node_path58.default.sep).join("/")) : relative2;
40157
+ return checkoutPath !== null ? import_node_path58.default.posix.join(XCODE_PACKAGES_DIR, checkoutPath) : relative2 === ".." || relative2.startsWith("../") ? import_node_path58.default.posix.join("external", file.split(import_node_path58.default.sep).join("/")) : relative2;
40263
40158
  }
40264
40159
  var layoutScope = new import_node_async_hooks2.AsyncLocalStorage();
40265
40160
  async function withXcodeLayout(root, run5) {
@@ -40278,7 +40173,7 @@ function xcodeLayout(root) {
40278
40173
  async function buildXcodeLayout(root) {
40279
40174
  const registered = xcodeProjects().get(root);
40280
40175
  if (!registered) return null;
40281
- const app = readXcodeAppTargetPrepared(
40176
+ const appTarget = readXcodeAppTargetPrepared(
40282
40177
  registered.xcodeproj,
40283
40178
  registered.target,
40284
40179
  registered.configuration,
@@ -40288,6 +40183,73 @@ async function buildXcodeLayout(root) {
40288
40183
  nativeModules: registered.nativeModules
40289
40184
  }
40290
40185
  );
40186
+ const { packages, standins, projectGaps, binaries } = await swiftPackages(
40187
+ registered,
40188
+ appTarget
40189
+ );
40190
+ const sourceFrameworks = new Map(
40191
+ packages.sourceFrameworks.map(
40192
+ ({
40193
+ packageTarget,
40194
+ project,
40195
+ target,
40196
+ module: module2,
40197
+ configuration,
40198
+ machOType,
40199
+ settings
40200
+ }) => {
40201
+ const framework = readXcodeAppTarget(project, target, configuration, {
40202
+ prepareGeneratedSources: true,
40203
+ frameworkMachOType: machOType,
40204
+ frameworkBuildSettings: settings
40205
+ });
40206
+ if (framework.moduleName !== module2 || framework.allSources.length === 0)
40207
+ throw new Error(`${project}: ${target} did not produce source module ${module2}`);
40208
+ if (framework.linkedProducts.length > 0 || framework.binaryFrameworks.some(({ path: path55 }) => path55))
40209
+ throw new Error(
40210
+ `${project}: ${target} has external dependencies outside the source framework build`
40211
+ );
40212
+ return [packageTarget, framework];
40213
+ }
40214
+ )
40215
+ );
40216
+ const frameworkTargets = [...sourceFrameworks.values()];
40217
+ const packageFrameworkSearchPaths = frameworkTargets.flatMap(
40218
+ ({ objc }) => objc?.frameworkSearchPaths.slice(0, 1) ?? []
40219
+ );
40220
+ const withPackageFrameworks = (target) => target.objc && packageFrameworkSearchPaths.length > 0 ? {
40221
+ ...target,
40222
+ objc: {
40223
+ ...target.objc,
40224
+ frameworkSearchPaths: [
40225
+ .../* @__PURE__ */ new Set([
40226
+ ...target.objc.frameworkSearchPaths,
40227
+ ...packageFrameworkSearchPaths
40228
+ ])
40229
+ ]
40230
+ }
40231
+ } : target;
40232
+ const app = {
40233
+ ...withPackageFrameworks(appTarget),
40234
+ frameworks: [
40235
+ ...appTarget.frameworks.map(withPackageFrameworks),
40236
+ ...frameworkTargets.flatMap((framework) => [...framework.frameworks, framework])
40237
+ ],
40238
+ projectFiles: [
40239
+ ...appTarget.projectFiles,
40240
+ ...frameworkTargets.flatMap((framework) => framework.projectFiles)
40241
+ ],
40242
+ resourceProducts: [
40243
+ ...appTarget.resourceProducts,
40244
+ ...frameworkTargets.flatMap((framework) => framework.resourceProducts)
40245
+ ],
40246
+ sdkFrameworks: [
40247
+ .../* @__PURE__ */ new Set([
40248
+ ...appTarget.sdkFrameworks,
40249
+ ...frameworkTargets.flatMap((framework) => framework.sdkFrameworks)
40250
+ ])
40251
+ ]
40252
+ };
40291
40253
  const appSources = app.allSources;
40292
40254
  const checkouts = remoteSwiftCheckouts(app.rootDir);
40293
40255
  const files2 = /* @__PURE__ */ new Set([
@@ -40303,10 +40265,6 @@ async function buildXcodeLayout(root) {
40303
40265
  const resourceBundles = [
40304
40266
  { target: app.moduleName, sourcePath: XCODE_APP_DIR, path: "." }
40305
40267
  ];
40306
- const { packages, standins, projectGaps, binaries } = await swiftPackages(
40307
- registered,
40308
- app
40309
- );
40310
40268
  const targets = [];
40311
40269
  const frameworkNames = /* @__PURE__ */ new Map();
40312
40270
  const usedNames = new Set(
@@ -40781,7 +40739,14 @@ async function buildXcodeLayout(root) {
40781
40739
  )
40782
40740
  });
40783
40741
  }
40784
- const graphTargets = [...app.sourceLinkGraph.targets, ...packages.sourceLinks.targets];
40742
+ const graphTargets = [
40743
+ ...app.sourceLinkGraph.targets,
40744
+ ...frameworkTargets.flatMap((framework) => framework.sourceLinkGraph.targets),
40745
+ ...packages.sourceLinks.targets.map((target) => {
40746
+ const source = sourceFrameworks.get(target.id);
40747
+ return source ? { ...target, dependencies: [{ target: source.id, attributes: [] }] } : target;
40748
+ })
40749
+ ];
40785
40750
  const applicationBuildVersion = app.sourceLinkGraph.targets.find(
40786
40751
  (target) => target.id === app.sourceLinkGraph.entry
40787
40752
  ).buildVersion;
@@ -41798,11 +41763,22 @@ async function compile(packagePath, stamp, moduleRootOverride, hosted, snapshot,
41798
41763
  const parsed = compileTargets(input);
41799
41764
  const targets = parsed.map((target) => swiftTargetModuleName(target.name));
41800
41765
  const byPath = [...parsed].sort((left, right) => right.path.length - left.path.length);
41766
+ const clangModulesByTarget = new Map(
41767
+ (input.nativeTargets ?? []).map(({ name: name3, headerSearchPaths }) => [
41768
+ name3,
41769
+ headerSearchPaths.flatMap((directory) => {
41770
+ const map = input.files[import_node_path58.default.posix.join(directory, "module.modulemap")];
41771
+ return map === void 0 ? [] : moduleMapModules(map).map(({ name: name4 }) => name4);
41772
+ })
41773
+ ])
41774
+ );
41801
41775
  const providedByFile = (file) => {
41802
41776
  const owner = byPath.find(
41803
41777
  (target) => target.path === "." ? true : file.startsWith(`${target.path}/`)
41804
41778
  );
41805
- return owner?.experimentalFeatures?.includes("BuiltinModule") ? ["Builtin"] : [];
41779
+ if (!owner) return [];
41780
+ const clangModules = clangModulesByTarget.get(owner.name) ?? [];
41781
+ return owner.experimentalFeatures?.includes("BuiltinModule") ? [...clangModules, "Builtin"] : clangModules;
41806
41782
  };
41807
41783
  const missing = missingSwiftModules(
41808
41784
  input.files,