peachsim 0.1.762 → 0.1.764

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 (74) hide show
  1. package/README.md +5 -0
  2. package/cli/bridge-flow-runner.ts +3 -4
  3. package/cli/commands/inspect/settling.ts +193 -162
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/agent-identity.cjs +1 -1
  7. package/dist-lib/agent-sessions.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +10 -16
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +191 -159
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity.cjs +1 -1
  49. package/dist-lib/native-app-identity.mjs +1 -1
  50. package/dist-lib/native-firebase-metadata.cjs +1 -1
  51. package/dist-lib/native-firebase-metadata.mjs +1 -1
  52. package/dist-lib/plist.cjs +1 -1
  53. package/dist-lib/plist.mjs +1 -1
  54. package/dist-lib/profiles.cjs +1 -1
  55. package/dist-lib/public-brand.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.mjs +1 -1
  58. package/dist-lib/render-mode.cjs +1 -1
  59. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  60. package/dist-lib/sdk.cjs +191 -159
  61. package/dist-lib/sdk.mjs +191 -159
  62. package/dist-lib/skills.cjs +206 -181
  63. package/dist-lib/swift-compile.cjs +1 -1
  64. package/dist-lib/swift-compile.mjs +1 -1
  65. package/dist-lib/swift-package.cjs +1 -1
  66. package/dist-lib/swift-package.mjs +1 -1
  67. package/dist-lib/swift-submit.cjs +1 -1
  68. package/dist-lib/swift-submit.mjs +1 -1
  69. package/dist-lib/swift-toolchain.cjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite-swift.cjs +10 -16
  72. package/dist-lib/vite.cjs +1 -1
  73. package/package.json +1 -1
  74. package/src/swift-packages.ts +21 -19
@@ -3,8 +3,8 @@
3
3
  // (swift-package-manifest.ts) to the source targets that build it; remote
4
4
  // packages are fetched at the revision the app's Package.resolved pins, into
5
5
  // .build/peach/checkouts under the app's root. peach compiles swift source
6
- // only, so a product reaching a binary or c-family target stays missing,
7
- // with the reason, and so does every module such a package declares.
6
+ // only, so a target reaching a binary or c-family target stays missing, with
7
+ // the reason; the targets beside it still compile.
8
8
 
9
9
  import { execFileSync } from 'node:child_process'
10
10
  import fs from 'node:fs'
@@ -203,15 +203,15 @@ export function resolveSwiftPackages(options: {
203
203
  const files = swiftTargetFiles(pkg.manifest, target)
204
204
  if (files.some((file) => C_FAMILY.test(file)))
205
205
  return `${name} is a C or Objective-C target`
206
- for (const dependency of target.dependencies) {
207
- if (dependency.kind === 'target') {
208
- const nested = resolveTarget(pkg, dependency.name)
209
- if (nested) return nested
210
- continue
211
- }
206
+ // every dependency resolves, so a failing one never hides the rest
207
+ // of the closure from the compile or from the report
208
+ const reasons = target.dependencies.map((dependency) => {
209
+ if (dependency.kind === 'target') return resolveTarget(pkg, dependency.name)
212
210
  const nested = resolveDependencyProduct(pkg, dependency.package, dependency.name)
213
- if (nested) return `${dependency.name}: ${nested}`
214
- }
211
+ return nested && `${dependency.name}: ${nested}`
212
+ })
213
+ const blocked = reasons.find((reason) => reason !== null)
214
+ if (blocked) return blocked
215
215
  const relative = files.map((file) => path.relative(target.dir, file))
216
216
  targets.set(`${pkg.manifest.dir}\0${name}`, {
217
217
  name,
@@ -235,11 +235,10 @@ export function resolveSwiftPackages(options: {
235
235
  if (provided.has(product)) return null
236
236
  const roots = pkg.manifest.products.get(product)
237
237
  if (!roots) return `${path.basename(pkg.manifest.dir)} has no library ${product}`
238
- for (const name of roots) {
239
- const reason = resolveTarget(pkg, name)
240
- if (reason) return reason
241
- }
242
- return null
238
+ return (
239
+ roots.map((name) => resolveTarget(pkg, name)).find((reason) => reason !== null) ??
240
+ null
241
+ )
243
242
  }
244
243
  // a `.product(package:)` names a dependency by identity or by its `name:`
245
244
  const resolveDependencyProduct = (
@@ -304,12 +303,15 @@ export function resolveSwiftPackages(options: {
304
303
  result.modules.set(name, { source: pkg.source, reason })
305
304
  }
306
305
  }
307
- // only targets a linked product reaches compile; the module sweep above
308
- // resolved the rest to learn their reasons
306
+ // what compiles is every buildable target in a linked product's closure,
307
+ // decided per target: a product with one target behind a binary still
308
+ // builds its other targets and their dependencies, which the app may
309
+ // import directly. the module sweep above resolved the rest only to learn
310
+ // their reasons.
309
311
  const reached = new Set<string>()
310
312
  const reach = (pkg: LoadedPackage, name: string) => {
311
313
  const key = `${pkg.manifest.dir}\0${name}`
312
- if (reached.has(key) || !targets.has(key)) return
314
+ if (reached.has(key)) return
313
315
  reached.add(key)
314
316
  for (const dependency of pkg.manifest.targets.get(name)?.dependencies ?? []) {
315
317
  if (dependency.kind === 'target') reach(pkg, dependency.name)
@@ -331,7 +333,7 @@ export function resolveSwiftPackages(options: {
331
333
  source.kind === 'unnamed'
332
334
  ? unnamed().find((candidate) => candidate.manifest.products.has(product))
333
335
  : packages.get(source.kind === 'local' ? path.resolve(source.dir) : source.url)
334
- if (!pkg || typeof pkg === 'string' || result.unavailable.has(product)) continue
336
+ if (!pkg || typeof pkg === 'string') continue
335
337
  for (const root of pkg.manifest.products.get(product) ?? []) reach(pkg, root)
336
338
  }
337
339
  result.targets = [...targets.entries()]