peachsim 0.1.2220 → 0.1.2222

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 (128) hide show
  1. package/cli/commands/compat.ts +4 -4
  2. package/cli/commands/inspect.ts +4 -4
  3. package/cli/commands/report-issue.ts +1 -1
  4. package/cli/runtime-compat.ts +7 -2
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +475 -381
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +1 -1
  28. package/dist-lib/detox/index.cjs +3 -2
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +472 -379
  31. package/dist-lib/expo-swift-metadata.cjs +1 -1
  32. package/dist-lib/expo-swift-metadata.mjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +695 -574
  35. package/dist-lib/host/fetch-proxy-handler.cjs +10 -7
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +8232 -7815
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +8146 -7737
  51. package/dist-lib/native-app-identity-project.cjs +331 -13
  52. package/dist-lib/native-app-identity-project.mjs +331 -13
  53. package/dist-lib/native-app-identity.cjs +16 -3
  54. package/dist-lib/native-app-identity.mjs +16 -3
  55. package/dist-lib/native-firebase-metadata.cjs +1 -1
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/pdfium-raster.cjs +1 -1
  58. package/dist-lib/pdfium-raster.mjs +1 -1
  59. package/dist-lib/plist.cjs +1 -1
  60. package/dist-lib/plist.mjs +1 -1
  61. package/dist-lib/profiles.cjs +1 -1
  62. package/dist-lib/public-brand.cjs +1 -1
  63. package/dist-lib/public-origins-lib-esm.json +25 -24
  64. package/dist-lib/public-origins-lib.json +99 -96
  65. package/dist-lib/react-native-host-modules.cjs +1 -1
  66. package/dist-lib/react-native-host-modules.mjs +1 -1
  67. package/dist-lib/reap-browser.cjs +1 -1
  68. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  69. package/dist-lib/sdk.cjs +1 -1
  70. package/dist-lib/sdk.mjs +1 -1
  71. package/dist-lib/skills.cjs +532 -420
  72. package/dist-lib/swift-compile.cjs +84 -49
  73. package/dist-lib/swift-compile.mjs +84 -49
  74. package/dist-lib/swift-package.cjs +1 -1
  75. package/dist-lib/swift-package.mjs +1 -1
  76. package/dist-lib/swift-submit.cjs +1 -1
  77. package/dist-lib/swift-submit.mjs +1 -1
  78. package/dist-lib/swift-toolchain.cjs +1 -1
  79. package/dist-lib/swift.cjs +1 -1
  80. package/dist-lib/vite-swift.cjs +158 -69
  81. package/dist-lib/vite.cjs +2930 -2800
  82. package/dist-lib/worklet-executable.cjs +1 -1
  83. package/dist-lib/worklet-executable.mjs +1 -1
  84. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  85. package/dist-types/packages/peach-engine/src/cli-host-terser.d.ts +7 -0
  86. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
  87. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  88. package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
  89. package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -0
  90. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +8 -1
  91. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  92. package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +1 -1
  93. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  94. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
  95. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +1 -2
  96. package/dist-types/packages/peach-kit/src/internal.d.ts +1 -0
  97. package/dist-types/packages/peach-kit/src/ios-tint.d.ts +1 -0
  98. package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +25 -0
  99. package/kotlin/sdk.tar.gz +0 -0
  100. package/package.json +1 -1
  101. package/runtime-companion.json +1 -1
  102. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +4 -4
  103. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +1 -1
  104. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +5 -5
  105. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
  106. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +1 -1
  107. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +9 -9
  108. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +1 -1
  109. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +7 -7
  110. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +1 -1
  111. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +1 -1
  112. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +1 -1
  113. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutConstraint.h +1 -8
  114. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +1 -0
  115. package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +1 -0
  116. package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UILayoutPriority.h +11 -0
  117. package/src/cli-runtime.ts +1 -0
  118. package/src/expo-native-workspace.ts +14 -10
  119. package/src/expo-workspace-exclusion.ts +10 -7
  120. package/src/react-native-autolinking.ts +2 -1
  121. package/src/runtime-delivery.ts +7 -0
  122. package/src/swift-compile.ts +90 -54
  123. package/src/swift-coverage/xcode-assets.ts +4 -2
  124. package/src/swift-host.ts +53 -14
  125. package/src/swift-objc-import.ts +4 -0
  126. package/src/wasm-optimize.ts +5 -1
  127. package/src/xcode-project.ts +26 -5
  128. package/src/xcode-target-members.ts +25 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2220 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2222 | (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": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "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": "29c2661be4b952101c9b9b8fd861560e6ce63b25dd4464f47475aaf72024f4fe", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "25505683ca29a0b380413bf2a5026d4967eacf886e35bc11ece6e15317e5bb02", "home-paths.ts": "d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "86f79e98323ec065e0e5195324c75ca608f490efbd95dcc25c53d5aa0b9aecc9", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "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": "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": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "29c2661be4b952101c9b9b8fd861560e6ce63b25dd4464f47475aaf72024f4fe", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "25505683ca29a0b380413bf2a5026d4967eacf886e35bc11ece6e15317e5bb02", "home-paths.ts": "d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "b6e04100805ba81f14d751383416fd4aab46901a6f94f5b62f831e66c28001c1", "xcode-target-members.ts": "d49af77a690cff481b38333b5f63f6600123b1bb57f410b0adb298b010d2047b", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -1580,8 +1580,20 @@ function xcodeTargetMemberVisitor(objects) {
1580
1580
  for (const id of refs) {
1581
1581
  const file = resolvePath(id);
1582
1582
  if (file === null) continue;
1583
- if (phase.isa === "PBXSourcesBuildPhase") visit3(file, "source");
1584
- else for (const inner of filesUnder(file)) visit3(inner, "resource");
1583
+ if (phase.isa === "PBXSourcesBuildPhase") {
1584
+ visit3(file, "source");
1585
+ continue;
1586
+ }
1587
+ const ref = objects[id];
1588
+ const type = isDict(ref) ? str(ref.lastKnownFileType) ?? str(ref.explicitFileType) ?? "" : "";
1589
+ const root = file.replace(/[\\/]+$/, "");
1590
+ const folder = FOLDER_REFERENCE.test(type) ? root.split(/[\\/]/).pop() : void 0;
1591
+ for (const inner of filesUnder(file))
1592
+ visit3(
1593
+ inner,
1594
+ "resource",
1595
+ folder && `${folder}/${inner.slice(root.length + 1).replaceAll("\\", "/")}`
1596
+ );
1585
1597
  }
1586
1598
  }
1587
1599
  }
@@ -1619,13 +1631,14 @@ function xcodeTargetMemberVisitor(objects) {
1619
1631
  }
1620
1632
  };
1621
1633
  }
1622
- var NEVER_MEMBER, BUNDLE_DIR;
1634
+ var NEVER_MEMBER, FOLDER_REFERENCE, BUNDLE_DIR;
1623
1635
  var init_xcode_target_members = __esm({
1624
1636
  "src/xcode-target-members.ts"() {
1625
1637
  "use strict";
1626
1638
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1627
1639
  init_openstep_plist();
1628
1640
  NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
1641
+ FOLDER_REFERENCE = /^(?:folder|wrapper\.scnassets)$/;
1629
1642
  BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
1630
1643
  }
1631
1644
  });
@@ -10731,7 +10744,7 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
10731
10744
  listed.stdout.split("\0").filter(Boolean).map((entry) => entry.replace(/\/$/, ""))
10732
10745
  );
10733
10746
  const ignoreFiles = /* @__PURE__ */ new Map();
