peachsim 0.1.2221 → 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 (121) 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 +438 -362
  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 +435 -360
  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 +658 -555
  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 +495 -401
  71. package/dist-lib/swift-compile.cjs +47 -30
  72. package/dist-lib/swift-compile.mjs +47 -30
  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 +121 -50
  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-engine/src/cli-companion.d.ts +1 -0
  84. package/dist-types/packages/peach-engine/src/cli-host-terser.d.ts +7 -0
  85. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
  86. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  87. package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
  88. package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -0
  89. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +8 -1
  90. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  91. package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +1 -1
  92. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  93. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +1 -2
  94. package/dist-types/packages/peach-kit/src/internal.d.ts +1 -0
  95. package/dist-types/packages/peach-kit/src/ios-tint.d.ts +1 -0
  96. package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +25 -0
  97. package/kotlin/sdk.tar.gz +0 -0
  98. package/package.json +1 -1
  99. package/runtime-companion.json +1 -1
  100. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +4 -4
  101. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +1 -1
  102. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +5 -5
  103. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
  104. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +1 -1
  105. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +9 -9
  106. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +1 -1
  107. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +7 -7
  108. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +1 -1
  109. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +1 -1
  110. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +1 -1
  111. package/src/cli-runtime.ts +1 -0
  112. package/src/expo-native-workspace.ts +14 -10
  113. package/src/expo-workspace-exclusion.ts +10 -7
  114. package/src/react-native-autolinking.ts +2 -1
  115. package/src/runtime-delivery.ts +7 -0
  116. package/src/swift-compile.ts +47 -31
  117. package/src/swift-coverage/xcode-assets.ts +4 -2
  118. package/src/swift-host.ts +53 -14
  119. package/src/wasm-optimize.ts +5 -1
  120. package/src/xcode-project.ts +26 -5
  121. 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.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
 
@@ -15267,7 +15267,8 @@ var FEATURES = [
15267
15267
  "reference-types",
15268
15268
  "sign-ext"
15269
15269
  ];
15270
- var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
15270
+ var KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
15271
+ var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}${KEEP_WASM_NAMES ? " -g" : ""}`;
15271
15272
  var PINNED_BINARYEN_VERSION = "132";
15272
15273
  var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
15273
15274
  [
@@ -15303,6 +15304,7 @@ async function runWasmOpt(file, output2, skipPasses, binary) {
15303
15304
  const result = await (0, import_wasm_opt.wasmOpt)(
15304
15305
  [
15305
15306
  "-Oz",
15307
+ ...KEEP_WASM_NAMES ? ["-g"] : [],
15306
15308
  ...skipPasses.flatMap((pass) => ["--skip-pass", pass]),
15307
15309
  ...FEATURES.map((feature) => `--enable-${feature}`),
15308
15310
  file,
@@ -16922,7 +16924,8 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
16922
16924
  PeachCFNetwork: [],
16923
16925
  JavaScriptCore: ["PeachJavaScriptCore"],
16924
16926
  PeachJavaScriptCore: [],
16925
- GameplayKit: [],
16927
+ // GameplayKit names SpriteKit and SceneKit nodes, as on iOS
16928
+ GameplayKit: ["SpriteKit", "SceneKit", "PeachBox2D", "simd", "GLKit"],
16926
16929
  simd: [],
16927
16930
  ModelIO: ["simd"],
16928
16931
  GLKit: ["ModelIO"],
@@ -17433,10 +17436,21 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
17433
17436
  return siblings;
17434
17437
  }
17435
17438
  var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
17436
- var SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
17437
- var importsSpriteKit = (files2) => Object.entries(files2).some(
17438
- ([file, contents]) => file.endsWith(".swift") && swiftImportNames(contents).includes("SpriteKit")
17439
- );
17439
+ var GAME_FAMILY = ["SpriteKit", "SceneKit"];
17440
+ var gameProducts = (files2) => {
17441
+ const imported = new Set(
17442
+ Object.entries(files2).flatMap(
17443
+ ([file, contents]) => file.endsWith(".swift") ? swiftImportNames(contents) : []
17444
+ )
17445
+ );
17446
+ if (imported.has("SceneKit")) return [...GAME_FAMILY];
17447
+ return imported.has("SpriteKit") ? ["SpriteKit"] : [];
17448
+ };
17449
+ var gameProduct = (name3) => `.product(name: "${name3}", package: "sootsim-swift")`;
17450
+ var GAME_REACH = {
17451
+ SpriteKit: ["SpriteKit", "PeachBox2D", "simd", "GLKit"],
17452
+ SceneKit: ["SceneKit"]
17453
+ };
17440
17454
  var FOUNDATION_IMPLICIT_MODULES = [
17441
17455
  "PeachObjC",
17442
17456
  "Dispatch",
@@ -17463,7 +17477,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
17463
17477
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
17464
17478
  var MULTI_MANIFEST_VERSION = 68;
17465
17479
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
17466
- var compilerSourceDigest = true ? "2e9f321a97a408a1b3b8b7d85bbcfb108f0761ed9726b832a3c6c2cc52102806" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17480
+ var compilerSourceDigest = true ? "eba60b7a2e9485f928a6ec2e544e10d84b2b33430be66b9e069c9797a927af86" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17467
17481
  function swiftArtifactHash(input, release, moduleRoot) {
17468
17482
  const hash = (0, import_node_crypto13.createHash)("sha256");
17469
17483
  hash.update(`swift-compile
