peachsim 0.1.1979 → 0.1.1982

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 +155 -39
  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 +154 -38
  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 +155 -39
  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 +2 -2
  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 +2 -2
  47. package/dist-lib/native-app-identity-project.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.mjs +2 -2
  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 +155 -39
  68. package/dist-lib/swift-compile.cjs +22 -5
  69. package/dist-lib/swift-compile.mjs +22 -5
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -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 +23 -6
  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/dist-types/packages/peach-engine/src/engine/types.d.ts +4 -0
  81. package/dist-types/packages/peach-engine/src/engine/visible-frame.d.ts +1 -0
  82. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  83. package/package.json +1 -1
  84. package/src/expo-discovery-cache.ts +2 -0
  85. package/src/expo-swift-host.ts +144 -31
  86. package/src/expoSwiftContract.ts +1 -0
  87. package/src/swift-compile.ts +21 -2
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1979 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1982 | (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;
@@ -21721,7 +21721,7 @@ function swiftModuleDigest(root) {
21721
21721
  return digest2;
21722
21722
  }
21723
21723
  function swiftProjectBuildKey(moduleRoot, release) {
21724
- return (0, import_node_crypto17.createHash)("sha256").update(`${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
21724
+ return (0, import_node_crypto17.createHash)("sha256").update(`swift-framework/v2\0${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
21725
21725
  }
21726
21726
  var SYSTEM_MODULE_LIBRARIES = {
21727
21727
  "sqlite3.h": "sqlite3",
@@ -22238,7 +22238,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
22238
22238
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
22239
22239
  var MULTI_MANIFEST_VERSION = 66;
22240
22240
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
22241
- var compilerSourceDigest = true ? "4c6d0c445f1c9d7fab6a4d2bbd910ec116536acc8d1aa621f70c74c10dd9faba" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
22241
+ var compilerSourceDigest = true ? "2b36a6526c1736968b10c07d3f0413954b745c6a495b4b68702c61e477ba2565" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
22242
22242
  function swiftArtifactHash(input, release, moduleRoot) {
22243
22243
  const hash = (0, import_node_crypto17.createHash)("sha256");
22244
22244
  hash.update(`swift-compile
@@ -26064,7 +26064,7 @@ function mirrorTree2(source, target, skip) {
26064
26064
  if (!wanted.has(name3) && name3 !== skip)
26065
26065
  (0, import_node_fs43.rmSync)(import_node_path41.default.join(target, name3), { recursive: true, force: true });
26066
26066
  }
26067
- function stageFrameworkSource(moduleRoot, slot, frameworkKey) {
26067
+ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
26068
26068
  if (!slot) return moduleRoot;
26069
26069
  const staged = import_node_path41.default.join(slot, "source");
26070
26070
  const stagedModule = import_node_path41.default.join(staged, "packages", import_node_path41.default.basename(moduleRoot));
@@ -26075,6 +26075,16 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey) {
26075
26075
  swiftSharedSdkRoot(moduleRoot, false),
26076
26076
  import_node_path41.default.join(staged, "packages/peachsim/sdk/ios")
26077
26077
  );
26078
+ for (const file of swiftModuleInputFiles(moduleRoot)) {
26079
+ if (!file.startsWith("../")) continue;
26080
+ const from = import_node_path41.default.resolve(moduleRoot, file);
26081
+ const to = import_node_path41.default.resolve(stagedModule, file);
26082
+ if ((0, import_node_fs43.existsSync)(to) && (0, import_node_fs43.readFileSync)(from).equals((0, import_node_fs43.readFileSync)(to))) continue;
26083
+ (0, import_node_fs43.mkdirSync)(import_node_path41.default.dirname(to), { recursive: true });
26084
+ (0, import_node_fs43.copyFileSync)(from, to);
26085
+ }
26086
+ if (swiftProjectBuildKey(stagedModule, release) !== frameworkKey)
26087
+ throw new Error("Swift staged framework source differs from the caller");
26078
26088
  const modules = import_node_path41.default.join(staged, "node_modules");
26079
26089
  const target = (0, import_node_fs43.realpathSync)(import_node_path41.default.join(moduleRoot, "../../node_modules"));
26080
26090
  if (!(0, import_node_fs43.existsSync)(modules) || (0, import_node_fs43.readlinkSync)(modules) !== target) {
@@ -26251,7 +26261,14 @@ function compileSwiftProjectOnce(input, options) {
26251
26261
  const frameworkScratch = swiftFrameworkScratch(frameworkKey);
26252
26262
  const withFrameworkLock = (work) => distribution ? work(null) : withSwiftFrameworkSlot(frameworkKey, moduleRoot, options.signal, work);
26253
26263
  return withFrameworkLock(async (slot, frameworkLease) => {
26254
- const frameworkRoot = stageFrameworkSource(moduleRoot, slot, frameworkKey);
26264
+ const frameworkRoot = stageFrameworkSource(
26265
+ moduleRoot,
26266
+ slot,
26267
+ frameworkKey,
26268
+ options.release
26269
+ );
26270
+ if (swiftArtifactHash(input, options.release, frameworkRoot) !== hash)
26271
+ throw new Error("Swift staged project source differs from the caller");
26255
26272
  report("preparing compiler plugins");
26256
26273
  const pluginsFor = (pluginLease) => ensureMacroPlugins(
26257
26274
  frameworkRoot,
@@ -30799,12 +30816,12 @@ function sharedDir() {
30799
30816
  var strings = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
30800
30817
  var stringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
30801
30818
  function isExpoSwiftSourceUnit(value) {
30802
- return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && (value.nativeAppIdentity === void 0 || isNativeAppIdentity(value.nativeAppIdentity)) && strings(value.classes) && strings(value.bridgeModules) && strings(value.appDelegateSubscribers) && strings(value.reactDelegateHandlers) && stringRecord(value.files) && strings(value.frameworks) && (value.nativeTargets === void 0 || Array.isArray(value.nativeTargets) && value.nativeTargets.every(isRecord)) && (value.nativeFiles === void 0 || stringRecord(value.nativeFiles)) && (value.resources === void 0 || stringRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
30819
+ return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && (value.nativeAppIdentity === void 0 || isNativeAppIdentity(value.nativeAppIdentity)) && strings(value.classes) && strings(value.bridgeModules) && strings(value.appDelegateSubscribers) && strings(value.reactDelegateHandlers) && stringRecord(value.files) && strings(value.frameworks) && (value.workspaceSources === void 0 || strings(value.workspaceSources)) && (value.nativeTargets === void 0 || Array.isArray(value.nativeTargets) && value.nativeTargets.every(isRecord)) && (value.nativeFiles === void 0 || stringRecord(value.nativeFiles)) && (value.resources === void 0 || stringRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
30803
30820
  }
30804
30821
  var isDigest = (value) => /^[0-9a-f]{64}$/.test(value);
30805
30822
  var digestRecord = (value) => stringRecord(value) && Object.values(value).every(isDigest);
30806
30823
  function isStoredUnit(value) {
30807
- return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && strings(value.classes) && strings(value.bridgeModules) && strings(value.appDelegateSubscribers) && strings(value.reactDelegateHandlers) && digestRecord(value.files) && strings(value.frameworks) && (value.nativeTargets === void 0 || strings(value.nativeTargets) && value.nativeTargets.every(isDigest)) && (value.nativeFiles === void 0 || digestRecord(value.nativeFiles)) && (value.resources === void 0 || digestRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
30824
+ return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && strings(value.classes) && strings(value.bridgeModules) && strings(value.appDelegateSubscribers) && strings(value.reactDelegateHandlers) && digestRecord(value.files) && strings(value.frameworks) && (value.workspaceSources === void 0 || strings(value.workspaceSources)) && (value.nativeTargets === void 0 || strings(value.nativeTargets) && value.nativeTargets.every(isDigest)) && (value.nativeFiles === void 0 || digestRecord(value.nativeFiles)) && (value.resources === void 0 || digestRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
30808
30825
  }
30809
30826
  function readExpoDiscovery(key2) {
30810
30827
  let parsed;
@@ -31185,7 +31202,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
31185
31202
  return hash.digest("hex");
31186
31203
  }
31187
31204
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
31188
- var STANDIN_SOURCE_DIGEST = true ? "01e0eae770cafd2bbd23d98a22897ab31ada19f5a273a8f25da7c88aa3086c09" : standinSourceDigest();
31205
+ var STANDIN_SOURCE_DIGEST = true ? "5cfe4c5e593a540246f73f905de64026203a300735fd8f8a64343838e88f2bb9" : standinSourceDigest();
31189
31206
 
31190
31207
  // src/expoSwiftContract.ts
31191
31208
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -31515,7 +31532,7 @@ async function packageTreeDigest(root) {
31515
31532
 
31516
31533
  // src/expo-native-prebuilt.ts
31517
31534
  var EXPO_NATIVE_ENTRY_NAME = "ios";
31518
- var EXPO_NATIVE_COMPILER_DIGEST = true ? "858a349e21095ad768452af393a5eedaad4a799c2c76fd375de82fff69d2f988" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
31535
+ var EXPO_NATIVE_COMPILER_DIGEST = true ? "88b3db877ecb4ff83c9ecdbe1f42f181c198bd6dff6ce81a66f1c1a50f7af7af" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
31519
31536
  var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
31520
31537
  function readSources(value) {
31521
31538
  const sources = isRecord(value) ? value.sources : null;
@@ -41825,11 +41842,16 @@ function cloneUnits(units) {
41825
41842
  appDelegateSubscribers: unit2.appDelegateSubscribers.slice(),
41826
41843
  reactDelegateHandlers: unit2.reactDelegateHandlers.slice(),
41827
41844
  frameworks: unit2.frameworks.slice(),
41845
+ ...unit2.workspaceSources ? { workspaceSources: unit2.workspaceSources.slice() } : {},
41828
41846
  files: { ...unit2.files },
41829
41847
  ...unit2.nativeFiles ? { nativeFiles: { ...unit2.nativeFiles } } : {},
41830
41848
  ...unit2.headerAliases ? { headerAliases: { ...unit2.headerAliases } } : {},
41831
41849
  ...unit2.resources ? { resources: { ...unit2.resources } } : {},
41832
- ...unit2.resourceBundles ? { resourceBundles: unit2.resourceBundles.map((bundle) => ({ ...bundle })) } : {},
41850
+ ...unit2.resourceBundles ? {
41851
+ resourceBundles: unit2.resourceBundles.map((bundle) => ({
41852
+ ...bundle
41853
+ }))
41854
+ } : {},
41833
41855
  ...unit2.nativeTargets ? { nativeTargets: unit2.nativeTargets.map(cloneNativeTarget) } : {}
41834
41856
  }));
41835
41857
  }
@@ -42272,24 +42294,40 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
42272
42294
  installed?.input.files["Package.swift"] ?? ""
42273
42295
  );
42274
42296
  const units = [];
42297
+ const dependencyUnits = [];
42298
+ const processed = /* @__PURE__ */ new Set();
42275
42299
  const namespacesSeen = /* @__PURE__ */ new Set();
42276
42300
  const namespaceGroups = /* @__PURE__ */ new Map();
42277
42301
  let answeredInstalled = false;
42278
42302
  let needsNativeWorkspace = false;
42279
42303
  let bytes = 0;
42280
42304
  let fileCount = 0;
42281
- for (const [packageName, entry] of Object.entries(search).sort(
42282
- ([a], [b]) => a.localeCompare(b)
42283
- )) {
42305
+ const entries = Object.entries(search).sort(([a], [b]) => a.localeCompare(b));
42306
+ const queue = entries.slice();
42307
+ const queued = new Set(entries.map(([name3]) => name3));
42308
+ const reconsider = () => {
42309
+ for (const entry of entries)
42310
+ if (!processed.has(entry[0]) && !queued.has(entry[0])) {
42311
+ queue.push(entry);
42312
+ queued.add(entry[0]);
42313
+ }
42314
+ };
42315
+ for (const [packageName, entry] of queue) {
42316
+ queued.delete(packageName);
42317
+ if (processed.has(packageName)) continue;
42284
42318
  if (!entry || typeof entry !== "object")
42285
42319
  throw new Error("invalid Expo autolinking entry");
42286
42320
  const sourceRoot = Reflect.get(entry, "path");
42287
42321
  if (typeof sourceRoot !== "string")
42288
42322
  throw new Error("Expo autolinking entry has no path");
42289
42323
  const canonical = import_node_fs73.default.realpathSync(sourceRoot);
42290
- if (canonical.split(import_node_path71.default.sep).includes("node_modules") && peachAnsweredNativePackages().has(packageName)) {
42324
+ const answered2 = canonical.split(import_node_path71.default.sep).includes("node_modules") && peachAnsweredNativePackages().has(packageName);
42325
+ if (answered2) {
42291
42326
  answeredInstalled = true;
42292
- continue;
42327
+ if (installed || prepareNative) {
42328
+ processed.add(packageName);
42329
+ continue;
42330
+ }
42293
42331
  }
42294
42332
  for (const name3 of ["expo-module.config.json", "unimodule.json"]) {
42295
42333
  const descriptor = import_node_path71.default.join(canonical, name3);
@@ -42316,8 +42354,21 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
42316
42354
  const subscriberNames = delegateNames("appDelegateSubscribers");
42317
42355
  const handlerNames = delegateNames("reactDelegateHandlers");
42318
42356
  const deferredToWorkspace = prepareNative && !installedWorkspace && Array.isArray(pods) && pods.length > 0;
42319
- if ((!Array.isArray(modules) || modules.length === 0) && subscriberNames.length === 0 && handlerNames.length === 0)
42320
- continue;
42357
+ const dependencyOnly = answered2 || (!Array.isArray(modules) || modules.length === 0) && subscriberNames.length === 0 && handlerNames.length === 0;
42358
+ if (dependencyOnly) {
42359
+ if (installed || prepareNative || !Array.isArray(namespaces)) {
42360
+ processed.add(packageName);
42361
+ continue;
42362
+ }
42363
+ const imports2 = new Set(
42364
+ [...units, ...dependencyUnits].flatMap(
42365
+ (unit2) => Object.values(unit2.files).flatMap((source) => swiftImportNames(source))
42366
+ )
42367
+ );
42368
+ if (!namespaces.some((name3) => typeof name3 === "string" && imports2.has(name3)))
42369
+ continue;
42370
+ }
42371
+ processed.add(packageName);
42321
42372
  if (!Array.isArray(namespaces) || namespaces.length === 0 || !namespaces.every(
42322
42373
  (name3) => typeof name3 === "string" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name3)
42323
42374
  ))
@@ -42328,9 +42379,10 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
42328
42379
  }
42329
42380
  if (namespaces.length > 1 && !installed) {
42330
42381
  if (!nativeWorkspaceAvailable()) {
42331
- report(
42332
- `${packageName}: ${namespaces.join(", ")} need CocoaPods target membership, which only a Mac prepares; not compiled`
42333
- );
42382
+ if (!answered2)
42383
+ report(
42384
+ `${packageName}: ${namespaces.join(", ")} need CocoaPods target membership, which only a Mac prepares; not compiled`
42385
+ );
42334
42386
  continue;
42335
42387
  }
42336
42388
  const prepared = await prepareExpoNativeWorkspace(appRoot, signal, iosTarget);
@@ -42423,8 +42475,13 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
42423
42475
  walk3(file, binary2 || framework);
42424
42476
  continue;
42425
42477
  }
42426
- if (!binary2 && target.isFile() && /\.(?:mm?|c|cc|cpp)$/.test(child.name))
42427
- nativeSources.add(import_node_path71.default.relative(ios, file));
42478
+ if (!binary2 && target.isFile() && /\.(?:mm?|c|cc|cpp)$/.test(child.name)) {
42479
+ const source2 = linked ?? resolveSource(file);
42480
+ if (import_node_fs73.default.statSync(source2).size > 4096 || !/^(?:\s|\/\/[^\n]*|\/\*[\s\S]*?\*\/)*$/.test(
42481
+ import_node_fs73.default.readFileSync(source2, "utf8")
42482
+ ))
42483
+ nativeSources.add(import_node_path71.default.relative(ios, file));
42484
+ }
42428
42485
  if (!target.isFile() || !child.name.endsWith(".swift")) continue;
42429
42486
  const source = linked ?? resolveSource(file);
42430
42487
  if (sources.has(source)) continue;
@@ -42501,6 +42558,24 @@ ${import_node_fs73.default.readFileSync(source, "utf8")}`;
42501
42558
  const podspecFloor = podspec ? /\.platforms\s*=\s*\{\s*:ios\s*=>\s*['"](\d+(?:\.\d+){0,2})['"]/.exec(
42502
42559
  import_node_fs73.default.readFileSync(import_node_path71.default.join(ios, podspec), "utf8")
42503
42560
  )?.[1] : void 0;
42561
+ if (dependencyOnly && Object.keys(files2).length > 0) {
42562
+ dependencyUnits.push({
42563
+ namespace,
42564
+ moduleId: namespace,
42565
+ classes: [],
42566
+ bridgeModules: [],
42567
+ appDelegateSubscribers: [],
42568
+ reactDelegateHandlers: [],
42569
+ files: files2,
42570
+ frameworks: [...frameworks],
42571
+ ...nativeSources.size ? { workspaceSources: [namespace] } : {},
42572
+ ...podspecFloor ? {
42573
+ nativeTargets: [synthesizedNativeTarget(namespace, podspecFloor)]
42574
+ } : {}
42575
+ });
42576
+ reconsider();
42577
+ }
42578
+ if (dependencyOnly) continue;
42504
42579
  for (const declaration of declarations) {
42505
42580
  const className = declaration.reference;
42506
42581
  const owner = className.split(".")[0];
@@ -42533,10 +42608,13 @@ ${import_node_fs73.default.readFileSync(source, "utf8")}`;
42533
42608
  files: closure,
42534
42609
  frameworks: [...frameworks],
42535
42610
  ...absentFrameworks.length > 0 ? { absentFrameworks } : {},
42536
- ...podspecFloor ? { nativeTargets: [synthesizedNativeTarget(namespace, podspecFloor)] } : {}
42611
+ ...podspecFloor ? {
42612
+ nativeTargets: [synthesizedNativeTarget(namespace, podspecFloor)]
42613
+ } : {}
42537
42614
  };
42538
42615
  unit2.files[EXPO_SWIFT_ENTRY] = expoEntry([unit2]);
42539
42616
  units.push(unit2);
42617
+ reconsider();
42540
42618
  }
42541
42619
  }
42542
42620
  if (namespaces.length > 1) {
@@ -42653,23 +42731,26 @@ ${import_node_fs73.default.readFileSync(file, "utf8")}`;
42653
42731
  );
42654
42732
  const allFiles = Object.assign(
42655
42733
  {},
42656
- ...units.map((unit2) => unit2.files)
42734
+ ...[...units, ...dependencyUnits].map((unit2) => unit2.files)
42657
42735
  );
42658
- const targets = [...new Set(units.map((unit2) => unit2.namespace))].map((namespace) => ({
42736
+ const targets = [
42737
+ ...new Set([...units, ...dependencyUnits].map((unit2) => unit2.namespace))
42738
+ ].map((namespace) => ({
42659
42739
  name: namespace,
42660
42740
  path: `Sources/${namespace}`
42661
42741
  }));
42662
42742
  const dependencies = swiftTargetDependencies(allFiles, targets);
42663
42743
  const byNamespace = /* @__PURE__ */ new Map();
42664
- for (const unit2 of units) {
42665
- const entries = byNamespace.get(unit2.namespace) ?? [];
42666
- entries.push(unit2);
42667
- byNamespace.set(unit2.namespace, entries);
42744
+ for (const unit2 of [...units, ...dependencyUnits]) {
42745
+ const entries2 = byNamespace.get(unit2.namespace) ?? [];
42746
+ entries2.push(unit2);
42747
+ byNamespace.set(unit2.namespace, entries2);
42668
42748
  }
42669
42749
  for (const unit2 of units) {
42670
42750
  const included = /* @__PURE__ */ new Set([unit2.namespace]);
42751
+ const ownDependencies = swiftTargetDependencies(unit2.files, targets).get(unit2.namespace) ?? [];
42671
42752
  const visit3 = (namespace) => {
42672
- for (const dependency of dependencies.get(namespace) ?? []) {
42753
+ for (const dependency of namespace === unit2.namespace ? ownDependencies : dependencies.get(namespace) ?? []) {
42673
42754
  if (!byNamespace.has(dependency) || included.has(dependency)) continue;
42674
42755
  included.add(dependency);
42675
42756
  visit3(dependency);
@@ -42686,6 +42767,12 @@ ${import_node_fs73.default.readFileSync(file, "utf8")}`;
42686
42767
  ...dependency.flatMap((item) => item.frameworks)
42687
42768
  ])
42688
42769
  ];
42770
+ unit2.workspaceSources = [
42771
+ .../* @__PURE__ */ new Set([
42772
+ ...unit2.workspaceSources ?? [],
42773
+ ...dependency.flatMap((item) => item.workspaceSources ?? [])
42774
+ ])
42775
+ ];
42689
42776
  unit2.nativeTargets = [
42690
42777
  ...new Map(
42691
42778
  [
@@ -42708,11 +42795,19 @@ ${import_node_fs73.default.readFileSync(file, "utf8")}`;
42708
42795
  if (name3.startsWith(`Sources/${namespace}/`)) unit2.files[name3] = source;
42709
42796
  }
42710
42797
  }
42711
- unit2.files["Package.swift"] = expoManifest(
42712
- unit2.files,
42713
- "",
42714
- targetSettings2([...included].flatMap((namespace) => byNamespace.get(namespace)))
42798
+ const settings = targetSettings2(
42799
+ [...included].flatMap((namespace) => byNamespace.get(namespace))
42715
42800
  );
42801
+ if (!installed)
42802
+ for (const namespace of included)
42803
+ settings.set(namespace, {
42804
+ languageMode: 5,
42805
+ mainActorIsolation: false,
42806
+ resources: false,
42807
+ ...settings.get(namespace),
42808
+ dependencies: (namespace === unit2.namespace ? ownDependencies : dependencies.get(namespace) ?? []).filter((name3) => included.has(name3)).map((name3) => ({ kind: "target", name: name3 }))
42809
+ });
42810
+ unit2.files["Package.swift"] = expoManifest(unit2.files, "", settings);
42716
42811
  }
42717
42812
  if (nativeAppIdentity)
42718
42813
  for (const unit2 of units) unit2.nativeAppIdentity = nativeAppIdentity;
@@ -42751,8 +42846,21 @@ let package = Package(name: "PeachExpo", targets: [${declarations.join(", ")}, .
42751
42846
  function targetSettings2(units) {
42752
42847
  const settings = /* @__PURE__ */ new Map();
42753
42848
  for (const unit2 of units) {
42754
- for (const target of swiftManifestTargets(unit2.files["Package.swift"] ?? ""))
42755
- settings.set(target.name, target);
42849
+ for (const target of swiftManifestTargets(unit2.files["Package.swift"] ?? "")) {
42850
+ const previous = settings.get(target.name);
42851
+ const dependencies = [
42852
+ ...previous?.dependencies ?? [],
42853
+ ...target.dependencies ?? []
42854
+ ];
42855
+ settings.set(target.name, {
42856
+ ...target,
42857
+ dependencies: [
42858
+ ...new Map(
42859
+ dependencies.map((dependency) => [JSON.stringify(dependency), dependency])
42860
+ ).values()
42861
+ ]
42862
+ });
42863
+ }
42756
42864
  if (unit2.swiftLanguageMode !== void 0)
42757
42865
  settings.set(unit2.namespace, {
42758
42866
  ...settings.get(unit2.namespace),
@@ -43113,7 +43221,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
43113
43221
  projectFor(packagePath).nativeFiles = unit2.nativeFiles;
43114
43222
  projectFor(packagePath).headerAliases = unit2.headerAliases;
43115
43223
  projectFor(packagePath).resourceBundles = unit2.resourceBundles;
43116
- projectFor(packagePath).bundleFiles = unit2.resources ? { files: unit2.resources, bundles: unit2.resourceBundles ?? [], watched: [] } : void 0;
43224
+ projectFor(packagePath).bundleFiles = unit2.resources ? {
43225
+ files: unit2.resources,
43226
+ bundles: unit2.resourceBundles ?? [],
43227
+ watched: []
43228
+ } : void 0;
43117
43229
  const stamp = sourceContentStamp(packagePath, module2.root);
43118
43230
  const failed = readFailedCompilation(packagePath);
43119
43231
  if (failed?.stamp === stamp) {
@@ -43289,8 +43401,12 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
43289
43401
  linked.push(unit2);
43290
43402
  } catch (error) {
43291
43403
  signal.throwIfAborted();
43404
+ const message = error instanceof Error ? error.message : String(error);
43405
+ const missingImports = [...message.matchAll(/^ (\S+)/gm)].map(
43406
+ (match) => match[1]
43407
+ );
43292
43408
  const diagnostic = [
43293
- error instanceof Error ? error.message : String(error),
43409
+ error instanceof SwiftMissingModulesError && unit2.workspaceSources?.length ? `${unit2.workspaceSources.map((name3) => `${name3} needs a Mac-prepared workspace`).join("; ")}; unresolved imports: ${missingImports.join(", ")}` : message,
43294
43410
  ...gaps.get(unit2) ?? []
43295
43411
  ].join("\n");
43296
43412
  const unitFiles = [...Object.keys(unit2.files), ...expoUnitAppPaths(unit2)];
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1979 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1982 | (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.1979 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1982 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bundleGlobalFooter.ts
4
4
  function findBundleFooter(source, prefix) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1979 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1982 | (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;