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
 
@@ -1096,6 +1096,7 @@ function autolinkerJson(command, output2) {
1096
1096
  }
1097
1097
  }
1098
1098
  async function cliAdvertises(cli, args, token, appRoot, signal) {
1099
+ const started = Date.now();
1099
1100
  const { stdout, stderr } = await run3("node", [cli, ...args], {
1100
1101
  cwd: appRoot,
1101
1102
  signal,
@@ -1105,7 +1106,7 @@ async function cliAdvertises(cli, args, token, appRoot, signal) {
1105
1106
  });
1106
1107
  if (!stdout.trim())
1107
1108
  throw new Error(
1108
- `${cli} ${args.join(" ")} returned empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
1109
+ `${cli} ${args.join(" ")} exited 0 after ${Date.now() - started}ms with empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
1109
1110
  );
1110
1111
  return stdout.includes(token);
1111
1112
  }
@@ -3430,6 +3431,302 @@ var init_plist = __esm({
3430
3431
  }
3431
3432
  });
3432
3433
 
3434
+ // src/ios-sdk-frameworks.json
3435
+ var ios_sdk_frameworks_default;
3436
+ var init_ios_sdk_frameworks = __esm({
3437
+ "src/ios-sdk-frameworks.json"() {
3438
+ ios_sdk_frameworks_default = {
3439
+ sdk: "iphonesimulator27.1",
3440
+ frameworks: [
3441
+ "ARKit",
3442
+ "AVFAudio",
3443
+ "AVFoundation",
3444
+ "AVKit",
3445
+ "AVRouting",
3446
+ "Accelerate",
3447
+ "Accessibility",
3448
+ "AccessoryLiveActivities",
3449
+ "AccessoryNotifications",
3450
+ "AccessorySetupKit",
3451
+ "AccessoryTransportExtension",
3452
+ "Accounts",
3453
+ "ActivityKit",
3454
+ "AdAttributionKit",
3455
+ "AdServices",
3456
+ "AdSupport",
3457
+ "AddressBook",
3458
+ "AddressBookUI",
3459
+ "AlarmKit",
3460
+ "AppClip",
3461
+ "AppIntents",
3462
+ "AppIntentsTypeSupport",
3463
+ "AppMigrationKit",
3464
+ "AppTrackingTransparency",
3465
+ "AssetsLibrary",
3466
+ "AudioToolbox",
3467
+ "AudioUnit",
3468
+ "AuthenticationServices",
3469
+ "AutomatedDeviceEnrollment",
3470
+ "AutomaticAssessmentConfiguration",
3471
+ "BackgroundAssets",
3472
+ "BackgroundTasks",
3473
+ "BrowserEngineCore",
3474
+ "BrowserEngineKit",
3475
+ "BrowserKit",
3476
+ "BusinessChat",
3477
+ "CFNetwork",
3478
+ "CallKit",
3479
+ "CarKey",
3480
+ "CarPlay",
3481
+ "Charts",
3482
+ "ClassKit",
3483
+ "ClassKitUI",
3484
+ "ClockKit",
3485
+ "CloudKit",
3486
+ "ColorSync",
3487
+ "Combine",
3488
+ "ComputeGraph",
3489
+ "ContactProvider",
3490
+ "Contacts",
3491
+ "ContactsUI",
3492
+ "CoreAudio",
3493
+ "CoreAudioKit",
3494
+ "CoreAudioTypes",
3495
+ "CoreBluetooth",
3496
+ "CoreData",
3497
+ "CoreFoundation",
3498
+ "CoreGraphics",
3499
+ "CoreHaptics",
3500
+ "CoreImage",
3501
+ "CoreLocation",
3502
+ "CoreLocationUI",
3503
+ "CoreMIDI",
3504
+ "CoreML",
3505
+ "CoreMedia",
3506
+ "CoreMotion",
3507
+ "CoreNFC",
3508
+ "CoreServices",
3509
+ "CoreSpotlight",
3510
+ "CoreTelephony",
3511
+ "CoreText",
3512
+ "CoreTransferable",
3513
+ "CoreVideo",
3514
+ "CreateMLComponents",
3515
+ "CryptoKit",
3516
+ "CryptoTokenKit",
3517
+ "DataDetection",
3518
+ "DeclaredAgeRange",
3519
+ "DeveloperToolsSupport",
3520
+ "DeviceActivity",
3521
+ "DeviceCheck",
3522
+ "DeviceDiscoveryExtension",
3523
+ "DeviceDiscoveryUI",
3524
+ "EnergyKit",
3525
+ "EventKit",
3526
+ "EventKitUI",
3527
+ "ExposureNotification",
3528
+ "ExtensionFoundation",
3529
+ "ExtensionKit",
3530
+ "ExternalAccessory",
3531
+ "FamilyControls",
3532
+ "FileProvider",
3533
+ "FileProviderUI",
3534
+ "FinanceKit",
3535
+ "FinanceKitUI",
3536
+ "Foundation",
3537
+ "FoundationModels",
3538
+ "GLKit",
3539
+ "GSS",
3540
+ "GameController",
3541
+ "GameKit",
3542
+ "GameSave",
3543
+ "GameplayKit",
3544
+ "GeoToolbox",
3545
+ "GroupActivities",
3546
+ "HealthKit",
3547
+ "HealthKitUI",
3548
+ "HomeKit",
3549
+ "IOKit",
3550
+ "IOSurface",
3551
+ "IdentityDocumentServices",
3552
+ "IdentityDocumentServicesUI",
3553
+ "IdentityLookup",
3554
+ "IdentityLookupUI",
3555
+ "ImageCaptureCore",
3556
+ "ImageIO",
3557
+ "ImagePlayground",
3558
+ "ImmersiveMediaSupport",
3559
+ "Intents",
3560
+ "IntentsUI",
3561
+ "JavaScriptCore",
3562
+ "LinkPresentation",
3563
+ "LinkSecurity",
3564
+ "LiveCommunicationKit",
3565
+ "LocalAuthentication",
3566
+ "LocalAuthenticationEmbeddedUI",
3567
+ "LockedCameraCapture",
3568
+ "ManagedApp",
3569
+ "ManagedAppDistribution",
3570
+ "ManagedSettings",
3571
+ "ManagedSettingsUI",
3572
+ "MapKit",
3573
+ "MarketplaceKit",
3574
+ "Matter",
3575
+ "MatterSupport",
3576
+ "MediaAccessibility",
3577
+ "MediaIntelligence",
3578
+ "MediaIntents",
3579
+ "MediaPlayer",
3580
+ "MediaToolbox",
3581
+ "MessageUI",
3582
+ "Messages",
3583
+ "Metal",
3584
+ "MetalKit",
3585
+ "MetalPerformancePrimitives",
3586
+ "MetalPerformanceShaders",
3587
+ "MetalPerformanceShadersGraph",
3588
+ "MetricKit",
3589
+ "MobileCoreServices",
3590
+ "ModelIO",
3591
+ "MultipeerConnectivity",
3592
+ "MusicKit",
3593
+ "MusicUnderstanding",
3594
+ "NaturalLanguage",
3595
+ "NearbyInteraction",
3596
+ "Network",
3597
+ "NetworkExtension",
3598
+ "NotificationCenter",
3599
+ "NowPlaying",
3600
+ "OSLog",
3601
+ "OpenAL",
3602
+ "OpenGLES",
3603
+ "PDFKit",
3604
+ "PHASE",
3605
+ "PaperKit",
3606
+ "PassKit",
3607
+ "PencilKit",
3608
+ "PermissionKit",
3609
+ "Photos",
3610
+ "PhotosUI",
3611
+ "ProximityReader",
3612
+ "PushKit",
3613
+ "PushToTalk",
3614
+ "QuartzCore",
3615
+ "QuickLook",
3616
+ "QuickLookThumbnailing",
3617
+ "RealityFoundation",
3618
+ "RealityKit",
3619
+ "RelevanceKit",
3620
+ "ReplayKit",
3621
+ "RoomPlan",
3622
+ "SafariServices",
3623
+ "SafetyKit",
3624
+ "SceneKit",
3625
+ "ScreenTime",
3626
+ "SecureElementCredential",
3627
+ "Security",
3628
+ "SecurityUI",
3629
+ "SensitiveContentAnalysis",
3630
+ "SensorKit",
3631
+ "ServicesAccountLinking",
3632
+ "SharedWithYou",
3633
+ "SharedWithYouCore",
3634
+ "ShazamKit",
3635
+ "Social",
3636
+ "SoundAnalysis",
3637
+ "Speech",
3638
+ "SpriteKit",
3639
+ "StateReporting",
3640
+ "StoreKit",
3641
+ "SuggestedActions",
3642
+ "SwiftData",
3643
+ "SwiftUI",
3644
+ "SwiftUICore",
3645
+ "Symbols",
3646
+ "SystemConfiguration",
3647
+ "SystemExtensions",
3648
+ "TabularData",
3649
+ "TelephonyMessagingKit",
3650
+ "TipKit",
3651
+ "TouchController",
3652
+ "Translation",
3653
+ "TranslationUIProvider",
3654
+ "TrustInsights",
3655
+ "Twitter",
3656
+ "UIKit",
3657
+ "USDKit",
3658
+ "UniformTypeIdentifiers",
3659
+ "UserNotifications",
3660
+ "UserNotificationsUI",
3661
+ "VideoSubscriberAccount",
3662
+ "VideoToolbox",
3663
+ "Vision",
3664
+ "VisionKit",
3665
+ "WatchConnectivity",
3666
+ "WeatherKit",
3667
+ "WebKit",
3668
+ "WiFiAware",
3669
+ "WidgetKit",
3670
+ "WorkoutKit",
3671
+ "_AVKit_SwiftUI",
3672
+ "_AdAttributionKit_StoreKit",
3673
+ "_AppIntents_HealthKit",
3674
+ "_AppIntents_SwiftUI",
3675
+ "_AppIntents_UIKit",
3676
+ "_AuthenticationServices_SwiftUI",
3677
+ "_Contacts_AppIntents",
3678
+ "_CoreData_CloudKit",
3679
+ "_CoreLocationUI_SwiftUI",
3680
+ "_CoreNFC_UIKit",
3681
+ "_CoreSpotlight_FoundationModels",
3682
+ "_DataDetection_SwiftUI",
3683
+ "_DeviceActivity_SwiftUI",
3684
+ "_DeviceDiscoveryUI_SwiftUI",
3685
+ "_FinanceKit_AppIntents",
3686
+ "_FoundationModels_SwiftUI",
3687
+ "_FoundationModels_UIKit",
3688
+ "_GameController_SwiftUI",
3689
+ "_GeoToolbox_AppIntents",
3690
+ "_GroupActivities_UIKit",
3691
+ "_HomeKit_SwiftUI",
3692
+ "_Intents_TipKit",
3693
+ "_LinkPresentation_AppIntents",
3694
+ "_LocationEssentials",
3695
+ "_MapKit_SwiftUI",
3696
+ "_MarketplaceKit_UIKit",
3697
+ "_MediaIntents_AppIntents",
3698
+ "_MediaPlayer_AppIntents",
3699
+ "_MusicKit_SwiftUI",
3700
+ "_NowPlaying_AppIntents",
3701
+ "_PassKit_SwiftUI",
3702
+ "_PermissionKit_SwiftUI",
3703
+ "_PermissionKit_UIKit",
3704
+ "_PhotosUI_SwiftUI",
3705
+ "_PhotosUI_WidgetKit",
3706
+ "_Photos_AppIntents",
3707
+ "_QuickLook_SwiftUI",
3708
+ "_RealityKit_ComputeGraph",
3709
+ "_RealityKit_SwiftUI",
3710
+ "_RelevanceKit_MapKit",
3711
+ "_SceneKit_SwiftUI",
3712
+ "_SecureElementCredential_SwiftUI",
3713
+ "_SecureElementCredential_UIKit",
3714
+ "_SharedWithYou_AppIntents",
3715
+ "_SpriteKit_SwiftUI",
3716
+ "_StoreKit_SwiftUI",
3717
+ "_SwiftData_CoreData",
3718
+ "_SwiftData_SwiftUI",
3719
+ "_Translation_SwiftUI",
3720
+ "_USDKit_RealityKit",
3721
+ "_UserNotifications_AppIntents",
3722
+ "_WebKit_SwiftUI",
3723
+ "_WorkoutKit_SwiftUI",
3724
+ "iAd"
3725
+ ]
3726
+ };
3727
+ }
3728
+ });
3729
+
3433
3730
  // src/android-string-value.ts