@@ -17471,6 +17485,7 @@ ${release}
17471
17485
  `);
17472
17486
  hash.update(compilerSourceDigest);
17473
17487
  if (input.oneModule) hash.update("one-module\n");
17488
+ if (KEEP_WASM_NAMES) hash.update("names\n");
17474
17489
  hash.update(swiftModuleDigest(moduleRoot));
17475
17490
  if (input.optimize) hash.update(`optimize
17476
17491
  ${WASM_OPTIMIZE_IDENTITY}
@@ -17585,7 +17600,14 @@ function toolsetOrdersLibcxxBeforeDarwinOverlay(options) {
17585
17600
  return libcxx >= 0 && overlay > libcxx;
17586
17601
  }
17587
17602
  function emitSwiftPackageManifest(args) {
17588
- const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
17603
+ const {
17604
+ targets,
17605
+ siblings,
17606
+ moduleRoot,
17607
+ oneModule,
17608
+ gameProducts: gameProducts2 = [],
17609
+ distribution
17610
+ } = args;
17589
17611
  const prebuilt = args.prebuilt;
17590
17612
  const linkedObjects = Boolean(distribution || prebuilt);
17591
17613
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
@@ -17614,9 +17636,8 @@ function emitSwiftPackageManifest(args) {
17614
17636
  for (const name3 of [...siblings.values()].flat())
17615
17637
  if (OPTIONAL_FRAMEWORKS.has(name3) && !targets.some((target) => target.name === name3))
17616
17638
  reach(name3);
17617
- if (spriteKit) {
17618
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
17619
- }
17639
+ for (const product of gameProducts2)
17640
+ for (const name3 of GAME_REACH[product] ?? []) reach(name3);
17620
17641
  let distributionLinkPath;
17621
17642
  const distributionLink = args.distributionLink;
17622
17643
  if (distribution && distributionLink) {
@@ -17639,7 +17660,7 @@ function emitSwiftPackageManifest(args) {
17639
17660
  (object4) => !isProvider(object4) && !replacedObjects.has(object4)
17640
17661
  );
17641
17662
  const objects = available.filter(
17642
- (object4) => !targets.some((target) => object4.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, "SpriteKit", "PeachBox2D"].every(
17663
+ (object4) => !targets.some((target) => object4.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, ...GAME_FAMILY, "PeachBox2D"].every(
17643
17664
  (name3) => !object4.startsWith(`lib/${name3}-`) || reachedFrameworks.has(name3)
17644
17665
  )
17645
17666
  );
@@ -17802,7 +17823,7 @@ function emitSwiftPackageManifest(args) {
17802
17823
  ...linkedObjects || clang && !target.executable ? [] : [
17803
17824
  '.product(name: "SwiftUI", package: "sootsim-swift")',
17804
17825
  ...oneModule ? [ONE_PRODUCT] : [],
17805
- ...spriteKit ? [SPRITEKIT_PRODUCT] : []
17826
+ ...gameProducts2.map(gameProduct)
17806
17827
  ],
17807
17828
  ...(siblings.get(target.name) ?? []).flatMap(
17808
17829
  (dependency) => clang && // textual native headers can include one another without imposing
@@ -17834,7 +17855,7 @@ function emitSwiftPackageManifest(args) {
17834
17855
  .unsafeFlags(${flagArray(`[
17835
17856
  ${REACTOR_FLAG}${executableLinkFlags(args.root)} "-Xlinker", "--export-if-defined=__main_argc_argv"${library},
17836
17857
  ]`)}),
17837
- .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
17858
+ ${KEEP_WASM_NAMES ? "" : '.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),'}
17838
17859
  ]` : librarySettings.length > 0 ? `,
17839
17860
  linkerSettings: [${librarySettings.join(", ")}]` : "";
17840
17861
  const cDefines = macroSettings(target.cDefines);
@@ -18439,8 +18460,6 @@ var FOUNDATION_OVERLAY_GLOBALS = /* @__PURE__ */ new Set([
18439
18460
  "NSURLProtectionSpaceHTTPS",
18440
18461
  "NSURLProtectionSpaceHTTPSProxy",
18441
18462
  "NSURLProtectionSpaceSOCKSProxy",
18442
- "NSURLSessionDownloadTaskResumeData",
18443
- "NSURLSessionTransferSizeUnknown",
18444
18463
  "NSURLSessionUploadTaskResumeData",
18445
18464
  "NSUTF16BigEndianStringEncoding",
18446
18465
  "NSUTF16LittleEndianStringEncoding",
@@ -20352,14 +20371,17 @@ module ${moduleName}.Swift {
20352
20371
  manifest = manifest.replace(product, `${product}
20353
20372
  ${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
20354
20373
  }
20355
- if (importsSpriteKit(input.files)) {
20374
+ const games = gameProducts(input.files);
20375
+ if (games.length > 0) {
20356
20376
  const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
20357
20377
  if (!manifest.includes(anchor))
20358
20378
  throw new Error(
20359
- "scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
20379
+ "scripts/contrast-app-Package.swift lost the line the game products link at"
20360
20380
  );
20361
- manifest = manifest.replace(anchor, `${anchor}
20362
- ${SPRITEKIT_PRODUCT},`);
20381
+ manifest = manifest.replace(
20382
+ anchor,
20383
+ [anchor, ...games.map((name3) => `${gameProduct(name3)},`)].join("\n ")
20384
+ );
20363
20385
  }
20364
20386
  files2.set(import_node_path27.default.join(layout2.root, "Package.swift"), manifest + moduleFiles);
20365
20387
  } else {
@@ -20474,7 +20496,7 @@ module ${moduleName}.Swift {
20474
20496
  siblings: moduleSiblings,
20475
20497
  moduleRoot,
20476
20498
  oneModule: input.oneModule,
20477
- spriteKit: importsSpriteKit(input.files),
20499
+ gameProducts: gameProducts(input.files),
20478
20500
  distribution: distribution ?? void 0,
20479
20501
  moduleExcludes,
20480
20502
  deferDarwinOverlay: native.size > 0 && toolsetOrdersLibcxxBeforeDarwinOverlay(
@@ -20881,14 +20903,9 @@ function linkedFrameworkTargets(moduleRoot, input) {
20881
20903
  ))
20882
20904
  reach(match[1]);
20883
20905
  }
20884
- if (importsSpriteKit(input.files))
20885
- for (const name3 of ["SpriteKit", "PeachBox2D", "simd", "GLKit"]) reach(name3);
20886
- const wanted = [
20887
- "PeachApp",
20888
- ...input.oneModule ? ["One"] : [],
20889
- ...importsSpriteKit(input.files) ? ["SpriteKit"] : [],
20890
- ...reached
20891
- ];
20906
+ const games = gameProducts(input.files);
20907
+ for (const product of games) for (const name3 of GAME_REACH[product] ?? []) reach(name3);
20908
+ const wanted = ["PeachApp", ...input.oneModule ? ["One"] : [], ...games, ...reached];
20892
20909
  const linked = [...new Set(wanted)].filter((name3) => libraries.has(name3));
20893
20910
  if (!linked.includes("PeachApp"))
20894
20911
  throw new Error("swift-compile: the framework package declares no PeachApp library");
@@ -23559,6 +23576,7 @@ function parseOpenStepPlist(text5) {
23559
23576
  // src/xcode-target-members.ts
23560
23577
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23561
23578
  var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
23579
+ var FOLDER_REFERENCE = /^(?:folder|wrapper\.scnassets)$/;
23562
23580
  var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
23563
23581
  function xcodePathResolver(objects, projectDir, join9, sourceTreeRoot) {
23564
23582
  const parents = /* @__PURE__ */ new Map();
@@ -23625,8 +23643,20 @@ function xcodeTargetMemberVisitor(objects) {
23625
23643
  for (const id of refs) {
23626
23644
  const file = resolvePath(id);
23627
23645
  if (file === null) continue;
23628
- if (phase.isa === "PBXSourcesBuildPhase") visit(file, "source");
23629
- else for (const inner of filesUnder(file)) visit(inner, "resource");
23646
+ if (phase.isa === "PBXSourcesBuildPhase") {
23647
+ visit(file, "source");
23648
+ continue;
23649
+ }
23650
+ const ref = objects[id];
23651
+ const type = isDict(ref) ? str(ref.lastKnownFileType) ?? str(ref.explicitFileType) ?? "" : "";
23652
+ const root = file.replace(/[\\/]+$/, "");
23653
+ const folder = FOLDER_REFERENCE.test(type) ? root.split(/[\\/]/).pop() : void 0;
23654
+ for (const inner of filesUnder(file))
23655
+ visit(
23656
+ inner,
23657
+ "resource",
23658
+ folder && `${folder}/${inner.slice(root.length + 1).replaceAll("\\", "/")}`
23659
+ );
23630
23660
  }
23631
23661
  }
23632
23662
  }
@@ -24980,12 +25010,13 @@ function planAssetSymbols(resources, root, settings) {
24980
25010
  "2": ["ipad"],
24981
25011
  "1,2": ["iphone", "ipad"],
24982
25012
  "1,7": ["iphone"],
25013
+ "1,3,7": ["iphone"],
24983
25014
  "1,2,6": ["iphone", "ipad"],
24984
25015
  "1,2,7": ["iphone", "ipad"]
24985
25016
  }[families];
24986
25017
  if (!devices)
24987
25018
  return unknown2(
24988
- `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}".`
25019
+ `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}".`
24989
25020
  );
24990
25021
  const plan = {
24991
25022
  catalogs: catalogs.map((path51) => ({
@@ -28348,6 +28379,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
28348
28379
  const allSources = /* @__PURE__ */ new Set();
28349
28380
  const headers = /* @__PURE__ */ new Set();
28350
28381
  const resources = /* @__PURE__ */ new Set();
28382
+ const resourceNames = {};
28351
28383
  const scriptForOutput = /* @__PURE__ */ new Map();
28352
28384
  const copiedFiles = [];
28353
28385
  let generatedInfoPlist = false;
@@ -28517,13 +28549,14 @@ ${output2}`
28517
28549
  xcodePathResolver(project.objects, project.projectDir, import_node_path39.default.join, settings),
28518
28550
  (file) => isDirectory(file) ? walkFiles(file) : import_node_fs38.default.existsSync(file) ? [file] : [],
28519
28551
  import_node_path39.default.join,
28520
- (file, kind) => {
28552
+ (file, kind, bundleName) => {
28521
28553
  if (kind === "header") {
28522
28554
  headers.add(file);
28523
28555
  return;
28524
28556
  }
28525
28557
  if (kind === "resource") {
28526
28558
  resources.add(file);
28559
+ if (bundleName) resourceNames[file] = bundleName;
28527
28560
  return;
28528
28561
  }
28529
28562
  if (!import_node_fs38.default.existsSync(file)) {
@@ -28647,6 +28680,7 @@ ${output2}`
28647
28680
  return {
28648
28681
  sources: [...sources].sort(),
28649
28682
  resources: [...resources].sort(),
28683
+ resourceNames,
28650
28684
  copiedFiles,
28651
28685
  generatedInfoPlist,
28652
28686
  allSources: [...allSources].sort(),
@@ -29705,10 +29739,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
29705
29739
  byProduct.has(import_node_path39.default.basename(rawPath)))
29706
29740
  continue;
29707
29741
  const resolved = fileId ? project.resolvePath(fileId) : null;
29708
- if (fileId && resolved !== null && !import_node_fs38.default.existsSync(resolved))
29709
- throw new Error(
29710
- `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
29711
- );
29742
+ if (fileId && resolved !== null && !import_node_fs38.default.existsSync(resolved)) {
29743
+ if (!ios_sdk_frameworks_default.frameworks.includes(name3))
29744
+ throw new Error(
29745
+ `${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
29746
+ );
29747
+ sdkFrameworks.add(name3);
29748
+ continue;
29749
+ }
29712
29750
  if (!binaryFrameworks.get(name3)) binaryFrameworks.set(name3, resolved);
29713
29751
  }
29714
29752
  }
@@ -29785,7 +29823,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
29785
29823
  ...linkedProducts.flatMap(
29786
29824
  ({ source }) => source.kind === "local" && import_node_fs38.default.existsSync(source.dir) ? [source.dir] : []
29787
29825
  ),
29788
- ...new Set(podSourceDirs)
29826
+ ...new Set(podSourceDirs),
29827
+ // a target's own files may sit beside the project, such as an asset
29828
+ // catalog one folder up, and xcode builds them from there
29829
+ ...new Set(
29830
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs38.default.existsSync(file)).map((file) => import_node_path39.default.dirname(file))
29831
+ )
29789
29832
  ].map((dir) => import_node_fs38.default.realpathSync.native(dir))
29790
29833
  ),
29791
29834
  projectFiles: [
@@ -30894,7 +30937,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
30894
30937
  return hash.digest("hex");
30895
30938
  }
30896
30939
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
30897
- var STANDIN_SOURCE_DIGEST = true ? "70b9e9f32fde5739daaee933df31b2584f9ef3289c322a0f5b03f1eaac947880" : standinSourceDigest();
30940
+ var STANDIN_SOURCE_DIGEST = true ? "1a62599378cd7cdf32385f588eb3f983f07ea222d145ec5b6dc34cce9104f46c" : standinSourceDigest();
30898
30941
 
30899
30942
  // src/swift-standins.ts
30900
30943
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -37085,6 +37128,17 @@ function isPackageSource(file) {
37085
37128
  function sourceFiles(root) {
37086
37129
  return packageFiles(root, false).filter(isPackageSource);
37087
37130
  }
37131
+ function xcodeFlatResources(app) {
37132
+ if (!app) return /* @__PURE__ */ new Set();
37133
+ return new Set(
37134
+ app.resources.filter(
37135
+ (file) => !Object.hasOwn(app.resourceNames, file) && !file.split(import_node_path54.default.sep).some((segment) => segment.endsWith(".xcassets"))
37136
+ )
37137
+ );
37138
+ }
37139
+ function bundleResourcePath(flatResources, disk, file) {
37140
+ return flatResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37141
+ }
37088
37142
  function resourceCandidateFiles(root) {
37089
37143
  return packageFiles(root, false).filter(
37090
37144
  (file) => !isPackageSource(file) && !file.endsWith(".xcconfig") && !["project.pbxproj", "project.xcproj", "Package.resolved"].includes(
@@ -37143,12 +37197,24 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
37143
37197
  const disk = byRelative.get(file);
37144
37198
  return !disk || !layout2?.targetDirs.get(disk)?.startsWith(`${XCODE_FRAMEWORKS_DIR}/`);
37145
37199
  });
37146
- const found = enumerateBundleImages(relative2, readContents2, (file) => {
37147
- const disk = byRelative.get(file);
37148
- if (!disk) throw new Error(`image source ${file} has no input file`);
37149
- const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37150
- return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37151
- });
37200
+ const flatResources = xcodeFlatResources(layout2?.app);
37201
+ const bundled = new Map(
37202
+ relative2.map((file) => [
37203
+ bundleResourcePath(flatResources, byRelative.get(file), file),
37204
+ file
37205
+ ])
37206
+ );
37207
+ const found = enumerateBundleImages(
37208
+ [...bundled.keys()],
37209
+ (file) => readContents2(bundled.get(file) ?? file),
37210
+ (marked) => {
37211
+ const file = bundled.get(marked) ?? marked;
37212
+ const disk = byRelative.get(file);
37213
+ if (!disk) throw new Error(`image source ${file} has no input file`);
37214
+ const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
37215
+ return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
37216
+ }
37217
+ ).map((image) => ({ ...image, file: bundled.get(image.file) ?? image.file }));
37152
37218
  const colors = enumerateBundleColors(catalogFiles, readContents2);
37153
37219
  const symbols = enumerateBundleSymbols(catalogFiles, readContents2, (file) => {
37154
37220
  const disk = byRelative.get(file);
@@ -37332,15 +37398,20 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
37332
37398
  }
37333
37399
  }
37334
37400
  const groups = /* @__PURE__ */ new Map();
37335
- const appResources = new Set(xcode?.app.resources ?? []);
37401
+ const flatResources = xcodeFlatResources(xcode?.app);
37336
37402
  for (const file of relative2) {
37337
37403
  const disk = import_node_path54.default.join(packagePath, ...file.split("/"));
37404
+ const folderName = xcode?.app.resourceNames[disk];
37405
+ if (folderName) {
37406
+ watched.push(file);
37407
+ addFile(folderName, readPackageFile2(packagePath, disk, limits.resourceBytes));
37408
+ continue;
37409
+ }
37338
37410
  const key2 = xcode ? xcodeInputKey(xcode, disk, file) : file;
37339
37411
  const bundle = swiftResourceBundleForFile(bundles, key2);
37340
37412
  const bundlePath = bundle?.path ?? ".";
37341
37413
  const group = groups.get(bundlePath) ?? /* @__PURE__ */ new Map();
37342
- const resource = appResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
37343
- group.set(resource, disk);
37414
+ group.set(bundleResourcePath(flatResources, disk, file), disk);
37344
37415
  groups.set(bundlePath, group);
37345
37416
  }
37346
37417
  for (const bundle of bundles) {