peachsim 0.1.1846 → 0.1.1847

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 (90) hide show
  1. package/detox/index.ts +14 -4
  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 +120 -55
  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 +14 -6
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +44 -22
  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 +119 -54
  32. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  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 +22 -11
  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 +22 -11
  48. package/dist-lib/native-app-identity-project.cjs +21 -10
  49. package/dist-lib/native-app-identity-project.mjs +21 -10
  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 +121 -56
  69. package/dist-lib/swift-compile.cjs +8 -3
  70. package/dist-lib/swift-compile.mjs +7 -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 +28 -13
  78. package/dist-lib/vite.cjs +2 -2
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +2 -1
  82. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +3 -0
  83. package/package.json +1 -1
  84. package/runtime-companion.json +1 -1
  85. package/src/expo-swift-host.ts +29 -13
  86. package/src/swift-compile.ts +11 -3
  87. package/src/swift-host.ts +5 -1
  88. package/src/turbo-codegen-intake.ts +41 -6
  89. package/src/turbo-source.ts +56 -24
  90. package/src/xcode-project.ts +31 -11
@@ -192,6 +192,8 @@ export interface XcodeAppTarget extends XcodeModuleTarget {
192
192
  localPackageDirs: string[]
193
193
  /** prebuilt frameworks and library module-map directories, at their declared paths. */
194
194
  binaryFrameworks: { name: string; path: string | null }[]
195
+ /** sdk frameworks the link names: OTHER_LDFLAGS -framework and sdk entries in frameworks phases. */
196
+ sdkFrameworks: string[]
195
197
  /** workspace pins, or local package locks when the workspace has no lock. */
196
198
  packageResolved: string[]
197
199
  /** every application target in the workspace, for a chooser. */
@@ -271,12 +273,13 @@ function readXcconfig(file: string, read: string[]): Record<string, string> {
271
273
  return settings
272
274
  }
273
275
 
274
- // one level's settings as xcode applies them: a key whose conditions all
275
- // match the build overrides the unconditional key; others never apply.
276
+ // one level's settings as xcode applies them: the unconditional keys, then
277
+ // the keys whose conditions all match the build, whose `$(inherited)` reads
278
+ // the unconditional key of the same level; others never apply.
276
279
  function applyConditions(
277
280
  raw: Record<string, string>,
278
281
  configuration: string,
279
- ): Record<string, string> {
282
+ ): [Record<string, string>, Record<string, string>] {
280
283
  const plain: Record<string, string> = {}
281
284
  const conditional: Record<string, string> = {}
282
285
  for (const [key, value] of Object.entries(raw)) {
@@ -301,7 +304,7 @@ function applyConditions(
301
304
  )
302
305
  if (matches) conditional[key.slice(0, bracket)] = value
303
306
  }
304
- return { ...plain, ...conditional }
307
+ return [plain, conditional]
305
308
  }
306
309
 
307
310
  // xcode's build setting operators, as measured against xcodebuild.
@@ -676,8 +679,8 @@ function targetSettings(
676
679
  const fromFile = baseFile ? readXcconfig(baseFile, read) : {}
677
680
  xcconfigs.push(...read)
678
681
  return [
679
- applyConditions(fromFile, name),
680
- applyConditions(
682
+ ...applyConditions(fromFile, name),
683
+ ...applyConditions(
681
684
  Object.fromEntries(
682
685
  Object.entries(own).flatMap(([key, value]) =>
683
686
  typeof value === 'string'
@@ -2685,7 +2688,14 @@ export function readXcodeAppTarget(
2685
2688
  const binaryFrameworks = new Map<string, string | null>()
2686
2689
  const searchedFrameworks = new Map<string, string>()
2687
2690
  const frameworkSearchDirectories = new Set<string>()
2691
+ const sdkFrameworks = new Set<string>()
2688
2692
  for (const { ref, settings } of builtTargets) {
2693
+ const ldflags = settingList(settings('OTHER_LDFLAGS'))
2694
+ ldflags.forEach((flag, index) => {
2695
+ const name = ldflags[index + 1]
2696
+ if ((flag === '-framework' || flag === '-weak_framework') && name)
2697
+ sdkFrameworks.add(name)
2698
+ })
2689
2699
  const absolute = (raw: string) =>
2690
2700
  path.resolve(ref.project.projectDir, expand(raw, settings))
2691
2701
  const requested = options.nativeModules
@@ -2833,14 +2843,19 @@ export function readXcodeAppTarget(
2833
2843
  const rawPath = str(file?.path) ?? ''
2834
2844
  const name = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1]
2835
2845
  if (file?.isa !== 'PBXFileReference' || !name) continue
2846
+ // a path into the sdk's own frameworks folder is the sdk's own
2847
+ // however it is rooted: xcode links -framework <name> from the sdk
2848
+ // and a stale group-relative path to it contributes nothing.
2836
2849
  if (
2837
- tree === 'BUILT_PRODUCTS_DIR' ||
2838
2850
  tree === 'SDKROOT' ||
2851
+ /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`)
2852
+ ) {
2853
+ sdkFrameworks.add(name)
2854
+ continue
2855
+ }
2856
+ if (
2857
+ tree === 'BUILT_PRODUCTS_DIR' ||
2839
2858
  tree === 'DEVELOPER_DIR' ||
2840
- // a path into the sdk's own frameworks folder is the sdk's own
2841
- // however it is rooted: xcode links -framework <name> from the sdk
2842
- // and a stale group-relative path to it contributes nothing.
2843
- /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) ||
2844
2859
  // a target in the workspace builds it, so it exists only after that build
2845
2860
  byProduct.has(path.basename(rawPath))
2846
2861
  )
@@ -2953,6 +2968,11 @@ export function readXcodeAppTarget(
2953
2968
  binaryFrameworks: [...binaryFrameworks]
2954
2969
  .map(([name, file]) => ({ name, path: file }))
2955
2970
  .sort((left, right) => left.name.localeCompare(right.name)),
2971
+ sdkFrameworks: [...sdkFrameworks]
2972
+ .filter(
2973
+ (name) => !binaryFrameworks.has(name) && !byProduct.has(`${name}.framework`),
2974
+ )
2975
+ .sort(),
2956
2976
  packageResolved,
2957
2977
  appTargets: appTargetNames,
2958
2978
  configuration,