3434
3731
  var init_android_string_value = __esm({
3435
3732
  "src/android-string-value.ts"() {
@@ -3735,8 +4032,20 @@ function xcodeTargetMemberVisitor(objects) {
3735
4032
  for (const id of refs) {
3736
4033
  const file = resolvePath(id);
3737
4034
  if (file === null) continue;
3738
- if (phase.isa === "PBXSourcesBuildPhase") visit3(file, "source");
3739
- else for (const inner of filesUnder(file)) visit3(inner, "resource");
4035
+ if (phase.isa === "PBXSourcesBuildPhase") {
4036
+ visit3(file, "source");
4037
+ continue;
4038
+ }
4039
+ const ref = objects[id];
4040
+ const type = isDict(ref) ? str(ref.lastKnownFileType) ?? str(ref.explicitFileType) ?? "" : "";
4041
+ const root = file.replace(/[\\/]+$/, "");
4042
+ const folder = FOLDER_REFERENCE.test(type) ? root.split(/[\\/]/).pop() : void 0;
4043
+ for (const inner of filesUnder(file))
4044
+ visit3(
4045
+ inner,
4046
+ "resource",
4047
+ folder && `${folder}/${inner.slice(root.length + 1).replaceAll("\\", "/")}`
4048
+ );
3740
4049
  }
3741
4050
  }
3742
4051
  }
@@ -3774,13 +4083,14 @@ function xcodeTargetMemberVisitor(objects) {
3774
4083
  }
3775
4084
  };
3776
4085
  }
3777
- var NEVER_MEMBER, BUNDLE_DIR;
4086
+ var NEVER_MEMBER, FOLDER_REFERENCE, BUNDLE_DIR;
3778
4087
  var init_xcode_target_members = __esm({
3779
4088
  "src/xcode-target-members.ts"() {
3780
4089
  "use strict";
3781
4090
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3782
4091
  init_openstep_plist();
3783
4092
  NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
4093
+ FOLDER_REFERENCE = /^(?:folder|wrapper\.scnassets)$/;
3784
4094
  BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
3785
4095
  }
3786
4096
  });
@@ -5864,12 +6174,13 @@ function planAssetSymbols(resources, root, settings) {
5864
6174
  "2": ["ipad"],
5865
6175
  "1,2": ["iphone", "ipad"],
5866
6176
  "1,7": ["iphone"],
6177
+ "1,3,7": ["iphone"],
5867
6178
  "1,2,6": ["iphone", "ipad"],
5868
6179
  "1,2,7": ["iphone", "ipad"]
5869
6180
  }[families];
