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.
- package/README.md +5 -0
- package/cli/bridge-flow-runner.ts +3 -4
- package/cli/commands/inspect/settling.ts +193 -162
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +10 -16
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +191 -159
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +191 -159
- package/dist-lib/sdk.mjs +191 -159
- package/dist-lib/skills.cjs +206 -181
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +10 -16
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/swift-packages.ts +21 -19
package/src/swift-packages.ts
CHANGED
|
@@ -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
|
|
7
|
-
//
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
-
//
|
|
308
|
-
//
|
|
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)
|
|
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'
|
|
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()]
|