peachsim 0.1.750 → 0.1.752

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/cli/commands/inspect/settling.ts +7 -2
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/agent-identity.cjs +1 -1
  5. package/dist-lib/agent-sessions.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cli-constants.cjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/detox/index.cjs +1 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/home-paths.cjs +1 -1
  29. package/dist-lib/host/bridge-host.cjs +571 -300
  30. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  31. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  33. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  34. package/dist-lib/host/websocket-proxy.cjs +1 -1
  35. package/dist-lib/index.cjs +5 -3
  36. package/dist-lib/jump-to-source-babel.cjs +1 -1
  37. package/dist-lib/jump-to-source-native.cjs +1 -1
  38. package/dist-lib/kotlin-host.cjs +1 -1
  39. package/dist-lib/menu.cjs +1 -1
  40. package/dist-lib/menu.mjs +1 -1
  41. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  43. package/dist-lib/metro-production-bundle.cjs +1 -1
  44. package/dist-lib/metro-production-bundle.mjs +1 -1
  45. package/dist-lib/metro.cjs +1 -1
  46. package/dist-lib/native-app-identity.cjs +1 -1
  47. package/dist-lib/native-app-identity.mjs +1 -1
  48. package/dist-lib/native-firebase-metadata.cjs +1 -1
  49. package/dist-lib/native-firebase-metadata.mjs +1 -1
  50. package/dist-lib/plist.cjs +1 -1
  51. package/dist-lib/plist.mjs +1 -1
  52. package/dist-lib/profiles.cjs +1 -1
  53. package/dist-lib/public-brand.cjs +1 -1
  54. package/dist-lib/react-native-host-modules.cjs +1 -1
  55. package/dist-lib/react-native-host-modules.mjs +1 -1
  56. package/dist-lib/render-mode.cjs +1 -1
  57. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  58. package/dist-lib/sdk.cjs +5 -3
  59. package/dist-lib/sdk.mjs +5 -3
  60. package/dist-lib/skills.cjs +752 -479
  61. package/dist-lib/swift-compile.cjs +1 -1
  62. package/dist-lib/swift-compile.mjs +1 -1
  63. package/dist-lib/swift-package.cjs +1 -1
  64. package/dist-lib/swift-package.mjs +1 -1
  65. package/dist-lib/swift-submit.cjs +1 -1
  66. package/dist-lib/swift-submit.mjs +1 -1
  67. package/dist-lib/swift-toolchain.cjs +1 -1
  68. package/dist-lib/swift.cjs +1 -1
  69. package/dist-lib/vite-swift.cjs +465 -194
  70. package/dist-lib/vite.cjs +1 -1
  71. package/package.json +1 -1
  72. package/src/swift-host.ts +51 -18
  73. package/src/vite-plugin.ts +3 -1
  74. package/src/xcode-project.ts +590 -245
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.752 | (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.750",
3
+ "version": "0.1.752",
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",
package/src/swift-host.ts CHANGED
@@ -198,7 +198,7 @@ export function openXcodeProject(
198
198
  moduleRoot: string | undefined,
199
199
  ): string {
200
200
  const app = readXcodeAppTarget(xcodeproj, target)
201
- const root = fs.realpathSync(app.projectDir)
201
+ const root = app.rootDir
202
202
  xcodeProjects.set(root, {
203
203
  xcodeproj,
204
204
  target: app.name,
@@ -219,7 +219,7 @@ function remotePackages(entry: XcodeProjectEntry, app: XcodeAppTarget): RemotePa
219
219
  entry.remote = {
220
220
  key,
221
221
  packages: resolveRemotePackages(
222
- fs.realpathSync(app.projectDir),
222
+ app.rootDir,
223
223
  app.packageResolved,
224
224
  app.remoteProducts,
225
225
  entry.provided,
@@ -230,17 +230,21 @@ function remotePackages(entry: XcodeProjectEntry, app: XcodeAppTarget): RemotePa
230
230
  }
231
231
 
232
232
  // the app target's sources compile as one executable target under this
233
- // directory, each at its project-relative path, so a diagnostic still names
234
- // the file; local package targets keep their own project-relative paths.
233
+ // directory, each at its root-relative path, so a diagnostic still names the
234
+ // file; each framework target compiles as one target under its module's
235
+ // directory below XCODE_FRAMEWORKS_DIR; local package targets keep their own
236
+ // root-relative paths.
235
237
  export const XCODE_APP_DIR = '__app__'
238
+ const XCODE_FRAMEWORKS_DIR = '__frameworks__'
236
239
  // remote package checkouts compile here: swiftpm owns `.build` in the
237
240
  // compile's package root as its scratch directory.
238
241
  const XCODE_PACKAGES_DIR = '__packages__'
239
242
  const CHECKOUTS_PREFIX = `${REMOTE_CHECKOUTS.split(path.sep).join(path.posix.sep)}/`
240
243
 
241
- // the compile input key of a project-relative path in an xcode layout.
242
- function xcodeInputKey(appSources: Set<string>, file: string, relative: string): string {
243
- if (appSources.has(file)) return path.posix.join(XCODE_APP_DIR, relative)
244
+ // the compile input key of a root-relative path in an xcode layout.
245
+ function xcodeInputKey(layout: XcodeLayout, file: string, relative: string): string {
246
+ const owner = layout.targetDirs.get(file)
247
+ if (owner) return path.posix.join(owner, relative)
244
248
  return relative.startsWith(CHECKOUTS_PREFIX)
245
249
  ? path.posix.join(XCODE_PACKAGES_DIR, relative.slice(CHECKOUTS_PREFIX.length))
246
250
  : relative
@@ -252,6 +256,8 @@ interface XcodeLayout {
252
256
  targets: ReturnType<typeof swiftManifestTargets>
253
257
  /** remote products that cannot compile, with why. */
254
258
  unavailable: RemotePackages['unavailable']
259
+ /** the input directory each app and framework source compiles under. */
260
+ targetDirs: Map<string, string>
255
261
  files: string[]
256
262
  }
257
263
 
@@ -259,17 +265,40 @@ function xcodeLayout(root: string): XcodeLayout | null {
259
265
  const registered = xcodeProjects.get(root)
260
266
  if (!registered) return null
261
267
  const app = readXcodeAppTarget(registered.xcodeproj, registered.target)
262
- const files = new Set([app.pbxproj, ...app.sources, ...app.resources])
268
+ const files = new Set([...app.pbxprojs, ...app.sources, ...app.resources])
263
269
  if (app.infoPlistFile) files.add(app.infoPlistFile)
270
+ const targetDirs = new Map(app.sources.map((file) => [file, XCODE_APP_DIR]))
264
271
  const targets: XcodeLayout['targets'] = []
272
+ for (const framework of app.frameworks) {
273
+ const dir = path.posix.join(XCODE_FRAMEWORKS_DIR, framework.moduleName)
274
+ for (const file of framework.sources) {
275
+ if (targetDirs.has(file)) continue
276
+ targetDirs.set(file, dir)
277
+ files.add(file)
278
+ }
279
+ targets.push({
280
+ name: framework.moduleName,
281
+ path: dir,
282
+ executable: false,
283
+ resources: false,
284
+ languageMode: framework.languageMode,
285
+ mainActorIsolation: framework.mainActorIsolation,
286
+ })
287
+ }
265
288
  for (const dir of app.localPackages) {
266
- const manifest = path.join(dir, 'Package.swift')
267
- files.add(manifest)
289
+ const manifestFile = path.join(dir, 'Package.swift')
290
+ files.add(manifestFile)
291
+ const manifest = fs.readFileSync(manifestFile, 'utf8')
268
292
  const prefix = path.relative(root, dir).split(path.sep).join(path.posix.sep)
269
- const all = packageFiles(dir).map((file) =>
270
- path.relative(dir, file).split(path.sep).join(path.posix.sep),
293
+ // only target directories: a package at a repository's root holds the
294
+ // whole app beside its sources
295
+ const declared = swiftManifestTargets(manifest).filter((target) => !target.executable)
296
+ const all = declared.flatMap((target) =>
297
+ sourceTreeFiles(path.join(dir, target.path), root).map((file) =>
298
+ path.relative(dir, file).split(path.sep).join(path.posix.sep),
299
+ ),
271
300
  )
272
- for (const target of swiftManifestTargets(fs.readFileSync(manifest, 'utf8'), all)) {
301
+ for (const target of swiftManifestTargets(manifest, all)) {
273
302
  if (target.executable) continue
274
303
  targets.push({ ...target, path: path.posix.join(prefix, target.path) })
275
304
  for (const relative of all) {
@@ -295,6 +324,7 @@ function xcodeLayout(root: string): XcodeLayout | null {
295
324
  app,
296
325
  targets,
297
326
  unavailable: remote.unavailable,
327
+ targetDirs,
298
328
  files: [...files].sort(),
299
329
  }
300
330
  }
@@ -323,7 +353,11 @@ function xcodeManifest(layout: XcodeLayout): string {
323
353
  function packageFiles(root: string): string[] {
324
354
  const canonicalRoot = fs.realpathSync(root)
325
355
  const xcode = xcodeLayout(canonicalRoot)
326
- if (xcode) return xcode.files
356
+ return xcode ? xcode.files : sourceTreeFiles(canonicalRoot, canonicalRoot)
357
+ }
358
+
359
+ // every input file under `dir`, which must stay inside `canonicalRoot`.
360
+ function sourceTreeFiles(dir: string, canonicalRoot: string): string[] {
327
361
  const found: string[] = []
328
362
  const walk = (dir: string): void => {
329
363
  for (const entry of fs
@@ -356,7 +390,7 @@ function packageFiles(root: string): string[] {
356
390
  }
357
391
  }
358
392
  }
359
- walk(canonicalRoot)
393
+ if (fs.existsSync(dir)) walk(fs.realpathSync(dir))
360
394
  return found
361
395
  }
362
396
 
@@ -682,12 +716,11 @@ export function icuUrl(origin: string, artifact: SwiftArtifact): string {
682
716
 
683
717
  function packageSources(packagePath: string): Record<string, string> {
684
718
  const xcode = xcodeLayout(packagePath)
685
- const appSources = new Set(xcode?.app.sources)
686
719
  const files: Record<string, string> = {}
687
720
  for (const file of sourceFiles(packagePath)) {
688
721
  const relative = path.relative(packagePath, file).split(path.sep).join(path.posix.sep)
689
722
  if (xcode && path.basename(file) === 'Package.swift') continue
690
- files[xcode ? xcodeInputKey(appSources, file, relative) : relative] = readPackageFile(
723
+ files[xcode ? xcodeInputKey(xcode, file, relative) : relative] = readPackageFile(
691
724
  packagePath,
692
725
  file,
693
726
  MAX_SWIFT_COMPILE_SOURCE_BYTES,
@@ -867,7 +900,7 @@ export function swiftApiGapReport(output: string): string | null {
867
900
  if (!diagnostic || seen.has(line)) continue
868
901
  seen.add(line)
869
902
  const file = diagnostic[1]!
870
- .replace(new RegExp(`^${XCODE_APP_DIR}/`), '')
903
+ .replace(new RegExp(`^(?:${XCODE_APP_DIR}|${XCODE_FRAMEWORKS_DIR}/[^/]+)/`), '')
871
904
  .replace(new RegExp(`^${XCODE_PACKAGES_DIR}/`), '')
872
905
  const message = diagnostic[4]!
873
906
  const rule = API_GAP_PATTERNS.find(([pattern]) => pattern.test(message))
@@ -600,7 +600,9 @@ const ENGINE_WORKER_BOOT_CLOSURES: WorkerBootClosure[] = [
600
600
  // each carries only its own CanvasKit glue: 3,263,311 graphite and
601
601
  // 3,256,832 ganesh bytes when the split landed, down from 3,386,929 with both.
602
602
  { entry: 'src/render-worker/shell-worker-entry.ts', maxBytes: 3_310_000 },
603
- { entry: 'src/render-worker/shell-worker-ganesh-entry.ts', maxBytes: 3_300_000 },
603
+ // nate, 2026-10-06: "we can increase Ganesh. We can increase that to like 3.6",
604
+ // as work moves from the javascript into native code.
605
+ { entry: 'src/render-worker/shell-worker-ganesh-entry.ts', maxBytes: 3_600_000 },
604
606
  { entry: 'src/render-worker/compositor-worker-entry.ts', maxBytes: 1_200_000 },
605
607
  { entry: 'src/render-worker/compositor-worker-ganesh-entry.ts', maxBytes: 1_110_000 },
606
608
  ]