5870
6181
  if (!devices)
5871
6182
  return unknown2(
5872
- `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}".`
6183
+ `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}".`
5873
6184
  );
5874
6185
  const plan = {
5875
6186
  catalogs: catalogs.map((path74) => ({
@@ -17827,6 +18138,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
17827
18138
  const result = await (0, import_wasm_opt.wasmOpt)(
17828
18139
  [
17829
18140
  "-Oz",
18141
+ ...KEEP_WASM_NAMES ? ["-g"] : [],
17830
18142
  ...skipPasses.flatMap((pass) => ["--skip-pass", pass]),
17831
18143
  ...FEATURES.map((feature) => `--enable-${feature}`),
17832
18144
  file,
@@ -17860,7 +18172,7 @@ async function installWasmOpt() {
17860
18172
  async function optimizeWasm(file, output2, skipPasses = []) {
17861
18173
  await runWasmOpt(file, output2, skipPasses, await installWasmOpt());
17862
18174
  }
17863
- var import_node_fs41, import_node_path38, import_wasm_opt, FEATURES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
18175
+ var import_node_fs41, import_node_path38, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
17864
18176
  var init_wasm_optimize = __esm({
17865
18177
  "src/wasm-optimize.ts"() {
17866
18178
  "use strict";
@@ -17883,7 +18195,8 @@ var init_wasm_optimize = __esm({
17883
18195
  "reference-types",
17884
18196
  "sign-ext"
17885
18197
  ];
17886
- WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
18198
+ KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
18199
+ WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}${KEEP_WASM_NAMES ? " -g" : ""}`;
17887
18200
  PINNED_BINARYEN_VERSION = "132";
17888
18201
  BINARYEN_RELEASES = /* @__PURE__ */ new Map([
17889
18202
  [
@@ -18651,7 +18964,7 @@ function swiftSubmoduleImports(sources) {
18651
18964
  }
18652
18965
  return imports2;
18653
18966
  }
18654
- function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
18967
+ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set(), swiftHeader) {
18655
18968
  const header = (file) => `header ${JSON.stringify(file)}`;
18656
18969
  const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
18657
18970
  return [
@@ -18659,6 +18972,7 @@ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new S
18659
18972
  ...headers.map(
18660
18973
  (file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
18661
18974
  ),
18975
+ ...swiftHeader ? [" module Swift {", ` ${header(swiftHeader)}`, " requires objc", " }"] : [],
18662
18976
  " export *",
18663
18977
  "}",
18664
18978
  ""
@@ -19934,6 +20248,7 @@ ${release}
19934
20248
  `);
19935
20249
  hash.update(compilerSourceDigest);
19936
20250
  if (input.oneModule) hash.update("one-module\n");
20251
+ if (KEEP_WASM_NAMES) hash.update("names\n");
19937
20252
  hash.update(swiftModuleDigest(moduleRoot));
19938
20253
  if (input.optimize) hash.update(`optimize
19939
20254
  ${WASM_OPTIMIZE_IDENTITY}
@@ -20045,7 +20360,14 @@ function toolsetOrdersLibcxxBeforeDarwinOverlay(options) {
20045
20360
  return libcxx >= 0 && overlay > libcxx;
20046
20361
  }
20047
20362
  function emitSwiftPackageManifest(args) {
20048
- const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
20363
+ const {
20364
+ targets,
20365
+ siblings,
20366
+ moduleRoot,
20367
+ oneModule,
20368
+ gameProducts: gameProducts2 = [],
20369
+ distribution
20370
+ } = args;
20049
20371
  const prebuilt = args.prebuilt;
20050
20372
  const linkedObjects = Boolean(distribution || prebuilt);
20051
20373
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
@@ -20074,9 +20396,8 @@ function emitSwiftPackageManifest(args) {
20074
20396
  for (const name3 of [...siblings.values()].flat())
20075
20397
  if (OPTIONAL_FRAMEWORKS.has(name3) && !targets.some((target) => target.name === name3))
20076
20398
  reach(name3);
20077
- if (spriteKit) {
20078
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
20079
- }
20399
+ for (const product of gameProducts2)
20400
+ for (const name3 of GAME_REACH[product] ?? []) reach(name3);
20080
20401
  let distributionLinkPath;
20081
20402
  const distributionLink = args.distributionLink;
20082
20403
  if (distribution && distributionLink) {
@@ -20099,7 +20420,7 @@ function emitSwiftPackageManifest(args) {
20099
20420
  (object6) => !isProvider(object6) && !replacedObjects.has(object6)
20100
20421
  );
20101
20422
  const objects = available.filter(
20102
- (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, "SpriteKit", "PeachBox2D"].every(
20423
+ (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, ...GAME_FAMILY, "PeachBox2D"].every(
20103
20424
  (name3) => !object6.startsWith(`lib/${name3}-`) || reachedFrameworks.has(name3)
20104
20425
  )
20105
20426
  );
@@ -20216,6 +20537,10 @@ function emitSwiftPackageManifest(args) {
20216
20537
  includeImportContext(dependency);
20217
20538
  const importedNativeFlags = [
20218
20539
  ...args.nativeImportFlags?.get(target.name) ?? [],
20540
+ ...[...importContext].flatMap((name3) => {
20541
+ const map2 = name3 === target.name ? void 0 : args.nativeSwiftHeaderMaps?.get(name3);
20542
+ return map2 ? ["-fmodule-map-file=" + map2] : [];
20543
+ }),
20219
20544
  ...[...importContext].flatMap((name3) => args.native?.get(name3)?.importFlags ?? []),
20220
20545
  ...[...importContext].flatMap((name3) => {
20221
20546
  const flags = targets.find((target2) => target2.name === name3)?.swiftFlags ?? [];
@@ -20258,7 +20583,7 @@ function emitSwiftPackageManifest(args) {
20258
20583
  ...linkedObjects || clang && !target.executable ? [] : [
20259
20584
  '.product(name: "SwiftUI", package: "sootsim-swift")',
20260
20585
  ...oneModule ? [ONE_PRODUCT] : [],
20261
- ...spriteKit ? [SPRITEKIT_PRODUCT] : []
20586
+ ...gameProducts2.map(gameProduct)
20262
20587
  ],
20263
20588
  ...(siblings.get(target.name) ?? []).flatMap(
20264
20589
  (dependency) => clang && // textual native headers can include one another without imposing
@@ -20290,7 +20615,7 @@ function emitSwiftPackageManifest(args) {
20290
20615
  .unsafeFlags(${flagArray(`[
20291
20616
  ${REACTOR_FLAG}${executableLinkFlags(args.root)} "-Xlinker", "--export-if-defined=__main_argc_argv"${library},
20292
20617
  ]`)}),
20293
- .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
20618
+ ${KEEP_WASM_NAMES ? "" : '.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),'}
20294
20619
  ]` : librarySettings.length > 0 ? `,
20295
20620
  linkerSettings: [${librarySettings.join(", ")}]` : "";
20296
20621
  const cDefines = macroSettings(target.cDefines);
@@ -21478,6 +21803,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
21478
21803
  )
21479
21804
  );
21480
21805
  const importModuleMaps = /* @__PURE__ */ new Map();
21806
+ const sourceModuleMaps = /* @__PURE__ */ new Map();
21481
21807
  const generatedModuleMaps = [];
21482
21808
  for (const target of targets) {
21483
21809
  const prefix = target.path === "." ? "" : `${target.path}/`;
@@ -21712,6 +22038,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
21712
22038
  stageTargetFile(target.name, import_node_path47.default.join(layout2.root, modulemap), moduleContents, {
21713
22039
  allowExisting: true
21714
22040
  });
22041
+ sourceModuleMaps.set(swiftTargetModuleName(target.name), {
22042
+ path: import_node_path47.default.join(layout2.root, modulemap),
22043
+ contents: moduleContents.toString()
22044
+ });
21715
22045
  if (modulemap.endsWith("/Modules/module.modulemap")) {
21716
22046
  const framework = import_node_path47.default.posix.dirname(import_node_path47.default.posix.dirname(modulemap));
21717
22047
  for (const [, header] of moduleContents.toString().matchAll(/\bheader\s+"([^"]+)"/g))
@@ -21986,6 +22316,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
21986
22316
  if (native.size > 0) (0, import_node_fs50.mkdirSync)(headerDirectory, { recursive: true });
21987
22317
  const headerAliasFlags = Object.keys(input.headerAliases ?? {}).length > 0 ? ["-ivfsoverlay", headerSearch.files[0]] : [];
21988
22318
  const nativeHeaderFlags = [...headerAliasFlags];
22319
+ const nativeSwiftHeaderMaps = /* @__PURE__ */ new Map();
21989
22320
  const originalMaps = /* @__PURE__ */ new Map();
21990
22321
  for (const target of input.nativeTargets ?? []) {
21991
22322
  for (const flag of [...target.flags, ...target.cxxFlags]) {
@@ -22016,30 +22347,33 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
22016
22347
  );
22017
22348
  const moduleName = swiftTargetModuleName(name3);
22018
22349
  const originalMap = originalMaps.get(moduleName);
22019
- const originalTokens = originalMap ? moduleMapTokens(input.files[originalMap]) : [];
22020
- if (originalMap && originalTokens.some(
22350
+ const stagedMap = sourceModuleMaps.get(moduleName);
22351
+ const originalPath = originalMap ? import_node_path47.default.join(layout2.root, originalMap) : stagedMap?.path;
22352
+ const originalContents = originalMap ? input.files[originalMap] : stagedMap?.contents;
22353
+ const originalTokens = originalContents ? moduleMapTokens(originalContents) : [];
22354
+ if (originalPath && originalTokens.some(
22021
22355
  (token, index) => token === "module" && (originalTokens[index + 1] === "Swift" || originalTokens[index + 1] === `${moduleName}.Swift`)
22022
22356
  )) {
22023
- nativeHeaderFlags.push("-fmodule-map-file=" + import_node_path47.default.join(layout2.root, originalMap));
22357
+ nativeHeaderFlags.push("-fmodule-map-file=" + originalPath);
22358
+ nativeSwiftHeaderMaps.set(name3, originalPath);
22024
22359
  continue;
22025
22360
  }
22026
22361
  files2.set(
22027
22362
  modulemap,
22028
- originalMap ? `extern module ${moduleName} ${JSON.stringify(import_node_path47.default.join(layout2.root, originalMap))}
22363
+ originalPath ? `extern module ${moduleName} ${JSON.stringify(originalPath)}
22029
22364
  module ${moduleName}.Swift {
22030
22365
  header ${JSON.stringify(import_node_path47.default.join(headerDirectory, name3 + "-Swift.h"))}
22031
22366
  requires objc
22032
22367
  }
22033
22368
  ` : swiftObjCModuleMap(
22034
22369
  moduleName,
22035
- [
22036
- ...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path47.default.join(layout2.root, header)),
22037
- import_node_path47.default.join(headerDirectory, name3 + "-Swift.h")
22038
- ],
22039
- submoduleImports.get(moduleName)
22370
+ (input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path47.default.join(layout2.root, header)),
22371
+ submoduleImports.get(moduleName),
22372
+ import_node_path47.default.join(headerDirectory, name3 + "-Swift.h")
22040
22373
  )
22041
22374
  );
22042
22375
  nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
22376
+ nativeSwiftHeaderMaps.set(name3, modulemap);
22043
22377
  }
22044
22378
  const modulePlan = (0, import_node_crypto21.createHash)("sha256").update(
22045
22379
  swiftModuleInputFiles(moduleRoot).join("\n")
@@ -22290,14 +22624,17 @@ module ${moduleName}.Swift {
22290
22624
  manifest = manifest.replace(product, `${product}
22291
22625
  ${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
22292
22626
  }
22293
- if (importsSpriteKit(input.files)) {
22627
+ const games = gameProducts(input.files);
22628
+ if (games.length > 0) {
22294
22629
  const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
22295
22630
  if (!manifest.includes(anchor))
22296
22631
  throw new Error(
22297
- "scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
22632
+ "scripts/contrast-app-Package.swift lost the line the game products link at"
22298
22633
  );
22299
- manifest = manifest.replace(anchor, `${anchor}
22300
- ${SPRITEKIT_PRODUCT},`);
22634
+ manifest = manifest.replace(
22635
+ anchor,
22636
+ [anchor, ...games.map((name3) => `${gameProduct(name3)},`)].join("\n ")
22637
+ );
22301
22638
  }
22302
22639
  files2.set(import_node_path47.default.join(layout2.root, "Package.swift"), manifest + moduleFiles);
22303
22640
  } else {
@@ -22396,6 +22733,7 @@ module ${moduleName}.Swift {
22396
22733
  nativeFlags,
22397
22734
  nativeImportFlags,
22398
22735
  nativeHeaderFlags,
22736
+ nativeSwiftHeaderMaps,
22399
22737
  nativeHeaderDeclarations,
22400
22738
  objcImplementationModules: new Set(
22401
22739
  targets.filter(
@@ -22411,7 +22749,7 @@ module ${moduleName}.Swift {
22411
22749
  siblings: moduleSiblings,
22412
22750
  moduleRoot,
22413
22751
  oneModule: input.oneModule,
22414
- spriteKit: importsSpriteKit(input.files),
22752
+ gameProducts: gameProducts(input.files),
22415
22753
  distribution: distribution ?? void 0,
22416
22754
  moduleExcludes,
22417
22755
  deferDarwinOverlay: native.size > 0 && toolsetOrdersLibcxxBeforeDarwinOverlay(
@@ -22553,30 +22891,30 @@ module ${moduleName}.Swift {
22553
22891
  )
22554
22892
  ])
22555
22893
  );
22894
+ const producerSet = /* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers]);
22895
+ const orderedProducers = [];
22556
22896
  const included = /* @__PURE__ */ new Set();
22557
22897
  const include = (name3) => {
22558
22898
  if (included.has(name3)) return;
22559
22899
  included.add(name3);
22560
22900
  for (const dependency of dependencies.get(name3) ?? []) include(dependency);
22901
+ if (producerSet.has(name3)) orderedProducers.push(name3);
22561
22902
  };
22562
- for (const producer of producers)
22903
+ for (const producer of producerSet)
22563
22904
  for (const dependency of dependencies.get(producer) ?? []) include(dependency);
22905
+ const needsHeaderStages = [...producerSet].some((name3) => included.has(name3));
22906
+ for (const producer of producerSet) include(producer);
22564
22907
  return {
22565
22908
  nativeBuildTargets: [...native].flatMap(([name3, plan]) => [
22566
22909
  ...!plan.mixed && plan.sources.length > 0 ? [name3] : [],
22567
22910
  ...plan.groups?.map((group) => group.name) ?? (plan.late ? [plan.late.name] : [])
22568
22911
  ]),
22569
- headerProducers: [
22570
- .../* @__PURE__ */ new Set([
22571
- ...Object.keys(nativeHeaderDeclarations),
22572
- ...producers.filter((name3) => !included.has(name3))
22573
- ])
22574
- ],
22912
+ headerProducers: orderedProducers,
22575
22913
  emittedHeaderProducers: [
22576
22914
  .../* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers])
22577
22915
  ],
22578
22916
  nativeHeaderDeclarations,
22579
- headerProductTarget,
22917
+ headerProductTarget: needsHeaderStages ? void 0 : headerProductTarget,
22580
22918
  targetFailures,
22581
22919
  generatedOwners,
22582
22920
  targetToolset
@@ -22810,14 +23148,9 @@ function linkedFrameworkTargets(moduleRoot, input) {
22810
23148
  ))
22811
23149
  reach(match[1]);
22812
23150
  }
22813
- if (importsSpriteKit(input.files))
22814
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
22815
- const wanted = [
22816
- "PeachApp",
22817
- ...input.oneModule ? ["One"] : [],
22818
- ...importsSpriteKit(input.files) ? ["SpriteKit"] : [],
22819
- ...reached
22820
- ];
23151
+ const games = gameProducts(input.files);
23152
+ for (const product of games) for (const name3 of GAME_REACH[product] ?? []) reach(name3);
23153
+ const wanted = ["PeachApp", ...input.oneModule ? ["One"] : [], ...games, ...reached];
22821
23154
  const linked = [...new Set(wanted)].filter((name3) => libraries.has(name3));
22822
23155
  if (!linked.includes("PeachApp"))
22823
23156
  throw new Error("swift-compile: the framework package declares no PeachApp library");
@@ -23720,7 +24053,7 @@ function compileSwiftProjectOnce(input, options) {
23720
24053
  options.signal
23721
24054
  );
23722
24055
  }
23723
- var import_node_child_process27, import_node_crypto21, import_node_fs50, import_node_os11, import_node_path47, 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;
24056
+ var import_node_child_process27, import_node_crypto21, import_node_fs50, import_node_os11, import_node_path47, 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;
23724
24057
  var init_swift_compile = __esm({
23725
24058
  "src/swift-compile.ts"() {
23726
24059
  "use strict";
@@ -23763,7 +24096,10 @@ var init_swift_compile = __esm({
23763
24096
  SWIFTPM_NOISE = /^(?:\[\d+\/\d+\] |Building for production\.\.\.$|warning: '--build-system native' has been deprecated)/;
23764
24097
  SWIFT_BUILDER_TRANSPORT_MARGIN_MS = 3e5;
23765
24098
  SWIFT_BUILDER_DEFAULT_COMPILE_MS = 18e5;
23766
- 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, "");
24099
+ clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
24100
+ /^@import (?:CoreFoundation|FoundationNetworking);$/gm,
24101
+ "@import Foundation;"
24102
+ ).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
23767
24103
  swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
23768
24104
  ...[
23769
24105
  ...header.matchAll(
@@ -23791,7 +24127,8 @@ var init_swift_compile = __esm({
23791
24127
  PeachCFNetwork: [],
23792
24128
  JavaScriptCore: ["PeachJavaScriptCore"],
23793
24129
  PeachJavaScriptCore: [],
23794
- GameplayKit: [],
24130
+ // GameplayKit names SpriteKit and SceneKit nodes, as on iOS
24131
+ GameplayKit: ["SpriteKit", "SceneKit", "PeachBox2D", "simd", "GLKit"],
23795
24132
  simd: [],
23796
24133
  ModelIO: ["simd"],
23797
24134
  GLKit: ["ModelIO"],
@@ -23903,10 +24240,21 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
23903
24240
  }
23904
24241
  ];
23905
24242
  ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
23906
- SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
23907
- importsSpriteKit = (files2) => Object.entries(files2).some(
23908
- ([file, contents]) => file.endsWith(".swift") && swiftImportNames(contents).includes("SpriteKit")
23909
- );
24243
+ GAME_FAMILY = ["SpriteKit", "SceneKit"];
24244
+ gameProducts = (files2) => {
24245
+ const imported = new Set(
24246
+ Object.entries(files2).flatMap(
24247
+ ([file, contents]) => file.endsWith(".swift") ? swiftImportNames(contents) : []
24248
+ )
24249
+ );
24250
+ if (imported.has("SceneKit")) return [...GAME_FAMILY];
24251
+ return imported.has("SpriteKit") ? ["SpriteKit"] : [];
24252
+ };
24253
+ gameProduct = (name3) => `.product(name: "${name3}", package: "sootsim-swift")`;
24254
+ GAME_REACH = {
24255
+ SpriteKit: ["SpriteKit", "PeachBox2D", "simd", "GLKit"],
24256
+ SceneKit: ["SceneKit"]
24257
+ };
23910
24258
  FOUNDATION_IMPLICIT_MODULES = [
23911
24259
  "PeachObjC",
23912
24260
  "Dispatch",
@@ -23933,7 +24281,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
23933
24281
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
23934
24282
  MULTI_MANIFEST_VERSION = 68;
23935
24283
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
23936
- compilerSourceDigest = true ? "0a0bc1c871aee83ea273120655f55a43ddccde646478a452b4c73d2daefd58c3" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
24284
+ compilerSourceDigest = true ? "eba60b7a2e9485f928a6ec2e544e10d84b2b33430be66b9e069c9797a927af86" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
23937
24285
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
23938
24286
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
23939
24287
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -24264,8 +24612,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
24264
24612
  "NSURLProtectionSpaceHTTPS",
24265
24613
  "NSURLProtectionSpaceHTTPSProxy",
24266
24614
  "NSURLProtectionSpaceSOCKSProxy",
24267
- "NSURLSessionDownloadTaskResumeData",
24268
- "NSURLSessionTransferSizeUnknown",
24269
24615
  "NSURLSessionUploadTaskResumeData",
24270
24616
  "NSUTF16BigEndianStringEncoding",
24271
24617
  "NSUTF16LittleEndianStringEncoding",
@@ -26427,6 +26773,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
26427
26773
  const allSources = /* @__PURE__ */ new Set();
26428
26774
  const headers = /* @__PURE__ */ new Set();
26429
26775
  const resources = /* @__PURE__ */ new Set();
26776
+ const resourceNames = {};
26430
26777
  const scriptForOutput = /* @__PURE__ */ new Map();
26431
26778
  const copiedFiles = [];
26432
26779
  let generatedInfoPlist = false;
@@ -26596,13 +26943,14 @@ ${output2}`
26596
26943
  xcodePathResolver(project.objects, project.projectDir, import_node_path51.default.join, settings),
26597
26944
  (file) => isDirectory(file) ? walkFiles(file) : import_node_fs53.default.existsSync(file) ? [file] : [],
26598
26945
  import_node_path51.default.join,
26599
- (file, kind) => {
26946
+ (file, kind, bundleName) => {
26600
26947
  if (kind === "header") {
26601
26948
  headers.add(file);
26602
26949
  return;
26603
26950
  }
26604
26951
  if (kind === "resource") {
26605
26952
  resources.add(file);
26953
+ if (bundleName) resourceNames[file] = bundleName;
26606
26954
  return;
26607
26955
  }
26608
26956
  if (!import_node_fs53.default.existsSync(file)) {
@@ -26726,6 +27074,7 @@ ${output2}`
26726
27074
  return {
26727
27075
  sources: [...sources].sort(),
26728
27076
  resources: [...resources].sort(),
27077
+ resourceNames,
26729
27078
  copiedFiles,
26730
27079
  generatedInfoPlist,
26731
27080
  allSources: [...allSources].sort(),
@@ -27787,10 +28136,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
27787
28136
  byProduct.has(import_node_path51.default.basename(rawPath)))
27788
28137
  continue;
27789
28138
  const resolved = fileId ? project.resolvePath(fileId) : null;
27790
- if (fileId && resolved !== null && !import_node_fs53.default.existsSync(resolved))
27791
- throw new Error(
27792
- `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
27793
- );
28139
+ if (fileId && resolved !== null && !import_node_fs53.default.existsSync(resolved)) {
28140
+ if (!ios_sdk_frameworks_default.frameworks.includes(name3))
28141
+ throw new Error(
28142
+ `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
28143
+ );
28144
+ sdkFrameworks.add(name3);
28145
+ continue;
28146
+ }
27794
28147
  if (!binaryFrameworks.get(name3)) binaryFrameworks.set(name3, resolved);
27795
28148
  }
27796
28149
  }
@@ -27867,7 +28220,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
27867
28220
  ...linkedProducts.flatMap(
27868
28221
  ({ source }) => source.kind === "local" && import_node_fs53.default.existsSync(source.dir) ? [source.dir] : []
27869
28222
  ),
27870
- ...new Set(podSourceDirs)
28223
+ ...new Set(podSourceDirs),
28224
+ // a target's own files may sit beside the project, such as an asset
28225
+ // catalog one folder up, and xcode builds them from there
28226
+ ...new Set(
28227
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs53.default.existsSync(file)).map((file) => import_node_path51.default.dirname(file))
28228
+ )
27871
28229
  ].map((dir) => import_node_fs53.default.realpathSync.native(dir))
27872
28230
  ),
27873
28231
  projectFiles: [
@@ -27912,6 +28270,7 @@ var init_xcode_project = __esm({
27912
28270
  import_node_fs53 = __toESM(require("node:fs"), 1);
27913
28271
  import_node_path51 = __toESM(require("node:path"), 1);
27914
28272
  import_plist2 = __toESM(require("plist"), 1);
28273
+ init_ios_sdk_frameworks();
27915
28274
  init_is_record();
27916
28275
  init_native_app_identity();
27917
28276
  init_prepared_xcode_phases();
@@ -28053,7 +28412,7 @@ var init_swift_standin_digest = __esm({
28053
28412
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
28054
28413
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
28055
28414
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
28056
- STANDIN_SOURCE_DIGEST = true ? "c0f609da62368c513c186d23bc8aa8e450d27efae5b8c2e7cdf50d34fa734ff0" : standinSourceDigest();
28415
+ STANDIN_SOURCE_DIGEST = true ? "1a62599378cd7cdf32385f588eb3f983f07ea222d145ec5b6dc34cce9104f46c" : standinSourceDigest();
28057
28416
  }
28058
28417
  });
28059
28418
 
@@ -35745,302 +36104,6 @@ var init_core_data_entity_classes = __esm({
35745
36104
  }
35746
36105
  });
35747
36106
 
35748
- // src/ios-sdk-frameworks.json
35749
- var ios_sdk_frameworks_default;
35750
- var init_ios_sdk_frameworks = __esm({
35751
- "src/ios-sdk-frameworks.json"() {
35752
- ios_sdk_frameworks_default = {
35753
- sdk: "iphonesimulator27.1",
35754
- frameworks: [
35755
- "ARKit",
35756
- "AVFAudio",
35757
- "AVFoundation",
35758
- "AVKit",
35759
- "AVRouting",
35760
- "Accelerate",
35761
- "Accessibility",
35762
- "AccessoryLiveActivities",
35763
- "AccessoryNotifications",
35764
- "AccessorySetupKit",
35765
- "AccessoryTransportExtension",
35766
- "Accounts",
35767
- "ActivityKit",
35768
- "AdAttributionKit",
35769
- "AdServices",
35770
- "AdSupport",
35771
- "AddressBook",
35772
- "AddressBookUI",
35773
- "AlarmKit",
35774
- "AppClip",
35775
- "AppIntents",
35776
- "AppIntentsTypeSupport",
35777
- "AppMigrationKit",
35778
- "AppTrackingTransparency",
35779
- "AssetsLibrary",
35780
- "AudioToolbox",
35781
- "AudioUnit",
35782
- "AuthenticationServices",
35783
- "AutomatedDeviceEnrollment",
35784
- "AutomaticAssessmentConfiguration",
35785
- "BackgroundAssets",
35786
- "BackgroundTasks",
35787
- "BrowserEngineCore",
35788
- "BrowserEngineKit",
35789
- "BrowserKit",
35790
- "BusinessChat",
35791
- "CFNetwork",
35792
- "CallKit",
35793
- "CarKey",
35794
- "CarPlay",
35795
- "Charts",
35796
- "ClassKit",
35797
- "ClassKitUI",
35798
- "ClockKit",
35799
- "CloudKit",
35800
- "ColorSync",
35801
- "Combine",
35802
- "ComputeGraph",
35803
- "ContactProvider",
35804
- "Contacts",
35805
- "ContactsUI",
35806
- "CoreAudio",
35807
- "CoreAudioKit",
35808
- "CoreAudioTypes",
35809
- "CoreBluetooth",
35810
- "CoreData",
35811
- "CoreFoundation",
35812
- "CoreGraphics",
35813
- "CoreHaptics",
35814
- "CoreImage",
35815
- "CoreLocation",
35816
- "CoreLocationUI",
35817
- "CoreMIDI",
35818
- "CoreML",
35819
- "CoreMedia",
35820
- "CoreMotion",
35821
- "CoreNFC",
35822
- "CoreServices",
35823
- "CoreSpotlight",
35824
- "CoreTelephony",
35825
- "CoreText",
35826
- "CoreTransferable",
35827
- "CoreVideo",
35828
- "CreateMLComponents",
35829
- "CryptoKit",
35830
- "CryptoTokenKit",
35831
- "DataDetection",
35832
- "DeclaredAgeRange",
35833
- "DeveloperToolsSupport",
35834
- "DeviceActivity",
35835
- "DeviceCheck",
35836
- "DeviceDiscoveryExtension",
35837
- "DeviceDiscoveryUI",
35838
- "EnergyKit",
35839
- "EventKit",
35840
- "EventKitUI",
35841
- "ExposureNotification",
35842
- "ExtensionFoundation",
35843
- "ExtensionKit",
35844
- "ExternalAccessory",
35845
- "FamilyControls",
35846
- "FileProvider",
35847
- "FileProviderUI",
35848
- "FinanceKit",
35849
- "FinanceKitUI",
35850
- "Foundation",
35851
- "FoundationModels",
35852
- "GLKit",
35853
- "GSS",
35854
- "GameController",
35855
- "GameKit",
35856
- "GameSave",
35857
- "GameplayKit",
35858
- "GeoToolbox",
35859
- "GroupActivities",
35860
- "HealthKit",
35861
- "HealthKitUI",
35862
- "HomeKit",
35863
- "IOKit",
35864
- "IOSurface",
35865
- "IdentityDocumentServices",
35866
- "IdentityDocumentServicesUI",
35867
- "IdentityLookup",
35868
- "IdentityLookupUI",
35869
- "ImageCaptureCore",
35870
- "ImageIO",
35871
- "ImagePlayground",
35872
- "ImmersiveMediaSupport",
35873
- "Intents",
35874
- "IntentsUI",
35875
- "JavaScriptCore",
35876
- "LinkPresentation",
35877
- "LinkSecurity",
35878
- "LiveCommunicationKit",
35879
- "LocalAuthentication",
35880
- "LocalAuthenticationEmbeddedUI",
35881
- "LockedCameraCapture",
35882
- "ManagedApp",
35883
- "ManagedAppDistribution",
35884
- "ManagedSettings",
35885
- "ManagedSettingsUI",
35886
- "MapKit",
35887
- "MarketplaceKit",
35888
- "Matter",
35889
- "MatterSupport",
35890
- "MediaAccessibility",
35891
- "MediaIntelligence",
35892
- "MediaIntents",
35893
- "MediaPlayer",
35894
- "MediaToolbox",
35895
- "MessageUI",
35896
- "Messages",
35897
- "Metal",
35898
- "MetalKit",
35899
- "MetalPerformancePrimitives",
35900
- "MetalPerformanceShaders",
35901
- "MetalPerformanceShadersGraph",
35902
- "MetricKit",
35903
- "MobileCoreServices",
35904
- "ModelIO",
35905
- "MultipeerConnectivity",
35906
- "MusicKit",
35907
- "MusicUnderstanding",
35908
- "NaturalLanguage",
35909
- "NearbyInteraction",
35910
- "Network",
35911
- "NetworkExtension",
35912
- "NotificationCenter",
35913
- "NowPlaying",
35914
- "OSLog",
35915
- "OpenAL",
35916
- "OpenGLES",
35917
- "PDFKit",
35918
- "PHASE",
35919
- "PaperKit",
35920
- "PassKit",
35921
- "PencilKit",
35922
- "PermissionKit",
35923
- "Photos",
35924
- "PhotosUI",
35925
- "ProximityReader",
35926
- "PushKit",
35927
- "PushToTalk",
35928
- "QuartzCore",
35929
- "QuickLook",
35930
- "QuickLookThumbnailing",
35931
- "RealityFoundation",
35932
- "RealityKit",
35933
- "RelevanceKit",
35934
- "ReplayKit",
35935
- "RoomPlan",
35936
- "SafariServices",
35937
- "SafetyKit",
35938
- "SceneKit",
35939
- "ScreenTime",
35940
- "SecureElementCredential",
35941
- "Security",
35942
- "SecurityUI",
35943
- "SensitiveContentAnalysis",
35944
- "SensorKit",
35945
- "ServicesAccountLinking",
35946
- "SharedWithYou",
35947
- "SharedWithYouCore",
35948
- "ShazamKit",
35949
- "Social",
35950
- "SoundAnalysis",
35951
- "Speech",
35952
- "SpriteKit",
35953
- "StateReporting",
35954
- "StoreKit",
35955
- "SuggestedActions",
35956
- "SwiftData",
35957
- "SwiftUI",
35958
- "SwiftUICore",
35959
- "Symbols",
35960
- "SystemConfiguration",
35961
- "SystemExtensions",
35962
- "TabularData",
35963
- "TelephonyMessagingKit",
35964
- "TipKit",
35965
- "TouchController",
35966
- "Translation",
35967
- "TranslationUIProvider",
35968
- "TrustInsights",
35969
- "Twitter",
35970
- "UIKit",
35971
- "USDKit",
35972
- "UniformTypeIdentifiers",
35973
- "UserNotifications",
35974
- "UserNotificationsUI",
35975
- "VideoSubscriberAccount",
35976
- "VideoToolbox",
35977
- "Vision",
35978
- "VisionKit",
35979
- "WatchConnectivity",
35980
- "WeatherKit",
35981
- "WebKit",
35982
- "WiFiAware",
35983
- "WidgetKit",
35984
- "WorkoutKit",
35985
- "_AVKit_SwiftUI",
35986
- "_AdAttributionKit_StoreKit",
35987
- "_AppIntents_HealthKit",
35988
- "_AppIntents_SwiftUI",
35989
- "_AppIntents_UIKit",
35990
- "_AuthenticationServices_SwiftUI",
35991
- "_Contacts_AppIntents",
35992
- "_CoreData_CloudKit",
35993
- "_CoreLocationUI_SwiftUI",
35994
- "_CoreNFC_UIKit",
35995
- "_CoreSpotlight_FoundationModels",
35996
- "_DataDetection_SwiftUI",
35997
- "_DeviceActivity_SwiftUI",
35998
- "_DeviceDiscoveryUI_SwiftUI",
35999
- "_FinanceKit_AppIntents",
36000
- "_FoundationModels_SwiftUI",
36001
- "_FoundationModels_UIKit",
36002
- "_GameController_SwiftUI",
36003
- "_GeoToolbox_AppIntents",
36004
- "_GroupActivities_UIKit",
36005
- "_HomeKit_SwiftUI",
36006
- "_Intents_TipKit",
36007
- "_LinkPresentation_AppIntents",
36008
- "_LocationEssentials",
36009
- "_MapKit_SwiftUI",
36010
- "_MarketplaceKit_UIKit",
36011
- "_MediaIntents_AppIntents",
36012
- "_MediaPlayer_AppIntents",
36013
- "_MusicKit_SwiftUI",
36014
- "_NowPlaying_AppIntents",
36015
- "_PassKit_SwiftUI",
36016
- "_PermissionKit_SwiftUI",
36017
- "_PermissionKit_UIKit",
36018
- "_PhotosUI_SwiftUI",
36019
- "_PhotosUI_WidgetKit",
36020
- "_Photos_AppIntents",
36021
- "_QuickLook_SwiftUI",
36022
- "_RealityKit_ComputeGraph",
36023
- "_RealityKit_SwiftUI",
36024
- "_RelevanceKit_MapKit",
36025
- "_SceneKit_SwiftUI",
36026
- "_SecureElementCredential_SwiftUI",
36027
- "_SecureElementCredential_UIKit",
36028
- "_SharedWithYou_AppIntents",
36029
- "_SpriteKit_SwiftUI",
36030
- "_StoreKit_SwiftUI",
36031
- "_SwiftData_CoreData",
36032
- "_SwiftData_SwiftUI",
36033
- "_Translation_SwiftUI",
36034
- "_USDKit_RealityKit",
36035
- "_UserNotifications_AppIntents",
36036
- "_WebKit_SwiftUI",
36037
- "_WorkoutKit_SwiftUI",
36038
- "iAd"
36039
- ]
36040
- };
36041
- }
36042
- });
36043
-
36044
36107
  // src/swift-cxx-reachable.ts
36045
36108
  function cxxTrace(stderr) {
36046
36109
  const files2 = [];
@@ -37560,6 +37623,17 @@ function isPackageSource(file) {
37560
37623
  function sourceFiles(root) {
37561
37624
  return packageFiles(root, false).filter(isPackageSource);
37562
37625
  }
37626
+ function xcodeFlatResources(app) {
37627
+ if (!app) return /* @__PURE__ */ new Set();
37628
+ return new Set(
37629
+ app.resources.filter(
37630
+ (file) => !Object.hasOwn(app.resourceNames, file) && !file.split(import_node_path77.default.sep).some((segment) => segment.endsWith(".xcassets"))
37631
+ )
37632
+ );
37633
+ }
37634
+ function bundleResourcePath(flatResources, disk, file) {
37635
+ return flatResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37636
+ }
37563
37637
  function resourceCandidateFiles(root) {
37564
37638
  return packageFiles(root, false).filter(
37565
37639
  (file) => !isPackageSource(file) && !file.endsWith(".xcconfig") && !["project.pbxproj", "project.xcproj", "Package.resolved"].includes(
@@ -37632,12 +37706,24 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
37632
37706
  const disk = byRelative.get(file);
37633
37707
  return !disk || !layout2?.targetDirs.get(disk)?.startsWith(`${XCODE_FRAMEWORKS_DIR}/`);
37634
37708
  });
37635
- const found = enumerateBundleImages(relative3, readContents2, (file) => {
37636
- const disk = byRelative.get(file);
37637
- if (!disk) throw new Error(`image source ${file} has no input file`);
37638
- const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37639
- return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37640
- });
37709
+ const flatResources = xcodeFlatResources(layout2?.app);
37710
+ const bundled = new Map(
37711
+ relative3.map((file) => [
37712
+ bundleResourcePath(flatResources, byRelative.get(file), file),
37713
+ file
37714
+ ])
37715
+ );
37716
+ const found = enumerateBundleImages(
37717
+ [...bundled.keys()],
37718
+ (file) => readContents2(bundled.get(file) ?? file),
37719
+ (marked) => {
37720
+ const file = bundled.get(marked) ?? marked;
37721
+ const disk = byRelative.get(file);
37722
+ if (!disk) throw new Error(`image source ${file} has no input file`);
37723
+ const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37724
+ return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37725
+ }
37726
+ ).map((image) => ({ ...image, file: bundled.get(image.file) ?? image.file }));
37641
37727
  const colors = enumerateBundleColors(catalogFiles, readContents2);
37642
37728
  const symbols = enumerateBundleSymbols(catalogFiles, readContents2, (file) => {
37643
37729
  const disk = byRelative.get(file);
@@ -37821,15 +37907,20 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
37821
37907
  }
37822
37908
  }
37823
37909
  const groups = /* @__PURE__ */ new Map();
37824
- const appResources = new Set(xcode?.app.resources ?? []);
37910
+ const flatResources = xcodeFlatResources(xcode?.app);
37825
37911
  for (const file of relative3) {
37826
37912
  const disk = import_node_path77.default.join(packagePath, ...file.split("/"));
37913
+ const folderName = xcode?.app.resourceNames[disk];
37914
+ if (folderName) {
37915
+ watched.push(file);
37916
+ addFile(folderName, readPackageFile2(packagePath, disk, limits.resourceBytes));
37917
+ continue;
37918
+ }
37827
37919
  const key2 = xcode ? xcodeInputKey(xcode, disk, file) : file;
37828
37920
  const bundle = swiftResourceBundleForFile(bundles, key2);
37829
37921
  const bundlePath = bundle?.path ?? ".";
37830
37922
  const group = groups.get(bundlePath) ?? /* @__PURE__ */ new Map();
37831
- const resource = appResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37832
- group.set(resource, disk);
37923
+ group.set(bundleResourcePath(flatResources, disk, file), disk);
37833
37924
  groups.set(bundlePath, group);
37834
37925
  }
37835
37926
  for (const bundle of bundles) {
@@ -47179,7 +47270,7 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
47179
47270
  listed.stdout.split("\0").filter(Boolean).map((entry) => entry.replace(/\/$/, ""))
47180
47271
  );
47181
47272
  const ignoreFiles = /* @__PURE__ */ new Map();
47182
- return (relative3) => {
47273
+ return (relative3, knownDirectory) => {
47183
47274
  const parts = relative3.split(import_node_path14.default.sep);
47184
47275
  const linked = linkedPackages.some(
47185
47276
  (directory2) => relative3.startsWith(directory2 + import_node_path14.default.sep)
@@ -47191,16 +47282,16 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
47191
47282
  }
47192
47283
  if (portable && relative3) {
47193
47284
  let excluded = false;
47194
- const isDirectory3 = import_node_fs18.default.lstatSync(import_node_path14.default.join(root, relative3)).isDirectory();
47285
+ const isDirectory3 = knownDirectory ?? import_node_fs18.default.lstatSync(import_node_path14.default.join(root, relative3)).isDirectory();
47195
47286
  for (let index = 0; index < parts.length; index++) {
47196
47287
  const directory2 = parts.slice(0, index).join(import_node_path14.default.sep);
47197
47288
  let rules2 = ignoreFiles.get(directory2);
47198
- if (!rules2) {
47199
- rules2 = (0, import_ignore.default)();
47289
+ if (rules2 === void 0) {
47200
47290
  const file = import_node_path14.default.join(root, directory2, ".gitignore");
47201
- if (import_node_fs18.default.existsSync(file)) rules2.add(import_node_fs18.default.readFileSync(file, "utf8"));
47291
+ rules2 = import_node_fs18.default.existsSync(file) ? (0, import_ignore.default)().add(import_node_fs18.default.readFileSync(file, "utf8")) : null;
47202
47292
  ignoreFiles.set(directory2, rules2);
47203
47293
  }
47294
+ if (!rules2) continue;
47204
47295
  const item = parts.slice(index).join("/");
47205
47296
  const result = rules2.test(isDirectory3 ? `${item}/` : item);
47206
47297
  if (result.ignored) excluded = true;
@@ -47792,7 +47883,7 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
47792
47883
  signal?.throwIfAborted();
47793
47884
  const file = import_node_path57.default.join(directory2, entry.name);
47794
47885
  const relative3 = import_node_path57.default.relative(root, file);
47795
- if (excluded(relative3)) continue;
47886
+ if (excluded(relative3, entry.isDirectory())) continue;
47796
47887
  hash.update(`${relative3}\0`);
47797
47888
  if (entry.isSymbolicLink()) {
47798
47889
  const link = `link\0${await import_node_fs59.default.promises.readlink(file)}\0`;
@@ -47920,8 +48011,10 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
47920
48011
  if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
47921
48012
  return;
47922
48013
  import_node_fs59.default.mkdirSync(import_node_path57.default.dirname(target), { recursive: true });
47923
- import_node_fs59.default.copyFileSync(file, target);
47924
- import_node_fs59.default.utimesSync(target, source.atime, source.mtime);
48014
+ const staged = `${target}.${process.pid}.peach-sync`;
48015
+ import_node_fs59.default.copyFileSync(file, staged);
48016
+ import_node_fs59.default.utimesSync(staged, source.atime, source.mtime);
48017
+ import_node_fs59.default.renameSync(staged, target);
47925
48018
  };
47926
48019
  const walkInstalled = (directory2) => {
47927
48020
  for (const entry of import_node_fs59.default.readdirSync(directory2, { withFileTypes: true })) {
@@ -47939,7 +48032,7 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
47939
48032
  walkInstalled(file);
47940
48033
  continue;
47941
48034
  }
47942
- if (excluded(relative3) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path57.default.join(appRelative, "ios"))
48035
+ if (excluded(relative3, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path57.default.join(appRelative, "ios"))
47943
48036
  continue;
47944
48037
  if (entry.isDirectory()) walk3(file);
47945
48038
  else if (entry.isFile()) {
@@ -48856,7 +48949,7 @@ init_swift_native_pin();
48856
48949
  init_xcode_project();
48857
48950
  var EXPO_NATIVE_ENTRY_NAME = "ios";
48858
48951
  function expoNativeCompilerDigestValue() {
48859
- return true ? "8e765b5dfd0ec93d9027f9d10365ed11f7d85a195d0a888dd1fb76b99195ff2e" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
48952
+ return true ? "db679f96e034ef5a3e217e2553ec748fa11d5dd68cd9247dd7bcae61a03d42a1" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
48860
48953
  }
48861
48954
  var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
48862
48955
  function readSources(value) {