10734
- return (relative4) => {
10747
+ return (relative4, knownDirectory) => {
10735
10748
  const parts = relative4.split(import_node_path8.default.sep);
10736
10749
  const linked = linkedPackages.some(
10737
10750
  (directory2) => relative4.startsWith(directory2 + import_node_path8.default.sep)
@@ -10743,16 +10756,16 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
10743
10756
  }
10744
10757
  if (portable && relative4) {
10745
10758
  let excluded = false;
10746
- const isDirectory3 = import_node_fs10.default.lstatSync(import_node_path8.default.join(root, relative4)).isDirectory();
10759
+ const isDirectory3 = knownDirectory ?? import_node_fs10.default.lstatSync(import_node_path8.default.join(root, relative4)).isDirectory();
10747
10760
  for (let index = 0; index < parts.length; index++) {
10748
10761
  const directory2 = parts.slice(0, index).join(import_node_path8.default.sep);
10749
10762
  let rules2 = ignoreFiles.get(directory2);
10750
- if (!rules2) {
10751
- rules2 = (0, import_ignore.default)();
10763
+ if (rules2 === void 0) {
10752
10764
  const file = import_node_path8.default.join(root, directory2, ".gitignore");
10753
- if (import_node_fs10.default.existsSync(file)) rules2.add(import_node_fs10.default.readFileSync(file, "utf8"));
10765
+ rules2 = import_node_fs10.default.existsSync(file) ? (0, import_ignore.default)().add(import_node_fs10.default.readFileSync(file, "utf8")) : null;
10754
10766
  ignoreFiles.set(directory2, rules2);
10755
10767
  }
10768
+ if (!rules2) continue;
10756
10769
  const item = parts.slice(index).join("/");
10757
10770
  const result = rules2.test(isDirectory3 ? `${item}/` : item);
10758
10771
  if (result.ignored) excluded = true;
@@ -11042,6 +11055,302 @@ var init_plist = __esm({
11042
11055
  }
11043
11056
  });
11044
11057
 
11058
+ // src/ios-sdk-frameworks.json
11059
+ var ios_sdk_frameworks_default;
11060
+ var init_ios_sdk_frameworks = __esm({
11061
+ "src/ios-sdk-frameworks.json"() {
11062
+ ios_sdk_frameworks_default = {
11063
+ sdk: "iphonesimulator27.1",
11064
+ frameworks: [
11065
+ "ARKit",
11066
+ "AVFAudio",
11067
+ "AVFoundation",
11068
+ "AVKit",
11069
+ "AVRouting",
11070
+ "Accelerate",
11071
+ "Accessibility",
11072
+ "AccessoryLiveActivities",
11073
+ "AccessoryNotifications",
11074
+ "AccessorySetupKit",
11075
+ "AccessoryTransportExtension",
11076
+ "Accounts",
11077
+ "ActivityKit",
11078
+ "AdAttributionKit",
11079
+ "AdServices",
11080
+ "AdSupport",
11081
+ "AddressBook",
11082
+ "AddressBookUI",
11083
+ "AlarmKit",
11084
+ "AppClip",
11085
+ "AppIntents",
11086
+ "AppIntentsTypeSupport",
11087
+ "AppMigrationKit",
11088
+ "AppTrackingTransparency",
11089
+ "AssetsLibrary",
11090
+ "AudioToolbox",
11091
+ "AudioUnit",
11092
+ "AuthenticationServices",
11093
+ "AutomatedDeviceEnrollment",
11094
+ "AutomaticAssessmentConfiguration",
11095
+ "BackgroundAssets",
11096
+ "BackgroundTasks",
11097
+ "BrowserEngineCore",
11098
+ "BrowserEngineKit",
11099
+ "BrowserKit",
11100
+ "BusinessChat",
11101
+ "CFNetwork",
11102
+ "CallKit",
11103
+ "CarKey",
11104
+ "CarPlay",
11105
+ "Charts",
11106
+ "ClassKit",
11107
+ "ClassKitUI",
11108
+ "ClockKit",
11109
+ "CloudKit",
11110
+ "ColorSync",
11111
+ "Combine",
11112
+ "ComputeGraph",
11113
+ "ContactProvider",
11114
+ "Contacts",
11115
+ "ContactsUI",
11116
+ "CoreAudio",
11117
+ "CoreAudioKit",
11118
+ "CoreAudioTypes",
11119
+ "CoreBluetooth",
11120
+ "CoreData",
11121
+ "CoreFoundation",
11122
+ "CoreGraphics",
11123
+ "CoreHaptics",
11124
+ "CoreImage",
11125
+ "CoreLocation",
11126
+ "CoreLocationUI",
11127
+ "CoreMIDI",
11128
+ "CoreML",
11129
+ "CoreMedia",
11130
+ "CoreMotion",
11131
+ "CoreNFC",
11132
+ "CoreServices",
11133
+ "CoreSpotlight",
11134
+ "CoreTelephony",
11135
+ "CoreText",
11136
+ "CoreTransferable",
11137
+ "CoreVideo",
11138
+ "CreateMLComponents",
11139
+ "CryptoKit",
11140
+ "CryptoTokenKit",
11141
+ "DataDetection",
11142
+ "DeclaredAgeRange",
11143
+ "DeveloperToolsSupport",
11144
+ "DeviceActivity",
11145
+ "DeviceCheck",
11146
+ "DeviceDiscoveryExtension",
11147
+ "DeviceDiscoveryUI",
11148
+ "EnergyKit",
11149
+ "EventKit",
11150
+ "EventKitUI",
11151
+ "ExposureNotification",
11152
+ "ExtensionFoundation",
11153
+ "ExtensionKit",
11154
+ "ExternalAccessory",
11155
+ "FamilyControls",
11156
+ "FileProvider",
11157
+ "FileProviderUI",
11158
+ "FinanceKit",
11159
+ "FinanceKitUI",
11160
+ "Foundation",
11161
+ "FoundationModels",
11162
+ "GLKit",
11163
+ "GSS",
11164
+ "GameController",
11165
+ "GameKit",
11166
+ "GameSave",
11167
+ "GameplayKit",
11168
+ "GeoToolbox",
11169
+ "GroupActivities",
11170
+ "HealthKit",
11171
+ "HealthKitUI",
11172
+ "HomeKit",
11173
+ "IOKit",
11174
+ "IOSurface",
11175
+ "IdentityDocumentServices",
11176
+ "IdentityDocumentServicesUI",
11177
+ "IdentityLookup",
11178
+ "IdentityLookupUI",
11179
+ "ImageCaptureCore",
11180
+ "ImageIO",
11181
+ "ImagePlayground",
11182
+ "ImmersiveMediaSupport",
11183
+ "Intents",
11184
+ "IntentsUI",
11185
+ "JavaScriptCore",
11186
+ "LinkPresentation",
11187
+ "LinkSecurity",
11188
+ "LiveCommunicationKit",
11189
+ "LocalAuthentication",
11190
+ "LocalAuthenticationEmbeddedUI",
11191
+ "LockedCameraCapture",
11192
+ "ManagedApp",
11193
+ "ManagedAppDistribution",
11194
+ "ManagedSettings",
11195
+ "ManagedSettingsUI",
11196
+ "MapKit",
11197
+ "MarketplaceKit",
11198
+ "Matter",
11199
+ "MatterSupport",
11200
+ "MediaAccessibility",
11201
+ "MediaIntelligence",
11202
+ "MediaIntents",
11203
+ "MediaPlayer",
11204
+ "MediaToolbox",
11205
+ "MessageUI",
11206
+ "Messages",
11207
+ "Metal",
11208
+ "MetalKit",
11209
+ "MetalPerformancePrimitives",
11210
+ "MetalPerformanceShaders",
11211
+ "MetalPerformanceShadersGraph",
11212
+ "MetricKit",
11213
+ "MobileCoreServices",
11214
+ "ModelIO",
11215
+ "MultipeerConnectivity",
11216
+ "MusicKit",
11217
+ "MusicUnderstanding",
11218
+ "NaturalLanguage",
11219
+ "NearbyInteraction",
11220
+ "Network",
11221
+ "NetworkExtension",
11222
+ "NotificationCenter",
11223
+ "NowPlaying",
11224
+ "OSLog",
11225
+ "OpenAL",
11226
+ "OpenGLES",
11227
+ "PDFKit",
11228
+ "PHASE",
11229
+ "PaperKit",
11230
+ "PassKit",
11231
+ "PencilKit",
11232
+ "PermissionKit",
11233
+ "Photos",
11234
+ "PhotosUI",
11235
+ "ProximityReader",
11236
+ "PushKit",
11237
+ "PushToTalk",
11238
+ "QuartzCore",
11239
+ "QuickLook",
11240
+ "QuickLookThumbnailing",
11241
+ "RealityFoundation",
11242
+ "RealityKit",
11243
+ "RelevanceKit",
11244
+ "ReplayKit",
11245
+ "RoomPlan",
11246
+ "SafariServices",
11247
+ "SafetyKit",
11248
+ "SceneKit",
11249
+ "ScreenTime",
11250
+ "SecureElementCredential",
11251
+ "Security",
11252
+ "SecurityUI",
11253
+ "SensitiveContentAnalysis",
11254
+ "SensorKit",
11255
+ "ServicesAccountLinking",
11256
+ "SharedWithYou",
11257
+ "SharedWithYouCore",
11258
+ "ShazamKit",
11259
+ "Social",
11260
+ "SoundAnalysis",
11261
+ "Speech",
11262
+ "SpriteKit",
11263
+ "StateReporting",
11264
+ "StoreKit",
11265
+ "SuggestedActions",
11266
+ "SwiftData",
11267
+ "SwiftUI",
11268
+ "SwiftUICore",
11269
+ "Symbols",
11270
+ "SystemConfiguration",
11271
+ "SystemExtensions",
11272
+ "TabularData",
11273
+ "TelephonyMessagingKit",
11274
+ "TipKit",
11275
+ "TouchController",
11276
+ "Translation",
11277
+ "TranslationUIProvider",
11278
+ "TrustInsights",
11279
+ "Twitter",
11280
+ "UIKit",
11281
+ "USDKit",
11282
+ "UniformTypeIdentifiers",
11283
+ "UserNotifications",
11284
+ "UserNotificationsUI",
11285
+ "VideoSubscriberAccount",
11286
+ "VideoToolbox",
11287
+ "Vision",
11288
+ "VisionKit",
11289
+ "WatchConnectivity",
11290
+ "WeatherKit",
11291
+ "WebKit",
11292
+ "WiFiAware",
11293
+ "WidgetKit",
11294
+ "WorkoutKit",
11295
+ "_AVKit_SwiftUI",
11296
+ "_AdAttributionKit_StoreKit",
11297
+ "_AppIntents_HealthKit",
11298
+ "_AppIntents_SwiftUI",
11299
+ "_AppIntents_UIKit",
11300
+ "_AuthenticationServices_SwiftUI",
11301
+ "_Contacts_AppIntents",
11302
+ "_CoreData_CloudKit",
11303
+ "_CoreLocationUI_SwiftUI",
11304
+ "_CoreNFC_UIKit",
11305
+ "_CoreSpotlight_FoundationModels",
11306
+ "_DataDetection_SwiftUI",
11307
+ "_DeviceActivity_SwiftUI",
11308
+ "_DeviceDiscoveryUI_SwiftUI",
11309
+ "_FinanceKit_AppIntents",
11310
+ "_FoundationModels_SwiftUI",
11311
+ "_FoundationModels_UIKit",
11312
+ "_GameController_SwiftUI",
11313
+ "_GeoToolbox_AppIntents",
11314
+ "_GroupActivities_UIKit",
11315
+ "_HomeKit_SwiftUI",
11316
+ "_Intents_TipKit",
11317
+ "_LinkPresentation_AppIntents",
11318
+ "_LocationEssentials",
11319
+ "_MapKit_SwiftUI",
11320
+ "_MarketplaceKit_UIKit",
11321
+ "_MediaIntents_AppIntents",
11322
+ "_MediaPlayer_AppIntents",
11323
+ "_MusicKit_SwiftUI",
11324
+ "_NowPlaying_AppIntents",
11325
+ "_PassKit_SwiftUI",
11326
+ "_PermissionKit_SwiftUI",
11327
+ "_PermissionKit_UIKit",
11328
+ "_PhotosUI_SwiftUI",
11329
+ "_PhotosUI_WidgetKit",
11330
+ "_Photos_AppIntents",
11331
+ "_QuickLook_SwiftUI",
11332
+ "_RealityKit_ComputeGraph",
11333
+ "_RealityKit_SwiftUI",
11334
+ "_RelevanceKit_MapKit",
11335
+ "_SceneKit_SwiftUI",
11336
+ "_SecureElementCredential_SwiftUI",
11337
+ "_SecureElementCredential_UIKit",
11338
+ "_SharedWithYou_AppIntents",
11339
+ "_SpriteKit_SwiftUI",
11340
+ "_StoreKit_SwiftUI",
11341
+ "_SwiftData_CoreData",
11342
+ "_SwiftData_SwiftUI",
11343
+ "_Translation_SwiftUI",
11344
+ "_USDKit_RealityKit",
11345
+ "_UserNotifications_AppIntents",
11346
+ "_WebKit_SwiftUI",
11347
+ "_WorkoutKit_SwiftUI",
11348
+ "iAd"
11349
+ ]
11350
+ };
11351
+ }
11352
+ });
11353
+
11045
11354
  // src/prepared-xcode-phases.ts
11046
11355
  function relativeFile(root, file) {
11047
11356
  const relative4 = import_node_path12.default.relative(root, file);
@@ -12974,12 +13283,13 @@ function planAssetSymbols(resources, root, settings) {
12974
13283
  "2": ["ipad"],
12975
13284
  "1,2": ["iphone", "ipad"],
12976
13285
  "1,7": ["iphone"],
13286
+ "1,3,7": ["iphone"],
12977
13287
  "1,2,6": ["iphone", "ipad"],
12978
13288
  "1,2,7": ["iphone", "ipad"]
12979
13289
  }[families];
12980
13290
  if (!devices)
12981
13291
  return unknown2(
12982
- `Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
13292
+ `Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
12983
13293
  );
12984
13294
  const plan = {
12985
13295
  catalogs: catalogs.map((path99) => ({
@@ -24937,6 +25247,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
24937
25247
  const result = await (0, import_wasm_opt.wasmOpt)(
24938
25248
  [
24939
25249
  "-Oz",
25250
+ ...KEEP_WASM_NAMES ? ["-g"] : [],
24940
25251
  ...skipPasses.flatMap((pass) => ["--skip-pass", pass]),
24941
25252
  ...FEATURES.map((feature) => `--enable-${feature}`),
24942
25253
  file,
@@ -24970,7 +25281,7 @@ async function installWasmOpt() {
24970
25281
  async function optimizeWasm(file, output2, skipPasses = []) {
24971
25282
  await runWasmOpt(file, output2, skipPasses, await installWasmOpt());
24972
25283
  }
24973
- var import_node_fs33, import_node_path32, import_wasm_opt, FEATURES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
25284
+ var import_node_fs33, import_node_path32, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
24974
25285
  var init_wasm_optimize = __esm({
24975
25286
  "src/wasm-optimize.ts"() {
24976
25287
  "use strict";
@@ -24993,7 +25304,8 @@ var init_wasm_optimize = __esm({
24993
25304
  "reference-types",
24994
25305
  "sign-ext"
24995
25306
  ];
24996
- WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
25307
+ KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
25308
+ WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}${KEEP_WASM_NAMES ? " -g" : ""}`;
24997
25309
  PINNED_BINARYEN_VERSION = "132";
24998
25310
  BINARYEN_RELEASES = /* @__PURE__ */ new Map([
24999
25311
  [
@@ -25761,7 +26073,7 @@ function swiftSubmoduleImports(sources) {
25761
26073
  }
25762
26074
  return imports2;
25763
26075
  }
25764
- function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
26076
+ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set(), swiftHeader) {
25765
26077
  const header = (file) => `header ${JSON.stringify(file)}`;
25766
26078
  const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
25767
26079
  return [
@@ -25769,6 +26081,7 @@ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new S
25769
26081
  ...headers.map(
25770
26082
  (file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
25771
26083
  ),
26084
+ ...swiftHeader ? [" module Swift {", ` ${header(swiftHeader)}`, " requires objc", " }"] : [],
25772
26085
  " export *",
25773
26086
  "}",
25774
26087
  ""
@@ -27044,6 +27357,7 @@ ${release}
27044
27357
  `);
27045
27358
  hash.update(compilerSourceDigest);
27046
27359
  if (input.oneModule) hash.update("one-module\n");
27360
+ if (KEEP_WASM_NAMES) hash.update("names\n");
27047
27361
  hash.update(swiftModuleDigest(moduleRoot));
27048
27362
  if (input.optimize) hash.update(`optimize
27049
27363
  ${WASM_OPTIMIZE_IDENTITY}
@@ -27155,7 +27469,14 @@ function toolsetOrdersLibcxxBeforeDarwinOverlay(options) {
27155
27469
  return libcxx >= 0 && overlay > libcxx;
27156
27470
  }
27157
27471
  function emitSwiftPackageManifest(args) {
27158
- const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
27472
+ const {
27473
+ targets,
27474
+ siblings,
27475
+ moduleRoot,
27476
+ oneModule,
27477
+ gameProducts: gameProducts2 = [],
27478
+ distribution
27479
+ } = args;
27159
27480
  const prebuilt = args.prebuilt;
27160
27481
  const linkedObjects = Boolean(distribution || prebuilt);
27161
27482
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
@@ -27184,9 +27505,8 @@ function emitSwiftPackageManifest(args) {
27184
27505
  for (const name3 of [...siblings.values()].flat())
27185
27506
  if (OPTIONAL_FRAMEWORKS.has(name3) && !targets.some((target) => target.name === name3))
27186
27507
  reach(name3);
27187
- if (spriteKit) {
27188
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
27189
- }
27508
+ for (const product of gameProducts2)
27509
+ for (const name3 of GAME_REACH[product] ?? []) reach(name3);
27190
27510
  let distributionLinkPath;
27191
27511
  const distributionLink = args.distributionLink;
27192
27512
  if (distribution && distributionLink) {
@@ -27209,7 +27529,7 @@ function emitSwiftPackageManifest(args) {
27209
27529
  (object6) => !isProvider(object6) && !replacedObjects.has(object6)
27210
27530
  );
27211
27531
  const objects = available.filter(
27212
- (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, "SpriteKit", "PeachBox2D"].every(
27532
+ (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, ...GAME_FAMILY, "PeachBox2D"].every(
27213
27533
  (name3) => !object6.startsWith(`lib/${name3}-`) || reachedFrameworks.has(name3)
27214
27534
  )
27215
27535
  );
@@ -27326,6 +27646,10 @@ function emitSwiftPackageManifest(args) {
27326
27646
  includeImportContext(dependency);
27327
27647
  const importedNativeFlags = [
27328
27648
  ...args.nativeImportFlags?.get(target.name) ?? [],
27649
+ ...[...importContext].flatMap((name3) => {
27650
+ const map2 = name3 === target.name ? void 0 : args.nativeSwiftHeaderMaps?.get(name3);
27651
+ return map2 ? ["-fmodule-map-file=" + map2] : [];
27652
+ }),
27329
27653
  ...[...importContext].flatMap((name3) => args.native?.get(name3)?.importFlags ?? []),
27330
27654
  ...[...importContext].flatMap((name3) => {
27331
27655
  const flags = targets.find((target2) => target2.name === name3)?.swiftFlags ?? [];
@@ -27368,7 +27692,7 @@ function emitSwiftPackageManifest(args) {
27368
27692
  ...linkedObjects || clang && !target.executable ? [] : [
27369
27693
  '.product(name: "SwiftUI", package: "sootsim-swift")',
27370
27694
  ...oneModule ? [ONE_PRODUCT] : [],
27371
- ...spriteKit ? [SPRITEKIT_PRODUCT] : []
27695
+ ...gameProducts2.map(gameProduct)
27372
27696
  ],
27373
27697
  ...(siblings.get(target.name) ?? []).flatMap(
27374
27698
  (dependency) => clang && // textual native headers can include one another without imposing
@@ -27400,7 +27724,7 @@ function emitSwiftPackageManifest(args) {
27400
27724
  .unsafeFlags(${flagArray(`[
27401
27725
  ${REACTOR_FLAG}${executableLinkFlags(args.root)} "-Xlinker", "--export-if-defined=__main_argc_argv"${library},
27402
27726
  ]`)}),
27403
- .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
27727
+ ${KEEP_WASM_NAMES ? "" : '.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),'}
27404
27728
  ]` : librarySettings.length > 0 ? `,
27405
27729
  linkerSettings: [${librarySettings.join(", ")}]` : "";
27406
27730
  const cDefines = macroSettings(target.cDefines);
@@ -28588,6 +28912,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
28588
28912
  )
28589
28913
  );
28590
28914
  const importModuleMaps = /* @__PURE__ */ new Map();
28915
+ const sourceModuleMaps = /* @__PURE__ */ new Map();
28591
28916
  const generatedModuleMaps = [];
28592
28917
  for (const target of targets) {
28593
28918
  const prefix = target.path === "." ? "" : `${target.path}/`;
@@ -28822,6 +29147,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
28822
29147
  stageTargetFile(target.name, import_node_path41.default.join(layout2.root, modulemap), moduleContents, {
28823
29148
  allowExisting: true
28824
29149
  });
29150
+ sourceModuleMaps.set(swiftTargetModuleName(target.name), {
29151
+ path: import_node_path41.default.join(layout2.root, modulemap),
29152
+ contents: moduleContents.toString()
29153
+ });
28825
29154
  if (modulemap.endsWith("/Modules/module.modulemap")) {
28826
29155
  const framework = import_node_path41.default.posix.dirname(import_node_path41.default.posix.dirname(modulemap));
28827
29156
  for (const [, header] of moduleContents.toString().matchAll(/\bheader\s+"([^"]+)"/g))
@@ -29096,6 +29425,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
29096
29425
  if (native.size > 0) (0, import_node_fs42.mkdirSync)(headerDirectory, { recursive: true });
29097
29426
  const headerAliasFlags = Object.keys(input.headerAliases ?? {}).length > 0 ? ["-ivfsoverlay", headerSearch.files[0]] : [];
29098
29427
  const nativeHeaderFlags = [...headerAliasFlags];
29428
+ const nativeSwiftHeaderMaps = /* @__PURE__ */ new Map();
29099
29429
  const originalMaps = /* @__PURE__ */ new Map();
29100
29430
  for (const target of input.nativeTargets ?? []) {
29101
29431
  for (const flag of [...target.flags, ...target.cxxFlags]) {
@@ -29126,30 +29456,33 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
29126
29456
  );
29127
29457
  const moduleName2 = swiftTargetModuleName(name3);
29128
29458
  const originalMap = originalMaps.get(moduleName2);
29129
- const originalTokens = originalMap ? moduleMapTokens(input.files[originalMap]) : [];
29130
- if (originalMap && originalTokens.some(
29459
+ const stagedMap = sourceModuleMaps.get(moduleName2);
29460
+ const originalPath = originalMap ? import_node_path41.default.join(layout2.root, originalMap) : stagedMap?.path;
29461
+ const originalContents = originalMap ? input.files[originalMap] : stagedMap?.contents;
29462
+ const originalTokens = originalContents ? moduleMapTokens(originalContents) : [];
29463
+ if (originalPath && originalTokens.some(
29131
29464
  (token, index) => token === "module" && (originalTokens[index + 1] === "Swift" || originalTokens[index + 1] === `${moduleName2}.Swift`)
29132
29465
  )) {
29133
- nativeHeaderFlags.push("-fmodule-map-file=" + import_node_path41.default.join(layout2.root, originalMap));
29466
+ nativeHeaderFlags.push("-fmodule-map-file=" + originalPath);
29467
+ nativeSwiftHeaderMaps.set(name3, originalPath);
29134
29468
  continue;
29135
29469
  }
29136
29470
  files2.set(
29137
29471
  modulemap,
29138
- originalMap ? `extern module ${moduleName2} ${JSON.stringify(import_node_path41.default.join(layout2.root, originalMap))}
29472
+ originalPath ? `extern module ${moduleName2} ${JSON.stringify(originalPath)}
29139
29473
  module ${moduleName2}.Swift {
29140
29474
  header ${JSON.stringify(import_node_path41.default.join(headerDirectory, name3 + "-Swift.h"))}
29141
29475
  requires objc
29142
29476
  }
29143
29477
  ` : swiftObjCModuleMap(
29144
29478
  moduleName2,
29145
- [
29146
- ...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path41.default.join(layout2.root, header)),
29147
- import_node_path41.default.join(headerDirectory, name3 + "-Swift.h")
29148
- ],
29149
- submoduleImports.get(moduleName2)
29479
+ (input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path41.default.join(layout2.root, header)),
29480
+ submoduleImports.get(moduleName2),
29481
+ import_node_path41.default.join(headerDirectory, name3 + "-Swift.h")
29150
29482
  )
29151
29483
  );
29152
29484
  nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
29485
+ nativeSwiftHeaderMaps.set(name3, modulemap);
29153
29486
  }
29154
29487
  const modulePlan = (0, import_node_crypto20.createHash)("sha256").update(
29155
29488
  swiftModuleInputFiles(moduleRoot).join("\n")
@@ -29400,14 +29733,17 @@ module ${moduleName2}.Swift {
29400
29733
  manifest = manifest.replace(product, `${product}
29401
29734
  ${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
29402
29735
  }
29403
- if (importsSpriteKit(input.files)) {
29736
+ const games = gameProducts(input.files);
29737
+ if (games.length > 0) {
29404
29738
  const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
29405
29739
  if (!manifest.includes(anchor))
29406
29740
  throw new Error(
29407
- "scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
29741
+ "scripts/contrast-app-Package.swift lost the line the game products link at"
29408
29742
  );
29409
- manifest = manifest.replace(anchor, `${anchor}
29410
- ${SPRITEKIT_PRODUCT},`);
29743
+ manifest = manifest.replace(
29744
+ anchor,
29745
+ [anchor, ...games.map((name3) => `${gameProduct(name3)},`)].join("\n ")
29746
+ );
29411
29747
  }
29412
29748
  files2.set(import_node_path41.default.join(layout2.root, "Package.swift"), manifest + moduleFiles);
29413
29749
  } else {
@@ -29506,6 +29842,7 @@ module ${moduleName2}.Swift {
29506
29842
  nativeFlags,
29507
29843
  nativeImportFlags,
29508
29844
  nativeHeaderFlags,
29845
+ nativeSwiftHeaderMaps,
29509
29846
  nativeHeaderDeclarations,
29510
29847
  objcImplementationModules: new Set(
29511
29848
  targets.filter(
@@ -29521,7 +29858,7 @@ module ${moduleName2}.Swift {
29521
29858
  siblings: moduleSiblings,
29522
29859
  moduleRoot,
29523
29860
  oneModule: input.oneModule,
29524
- spriteKit: importsSpriteKit(input.files),
29861
+ gameProducts: gameProducts(input.files),
29525
29862
  distribution: distribution ?? void 0,
29526
29863
  moduleExcludes,
29527
29864
  deferDarwinOverlay: native.size > 0 && toolsetOrdersLibcxxBeforeDarwinOverlay(
@@ -29663,30 +30000,30 @@ module ${moduleName2}.Swift {
29663
30000
  )
29664
30001
  ])
29665
30002
  );
30003
+ const producerSet = /* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers]);
30004
+ const orderedProducers = [];
29666
30005
  const included = /* @__PURE__ */ new Set();
29667
30006
  const include = (name3) => {
29668
30007
  if (included.has(name3)) return;
29669
30008
  included.add(name3);
29670
30009
  for (const dependency of dependencies.get(name3) ?? []) include(dependency);
30010
+ if (producerSet.has(name3)) orderedProducers.push(name3);
29671
30011
  };
29672
- for (const producer of producers)
30012
+ for (const producer of producerSet)
29673
30013
  for (const dependency of dependencies.get(producer) ?? []) include(dependency);
30014
+ const needsHeaderStages = [...producerSet].some((name3) => included.has(name3));
30015
+ for (const producer of producerSet) include(producer);
29674
30016
  return {
29675
30017
  nativeBuildTargets: [...native].flatMap(([name3, plan]) => [
29676
30018
  ...!plan.mixed && plan.sources.length > 0 ? [name3] : [],
29677
30019
  ...plan.groups?.map((group) => group.name) ?? (plan.late ? [plan.late.name] : [])
29678
30020
  ]),
29679
- headerProducers: [
29680
- .../* @__PURE__ */ new Set([
29681
- ...Object.keys(nativeHeaderDeclarations),
29682
- ...producers.filter((name3) => !included.has(name3))
29683
- ])
29684
- ],
30021
+ headerProducers: orderedProducers,
29685
30022
  emittedHeaderProducers: [
29686
30023
  .../* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers])
29687
30024
  ],
29688
30025
  nativeHeaderDeclarations,
29689
- headerProductTarget,
30026
+ headerProductTarget: needsHeaderStages ? void 0 : headerProductTarget,
29690
30027
  targetFailures,
29691
30028
  generatedOwners,
29692
30029
  targetToolset
@@ -29920,14 +30257,9 @@ function linkedFrameworkTargets(moduleRoot, input) {
29920
30257
  ))
29921
30258
  reach(match[1]);
29922
30259
  }
29923
- if (importsSpriteKit(input.files))
29924
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
29925
- const wanted = [
29926
- "PeachApp",
29927
- ...input.oneModule ? ["One"] : [],
29928
- ...importsSpriteKit(input.files) ? ["SpriteKit"] : [],
29929
- ...reached
29930
- ];
30260
+ const games = gameProducts(input.files);
30261
+ for (const product of games) for (const name3 of GAME_REACH[product] ?? []) reach(name3);
30262
+ const wanted = ["PeachApp", ...input.oneModule ? ["One"] : [], ...games, ...reached];
29931
30263
  const linked = [...new Set(wanted)].filter((name3) => libraries.has(name3));
29932
30264
  if (!linked.includes("PeachApp"))
29933
30265
  throw new Error("swift-compile: the framework package declares no PeachApp library");
@@ -30830,7 +31162,7 @@ function compileSwiftProjectOnce(input, options) {
30830
31162
  options.signal
30831
31163
  );
30832
31164
  }
30833
- var import_node_child_process23, import_node_crypto20, import_node_fs42, import_node_os11, import_node_path41, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, FOUNDATION_IMPLICIT_MODULES, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, DIRECTIVE, OS_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
31165
+ var import_node_child_process23, import_node_crypto20, import_node_fs42, import_node_os11, import_node_path41, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, FOUNDATION_IMPLICIT_MODULES, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, DIRECTIVE, OS_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
30834
31166
  var init_swift_compile = __esm({
30835
31167
  "src/swift-compile.ts"() {
30836
31168
  "use strict";
@@ -30873,7 +31205,10 @@ var init_swift_compile = __esm({
30873
31205
  SWIFTPM_NOISE = /^(?:\[\d+\/\d+\] |Building for production\.\.\.$|warning: '--build-system native' has been deprecated)/;
30874
31206
  SWIFT_BUILDER_TRANSPORT_MARGIN_MS = 3e5;
30875
31207
  SWIFT_BUILDER_DEFAULT_COMPILE_MS = 18e5;
30876
- clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(/^@import CoreFoundation;$/gm, "@import Foundation;").replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
31208
+ clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
31209
+ /^@import (?:CoreFoundation|FoundationNetworking);$/gm,
31210
+ "@import Foundation;"
31211
+ ).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
30877
31212
  swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
30878
31213
  ...[
30879
31214
  ...header.matchAll(
@@ -30901,7 +31236,8 @@ var init_swift_compile = __esm({
30901
31236
  PeachCFNetwork: [],
30902
31237
  JavaScriptCore: ["PeachJavaScriptCore"],
30903
31238
  PeachJavaScriptCore: [],
30904
- GameplayKit: [],
31239
+ // GameplayKit names SpriteKit and SceneKit nodes, as on iOS
31240
+ GameplayKit: ["SpriteKit", "SceneKit", "PeachBox2D", "simd", "GLKit"],
30905
31241
  simd: [],
30906
31242
  ModelIO: ["simd"],
30907
31243
  GLKit: ["ModelIO"],
@@ -31013,10 +31349,21 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
31013
31349
  }
31014
31350
  ];
31015
31351
  ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
31016
- SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
31017
- importsSpriteKit = (files2) => Object.entries(files2).some(
31018
- ([file, contents]) => file.endsWith(".swift") && swiftImportNames(contents).includes("SpriteKit")
31019
- );
31352
+ GAME_FAMILY = ["SpriteKit", "SceneKit"];
31353
+ gameProducts = (files2) => {
31354
+ const imported = new Set(
31355
+ Object.entries(files2).flatMap(
31356
+ ([file, contents]) => file.endsWith(".swift") ? swiftImportNames(contents) : []
31357
+ )
31358
+ );
31359
+ if (imported.has("SceneKit")) return [...GAME_FAMILY];
31360
+ return imported.has("SpriteKit") ? ["SpriteKit"] : [];
31361
+ };
31362
+ gameProduct = (name3) => `.product(name: "${name3}", package: "sootsim-swift")`;
31363
+ GAME_REACH = {
31364
+ SpriteKit: ["SpriteKit", "PeachBox2D", "simd", "GLKit"],
31365
+ SceneKit: ["SceneKit"]
31366
+ };
31020
31367
  FOUNDATION_IMPLICIT_MODULES = [
31021
31368
  "PeachObjC",
31022
31369
  "Dispatch",
@@ -31043,7 +31390,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
31043
31390
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
31044
31391
  MULTI_MANIFEST_VERSION = 68;
31045
31392
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
31046
- compilerSourceDigest = true ? "0a0bc1c871aee83ea273120655f55a43ddccde646478a452b4c73d2daefd58c3" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
31393
+ compilerSourceDigest = true ? "eba60b7a2e9485f928a6ec2e544e10d84b2b33430be66b9e069c9797a927af86" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
31047
31394
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
31048
31395
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
31049
31396
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -31374,8 +31721,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
31374
31721
  "NSURLProtectionSpaceHTTPS",
31375
31722
  "NSURLProtectionSpaceHTTPSProxy",
31376
31723
  "NSURLProtectionSpaceSOCKSProxy",
31377
- "NSURLSessionDownloadTaskResumeData",
31378
- "NSURLSessionTransferSizeUnknown",
31379
31724
  "NSURLSessionUploadTaskResumeData",
31380
31725
  "NSUTF16BigEndianStringEncoding",
31381
31726
  "NSUTF16LittleEndianStringEncoding",
@@ -33696,6 +34041,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
33696
34041
  const allSources = /* @__PURE__ */ new Set();
33697
34042
  const headers = /* @__PURE__ */ new Set();
33698
34043
  const resources = /* @__PURE__ */ new Set();
34044
+ const resourceNames = {};
33699
34045
  const scriptForOutput = /* @__PURE__ */ new Map();
33700
34046
  const copiedFiles = [];
33701
34047
  let generatedInfoPlist = false;
@@ -33865,13 +34211,14 @@ ${output2}`
33865
34211
  xcodePathResolver(project2.objects, project2.projectDir, import_node_path46.default.join, settings),
33866
34212
  (file) => isDirectory(file) ? walkFiles(file) : import_node_fs46.default.existsSync(file) ? [file] : [],
33867
34213
  import_node_path46.default.join,
33868
- (file, kind) => {
34214
+ (file, kind, bundleName) => {
33869
34215
  if (kind === "header") {
33870
34216
  headers.add(file);
33871
34217
  return;
33872
34218
  }
33873
34219
  if (kind === "resource") {
33874
34220
  resources.add(file);
34221
+ if (bundleName) resourceNames[file] = bundleName;
33875
34222
  return;
33876
34223
  }
33877
34224
  if (!import_node_fs46.default.existsSync(file)) {
@@ -33995,6 +34342,7 @@ ${output2}`
33995
34342
  return {
33996
34343
  sources: [...sources].sort(),
33997
34344
  resources: [...resources].sort(),
34345
+ resourceNames,
33998
34346
  copiedFiles,
33999
34347
  generatedInfoPlist,
34000
34348
  allSources: [...allSources].sort(),
@@ -35199,10 +35547,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35199
35547
  byProduct.has(import_node_path46.default.basename(rawPath)))
35200
35548
  continue;
35201
35549
  const resolved = fileId ? project2.resolvePath(fileId) : null;
35202
- if (fileId && resolved !== null && !import_node_fs46.default.existsSync(resolved))
35203
- throw new Error(
35204
- `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project2.projectFile}`
35205
- );
35550
+ if (fileId && resolved !== null && !import_node_fs46.default.existsSync(resolved)) {
35551
+ if (!ios_sdk_frameworks_default.frameworks.includes(name3))
35552
+ throw new Error(
35553
+ `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project2.projectFile}`
35554
+ );
35555
+ sdkFrameworks.add(name3);
35556
+ continue;
35557
+ }
35206
35558
  if (!binaryFrameworks.get(name3)) binaryFrameworks.set(name3, resolved);
35207
35559
  }
35208
35560
  }
@@ -35279,7 +35631,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35279
35631
  ...linkedProducts.flatMap(
35280
35632
  ({ source }) => source.kind === "local" && import_node_fs46.default.existsSync(source.dir) ? [source.dir] : []
35281
35633
  ),
35282
- ...new Set(podSourceDirs)
35634
+ ...new Set(podSourceDirs),
35635
+ // a target's own files may sit beside the project, such as an asset
35636
+ // catalog one folder up, and xcode builds them from there
35637
+ ...new Set(
35638
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs46.default.existsSync(file)).map((file) => import_node_path46.default.dirname(file))
35639
+ )
35283
35640
  ].map((dir) => import_node_fs46.default.realpathSync.native(dir))
35284
35641
  ),
35285
35642
  projectFiles: [
@@ -35324,6 +35681,7 @@ var init_xcode_project = __esm({
35324
35681
  import_node_fs46 = __toESM(require("node:fs"), 1);
35325
35682
  import_node_path46 = __toESM(require("node:path"), 1);
35326
35683
  import_plist2 = __toESM(require("plist"), 1);
35684
+ init_ios_sdk_frameworks();
35327
35685
  init_is_record();
35328
35686
  init_native_app_identity();
35329
35687
  init_prepared_xcode_phases();
@@ -36434,6 +36792,7 @@ function autolinkerJson(command, output2) {
36434
36792
  }
36435
36793
  }
36436
36794
  async function cliAdvertises(cli, args, token, appRoot, signal) {
36795
+ const started = Date.now();
36437
36796
  const { stdout, stderr } = await run5("node", [cli, ...args], {
36438
36797
  cwd: appRoot,
36439
36798
  signal,
@@ -36443,7 +36802,7 @@ async function cliAdvertises(cli, args, token, appRoot, signal) {
36443
36802
  });
36444
36803
  if (!stdout.trim())
36445
36804
  throw new Error(
36446
- `${cli} ${args.join(" ")} returned empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
36805
+ `${cli} ${args.join(" ")} exited 0 after ${Date.now() - started}ms with empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
36447
36806
  );
36448
36807
  return stdout.includes(token);
36449
36808
  }
@@ -37704,7 +38063,7 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
37704
38063
  signal?.throwIfAborted();
37705
38064
  const file = import_node_path58.default.join(directory2, entry.name);
37706
38065
  const relative4 = import_node_path58.default.relative(root, file);
37707
- if (excluded(relative4)) continue;
38066
+ if (excluded(relative4, entry.isDirectory())) continue;
37708
38067
  hash.update(`${relative4}\0`);
37709
38068
  if (entry.isSymbolicLink()) {
37710
38069
  const link = `link\0${await import_node_fs58.default.promises.readlink(file)}\0`;
@@ -37828,8 +38187,10 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
37828
38187
  if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
37829
38188
  return;
37830
38189
  import_node_fs58.default.mkdirSync(import_node_path58.default.dirname(target), { recursive: true });
37831
- import_node_fs58.default.copyFileSync(file, target);
37832
- import_node_fs58.default.utimesSync(target, source.atime, source.mtime);
38190
+ const staged = `${target}.${process.pid}.peach-sync`;
38191
+ import_node_fs58.default.copyFileSync(file, staged);
38192
+ import_node_fs58.default.utimesSync(staged, source.atime, source.mtime);
38193
+ import_node_fs58.default.renameSync(staged, target);
37833
38194
  };
37834
38195
  const walkInstalled = (directory2) => {
37835
38196
  for (const entry of import_node_fs58.default.readdirSync(directory2, { withFileTypes: true })) {
@@ -37847,7 +38208,7 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
37847
38208
  walkInstalled(file);
37848
38209
  continue;
37849
38210
  }
37850
- if (excluded(relative4) || entry.isSymbolicLink() || !sourceIos && relative4 === import_node_path58.default.join(appRelative, "ios"))
38211
+ if (excluded(relative4, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative4 === import_node_path58.default.join(appRelative, "ios"))
37851
38212
  continue;
37852
38213
  if (entry.isDirectory()) walk3(file);
37853
38214
  else if (entry.isFile()) {
@@ -41967,302 +42328,6 @@ var init_core_data_entity_classes = __esm({
41967
42328
  }
41968
42329
  });
41969
42330
 
41970
- // src/ios-sdk-frameworks.json
41971
- var ios_sdk_frameworks_default;
41972
- var init_ios_sdk_frameworks = __esm({
41973
- "src/ios-sdk-frameworks.json"() {
41974
- ios_sdk_frameworks_default = {
41975
- sdk: "iphonesimulator27.1",
41976
- frameworks: [
41977
- "ARKit",
41978
- "AVFAudio",
41979
- "AVFoundation",
41980
- "AVKit",
41981
- "AVRouting",
41982
- "Accelerate",
41983
- "Accessibility",
41984
- "AccessoryLiveActivities",
41985
- "AccessoryNotifications",
41986
- "AccessorySetupKit",
41987
- "AccessoryTransportExtension",
41988
- "Accounts",
41989
- "ActivityKit",
41990
- "AdAttributionKit",
41991
- "AdServices",
41992
- "AdSupport",
41993
- "AddressBook",
41994
- "AddressBookUI",
41995
- "AlarmKit",
41996
- "AppClip",
41997
- "AppIntents",
41998
- "AppIntentsTypeSupport",
41999
- "AppMigrationKit",
42000
- "AppTrackingTransparency",
42001
- "AssetsLibrary",
42002
- "AudioToolbox",
42003
- "AudioUnit",
42004
- "AuthenticationServices",
42005
- "AutomatedDeviceEnrollment",
42006
- "AutomaticAssessmentConfiguration",
42007
- "BackgroundAssets",
42008
- "BackgroundTasks",
42009
- "BrowserEngineCore",
42010
- "BrowserEngineKit",
42011
- "BrowserKit",
42012
- "BusinessChat",
42013
- "CFNetwork",
42014
- "CallKit",
42015
- "CarKey",
42016
- "CarPlay",
42017
- "Charts",
42018
- "ClassKit",
42019
- "ClassKitUI",
42020
- "ClockKit",
42021
- "CloudKit",
42022
- "ColorSync",
42023
- "Combine",
42024
- "ComputeGraph",
42025
- "ContactProvider",
42026
- "Contacts",
42027
- "ContactsUI",
42028
- "CoreAudio",
42029
- "CoreAudioKit",
42030
- "CoreAudioTypes",
42031
- "CoreBluetooth",
42032
- "CoreData",
42033
- "CoreFoundation",
42034
- "CoreGraphics",
42035
- "CoreHaptics",
42036
- "CoreImage",
42037
- "CoreLocation",
42038
- "CoreLocationUI",
42039
- "CoreMIDI",
42040
- "CoreML",
42041
- "CoreMedia",
42042
- "CoreMotion",
42043
- "CoreNFC",
42044
- "CoreServices",
42045
- "CoreSpotlight",
42046
- "CoreTelephony",
42047
- "CoreText",
42048
- "CoreTransferable",
42049
- "CoreVideo",
42050
- "CreateMLComponents",
42051
- "CryptoKit",
42052
- "CryptoTokenKit",
42053
- "DataDetection",
42054
- "DeclaredAgeRange",
42055
- "DeveloperToolsSupport",
42056
- "DeviceActivity",
42057
- "DeviceCheck",
42058
- "DeviceDiscoveryExtension",
42059
- "DeviceDiscoveryUI",
42060
- "EnergyKit",
42061
- "EventKit",
42062
- "EventKitUI",
42063
- "ExposureNotification",
42064
- "ExtensionFoundation",
42065
- "ExtensionKit",
42066
- "ExternalAccessory",
42067
- "FamilyControls",
42068
- "FileProvider",
42069
- "FileProviderUI",
42070
- "FinanceKit",
42071
- "FinanceKitUI",
42072
- "Foundation",
42073
- "FoundationModels",
42074
- "GLKit",
42075
- "GSS",
42076
- "GameController",
42077
- "GameKit",
42078
- "GameSave",
42079
- "GameplayKit",
42080
- "GeoToolbox",
42081
- "GroupActivities",
42082
- "HealthKit",
42083
- "HealthKitUI",
42084
- "HomeKit",
42085
- "IOKit",
42086
- "IOSurface",
42087
- "IdentityDocumentServices",
42088
- "IdentityDocumentServicesUI",
42089
- "IdentityLookup",
42090
- "IdentityLookupUI",
42091
- "ImageCaptureCore",
42092
- "ImageIO",
42093
- "ImagePlayground",
42094
- "ImmersiveMediaSupport",
42095
- "Intents",
42096
- "IntentsUI",
42097
- "JavaScriptCore",
42098
- "LinkPresentation",
42099
- "LinkSecurity",
42100
- "LiveCommunicationKit",
42101
- "LocalAuthentication",
42102
- "LocalAuthenticationEmbeddedUI",
42103
- "LockedCameraCapture",
42104
- "ManagedApp",
42105
- "ManagedAppDistribution",
42106
- "ManagedSettings",
42107
- "ManagedSettingsUI",
42108
- "MapKit",
42109
- "MarketplaceKit",
42110
- "Matter",
42111
- "MatterSupport",
42112
- "MediaAccessibility",
42113
- "MediaIntelligence",
42114
- "MediaIntents",
42115
- "MediaPlayer",
42116
- "MediaToolbox",
42117
- "MessageUI",
42118
- "Messages",
42119
- "Metal",
42120
- "MetalKit",
42121
- "MetalPerformancePrimitives",
42122
- "MetalPerformanceShaders",
42123
- "MetalPerformanceShadersGraph",
42124
- "MetricKit",
42125
- "MobileCoreServices",
42126
- "ModelIO",
42127
- "MultipeerConnectivity",
42128
- "MusicKit",
42129
- "MusicUnderstanding",
42130
- "NaturalLanguage",
42131
- "NearbyInteraction",
42132
- "Network",
42133
- "NetworkExtension",
42134
- "NotificationCenter",
42135
- "NowPlaying",
42136
- "OSLog",
42137
- "OpenAL",
42138
- "OpenGLES",
42139
- "PDFKit",
42140
- "PHASE",
42141
- "PaperKit",
42142
- "PassKit",
42143
- "PencilKit",
42144
- "PermissionKit",
42145
- "Photos",
42146
- "PhotosUI",
42147
- "ProximityReader",
42148
- "PushKit",
42149
- "PushToTalk",
42150
- "QuartzCore",
42151
- "QuickLook",
42152
- "QuickLookThumbnailing",
42153
- "RealityFoundation",
42154
- "RealityKit",
42155
- "RelevanceKit",
42156
- "ReplayKit",
42157
- "RoomPlan",
42158
- "SafariServices",
42159
- "SafetyKit",
42160
- "SceneKit",
42161
- "ScreenTime",
42162
- "SecureElementCredential",
42163
- "Security",
42164
- "SecurityUI",
42165
- "SensitiveContentAnalysis",
42166
- "SensorKit",
42167
- "ServicesAccountLinking",
42168
- "SharedWithYou",
42169
- "SharedWithYouCore",
42170
- "ShazamKit",
42171
- "Social",
42172
- "SoundAnalysis",
42173
- "Speech",
42174
- "SpriteKit",
42175
- "StateReporting",
42176
- "StoreKit",
42177
- "SuggestedActions",
42178
- "SwiftData",
42179
- "SwiftUI",
42180
- "SwiftUICore",
42181
- "Symbols",
42182
- "SystemConfiguration",
42183
- "SystemExtensions",
42184
- "TabularData",
42185
- "TelephonyMessagingKit",
42186
- "TipKit",
42187
- "TouchController",
42188
- "Translation",
42189
- "TranslationUIProvider",
42190
- "TrustInsights",
42191
- "Twitter",
42192
- "UIKit",
42193
- "USDKit",
42194
- "UniformTypeIdentifiers",
42195
- "UserNotifications",
42196
- "UserNotificationsUI",
42197
- "VideoSubscriberAccount",
42198
- "VideoToolbox",
42199
- "Vision",
42200
- "VisionKit",
42201
- "WatchConnectivity",
42202
- "WeatherKit",
42203
- "WebKit",
42204
- "WiFiAware",
42205
- "WidgetKit",
42206
- "WorkoutKit",
42207
- "_AVKit_SwiftUI",
42208
- "_AdAttributionKit_StoreKit",
42209
- "_AppIntents_HealthKit",
42210
- "_AppIntents_SwiftUI",
42211
- "_AppIntents_UIKit",
42212
- "_AuthenticationServices_SwiftUI",
42213
- "_Contacts_AppIntents",
42214
- "_CoreData_CloudKit",
42215
- "_CoreLocationUI_SwiftUI",
42216
- "_CoreNFC_UIKit",
42217
- "_CoreSpotlight_FoundationModels",
42218
- "_DataDetection_SwiftUI",
42219
- "_DeviceActivity_SwiftUI",
42220
- "_DeviceDiscoveryUI_SwiftUI",
42221
- "_FinanceKit_AppIntents",
42222
- "_FoundationModels_SwiftUI",
42223
- "_FoundationModels_UIKit",
42224
- "_GameController_SwiftUI",
42225
- "_GeoToolbox_AppIntents",
42226
- "_GroupActivities_UIKit",
42227
- "_HomeKit_SwiftUI",
42228
- "_Intents_TipKit",
42229
- "_LinkPresentation_AppIntents",
42230
- "_LocationEssentials",
42231
- "_MapKit_SwiftUI",
42232
- "_MarketplaceKit_UIKit",
42233
- "_MediaIntents_AppIntents",
42234
- "_MediaPlayer_AppIntents",
42235
- "_MusicKit_SwiftUI",
42236
- "_NowPlaying_AppIntents",
42237
- "_PassKit_SwiftUI",
42238
- "_PermissionKit_SwiftUI",
42239
- "_PermissionKit_UIKit",
42240
- "_PhotosUI_SwiftUI",
42241
- "_PhotosUI_WidgetKit",
42242
- "_Photos_AppIntents",
42243
- "_QuickLook_SwiftUI",
42244
- "_RealityKit_ComputeGraph",
42245
- "_RealityKit_SwiftUI",
42246
- "_RelevanceKit_MapKit",
42247
- "_SceneKit_SwiftUI",
42248
- "_SecureElementCredential_SwiftUI",
42249
- "_SecureElementCredential_UIKit",
42250
- "_SharedWithYou_AppIntents",
42251
- "_SpriteKit_SwiftUI",
42252
- "_StoreKit_SwiftUI",
42253
- "_SwiftData_CoreData",
42254
- "_SwiftData_SwiftUI",
42255
- "_Translation_SwiftUI",
42256
- "_USDKit_RealityKit",
42257
- "_UserNotifications_AppIntents",
42258
- "_WebKit_SwiftUI",
42259
- "_WorkoutKit_SwiftUI",
42260
- "iAd"
42261
- ]
42262
- };
42263
- }
42264
- });
42265
-
42266
42331
  // src/swift-cxx-deps.ts
42267
42332
  function cxxDependencies(output2) {
42268
42333
  const body = output2.replace(/\\\r?\n/g, " ");
@@ -43249,7 +43314,7 @@ var init_swift_standin_digest = __esm({
43249
43314
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
43250
43315
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
43251
43316
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
43252
- STANDIN_SOURCE_DIGEST = true ? "c0f609da62368c513c186d23bc8aa8e450d27efae5b8c2e7cdf50d34fa734ff0" : standinSourceDigest();
43317
+ STANDIN_SOURCE_DIGEST = true ? "1a62599378cd7cdf32385f588eb3f983f07ea222d145ec5b6dc34cce9104f46c" : standinSourceDigest();
43253
43318
  }
43254
43319
  });
43255
43320
 
@@ -49236,6 +49301,17 @@ function isPackageSource(file) {
49236
49301
  function sourceFiles(root) {
49237
49302
  return packageFiles(root, false).filter(isPackageSource);
49238
49303
  }
49304
+ function xcodeFlatResources(app) {
49305
+ if (!app) return /* @__PURE__ */ new Set();
49306
+ return new Set(
49307
+ app.resources.filter(
49308
+ (file) => !Object.hasOwn(app.resourceNames, file) && !file.split(import_node_path79.default.sep).some((segment2) => segment2.endsWith(".xcassets"))
49309
+ )
49310
+ );
49311
+ }
49312
+ function bundleResourcePath(flatResources, disk, file) {
49313
+ return flatResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
49314
+ }
49239
49315
  function resourceCandidateFiles(root) {
49240
49316
  return packageFiles(root, false).filter(
49241
49317
  (file) => !isPackageSource(file) && !file.endsWith(".xcconfig") && !["project.pbxproj", "project.xcproj", "Package.resolved"].includes(
@@ -49308,12 +49384,24 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
49308
49384
  const disk = byRelative.get(file);
49309
49385
  return !disk || !layout2?.targetDirs.get(disk)?.startsWith(`${XCODE_FRAMEWORKS_DIR}/`);
49310
49386
  });
49311
- const found = enumerateBundleImages(relative4, readContents2, (file) => {
49312
- const disk = byRelative.get(file);
49313
- if (!disk) throw new Error(`image source ${file} has no input file`);
49314
- const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
49315
- return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
49316
- });
49387
+ const flatResources = xcodeFlatResources(layout2?.app);
49388
+ const bundled = new Map(
49389
+ relative4.map((file) => [
49390
+ bundleResourcePath(flatResources, byRelative.get(file), file),
49391
+ file
49392
+ ])
49393
+ );
49394
+ const found = enumerateBundleImages(
49395
+ [...bundled.keys()],
49396
+ (file) => readContents2(bundled.get(file) ?? file),
49397
+ (marked) => {
49398
+ const file = bundled.get(marked) ?? marked;
49399
+ const disk = byRelative.get(file);
49400
+ if (!disk) throw new Error(`image source ${file} has no input file`);
49401
+ const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
49402
+ return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
49403
+ }
49404
+ ).map((image) => ({ ...image, file: bundled.get(image.file) ?? image.file }));
49317
49405
  const colors = enumerateBundleColors(catalogFiles2, readContents2);
49318
49406
  const symbols = enumerateBundleSymbols(catalogFiles2, readContents2, (file) => {
49319
49407
  const disk = byRelative.get(file);
@@ -49497,15 +49585,20 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
49497
49585
  }
49498
49586
  }
49499
49587
  const groups = /* @__PURE__ */ new Map();
49500
- const appResources = new Set(xcode?.app.resources ?? []);
49588
+ const flatResources = xcodeFlatResources(xcode?.app);
49501
49589
  for (const file of relative4) {
49502
49590
  const disk = import_node_path79.default.join(packagePath, ...file.split("/"));
49591
+ const folderName = xcode?.app.resourceNames[disk];
49592
+ if (folderName) {
49593
+ watched.push(file);
49594
+ addFile(folderName, readPackageFile2(packagePath, disk, limits.resourceBytes));
49595
+ continue;
49596
+ }
49503
49597
  const key2 = xcode ? xcodeInputKey(xcode, disk, file) : file;
49504
49598
  const bundle = swiftResourceBundleForFile(bundles, key2);
49505
49599
  const bundlePath = bundle?.path ?? ".";
49506
49600
  const group = groups.get(bundlePath) ?? /* @__PURE__ */ new Map();
49507
- const resource = appResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
49508
- group.set(resource, disk);
49601
+ group.set(bundleResourcePath(flatResources, disk, file), disk);
49509
49602
  groups.set(bundlePath, group);
49510
49603
  }
49511
49604
  for (const bundle of bundles) {
@@ -55747,7 +55840,7 @@ var init_nitro_superset = __esm({
55747
55840
  init_nitroContract();
55748
55841
  init_swift_standin_digest();
55749
55842
  NITRO_SUPERSET_ENTRY_NAME = "superset";
55750
- NITRO_COMPILER_DIGEST = true ? "a16afc2e6e3c68812b9d48ad1c7be8c9d89cfebcf46e269779f2890053244d70" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
55843
+ NITRO_COMPILER_DIGEST = true ? "a4a039ea02c6f6891931ee5a3d0136be472592ea109f8bc1b947d9d235a9559c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
55751
55844
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
55752
55845
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
55753
55846
  published = /* @__PURE__ */ new Map();
@@ -56972,7 +57065,7 @@ var init_expo_native_compiler_digest = __esm({
56972
57065
 
56973
57066
  // src/expo-native-prebuilt.ts
56974
57067
  function expoNativeCompilerDigestValue() {
56975
- return true ? "8e765b5dfd0ec93d9027f9d10365ed11f7d85a195d0a888dd1fb76b99195ff2e" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
57068
+ return true ? "db679f96e034ef5a3e217e2553ec748fa11d5dd68cd9247dd7bcae61a03d42a1" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
56976
57069
  }
56977
57070
  function readSources(value) {
56978
57071
  const sources = isRecord(value) ? value.sources : null;
@@ -64449,7 +64542,7 @@ var import_node_path5 = require("node:path");
64449
64542
  init_src();
64450
64543
 
64451
64544
  // runtime-companion.json
64452
- var runtime_companion_default = { abi: 1, sha256: "c3cfa87c38bca3be3b225d514efe1b9e2ab9119227137e7190dfa25eccf43fe7", file: "node/cli-c3cfa87c38bca3be3b225d514efe1b9e2ab9119227137e7190dfa25eccf43fe7.cjs" };
64545
+ var runtime_companion_default = { abi: 1, sha256: "6b48c0f7ae1d87e581af7cf445b2eaad2e1a4aa8fad23a00e1ae90916b2bbc02", file: "node/cli-6b48c0f7ae1d87e581af7cf445b2eaad2e1a4aa8fad23a00e1ae90916b2bbc02.cjs" };
64453
64546
 
64454
64547
  // src/cli-runtime.ts
64455
64548
  init_answeredNativePackages();
@@ -64490,6 +64583,7 @@ function getCliRuntime() {
64490
64583
  "Incompatible Peach runtime companion ABI; run `peach runtime install`"
64491
64584
  );
64492
64585
  }
64586
+ runtime.provideTerser(() => import("terser"));
64493
64587
  loaded = { root, runtime };
64494
64588
  return runtime;
64495
64589
  }