peachsim 0.1.2221 → 0.1.2223

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 (127) hide show
  1. package/cli/commands/compat.ts +4 -4
  2. package/cli/commands/report-issue.ts +1 -1
  3. package/cli/runtime-compat.ts +7 -2
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +461 -369
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +3 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +458 -367
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +681 -562
  34. package/dist-lib/host/fetch-proxy-handler.cjs +10 -7
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +8232 -7815
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +8146 -7737
  50. package/dist-lib/native-app-identity-project.cjs +331 -13
  51. package/dist-lib/native-app-identity-project.mjs +331 -13
  52. package/dist-lib/native-app-identity.cjs +16 -3
  53. package/dist-lib/native-app-identity.mjs +16 -3
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +25 -24
  63. package/dist-lib/public-origins-lib.json +99 -96
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +1 -1
  69. package/dist-lib/sdk.mjs +1 -1
  70. package/dist-lib/skills.cjs +518 -408
  71. package/dist-lib/swift-compile.cjs +69 -36
  72. package/dist-lib/swift-compile.mjs +69 -36
  73. package/dist-lib/swift-package.cjs +1 -1
  74. package/dist-lib/swift-package.mjs +1 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +143 -56
  80. package/dist-lib/vite.cjs +2930 -2800
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +2 -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/shell-tree-wire.d.ts +1 -2
  95. package/dist-types/packages/peach-globals/src/browser-object-url.d.ts +10 -0
  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/UISegmentedControl.h +1 -1
  114. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +1 -1
  115. package/src/cli-runtime.ts +1 -0
  116. package/src/conformance-pixel-comparison.ts +16 -3
  117. package/src/expo-native-workspace.ts +14 -10
  118. package/src/expo-workspace-exclusion.ts +10 -7
  119. package/src/react-native-autolinking.ts +2 -1
  120. package/src/runtime-delivery.ts +7 -0
  121. package/src/swift-compile.ts +51 -35
  122. package/src/swift-coverage/xcode-assets.ts +4 -2
  123. package/src/swift-host.ts +53 -14
  124. package/src/swift-root-lock.ts +27 -4
  125. package/src/wasm-optimize.ts +5 -1
  126. package/src/xcode-project.ts +26 -5
  127. package/src/xcode-target-members.ts +25 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2221 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2223 | (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
  [
@@ -18792,6 +19105,17 @@ function processTable(pid) {
18792
19105
  );
18793
19106
  }
18794
19107
  }
19108
+ async function processTableWithRetry(pid, signal) {
19109
+ for (let attempt = 1; ; attempt++) {
19110
+ try {
19111
+ return processTable(pid);
19112
+ } catch (error) {
19113
+ if (attempt >= INSPECT_ATTEMPTS) throw error;
19114
+ await pause(POLL_MS * attempt, signal);
19115
+ signal?.throwIfAborted();
19116
+ }
19117
+ }
19118
+ }
18795
19119
  function sameProcess(row, identity2) {
18796
19120
  return row.pid === identity2.pid && Math.abs(row.start - identity2.start) <= START_TOLERANCE_MS;
18797
19121
  }
@@ -18866,7 +19190,11 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
18866
19190
  );
18867
19191
  (0, import_node_fs47.mkdirSync)(directory2, { recursive: true });
18868
19192
  const token = (0, import_node_crypto20.randomUUID)();
18869
- const owner = JSON.stringify(ownIdentity(process.pid));
19193
+ const ownRow = (await processTableWithRetry(process.pid, signal)).find(
19194
+ (candidate) => candidate.pid === process.pid && !candidate.zombie
19195
+ );
19196
+ if (!ownRow) throw new Error(`swift root lock cannot find process ${process.pid}`);
19197
+ const owner = JSON.stringify({ pid: process.pid, start: ownRow.start });
18870
19198
  const pending = import_node_path43.default.join(directory2, `pending.${token}`);
18871
19199
  let held = 0;
