peachsim 0.1.2299 → 0.1.2300

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 (91) hide show
  1. package/cli/commands/serve.ts +12 -3
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +113 -39
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +2 -2
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +85 -32
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +92 -38
  32. package/dist-lib/host/fetch-proxy-handler.cjs +5 -9
  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 +60 -30
  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 +59 -29
  48. package/dist-lib/native-app-identity-project.cjs +43 -22
  49. package/dist-lib/native-app-identity-project.mjs +43 -22
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +120 -54
  69. package/dist-lib/swift-compile.cjs +27 -3
  70. package/dist-lib/swift-compile.mjs +27 -3
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +75 -30
  78. package/dist-lib/vite.cjs +11 -10
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +3 -0
  82. package/dist-types/packages/peach-engine/src/render-worker/gesture-arbitration-native.d.ts +124 -0
  83. package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +2 -2
  84. package/package.json +1 -1
  85. package/runtime-companion.json +1 -1
  86. package/src/bundle-channel.mjs +4 -3
  87. package/src/cli-runtime.ts +6 -0
  88. package/src/native-firebase-config.ts +14 -0
  89. package/src/swift-compile.ts +28 -1
  90. package/src/vite-plugin-one.ts +3 -3
  91. package/src/xcode-project.ts +45 -22
@@ -642,6 +642,21 @@ interface TargetRef {
642
642
  target: PlistDict
643
643
  }
644
644
 
645
+ type HeaderPhaseFile = { file: string; visibility: 'Public' | 'Private' | 'Project' }
646
+
647
+ let developerDir: string | undefined
648
+ function selectedDeveloperDir(): string {
649
+ developerDir ??=
650
+ process.platform === 'darwin'
651
+ ? // runner-toolchain-platform: darwin
652
+ execFileSync('xcode-select', ['-p'], {
653
+ encoding: 'utf8',
654
+ stdio: ['ignore', 'pipe', 'pipe'],
655
+ }).trim()
656
+ : ''
657
+ return developerDir
658
+ }
659
+
645
660
  // the configuration a project builds when nothing names one: xcode's run
646
661
  // action builds Debug, else the list's default.
647
662
  function defaultConfiguration(project: LoadedProject): string {
@@ -741,20 +756,12 @@ function targetSettings(
741
756
  resolving.delete(marker)
742
757
  return value
743
758
  }
744
- let developerDir: string | undefined
745
759
  // export derived settings too, just as explicit project settings are exported.
746
760
  const derivedSettings: Record<string, () => string> = {
747
761
  DEVELOPER_DIR: () =>
748
762
  options.environment?.DEVELOPER_DIR ??
749
763
  process.env.DEVELOPER_DIR ??
750
- (developerDir ??=
751
- process.platform === 'darwin'
752
- ? // runner-toolchain-platform: darwin
753
- execFileSync('xcode-select', ['-p'], {
754
- encoding: 'utf8',
755
- stdio: ['ignore', 'pipe', 'pipe'],
756
- }).trim()
757
- : ''),
764
+ selectedDeveloperDir(),
758
765
  PRODUCT_NAME: () => get('TARGET_NAME'),
759
766
  PRODUCT_MODULE_NAME: () => applyOperator(get('PRODUCT_NAME'), 'c99extidentifier'),
760
767
  EXECUTABLE_NAME: () => get('PRODUCT_NAME'),
@@ -2040,9 +2047,16 @@ export function readXcodeAppTarget(
2040
2047
  visit(app)
2041
2048
 
2042
2049
  // a target's headers build phase, each header with the visibility it publishes.
2043
- const headerPhase = (
2044
- ref: TargetRef,
2045
- ): { file: string; visibility: 'Public' | 'Private' | 'Project' }[] =>
2050
+ const headerPhases = new Map<string, HeaderPhaseFile[]>()
2051
+ const headerPhase = (ref: TargetRef): HeaderPhaseFile[] => {
2052
+ const key = `${ref.project.xcodeproj}\0${ref.id}`
2053
+ const cached = headerPhases.get(key)
2054
+ if (cached) return cached
2055
+ const files = readHeaderPhase(ref)
2056
+ headerPhases.set(key, files)
2057
+ return files
2058
+ }
2059
+ const readHeaderPhase = (ref: TargetRef): HeaderPhaseFile[] =>
2046
2060
  list(ref.target.buildPhases).flatMap((phaseId) => {
2047
2061
  const phase = ref.project.object(phaseId)
2048
2062
  if (phase?.isa !== 'PBXHeadersBuildPhase') return []
@@ -2064,6 +2078,24 @@ export function readXcodeAppTarget(
2064
2078
  ]
2065
2079
  })
2066
2080
  })
2081
+ // every published header of the project's non-framework targets, by product.
2082
+ const projectNonFrameworkHeaders = new Map<LoadedProject, Map<string, string>>()
2083
+ const nonFrameworkHeadersOf = (project: LoadedProject): Map<string, string> => {
2084
+ const cached = projectNonFrameworkHeaders.get(project)
2085
+ if (cached) return cached
2086
+ const headers = new Map<string, string>()
2087
+ for (const other of projectTargets(project)) {
2088
+ if (FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? '')) continue
2089
+ const otherProduct = productName(other)
2090
+ for (const { file, visibility } of headerPhase(other)) {
2091
+ if (visibility === 'Project') continue
2092
+ const key = `${otherProduct}/${path.basename(file)}`
2093
+ if (!headers.has(key)) headers.set(key, file)
2094
+ }
2095
+ }
2096
+ projectNonFrameworkHeaders.set(project, headers)
2097
+ return headers
2098
+ }
2067
2099
  const productNames = new Map<string, string>()
2068
2100
  const productName = (ref: TargetRef) => {
2069
2101
  const key = `${ref.project.xcodeproj}\0${ref.id}`
@@ -2343,16 +2375,7 @@ export function readXcodeAppTarget(
2343
2375
  const qualified = `${product}/${name}`
2344
2376
  if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file)
2345
2377
  }
2346
- const nonFrameworkHeaders = new Map<string, string>()
2347
- for (const other of projectTargets(ref.project)) {
2348
- if (FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? '')) continue
2349
- const otherProduct = productName(other)
2350
- for (const { file, visibility } of headerPhase(other)) {
2351
- if (visibility === 'Project') continue
2352
- const key = `${otherProduct}/${path.basename(file)}`
2353
- if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file)
2354
- }
2355
- }
2378
+ const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project)
2356
2379
  const wrapper = path.join(settings('BUILT_PRODUCTS_DIR'), `${product}.framework`)
2357
2380
  const moduleMap =
2358
2381
  (settings('DEFINES_MODULE') === 'YES' || !framework) && settings('MODULEMAP_FILE')