peachsim 0.1.1918 → 0.1.1920

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 (87) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +71 -23
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +68 -19
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +69 -20
  31. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +3 -3
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +3 -3
  47. package/dist-lib/native-app-identity-project.cjs +3 -3
  48. package/dist-lib/native-app-identity-project.mjs +3 -3
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +53 -53
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +71 -23
  68. package/dist-lib/swift-compile.cjs +28 -10
  69. package/dist-lib/swift-compile.mjs +28 -10
  70. package/dist-lib/swift-package.cjs +4 -1
  71. package/dist-lib/swift-package.mjs +3 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +67 -18
  77. package/dist-lib/vite.cjs +1 -1
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/package.json +1 -1
  81. package/src/expo-swift-host.ts +6 -6
  82. package/src/swift-compile.ts +29 -5
  83. package/src/swift-guest-link.ts +3 -3
  84. package/src/swift-host.ts +54 -9
  85. package/src/swift-installed-targets.ts +1 -1
  86. package/src/swift-package.ts +3 -0
  87. package/src/swift-standins.ts +0 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1918 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1920 | (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": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "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": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "e66452b430a7dc749e0db64e21a2f3cd969ba48fa1ae31cd5de5c366c3783bf7", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "450ee02b48bcdbbacbb4e94cd161308f1dac1bdb540ed5033c2433f717f738d2", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "c126efdce870c1953833ec9c32d66b15bbe422ab2a31b7531be3e278edbc9737", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "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": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "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": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "450ee02b48bcdbbacbb4e94cd161308f1dac1bdb540ed5033c2433f717f738d2", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "c126efdce870c1953833ec9c32d66b15bbe422ab2a31b7531be3e278edbc9737", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -5378,6 +5378,7 @@ function isSwiftNativeTranslationUnit(file) {
5378
5378
  (extension) => file.endsWith(extension)
5379
5379
  );
5380
5380
  }
5381
+ var SWIFT_STANDINS_DIR = "__standins__";
5381
5382
  var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
5382
5383
  ...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
5383
5384
  ".s",
@@ -13227,7 +13228,7 @@ function linkGuestImages(options) {
13227
13228
  );
13228
13229
  const output2 = import_node_fs14.default.openSync(trace, "w");
13229
13230
  try {
13230
- (0, import_node_child_process11.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "inherit"] });
13231
+ (0, import_node_child_process11.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "pipe"] });
13231
13232
  } finally {
13232
13233
  import_node_fs14.default.closeSync(output2);
13233
13234
  }