18872
19200
  for (; ; ) {
@@ -18875,15 +19203,15 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
18875
19203
  const current2 = newest > 0 ? readGeneration(directory2, newest) : null;
18876
19204
  if (newest > 0 && !current2) continue;
18877
19205
  if (current2 && !current2.released) {
18878
- const owner2 = processTable(current2.holder.pid);
18879
- if (owner2.some((row) => !row.zombie && sameProcess(row, current2.holder))) {
19206
+ const holder = await processTableWithRetry(current2.holder.pid, signal);
19207
+ if (holder.some((row) => !row.zombie && sameProcess(row, current2.holder))) {
18880
19208
  if (!wait) return void 0;
18881
19209
  await pause(POLL_MS, signal);
18882
19210
  continue;
18883
19211
  }
18884
19212
  const children2 = readChildren(directory2, newest);
18885
19213
  if (children2.length) {
18886
- const table = processTable();
19214
+ const table = await processTableWithRetry(void 0, signal);
18887
19215
  if (children2.some((child) => groupAlive(table, child))) {
18888
19216
  if (!wait) return void 0;
18889
19217
  await pause(POLL_MS, signal);
@@ -18958,7 +19286,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
18958
19286
  (0, import_node_fs47.writeFileSync)(import_node_path43.default.join(directory2, name2(held, "released")), "");
18959
19287
  }
18960
19288
  }
18961
- var import_node_child_process25, import_node_crypto20, import_node_fs47, import_node_os10, import_node_path43, POLL_MS, START_TOLERANCE_MS, name2;
19289
+ var import_node_child_process25, import_node_crypto20, import_node_fs47, import_node_os10, import_node_path43, POLL_MS, INSPECT_ATTEMPTS, START_TOLERANCE_MS, name2;
18962
19290
  var init_swift_root_lock = __esm({
18963
19291
  "src/swift-root-lock.ts"() {
18964
19292
  "use strict";
@@ -18971,6 +19299,7 @@ var init_swift_root_lock = __esm({
18971
19299
  init_process_group();
18972
19300
  init_process_table();
18973
19301
  POLL_MS = 250;
19302
+ INSPECT_ATTEMPTS = 5;
18974
19303
  START_TOLERANCE_MS = 2e3;
18975
19304
  name2 = (number3, suffix) => `${String(number3).padStart(12, "0")}.${suffix}`;
18976
19305
  }
@@ -19935,6 +20264,7 @@ ${release}
19935
20264
  `);
19936
20265
  hash.update(compilerSourceDigest);
19937
20266
  if (input.oneModule) hash.update("one-module\n");
20267
+ if (KEEP_WASM_NAMES) hash.update("names\n");
19938
20268
  hash.update(swiftModuleDigest(moduleRoot));
19939
20269
  if (input.optimize) hash.update(`optimize
19940
20270
  ${WASM_OPTIMIZE_IDENTITY}
@@ -20046,7 +20376,14 @@ function toolsetOrdersLibcxxBeforeDarwinOverlay(options) {
20046
20376
  return libcxx >= 0 && overlay > libcxx;
20047
20377
  }
20048
20378
  function emitSwiftPackageManifest(args) {
20049
- const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
20379
+ const {
20380
+ targets,
20381
+ siblings,
20382
+ moduleRoot,
20383
+ oneModule,
20384
+ gameProducts: gameProducts2 = [],
20385
+ distribution
20386
+ } = args;
20050
20387
  const prebuilt = args.prebuilt;
20051
20388
  const linkedObjects = Boolean(distribution || prebuilt);
20052
20389
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
@@ -20075,9 +20412,8 @@ function emitSwiftPackageManifest(args) {
20075
20412
  for (const name3 of [...siblings.values()].flat())
20076
20413
  if (OPTIONAL_FRAMEWORKS.has(name3) && !targets.some((target) => target.name === name3))
20077
20414
  reach(name3);
20078
- if (spriteKit) {
20079
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
20080
- }
20415
+ for (const product of gameProducts2)
20416
+ for (const name3 of GAME_REACH[product] ?? []) reach(name3);
20081
20417
  let distributionLinkPath;
20082
20418
  const distributionLink = args.distributionLink;
20083
20419
  if (distribution && distributionLink) {
@@ -20100,7 +20436,7 @@ function emitSwiftPackageManifest(args) {
20100
20436
  (object6) => !isProvider(object6) && !replacedObjects.has(object6)
20101
20437
  );
20102
20438
  const objects = available.filter(
20103
- (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, "SpriteKit", "PeachBox2D"].every(
20439
+ (object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, ...GAME_FAMILY, "PeachBox2D"].every(
20104
20440
  (name3) => !object6.startsWith(`lib/${name3}-`) || reachedFrameworks.has(name3)
20105
20441
  )
20106
20442
  );
@@ -20263,7 +20599,7 @@ function emitSwiftPackageManifest(args) {
20263
20599
  ...linkedObjects || clang && !target.executable ? [] : [
20264
20600
  '.product(name: "SwiftUI", package: "sootsim-swift")',
20265
20601
  ...oneModule ? [ONE_PRODUCT] : [],
20266
- ...spriteKit ? [SPRITEKIT_PRODUCT] : []
20602
+ ...gameProducts2.map(gameProduct)
20267
20603
  ],
20268
20604
  ...(siblings.get(target.name) ?? []).flatMap(
20269
20605
  (dependency) => clang && // textual native headers can include one another without imposing
@@ -20295,7 +20631,7 @@ function emitSwiftPackageManifest(args) {
20295
20631
  .unsafeFlags(${flagArray(`[
20296
20632
  ${REACTOR_FLAG}${executableLinkFlags(args.root)} "-Xlinker", "--export-if-defined=__main_argc_argv"${library},
20297
20633
  ]`)}),
20298
- .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
20634
+ ${KEEP_WASM_NAMES ? "" : '.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),'}
20299
20635
  ]` : librarySettings.length > 0 ? `,
20300
20636
  linkerSettings: [${librarySettings.join(", ")}]` : "";
20301
20637
  const cDefines = macroSettings(target.cDefines);
@@ -22028,8 +22364,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
22028
22364
  const moduleName = swiftTargetModuleName(name3);
22029
22365
  const originalMap = originalMaps.get(moduleName);
22030
22366
  const stagedMap = sourceModuleMaps.get(moduleName);
22031
- const originalPath = originalMap ? import_node_path47.default.join(layout2.root, originalMap) : stagedMap?.path;
22032
- const originalContents = originalMap ? input.files[originalMap] : stagedMap?.contents;
22367
+ const originalPath = stagedMap?.path ?? (originalMap ? import_node_path47.default.join(layout2.root, originalMap) : void 0);
22368
+ const originalContents = stagedMap?.contents ?? (originalMap && input.files[originalMap]);
22033
22369
  const originalTokens = originalContents ? moduleMapTokens(originalContents) : [];
22034
22370
  if (originalPath && originalTokens.some(
22035
22371
  (token, index) => token === "module" && (originalTokens[index + 1] === "Swift" || originalTokens[index + 1] === `${moduleName}.Swift`)
@@ -22304,14 +22640,17 @@ module ${moduleName}.Swift {
22304
22640
  manifest = manifest.replace(product, `${product}
22305
22641
  ${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
22306
22642
  }
22307
- if (importsSpriteKit(input.files)) {
22643
+ const games = gameProducts(input.files);
22644
+ if (games.length > 0) {
22308
22645
  const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
22309
22646
  if (!manifest.includes(anchor))
22310
22647
  throw new Error(
22311
- "scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
22648
+ "scripts/contrast-app-Package.swift lost the line the game products link at"
22312
22649
  );
22313
- manifest = manifest.replace(anchor, `${anchor}
22314
- ${SPRITEKIT_PRODUCT},`);
22650
+ manifest = manifest.replace(
22651
+ anchor,
22652
+ [anchor, ...games.map((name3) => `${gameProduct(name3)},`)].join("\n ")
22653
+ );
22315
22654
  }
22316
22655
  files2.set(import_node_path47.default.join(layout2.root, "Package.swift"), manifest + moduleFiles);
22317
22656
  } else {
@@ -22426,7 +22765,7 @@ module ${moduleName}.Swift {
22426
22765
  siblings: moduleSiblings,
22427
22766
  moduleRoot,
22428
22767
  oneModule: input.oneModule,
22429
- spriteKit: importsSpriteKit(input.files),
22768
+ gameProducts: gameProducts(input.files),
22430
22769
  distribution: distribution ?? void 0,
22431
22770
  moduleExcludes,
22432
22771
  deferDarwinOverlay: native.size > 0 && toolsetOrdersLibcxxBeforeDarwinOverlay(
@@ -22825,14 +23164,9 @@ function linkedFrameworkTargets(moduleRoot, input) {
22825
23164
  ))
22826
23165
  reach(match[1]);
22827
23166
  }
22828
- if (importsSpriteKit(input.files))
22829
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
22830
- const wanted = [
22831
- "PeachApp",
22832
- ...input.oneModule ? ["One"] : [],
22833
- ...importsSpriteKit(input.files) ? ["SpriteKit"] : [],
22834
- ...reached
22835
- ];
23167
+ const games = gameProducts(input.files);
23168
+ for (const product of games) for (const name3 of GAME_REACH[product] ?? []) reach(name3);
23169
+ const wanted = ["PeachApp", ...input.oneModule ? ["One"] : [], ...games, ...reached];
22836
23170
  const linked = [...new Set(wanted)].filter((name3) => libraries.has(name3));
22837
23171
  if (!linked.includes("PeachApp"))
22838
23172
  throw new Error("swift-compile: the framework package declares no PeachApp library");
@@ -23735,7 +24069,7 @@ function compileSwiftProjectOnce(input, options) {
23735
24069
  options.signal
23736
24070
  );
23737
24071
  }
23738
- 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;
24072
+ 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;
23739
24073
  var init_swift_compile = __esm({
23740
24074
  "src/swift-compile.ts"() {
23741
24075
  "use strict";
@@ -23809,7 +24143,8 @@ var init_swift_compile = __esm({
23809
24143
  PeachCFNetwork: [],
23810
24144
  JavaScriptCore: ["PeachJavaScriptCore"],
23811
24145
  PeachJavaScriptCore: [],
23812
- GameplayKit: [],
24146
+ // GameplayKit names SpriteKit and SceneKit nodes, as on iOS
24147
+ GameplayKit: ["SpriteKit", "SceneKit", "PeachBox2D", "simd", "GLKit"],
23813
24148
  simd: [],
23814
24149
  ModelIO: ["simd"],
23815
24150
  GLKit: ["ModelIO"],
@@ -23921,10 +24256,21 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
23921
24256
  }
23922
24257
  ];
23923
24258
  ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
23924
- SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
23925
- importsSpriteKit = (files2) => Object.entries(files2).some(
23926
- ([file, contents]) => file.endsWith(".swift") && swiftImportNames(contents).includes("SpriteKit")
23927
- );
24259
+ GAME_FAMILY = ["SpriteKit", "SceneKit"];
24260
+ gameProducts = (files2) => {
24261
+ const imported = new Set(
24262
+ Object.entries(files2).flatMap(
24263
+ ([file, contents]) => file.endsWith(".swift") ? swiftImportNames(contents) : []
24264
+ )
24265
+ );
24266
+ if (imported.has("SceneKit")) return [...GAME_FAMILY];
24267
+ return imported.has("SpriteKit") ? ["SpriteKit"] : [];
24268
+ };
24269
+ gameProduct = (name3) => `.product(name: "${name3}", package: "sootsim-swift")`;
24270
+ GAME_REACH = {
24271
+ SpriteKit: ["SpriteKit", "PeachBox2D", "simd", "GLKit"],
24272
+ SceneKit: ["SceneKit"]
24273
+ };
23928
24274
  FOUNDATION_IMPLICIT_MODULES = [
23929
24275
  "PeachObjC",
23930
24276
  "Dispatch",
@@ -23951,7 +24297,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
23951
24297
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
23952
24298
  MULTI_MANIFEST_VERSION = 68;
23953
24299
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
23954
- compilerSourceDigest = true ? "2e9f321a97a408a1b3b8b7d85bbcfb108f0761ed9726b832a3c6c2cc52102806" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
24300
+ compilerSourceDigest = true ? "ae9e08389e6ab1901846342a7b347d7c10f8074172cf5d4d6505f7e955879ad4" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
23955
24301
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
23956
24302
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
23957
24303
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -24282,8 +24628,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
24282
24628
  "NSURLProtectionSpaceHTTPS",
24283
24629
  "NSURLProtectionSpaceHTTPSProxy",
24284
24630
  "NSURLProtectionSpaceSOCKSProxy",
24285
- "NSURLSessionDownloadTaskResumeData",
24286
- "NSURLSessionTransferSizeUnknown",
24287
24631
  "NSURLSessionUploadTaskResumeData",
24288
24632
  "NSUTF16BigEndianStringEncoding",
24289
24633
  "NSUTF16LittleEndianStringEncoding",
@@ -26445,6 +26789,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
26445
26789
  const allSources = /* @__PURE__ */ new Set();
26446
26790
  const headers = /* @__PURE__ */ new Set();
26447
26791
  const resources = /* @__PURE__ */ new Set();
26792
+ const resourceNames = {};
26448
26793
  const scriptForOutput = /* @__PURE__ */ new Map();
26449
26794
  const copiedFiles = [];
26450
26795
  let generatedInfoPlist = false;
@@ -26614,13 +26959,14 @@ ${output2}`
26614
26959
  xcodePathResolver(project.objects, project.projectDir, import_node_path51.default.join, settings),
26615
26960
  (file) => isDirectory(file) ? walkFiles(file) : import_node_fs53.default.existsSync(file) ? [file] : [],
26616
26961
  import_node_path51.default.join,
26617
- (file, kind) => {
26962
+ (file, kind, bundleName) => {
26618
26963
  if (kind === "header") {
26619
26964
  headers.add(file);
26620
26965
  return;
26621
26966
  }
26622
26967
  if (kind === "resource") {
26623
26968
  resources.add(file);
26969
+ if (bundleName) resourceNames[file] = bundleName;
26624
26970
  return;
26625
26971
  }
26626
26972
  if (!import_node_fs53.default.existsSync(file)) {
@@ -26744,6 +27090,7 @@ ${output2}`
26744
27090
  return {
26745
27091
  sources: [...sources].sort(),
26746
27092
  resources: [...resources].sort(),
27093
+ resourceNames,
26747
27094
  copiedFiles,
26748
27095
  generatedInfoPlist,
26749
27096
  allSources: [...allSources].sort(),
@@ -27805,10 +28152,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
27805
28152
  byProduct.has(import_node_path51.default.basename(rawPath)))
27806
28153
  continue;
27807
28154
  const resolved = fileId ? project.resolvePath(fileId) : null;
27808
- if (fileId && resolved !== null && !import_node_fs53.default.existsSync(resolved))
27809
- throw new Error(
27810
- `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
27811
- );
28155
+ if (fileId && resolved !== null && !import_node_fs53.default.existsSync(resolved)) {
28156
+ if (!ios_sdk_frameworks_default.frameworks.includes(name3))
28157
+ throw new Error(
28158
+ `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
28159
+ );
28160
+ sdkFrameworks.add(name3);
28161
+ continue;
28162
+ }
27812
28163
  if (!binaryFrameworks.get(name3)) binaryFrameworks.set(name3, resolved);
27813
28164
  }
27814
28165
  }
@@ -27885,7 +28236,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
27885
28236
  ...linkedProducts.flatMap(
27886
28237
  ({ source }) => source.kind === "local" && import_node_fs53.default.existsSync(source.dir) ? [source.dir] : []
27887
28238
  ),
27888
- ...new Set(podSourceDirs)
28239
+ ...new Set(podSourceDirs),
28240
+ // a target's own files may sit beside the project, such as an asset
28241
+ // catalog one folder up, and xcode builds them from there
28242
+ ...new Set(
28243
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs53.default.existsSync(file)).map((file) => import_node_path51.default.dirname(file))
28244
+ )
27889
28245
  ].map((dir) => import_node_fs53.default.realpathSync.native(dir))
27890
28246
  ),
27891
28247
  projectFiles: [
@@ -27930,6 +28286,7 @@ var init_xcode_project = __esm({
27930
28286
  import_node_fs53 = __toESM(require("node:fs"), 1);
27931
28287
  import_node_path51 = __toESM(require("node:path"), 1);
27932
28288
  import_plist2 = __toESM(require("plist"), 1);
28289
+ init_ios_sdk_frameworks();
27933
28290
  init_is_record();
27934
28291
  init_native_app_identity();
27935
28292
  init_prepared_xcode_phases();
@@ -28071,7 +28428,7 @@ var init_swift_standin_digest = __esm({
28071
28428
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
28072
28429
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
28073
28430
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
28074
- STANDIN_SOURCE_DIGEST = true ? "70b9e9f32fde5739daaee933df31b2584f9ef3289c322a0f5b03f1eaac947880" : standinSourceDigest();
28431
+ STANDIN_SOURCE_DIGEST = true ? "967c1c2a3b66ac640e0162783ed9e21b09ff285f8e1f7d4327b70416699e14c8" : standinSourceDigest();
28075
28432
  }
28076
28433
  });
28077
28434
 
@@ -35763,302 +36120,6 @@ var init_core_data_entity_classes = __esm({
35763
36120
  }
35764
36121
  });
35765
36122
 
35766
- // src/ios-sdk-frameworks.json
35767
- var ios_sdk_frameworks_default;
35768
- var init_ios_sdk_frameworks = __esm({
35769
- "src/ios-sdk-frameworks.json"() {
35770
- ios_sdk_frameworks_default = {
35771
- sdk: "iphonesimulator27.1",
35772
- frameworks: [
35773
- "ARKit",
35774
- "AVFAudio",
35775
- "AVFoundation",
35776
- "AVKit",
35777
- "AVRouting",
35778
- "Accelerate",
35779
- "Accessibility",
35780
- "AccessoryLiveActivities",
35781
- "AccessoryNotifications",
35782
- "AccessorySetupKit",
35783
- "AccessoryTransportExtension",
35784
- "Accounts",
35785
- "ActivityKit",
35786
- "AdAttributionKit",
35787
- "AdServices",
35788
- "AdSupport",
35789
- "AddressBook",
35790
- "AddressBookUI",
35791
- "AlarmKit",
35792
- "AppClip",
35793
- "AppIntents",
35794
- "AppIntentsTypeSupport",
35795
- "AppMigrationKit",
35796
- "AppTrackingTransparency",
35797
- "AssetsLibrary",
35798
- "AudioToolbox",
35799
- "AudioUnit",
35800
- "AuthenticationServices",
35801
- "AutomatedDeviceEnrollment",
35802
- "AutomaticAssessmentConfiguration",
35803
- "BackgroundAssets",
35804
- "BackgroundTasks",
35805
- "BrowserEngineCore",
35806
- "BrowserEngineKit",
35807
- "BrowserKit",
35808
- "BusinessChat",
35809
- "CFNetwork",
35810
- "CallKit",
35811
- "CarKey",
35812
- "CarPlay",
35813
- "Charts",
35814
- "ClassKit",
35815
- "ClassKitUI",
35816
- "ClockKit",
35817
- "CloudKit",
35818
- "ColorSync",
35819
- "Combine",
35820
- "ComputeGraph",
35821
- "ContactProvider",
35822
- "Contacts",
35823
- "ContactsUI",
35824
- "CoreAudio",
35825
- "CoreAudioKit",
35826
- "CoreAudioTypes",
35827
- "CoreBluetooth",
35828
- "CoreData",
35829
- "CoreFoundation",
35830
- "CoreGraphics",
35831
- "CoreHaptics",
35832
- "CoreImage",
35833
- "CoreLocation",
35834
- "CoreLocationUI",
35835
- "CoreMIDI",
35836
- "CoreML",
35837
- "CoreMedia",
35838
- "CoreMotion",
35839
- "CoreNFC",
35840
- "CoreServices",
35841
- "CoreSpotlight",
35842
- "CoreTelephony",
35843
- "CoreText",
35844
- "CoreTransferable",
35845
- "CoreVideo",
35846
- "CreateMLComponents",
35847
- "CryptoKit",
35848
- "CryptoTokenKit",
35849
- "DataDetection",
35850
- "DeclaredAgeRange",
35851
- "DeveloperToolsSupport",
35852
- "DeviceActivity",
35853
- "DeviceCheck",
35854
- "DeviceDiscoveryExtension",
35855
- "DeviceDiscoveryUI",
35856
- "EnergyKit",
35857
- "EventKit",
35858
- "EventKitUI",
35859
- "ExposureNotification",
35860
- "ExtensionFoundation",
35861
- "ExtensionKit",
35862
- "ExternalAccessory",
35863
- "FamilyControls",
35864
- "FileProvider",
35865
- "FileProviderUI",
35866
- "FinanceKit",
35867
- "FinanceKitUI",
35868
- "Foundation",
35869
- "FoundationModels",
35870
- "GLKit",
35871
- "GSS",
35872
- "GameController",
35873
- "GameKit",
35874
- "GameSave",
35875
- "GameplayKit",
35876
- "GeoToolbox",
35877
- "GroupActivities",
35878
- "HealthKit",
35879
- "HealthKitUI",
35880
- "HomeKit",
35881
- "IOKit",
35882
- "IOSurface",
35883
- "IdentityDocumentServices",
35884
- "IdentityDocumentServicesUI",
35885
- "IdentityLookup",
35886
- "IdentityLookupUI",
35887
- "ImageCaptureCore",
35888
- "ImageIO",
35889
- "ImagePlayground",
35890
- "ImmersiveMediaSupport",
35891
- "Intents",
35892
- "IntentsUI",
35893
- "JavaScriptCore",
35894
- "LinkPresentation",
35895
- "LinkSecurity",
35896
- "LiveCommunicationKit",
35897
- "LocalAuthentication",
35898
- "LocalAuthenticationEmbeddedUI",
35899
- "LockedCameraCapture",
35900
- "ManagedApp",
35901
- "ManagedAppDistribution",
35902
- "ManagedSettings",
35903
- "ManagedSettingsUI",
35904
- "MapKit",
35905
- "MarketplaceKit",
35906
- "Matter",
35907
- "MatterSupport",
35908
- "MediaAccessibility",
35909
- "MediaIntelligence",
35910
- "MediaIntents",
35911
- "MediaPlayer",
35912
- "MediaToolbox",
35913
- "MessageUI",
35914
- "Messages",
35915
- "Metal",
35916
- "MetalKit",
35917
- "MetalPerformancePrimitives",
35918
- "MetalPerformanceShaders",
35919
- "MetalPerformanceShadersGraph",
35920
- "MetricKit",
35921
- "MobileCoreServices",
35922
- "ModelIO",
35923
- "MultipeerConnectivity",
35924
- "MusicKit",
35925
- "MusicUnderstanding",
35926
- "NaturalLanguage",
35927
- "NearbyInteraction",
35928
- "Network",
35929
- "NetworkExtension",
35930
- "NotificationCenter",
35931
- "NowPlaying",
35932
- "OSLog",
35933
- "OpenAL",
35934
- "OpenGLES",
35935
- "PDFKit",
35936
- "PHASE",
35937
- "PaperKit",
35938
- "PassKit",
35939
- "PencilKit",
35940
- "PermissionKit",
35941
- "Photos",
35942
- "PhotosUI",
35943
- "ProximityReader",
35944
- "PushKit",
35945
- "PushToTalk",
35946
- "QuartzCore",
35947
- "QuickLook",
35948
- "QuickLookThumbnailing",
35949
- "RealityFoundation",
35950
- "RealityKit",
35951
- "RelevanceKit",
35952
- "ReplayKit",
35953
- "RoomPlan",
35954
- "SafariServices",
35955
- "SafetyKit",
35956
- "SceneKit",
35957
- "ScreenTime",
35958
- "SecureElementCredential",
35959
- "Security",
35960
- "SecurityUI",
35961
- "SensitiveContentAnalysis",
35962
- "SensorKit",
35963
- "ServicesAccountLinking",
35964
- "SharedWithYou",
35965
- "SharedWithYouCore",
35966
- "ShazamKit",
35967
- "Social",
35968
- "SoundAnalysis",
35969
- "Speech",
35970
- "SpriteKit",
35971
- "StateReporting",
35972
- "StoreKit",
35973
- "SuggestedActions",
35974
- "SwiftData",
35975
- "SwiftUI",
35976
- "SwiftUICore",
35977
- "Symbols",
35978
- "SystemConfiguration",
35979
- "SystemExtensions",
35980
- "TabularData",
35981
- "TelephonyMessagingKit",
35982
- "TipKit",
35983
- "TouchController",
35984
- "Translation",
35985
- "TranslationUIProvider",
35986
- "TrustInsights",
35987
- "Twitter",
35988
- "UIKit",
35989
- "USDKit",
35990
- "UniformTypeIdentifiers",
35991
- "UserNotifications",
35992
- "UserNotificationsUI",
35993
- "VideoSubscriberAccount",
35994
- "VideoToolbox",
35995
- "Vision",
35996
- "VisionKit",
35997
- "WatchConnectivity",
35998
- "WeatherKit",
35999
- "WebKit",
36000
- "WiFiAware",
36001
- "WidgetKit",
36002
- "WorkoutKit",
36003
- "_AVKit_SwiftUI",
36004
- "_AdAttributionKit_StoreKit",
36005
- "_AppIntents_HealthKit",
36006
- "_AppIntents_SwiftUI",
36007
- "_AppIntents_UIKit",
36008
- "_AuthenticationServices_SwiftUI",
36009
- "_Contacts_AppIntents",
36010
- "_CoreData_CloudKit",
36011
- "_CoreLocationUI_SwiftUI",
36012
- "_CoreNFC_UIKit",
36013
- "_CoreSpotlight_FoundationModels",
36014
- "_DataDetection_SwiftUI",
36015
- "_DeviceActivity_SwiftUI",
36016
- "_DeviceDiscoveryUI_SwiftUI",
36017
- "_FinanceKit_AppIntents",
36018
- "_FoundationModels_SwiftUI",
36019
- "_FoundationModels_UIKit",
36020
- "_GameController_SwiftUI",
36021
- "_GeoToolbox_AppIntents",
36022
- "_GroupActivities_UIKit",
36023
- "_HomeKit_SwiftUI",
36024
- "_Intents_TipKit",
36025
- "_LinkPresentation_AppIntents",
36026
- "_LocationEssentials",
36027
- "_MapKit_SwiftUI",
36028
- "_MarketplaceKit_UIKit",
36029
- "_MediaIntents_AppIntents",
36030
- "_MediaPlayer_AppIntents",
36031
- "_MusicKit_SwiftUI",
36032
- "_NowPlaying_AppIntents",
36033
- "_PassKit_SwiftUI",
36034
- "_PermissionKit_SwiftUI",
36035
- "_PermissionKit_UIKit",
36036
- "_PhotosUI_SwiftUI",
36037
- "_PhotosUI_WidgetKit",
36038
- "_Photos_AppIntents",
36039
- "_QuickLook_SwiftUI",
36040
- "_RealityKit_ComputeGraph",
36041
- "_RealityKit_SwiftUI",
36042
- "_RelevanceKit_MapKit",
36043
- "_SceneKit_SwiftUI",
36044
- "_SecureElementCredential_SwiftUI",
36045
- "_SecureElementCredential_UIKit",
36046
- "_SharedWithYou_AppIntents",
36047
- "_SpriteKit_SwiftUI",
36048
- "_StoreKit_SwiftUI",
36049
- "_SwiftData_CoreData",
36050
- "_SwiftData_SwiftUI",
36051
- "_Translation_SwiftUI",
36052
- "_USDKit_RealityKit",
36053
- "_UserNotifications_AppIntents",
36054
- "_WebKit_SwiftUI",
36055
- "_WorkoutKit_SwiftUI",
36056
- "iAd"
36057
- ]
36058
- };
36059
- }
36060
- });
36061
-
36062
36123
  // src/swift-cxx-reachable.ts
36063
36124
  function cxxTrace(stderr) {
36064
36125
  const files2 = [];
@@ -37578,6 +37639,17 @@ function isPackageSource(file) {
37578
37639
  function sourceFiles(root) {
37579
37640
  return packageFiles(root, false).filter(isPackageSource);
37580
37641
  }
37642
+ function xcodeFlatResources(app) {
37643
+ if (!app) return /* @__PURE__ */ new Set();
37644
+ return new Set(
37645
+ app.resources.filter(
37646
+ (file) => !Object.hasOwn(app.resourceNames, file) && !file.split(import_node_path77.default.sep).some((segment) => segment.endsWith(".xcassets"))
37647
+ )
37648
+ );
37649
+ }
37650
+ function bundleResourcePath(flatResources, disk, file) {
37651
+ return flatResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37652
+ }
37581
37653
  function resourceCandidateFiles(root) {
37582
37654
  return packageFiles(root, false).filter(
37583
37655
  (file) => !isPackageSource(file) && !file.endsWith(".xcconfig") && !["project.pbxproj", "project.xcproj", "Package.resolved"].includes(
@@ -37650,12 +37722,24 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
37650
37722
  const disk = byRelative.get(file);
37651
37723
  return !disk || !layout2?.targetDirs.get(disk)?.startsWith(`${XCODE_FRAMEWORKS_DIR}/`);
37652
37724
  });
37653
- const found = enumerateBundleImages(relative3, readContents2, (file) => {
37654
- const disk = byRelative.get(file);
37655
- if (!disk) throw new Error(`image source ${file} has no input file`);
37656
- const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37657
- return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37658
- });
37725
+ const flatResources = xcodeFlatResources(layout2?.app);
37726
+ const bundled = new Map(
37727
+ relative3.map((file) => [
37728
+ bundleResourcePath(flatResources, byRelative.get(file), file),
37729
+ file
37730
+ ])
37731
+ );
37732
+ const found = enumerateBundleImages(
37733
+ [...bundled.keys()],
37734
+ (file) => readContents2(bundled.get(file) ?? file),
37735
+ (marked) => {
37736
+ const file = bundled.get(marked) ?? marked;
37737
+ const disk = byRelative.get(file);
37738
+ if (!disk) throw new Error(`image source ${file} has no input file`);
37739
+ const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37740
+ return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37741
+ }
37742
+ ).map((image) => ({ ...image, file: bundled.get(image.file) ?? image.file }));
37659
37743
  const colors = enumerateBundleColors(catalogFiles, readContents2);
37660
37744
  const symbols = enumerateBundleSymbols(catalogFiles, readContents2, (file) => {
37661
37745
  const disk = byRelative.get(file);
@@ -37839,15 +37923,20 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
37839
37923
  }
37840
37924
  }
37841
37925
  const groups = /* @__PURE__ */ new Map();
37842
- const appResources = new Set(xcode?.app.resources ?? []);
37926
+ const flatResources = xcodeFlatResources(xcode?.app);
37843
37927
  for (const file of relative3) {
37844
37928
  const disk = import_node_path77.default.join(packagePath, ...file.split("/"));
37929
+ const folderName = xcode?.app.resourceNames[disk];
37930
+ if (folderName) {
37931
+ watched.push(file);
37932
+ addFile(folderName, readPackageFile2(packagePath, disk, limits.resourceBytes));
37933
+ continue;
37934
+ }
37845
37935
  const key2 = xcode ? xcodeInputKey(xcode, disk, file) : file;
37846
37936
  const bundle = swiftResourceBundleForFile(bundles, key2);
37847
37937
  const bundlePath = bundle?.path ?? ".";
37848
37938
  const group = groups.get(bundlePath) ?? /* @__PURE__ */ new Map();
37849
- const resource = appResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37850
- group.set(resource, disk);
37939
+ group.set(bundleResourcePath(flatResources, disk, file), disk);
37851
37940
  groups.set(bundlePath, group);
37852
37941
  }
37853
37942
  for (const bundle of bundles) {
@@ -47197,7 +47286,7 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
47197
47286
  listed.stdout.split("\0").filter(Boolean).map((entry) => entry.replace(/\/$/, ""))
47198
47287
  );
47199
47288
  const ignoreFiles = /* @__PURE__ */ new Map();
47200
- return (relative3) => {
47289
+ return (relative3, knownDirectory) => {
47201
47290
  const parts = relative3.split(import_node_path14.default.sep);
47202
47291
  const linked = linkedPackages.some(
47203
47292
  (directory2) => relative3.startsWith(directory2 + import_node_path14.default.sep)
@@ -47209,16 +47298,16 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
47209
47298
  }
47210
47299
  if (portable && relative3) {
47211
47300
  let excluded = false;
47212
- const isDirectory3 = import_node_fs18.default.lstatSync(import_node_path14.default.join(root, relative3)).isDirectory();
47301
+ const isDirectory3 = knownDirectory ?? import_node_fs18.default.lstatSync(import_node_path14.default.join(root, relative3)).isDirectory();
47213
47302
  for (let index = 0; index < parts.length; index++) {
47214
47303
  const directory2 = parts.slice(0, index).join(import_node_path14.default.sep);
47215
47304
  let rules2 = ignoreFiles.get(directory2);
47216
- if (!rules2) {
47217
- rules2 = (0, import_ignore.default)();
47305
+ if (rules2 === void 0) {
47218
47306
  const file = import_node_path14.default.join(root, directory2, ".gitignore");
47219
- if (import_node_fs18.default.existsSync(file)) rules2.add(import_node_fs18.default.readFileSync(file, "utf8"));
47307
+ rules2 = import_node_fs18.default.existsSync(file) ? (0, import_ignore.default)().add(import_node_fs18.default.readFileSync(file, "utf8")) : null;
47220
47308
  ignoreFiles.set(directory2, rules2);
47221
47309
  }
47310
+ if (!rules2) continue;
47222
47311
  const item = parts.slice(index).join("/");
47223
47312
  const result = rules2.test(isDirectory3 ? `${item}/` : item);
47224
47313
  if (result.ignored) excluded = true;
@@ -47810,7 +47899,7 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
47810
47899
  signal?.throwIfAborted();
47811
47900
  const file = import_node_path57.default.join(directory2, entry.name);
47812
47901
  const relative3 = import_node_path57.default.relative(root, file);
47813
- if (excluded(relative3)) continue;
47902
+ if (excluded(relative3, entry.isDirectory())) continue;
47814
47903
  hash.update(`${relative3}\0`);
47815
47904
  if (entry.isSymbolicLink()) {
47816
47905
  const link = `link\0${await import_node_fs59.default.promises.readlink(file)}\0`;
@@ -47938,8 +48027,10 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
47938
48027
  if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
47939
48028
  return;
47940
48029
  import_node_fs59.default.mkdirSync(import_node_path57.default.dirname(target), { recursive: true });
47941
- import_node_fs59.default.copyFileSync(file, target);
47942
- import_node_fs59.default.utimesSync(target, source.atime, source.mtime);
48030
+ const staged = `${target}.${process.pid}.peach-sync`;
48031
+ import_node_fs59.default.copyFileSync(file, staged);
48032
+ import_node_fs59.default.utimesSync(staged, source.atime, source.mtime);
48033
+ import_node_fs59.default.renameSync(staged, target);
47943
48034
  };
47944
48035
  const walkInstalled = (directory2) => {
47945
48036
  for (const entry of import_node_fs59.default.readdirSync(directory2, { withFileTypes: true })) {
@@ -47957,7 +48048,7 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
47957
48048
  walkInstalled(file);
47958
48049
  continue;
47959
48050
  }
47960
- if (excluded(relative3) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path57.default.join(appRelative, "ios"))
48051
+ if (excluded(relative3, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path57.default.join(appRelative, "ios"))
47961
48052
  continue;
47962
48053
  if (entry.isDirectory()) walk3(file);
47963
48054
  else if (entry.isFile()) {
@@ -48874,7 +48965,7 @@ init_swift_native_pin();
48874
48965
  init_xcode_project();
48875
48966
  var EXPO_NATIVE_ENTRY_NAME = "ios";
48876
48967
  function expoNativeCompilerDigestValue() {
48877
- return true ? "7667f1dce279c8074ed9dd97de1e3b293077ae012cacf08fd6572978f8ef7dc0" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
48968
+ return true ? "960ff9f28de62c2587b34eeda2a04b383e5ecce370aae9948f12cef49f8b450b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
48878
48969
  }
48879
48970
  var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
48880
48971
  function readSources(value) {