peachsim 0.1.779 → 0.1.781

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 (78) hide show
  1. package/cli/commands/detox.ts +13 -9
  2. package/cli/commands/test.ts +1 -1
  3. package/detox/jest-preset.cjs +1 -1
  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/detox/jest-preset.cjs +1 -1
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +591 -257
  33. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +1 -1
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +1 -1
  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/plist.cjs +1 -1
  54. package/dist-lib/plist.mjs +1 -1
  55. package/dist-lib/profiles.cjs +1 -1
  56. package/dist-lib/public-brand.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.mjs +1 -1
  59. package/dist-lib/render-mode.cjs +1 -1
  60. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  61. package/dist-lib/sdk.cjs +1 -1
  62. package/dist-lib/sdk.mjs +1 -1
  63. package/dist-lib/skills.cjs +594 -260
  64. package/dist-lib/swift-compile.cjs +1 -1
  65. package/dist-lib/swift-compile.mjs +1 -1
  66. package/dist-lib/swift-package.cjs +1 -1
  67. package/dist-lib/swift-package.mjs +1 -1
  68. package/dist-lib/swift-submit.cjs +1 -1
  69. package/dist-lib/swift-submit.mjs +1 -1
  70. package/dist-lib/swift-toolchain.cjs +1 -1
  71. package/dist-lib/swift.cjs +1 -1
  72. package/dist-lib/vite-swift.cjs +583 -257
  73. package/dist-lib/vite.cjs +1 -1
  74. package/package.json +1 -1
  75. package/skills/peach-test/SKILL.md +1 -1
  76. package/src/swift-host.ts +55 -28
  77. package/src/swift-standin-emit.ts +471 -242
  78. package/src/swift-standins.ts +285 -40
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.779 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.779",
3
+ "version": "0.1.781",
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",
@@ -234,7 +234,7 @@ upstream detox surface.
234
234
  ### one-line install
235
235
 
236
236
  ```js
237
- // rnx-detox.config.cjs
237
+ // peach-detox.config.cjs
238
238
  module.exports = {
239
239
  preset: 'peachsim/detox',
240
240
  rootDir: __dirname,
package/src/swift-host.ts CHANGED
@@ -33,7 +33,11 @@ import {
33
33
  type SwiftPackageGap,
34
34
  type SwiftPackages,
35
35
  } from './swift-packages'
36
- import { swiftStandins, type SwiftStandin } from './swift-standins'
36
+ import {
37
+ standinGenerationInputs,
38
+ swiftStandins,
39
+ type SwiftStandin,
40
+ } from './swift-standins'
37
41
  import {
38
42
  MAX_SWIFT_COMPILE_FILES,
39
43
  MAX_SWIFT_COMPILE_SOURCE_BYTES,
@@ -187,7 +191,12 @@ interface XcodeProjectEntry {
187
191
  provided: ReadonlySet<string> | null
188
192
  /** the module root a local compile links, which builds binary stand-ins. */
189
193
  moduleRoot: string | null
190
- packages?: { key: string; packages: SwiftPackages; standins: SwiftStandin[] }
194
+ packages?: {
195
+ key: string
196
+ standinKey: string
197
+ packages: SwiftPackages
198
+ standins: SwiftStandin[]
199
+ }
191
200
  }
192
201
 
193
202
  const xcodeProjects = new Map<string, XcodeProjectEntry>()
@@ -230,39 +239,57 @@ function swiftPackages(
230
239
  source.kind === 'local' ? stamp(path.join(source.dir, 'Package.swift')) : 0,
231
240
  ),
232
241
  ])
233
- if (entry.packages?.key !== key) {
234
- const resolve = (
235
- provided: ReadonlySet<string> | null,
236
- binaryGaps?: Map<string, string>,
237
- ) =>
238
- resolveSwiftPackages({
242
+ // the package key is cheap stamps; the stand-in key covers the generation
243
+ // inputs the stamps cannot see (artifact contents, peach's modules, the
244
+ // emitter), so a changed input rebuilds instead of reusing stale output.
245
+ let cached = entry.packages
246
+ if (cached?.key !== key) {
247
+ cached = {
248
+ key,
249
+ standinKey: '',
250
+ packages: resolveSwiftPackages({
239
251
  rootDir: app.rootDir,
240
252
  resolved: app.packageResolved,
241
253
  products: app.linkedProducts,
242
254
  localDirs: app.localPackageDirs,
243
- provided,
244
- binaryGaps,
245
- })
246
- let packages = resolve(entry.provided)
247
- let standins: SwiftStandin[] = []
248
- // a reached binary target with stand-ins for every module it ships
249
- // resolves as provided, so what depends on it compiles; the rest keep
250
- // their reason with why no stand-in was built
251
- const reached = packages.binaries.filter((binary) => binary.reached)
252
- if (entry.moduleRoot && entry.provided && reached.length > 0) {
253
- const built = swiftStandins(reached, {
254
- moduleRoot: entry.moduleRoot,
255
- toolchainBin: swiftModuleToolchain(entry.moduleRoot).toolchainBin,
255
+ provided: entry.provided,
256
+ }),
257
+ standins: [],
258
+ }
259
+ entry.packages = cached
260
+ }
261
+ // a reached binary target with stand-ins for every module it ships
262
+ // resolves as provided, so what depends on it compiles; the rest keep
263
+ // their reason with why no stand-in was built. surfaces peach already
264
+ // ships are skipped up front, so no generated target overrides a shipped
265
+ // module.
266
+ const reached = cached.packages.binaries.filter((binary) => binary.reached)
267
+ if (entry.moduleRoot && entry.provided && reached.length > 0) {
268
+ const resolved = swiftModuleToolchain(entry.moduleRoot)
269
+ const toolchain = {
270
+ moduleRoot: entry.moduleRoot,
271
+ toolchainBin: resolved.toolchainBin,
272
+ release: resolved.release,
273
+ }
274
+ const generation = standinGenerationInputs(reached, toolchain)
275
+ if (cached.standinKey !== generation) {
276
+ const built = swiftStandins(reached, toolchain, entry.provided)
277
+ cached.packages = resolveSwiftPackages({
278
+ rootDir: app.rootDir,
279
+ resolved: app.packageResolved,
280
+ products: app.linkedProducts,
281
+ localDirs: app.localPackageDirs,
282
+ provided: new Set([
283
+ ...entry.provided,
284
+ ...built.standins.map((standin) => standin.target),
285
+ ]),
286
+ binaryGaps: built.gaps,
256
287
  })
257
- standins = built.standins
258
- packages = resolve(
259
- new Set([...entry.provided, ...standins.map((standin) => standin.target)]),
260
- built.gaps,
261
- )
288
+ cached.standins = built.standins
289
+ cached.standinKey = generation
262
290
  }
263
- entry.packages = { key, packages, standins }
264
291
  }
265
- return entry.packages
292
+ return cached
266
293
  }
267
294
 
268
295
  // the app target's sources compile as one executable target under this