@@ -13599,7 +13600,7 @@ function discoverGuestLinkInputs(options) {
13599
13600
  const traceOutput = import_node_fs14.default.openSync(trace, "w");
13600
13601
  try {
13601
13602
  (0, import_node_child_process11.execFileSync)(options.wasmLd, [`@${response}`], {
13602
- stdio: ["ignore", traceOutput, "inherit"]
13603
+ stdio: ["ignore", traceOutput, "pipe"]
13603
13604
  });
13604
13605
  } finally {
13605
13606
  import_node_fs14.default.closeSync(traceOutput);
@@ -13754,7 +13755,7 @@ function verifyGuestSymbolScopes(options) {
13754
13755
  const traceOutput = import_node_fs14.default.openSync(tracePath, "w");
13755
13756
  try {
13756
13757
  (0, import_node_child_process11.execFileSync)(options.wasmLd, [`@${response}`], {
13757
- stdio: ["ignore", traceOutput, "inherit"]
13758
+ stdio: ["ignore", traceOutput, "pipe"]
13758
13759
  });
13759
13760
  } finally {
13760
13761
  import_node_fs14.default.closeSync(traceOutput);
@@ -15697,7 +15698,7 @@ function swiftModuleInterface(moduleRoot, name3, interfaceRoot) {
15697
15698
  if (declared.size === 0) return null;
15698
15699
  return { declared, header: clangInterfaceHeader((0, import_node_fs25.readFileSync)(built2, "utf8")) };
15699
15700
  }
15700
- var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(/^@import CoreFoundation;$/gm, "@import Foundation;").replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1");
15701
+ var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(/^@import CoreFoundation;$/gm, "@import Foundation;").replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
15701
15702
  var swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
15702
15703
  ...[
15703
15704
  ...header.matchAll(
@@ -16371,8 +16372,12 @@ function providedModulesPath(root, modules, excluded) {
16371
16372
  return directory;
16372
16373
  }
16373
16374
  function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWORKS) {
16374
- const localNames = new Set(targets.map((target) => target.name));
16375
- const names = /* @__PURE__ */ new Set([...frameworks, ...localNames]);
16375
+ const localNames = new Set(
16376
+ targets.flatMap(
16377
+ (target) => target.path.startsWith(`${SWIFT_STANDINS_DIR}/`) ? [] : [target.name]
16378
+ )
16379
+ );
16380
+ const names = /* @__PURE__ */ new Set([...frameworks, ...targets.map((target) => target.name)]);
16376
16381
  const siblings = /* @__PURE__ */ new Map();
16377
16382
  for (const target of targets) {
16378
16383
  const prefix = target.path === "." ? "" : `${target.path}/`;
@@ -16442,7 +16447,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
16442
16447
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
16443
16448
  var MULTI_MANIFEST_VERSION = 66;
16444
16449
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
16445
- var compilerSourceDigest = true ? "e3dfed5d099f11621c3c0eec35a1e6029262dcada1d8972551bd952e593f9f2f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16450
+ var compilerSourceDigest = true ? "e0f99d38b4422622101a49acffd939440548c5e58e5bb4d73930126572c11683" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16446
16451
  function swiftArtifactHash(input, release, moduleRoot) {
16447
16452
  const hash = (0, import_node_crypto12.createHash)("sha256");
16448
16453
  hash.update(`swift-compile
@@ -18887,7 +18892,15 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
18887
18892
  allowExisting: true
18888
18893
  }
18889
18894
  );
18890
- const quoteFlags = origin ? ["-iquote", import_node_path25.default.join(layout2.root, origin)] : [];
18895
+ const stagedDir = import_node_path25.default.posix.dirname(file);
18896
+ const quoteDirs = [
18897
+ ...stagedDir !== "." ? [stagedDir] : [],
18898
+ ...origin && origin !== stagedDir ? [origin] : []
18899
+ ];
18900
+ const quoteFlags = quoteDirs.flatMap((dir) => [
18901
+ "-iquote",
18902
+ import_node_path25.default.join(layout2.root, dir)
18903
+ ]);
18891
18904
  const perFile = [
18892
18905
  ...file.endsWith(".c") && swiftWholeFileArm64Guard(contents) ? ["-D__arm64__=1"] : [],
18893
18906
  .../\.mm?$/.test(file) ? ["-fobjc-exceptions"] : [],
@@ -19636,6 +19649,9 @@ module ${moduleName}.Swift {
19636
19649
  ...producers.filter((name3) => !included.has(name3))
19637
19650
  ])
19638
19651
  ],
19652
+ emittedHeaderProducers: [
19653
+ .../* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers])
19654
+ ],
19639
19655
  nativeHeaderDeclarations,
19640
19656
  headerProductTarget,
19641
19657
  targetFailures,
@@ -20562,7 +20578,9 @@ function compileSwiftProjectOnce(input, options) {
20562
20578
  SWIFTPM_PROGRESS,
20563
20579
  SWIFTPM_NOISE
20564
20580
  );
20565
- for (const producer of build === preparation.headerProductTarget ? preparation.headerProducers : [build]) {
20581
+ for (const producer of build === preparation.headerProductTarget ? preparation.emittedHeaderProducers : preparation.emittedHeaderProducers.filter(
20582
+ (candidate) => candidate === build || !preparation.headerProducers.includes(candidate)
20583
+ )) {
20566
20584
  const emitted = import_node_path25.default.join(
20567
20585
  root,
20568
20586
  ".build",
@@ -29587,7 +29605,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
29587
29605
  return hash.digest("hex");
29588
29606
  }
29589
29607
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
29590
- var STANDIN_SOURCE_DIGEST = true ? "319c02d1bbe0c54faca9f9329be8dd5fad539cd7fe609696bb303a4596e7d564" : standinSourceDigest();
29608
+ var STANDIN_SOURCE_DIGEST = true ? "dd0f39366da15dd9d36186cc0427ce01492a37915ffe39f624ebda75d4f545a1" : standinSourceDigest();
29591
29609
 
29592
29610
  // src/swift-standins.ts
29593
29611
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -30274,7 +30292,6 @@ async function emitCxxStandin(input) {
30274
30292
  // src/swift-standins.ts
30275
30293
  var TRIPLE = "wasm32-unknown-wasip1";
30276
30294
  var cacheDir4 = import_node_path46.default.join(cacheDir(), "swift-standins");
30277
- var SWIFT_STANDINS_DIR = "__standins__";
30278
30295
  function exec(file, args, cwd) {
30279
30296
  return (0, import_node_child_process29.execFileSync)(file, args, {
30280
30297
  cwd,
@@ -34399,12 +34416,44 @@ async function buildXcodeLayout(root) {
34399
34416
  for (const framework of app.frameworks) {
34400
34417
  const target = targets.find((target2) => target2.name === frameworkNames.get(framework));
34401
34418
  if (!target) continue;
34402
- target.dependencies = framework.targetDependencies.flatMap(
34403
- (identity2) => app.frameworks.filter((dependency) => dependency.targetIdentity === identity2).flatMap((dependency) => {
34404
- const name3 = frameworkNames.get(dependency);
34405
- return name3 ? [{ kind: "target", name: name3 }] : [];
34419
+ const productLinks = packages.sourceLinks.owners.find((owner) => owner.module === framework.moduleName)?.products ?? [];
34420
+ target.dependencies = [
34421
+ ...framework.targetDependencies.flatMap(
34422
+ (identity2) => app.frameworks.filter((dependency) => dependency.targetIdentity === identity2).flatMap((dependency) => {
34423
+ const name3 = frameworkNames.get(dependency);
34424
+ return name3 ? [{ kind: "target", name: name3 }] : [];
34425
+ })
34426
+ ),
34427
+ ...productLinks.flatMap(({ target: productId }) => {
34428
+ const product = packages.sourceLinks.targets.find((item) => item.id === productId);
34429
+ return (product?.dependencies ?? []).flatMap(({ target: targetId }) => {
34430
+ const item = packages.sourceLinks.targets.find((node) => node.id === targetId);
34431
+ if (!item) return [];
34432
+ if (item.sourceTarget)
34433
+ return [
34434
+ { kind: "target", name: item.sourceTarget }
34435
+ ];
34436
+ return item.productType === "swiftpm.target.binary" ? standins.filter((standin) => standin.target === item.productName).map(
34437
+ (standin) => ({
34438
+ kind: "target",
34439
+ name: standin.module
34440
+ })
34441
+ ) : [];
34442
+ });
34443
+ }),
34444
+ ...(framework.packageProducts ?? []).flatMap(({ product, source }) => {
34445
+ const native = packages.nativeProducts.find(
34446
+ ({ name: name3, source: origin }) => name3 === product && (source.kind === "unnamed" || origin === (source.kind === "remote" ? source.url : import_node_path51.default.resolve(source.dir)))
34447
+ );
34448
+ return native ? [
34449
+ {
34450
+ kind: "product",
34451
+ name: native.name,
34452
+ package: native.packageDir
34453
+ }
34454
+ ] : [];
34406
34455
  })
34407
- );
34456
+ ];
34408
34457
  }
34409
34458
  const packagePaths = /* @__PURE__ */ new Map();
34410
34459
  const packageFiles2 = /* @__PURE__ */ new Map();
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1918 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1920 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1918 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1920 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1918 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1920 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1918",
3
+ "version": "0.1.1920",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -76,13 +76,10 @@ import {
76
76
  swiftManifestTargets,
77
77
  swiftManifestSettings,
78
78
  swiftNativeSupportFiles,
79
+ SWIFT_STANDINS_DIR,
79
80
  type SwiftPackageTarget,
80
81
  } from './swift-package'
81
- import {
82
- standinGenerationInputs,
83
- swiftStandins,
84
- SWIFT_STANDINS_DIR,
85
- } from './swift-standins'
82
+ import { standinGenerationInputs, swiftStandins } from './swift-standins'
86
83
  import { MAX_SWIFT_COMPILE_FILES, MAX_SWIFT_COMPILE_SOURCE_BYTES } from './swift-submit'
87
84
  import { swiftCacheDir } from './swift-toolchain'
88
85
  import { registersReactModule } from './turbo-source'
@@ -693,7 +690,10 @@ function enrichInstalledUnits(
693
690
  const visit = (name: string, root = false) => {
694
691
  // React's SDK module declares the upstream bridge surface; its installed
695
692
  // native target owns the implementations and shared handler state.
696
- if (included.has(name) || (!root && provided.has(name) && (bridge || name !== 'React')))
693
+ if (
694
+ included.has(name) ||
695
+ (!root && provided.has(name) && (bridge || name !== 'React'))
696
+ )
697
697
  return
698
698
  const dependency = targetByName.get(name)
699
699
  if (!dependency) return
@@ -86,6 +86,7 @@ import {
86
86
  clangSettingEntries,
87
87
  withoutGlogModuleMap,
88
88
  SWIFT_NATIVE_SOURCE_EXTENSIONS,
89
+ SWIFT_STANDINS_DIR,
89
90
  type SwiftPackageTarget,
90
91
  } from './swift-package'
91
92
  import {
@@ -423,6 +424,7 @@ const clangInterfaceHeader = (header: string): string =>
423
424
  .replace(/^@import (?:UIKitCore|UIKitText);$/gm, '@import UIKit;')
424
425
  .replace(/^@import CoreFoundation;$/gm, '@import Foundation;')
425
426
  .replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, '$1')
427
+ .replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, '')
426
428
 
427
429
  /** the Objective-C protocols and classes a generated interface header defines. */
428
430
  const swiftInterfaceDeclarations = (header: string): Set<string> =>
@@ -1397,8 +1399,14 @@ export function swiftTargetDependencies(
1397
1399
  >[],
1398
1400
  frameworks: Iterable<string> = OPTIONAL_FRAMEWORKS,
1399
1401
  ): Map<string, string[]> {
1400
- const localNames = new Set(targets.map((target) => target.name))
1401
- const names = new Set([...frameworks, ...localNames])
1402
+ // a binary stand-in replaces a framework xcode reaches through search paths
1403
+ // and autolinking, never a declared edge, so its importers keep that edge
1404
+ const localNames = new Set(
1405
+ targets.flatMap((target) =>
1406
+ target.path.startsWith(`${SWIFT_STANDINS_DIR}/`) ? [] : [target.name],
1407
+ ),
1408
+ )
1409
+ const names = new Set([...frameworks, ...targets.map((target) => target.name)])
1402
1410
  const siblings = new Map<string, string[]>()
1403
1411
  for (const target of targets) {
1404
1412
  const prefix = target.path === '.' ? '' : `${target.path}/`
@@ -4229,6 +4237,7 @@ export function writeSwiftProject(
4229
4237
  moduleRoot: string,
4230
4238
  prebuilt?: SwiftFrameworkProducts,
4231
4239
  ): SwiftProjectPreparation & {
4240
+ emittedHeaderProducers: string[]
4232
4241
  generatedOwners: Map<string, string>
4233
4242
  targetToolset: boolean
4234
4243
  } {
@@ -4950,7 +4959,15 @@ export function writeSwiftProject(
4950
4959
  )
4951
4960
  // a relocated unit still searches its original containing directory
4952
4961
  // before quoted header maps and configured user search paths.
4953
- const quoteFlags = origin ? ['-iquote', path.join(layout.root, origin)] : []
4962
+ const stagedDir = path.posix.dirname(file)
4963
+ const quoteDirs = [
4964
+ ...(stagedDir !== '.' ? [stagedDir] : []),
4965
+ ...(origin && origin !== stagedDir ? [origin] : []),
4966
+ ]
4967
+ const quoteFlags = quoteDirs.flatMap((dir) => [
4968
+ '-iquote',
4969
+ path.join(layout.root, dir),
4970
+ ])
4954
4971
  const perFile = [
4955
4972
  ...(file.endsWith('.c') && swiftWholeFileArm64Guard(contents)
4956
4973
  ? ['-D__arm64__=1']
@@ -5861,6 +5878,9 @@ export function writeSwiftProject(
5861
5878
  ...producers.filter((name) => !included.has(name)),
5862
5879
  ]),
5863
5880
  ],
5881
+ emittedHeaderProducers: [
5882
+ ...new Set([...Object.keys(nativeHeaderDeclarations), ...producers]),
5883
+ ],
5864
5884
  nativeHeaderDeclarations,
5865
5885
  headerProductTarget,
5866
5886
  targetFailures,
@@ -7085,8 +7105,12 @@ function compileSwiftProjectOnce(
7085
7105
  SWIFTPM_NOISE,
7086
7106
  )
7087
7107
  for (const producer of build === preparation.headerProductTarget
7088
- ? preparation.headerProducers
7089
- : [build]) {
7108
+ ? preparation.emittedHeaderProducers
7109
+ : preparation.emittedHeaderProducers.filter(
7110
+ (candidate) =>
7111
+ candidate === build ||
7112
+ !preparation.headerProducers.includes(candidate),
7113
+ )) {
7090
7114
  const emitted = path.join(
7091
7115
  root,
7092
7116
  '.build',
@@ -336,7 +336,7 @@ export function linkGuestImages(
336
336
  )
337
337
  const output = fs.openSync(trace, 'w')
338
338
  try {
339
- execFileSync(wasmLd, [`@${response}`], { stdio: ['ignore', output, 'inherit'] })
339
+ execFileSync(wasmLd, [`@${response}`], { stdio: ['ignore', output, 'pipe'] })
340
340
  } finally {
341
341
  fs.closeSync(output)
342
342
  }
@@ -760,7 +760,7 @@ export function discoverGuestLinkInputs(options: {
760
760
  const traceOutput = fs.openSync(trace, 'w')
761
761
  try {
762
762
  execFileSync(options.wasmLd, [`@${response}`], {
763
- stdio: ['ignore', traceOutput, 'inherit'],
763
+ stdio: ['ignore', traceOutput, 'pipe'],
764
764
  })
765
765
  } finally {
766
766
  fs.closeSync(traceOutput)
@@ -988,7 +988,7 @@ export function verifyGuestSymbolScopes(options: {
988
988
  const traceOutput = fs.openSync(tracePath, 'w')
989
989
  try {
990
990
  execFileSync(options.wasmLd, [`@${response}`], {
991
- stdio: ['ignore', traceOutput, 'inherit'],
991
+ stdio: ['ignore', traceOutput, 'pipe'],
992
992
  })
993
993
  } finally {
994
994
  fs.closeSync(traceOutput)
package/src/swift-host.ts CHANGED
@@ -60,6 +60,7 @@ import {
60
60
  swiftResourceBundleForFile,
61
61
  swiftResourceBundleInfoPlist,
62
62
  SWIFT_NATIVE_SOURCE_EXTENSIONS,
63
+ SWIFT_STANDINS_DIR,
63
64
  swiftTargetModuleName,
64
65
  swiftPackageIdentity,
65
66
  clangMacroSetting,
@@ -91,7 +92,6 @@ import {
91
92
  standinGenerationInputs,
92
93
  standinLibrary,
93
94
  swiftStandins,
94
- SWIFT_STANDINS_DIR,
95
95
  type SwiftStandin,
96
96
  type SwiftStandins,
97
97
  } from './swift-standins'
@@ -872,14 +872,59 @@ async function buildXcodeLayout(root: string): Promise<XcodeLayout | null> {
872
872
  for (const framework of app.frameworks) {
873
873
  const target = targets.find((target) => target.name === frameworkNames.get(framework))
874
874
  if (!target) continue
875
- target.dependencies = framework.targetDependencies.flatMap((identity) =>
876
- app.frameworks
877
- .filter((dependency) => dependency.targetIdentity === identity)
878
- .flatMap((dependency) => {
879
- const name = frameworkNames.get(dependency)
880
- return name ? [{ kind: 'target', name } satisfies SwiftTargetDependency] : []
881
- }),
882
- )
875
+ const productLinks =
876
+ packages.sourceLinks.owners.find((owner) => owner.module === framework.moduleName)
877
+ ?.products ?? []
878
+ target.dependencies = [
879
+ ...framework.targetDependencies.flatMap((identity) =>
880
+ app.frameworks
881
+ .filter((dependency) => dependency.targetIdentity === identity)
882
+ .flatMap((dependency) => {
883
+ const name = frameworkNames.get(dependency)
884
+ return name ? [{ kind: 'target', name } satisfies SwiftTargetDependency] : []
885
+ }),
886
+ ),
887
+ ...productLinks.flatMap(({ target: productId }) => {
888
+ const product = packages.sourceLinks.targets.find((item) => item.id === productId)
889
+ return (product?.dependencies ?? []).flatMap(({ target: targetId }) => {
890
+ const item = packages.sourceLinks.targets.find((node) => node.id === targetId)
891
+ if (!item) return []
892
+ if (item.sourceTarget)
893
+ return [
894
+ { kind: 'target', name: item.sourceTarget } satisfies SwiftTargetDependency,
895
+ ]
896
+ return item.productType === 'swiftpm.target.binary'
897
+ ? standins
898
+ .filter((standin) => standin.target === item.productName)
899
+ .map(
900
+ (standin) =>
901
+ ({
902
+ kind: 'target',
903
+ name: standin.module,
904
+ }) satisfies SwiftTargetDependency,
905
+ )
906
+ : []
907
+ })
908
+ }),
909
+ ...(framework.packageProducts ?? []).flatMap(({ product, source }) => {
910
+ const native = packages.nativeProducts.find(
911
+ ({ name, source: origin }) =>
912
+ name === product &&
913
+ (source.kind === 'unnamed' ||
914
+ origin ===
915
+ (source.kind === 'remote' ? source.url : path.resolve(source.dir))),
916
+ )
917
+ return native
918
+ ? [
919
+ {
920
+ kind: 'product',
921
+ name: native.name,
922
+ package: native.packageDir,
923
+ } satisfies SwiftTargetDependency,
924
+ ]
925
+ : []
926
+ }),
927
+ ]
883
928
  }
884
929
  const packagePaths = new Map<string, string>()
885
930
  const packageFiles = new Map<string, string>()
@@ -4,10 +4,10 @@ import {
4
4
  moduleMapName,
5
5
  swiftManifestTargets,
6
6
  swiftNativeSupportFiles,
7
+ SWIFT_STANDINS_DIR,
7
8
  type SwiftPackageTarget,
8
9
  } from './swift-package'
9
10
  import { projectSourceKey } from './swift-source-file'
10
- import { SWIFT_STANDINS_DIR } from './swift-standins'
11
11
  import type { SwiftCompileInput } from './swift-compile'
12
12
 
13
13
  /** installed CocoaPods declarations and mixed implementations keep one source owner. */
@@ -250,6 +250,9 @@ export function isSwiftNativeTranslationUnit(file: string): boolean {
250
250
  // along because swiftpm compiles it for the destination: its
251
251
  // SupportedLanguageExtension admits .s and .S to clang targets at tools 5 and
252
252
  // later, and a target without a portable path is refused before transport.
253
+ // each binary stand-in is a target under its module's directory here.
254
+ export const SWIFT_STANDINS_DIR = '__standins__'
255
+
253
256
  export const SWIFT_NATIVE_SOURCE_EXTENSIONS = [
254
257
  ...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
255
258
  '.s',
@@ -72,9 +72,6 @@ import type { SwiftPackageBinary } from './swift-packages'
72
72
  const TRIPLE = 'wasm32-unknown-wasip1'
73
73
  // every stand-in artifact and temporary workspace belongs to peach.
74
74
  const cacheDir = path.join(peachCacheDir(), 'swift-standins')
75
- // each binary stand-in is a target under its module's directory here.
76
- export const SWIFT_STANDINS_DIR = '__standins__'
77
-
78
75
  export interface SwiftStandin {
79
76
  /** the module it stands in for, which names its compile target. */
80
77
  module: string