peachsim 0.1.1815 → 0.1.1818

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 (147) hide show
  1. package/cli/commands/agent-indicator-mode.ts +2 -1
  2. package/cli/commands/coverage-swift.ts +4 -3
  3. package/cli/commands/flow.ts +7 -0
  4. package/cli/commands/inspect/core.ts +1 -1
  5. package/cli/commands/maestro-compare.ts +7 -0
  6. package/cli/commands/package.ts +87 -31
  7. package/cli/commands/screenshot-mode.ts +2 -1
  8. package/cli/commands/shell-boolean-mode.ts +7 -3
  9. package/cli/commands/shell-url.ts +4 -0
  10. package/cli/commands/show-touches-mode.ts +2 -1
  11. package/cli/commands/test.ts +3 -2
  12. package/cli/commands/three-mode.ts +2 -1
  13. package/cli/outbound-endpoints.ts +1 -1
  14. package/cli/packaged-app-launcher.ts +6 -1
  15. package/dist-lib/agent-daemon-client.cjs +1 -1
  16. package/dist-lib/agent-events.cjs +1 -1
  17. package/dist-lib/attached-projects.cjs +1 -1
  18. package/dist-lib/auth/shared-session.cjs +1 -1
  19. package/dist-lib/backend-origin.cjs +1 -1
  20. package/dist-lib/beta.cjs +1 -1
  21. package/dist-lib/beta.mjs +1 -1
  22. package/dist-lib/bridge-constants.cjs +1 -1
  23. package/dist-lib/bridge-contract-input.cjs +1 -1
  24. package/dist-lib/bridge-contract-input.mjs +1 -1
  25. package/dist-lib/bridge-contract.cjs +1 -1
  26. package/dist-lib/bridge-contract.mjs +1 -1
  27. package/dist-lib/bundle-channel.cjs +5728 -7551
  28. package/dist-lib/capture-contract.cjs +1 -1
  29. package/dist-lib/capture-contract.mjs +1 -1
  30. package/dist-lib/cloud-contract.cjs +1 -1
  31. package/dist-lib/cloud-contract.mjs +1 -1
  32. package/dist-lib/cloud-test-args.cjs +1 -1
  33. package/dist-lib/cloud-test-args.mjs +1 -1
  34. package/dist-lib/cloud.cjs +1 -1
  35. package/dist-lib/cloud.mjs +1 -1
  36. package/dist-lib/config.cjs +1 -1
  37. package/dist-lib/config.mjs +1 -1
  38. package/dist-lib/detox/index.cjs +13 -4
  39. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  40. package/dist-lib/expo-swift-bundle.cjs +5234 -5704
  41. package/dist-lib/expo-swift-metadata.cjs +1 -1
  42. package/dist-lib/expo-swift-metadata.mjs +1 -1
  43. package/dist-lib/home-paths.cjs +1 -1
  44. package/dist-lib/host/bridge-host.cjs +4913 -6811
  45. package/dist-lib/host/fetch-proxy-handler.cjs +13 -4
  46. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  47. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  48. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  49. package/dist-lib/host/websocket-proxy.cjs +1 -1
  50. package/dist-lib/index.cjs +40 -30
  51. package/dist-lib/jump-to-source-babel.cjs +1 -1
  52. package/dist-lib/jump-to-source-native.cjs +1 -1
  53. package/dist-lib/kotlin-host.cjs +1 -1
  54. package/dist-lib/menu.cjs +1 -1
  55. package/dist-lib/menu.mjs +1 -1
  56. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  57. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  58. package/dist-lib/metro-production-bundle.cjs +1 -1
  59. package/dist-lib/metro-production-bundle.mjs +1 -1
  60. package/dist-lib/metro.cjs +39 -29
  61. package/dist-lib/native-app-identity-project.cjs +31 -26
  62. package/dist-lib/native-app-identity-project.mjs +295 -279
  63. package/dist-lib/native-app-identity.cjs +1 -1
  64. package/dist-lib/native-app-identity.mjs +1 -1
  65. package/dist-lib/native-firebase-metadata.cjs +1 -1
  66. package/dist-lib/native-firebase-metadata.mjs +1 -1
  67. package/dist-lib/pdfium-raster.cjs +1 -1
  68. package/dist-lib/pdfium-raster.mjs +1 -1
  69. package/dist-lib/plist.cjs +1 -1
  70. package/dist-lib/plist.mjs +1 -1
  71. package/dist-lib/profiles.cjs +1 -1
  72. package/dist-lib/public-brand.cjs +1 -1
  73. package/dist-lib/public-origins-lib-esm.json +29 -24
  74. package/dist-lib/public-origins-lib.json +121 -93
  75. package/dist-lib/react-native-host-modules.cjs +1 -1
  76. package/dist-lib/react-native-host-modules.mjs +1 -1
  77. package/dist-lib/reap-browser.cjs +1 -1
  78. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  79. package/dist-lib/sdk.cjs +2 -2
  80. package/dist-lib/sdk.mjs +2 -2
  81. package/dist-lib/skills.cjs +64622 -66476
  82. package/dist-lib/swift-compile.cjs +328 -265
  83. package/dist-lib/swift-compile.mjs +335 -270
  84. package/dist-lib/swift-package.cjs +1 -1
  85. package/dist-lib/swift-package.mjs +1 -1
  86. package/dist-lib/swift-submit.cjs +1 -1
  87. package/dist-lib/swift-submit.mjs +1 -1
  88. package/dist-lib/swift-toolchain.cjs +52 -6
  89. package/dist-lib/swift.cjs +1 -1
  90. package/dist-lib/vite-swift.cjs +2405 -2262
  91. package/dist-lib/vite.cjs +13 -4
  92. package/dist-lib/worklet-executable.cjs +1 -1
  93. package/dist-lib/worklet-executable.mjs +1 -1
  94. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +5 -0
  95. package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +41 -0
  96. package/dist-types/packages/peach-engine/src/render-worker/mapServicesContract.d.ts +45 -0
  97. package/package.json +2 -1
  98. package/runtime-companion.json +1 -1
  99. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +1 -1
  100. package/sdk/ios/usr/include/module.modulemap +3 -0
  101. package/sdk/ios/usr/include/notify.modulemap +9 -0
  102. package/sdk/ios/usr/lib/swift/Darwin.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
  103. package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
  104. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -1
  105. package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
  106. package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +21 -0
  107. package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -1
  108. package/sdk/ios/wasm/include/__header_time.h +4 -0
  109. package/sdk/ios/wasm/include/pthread.h +2 -0
  110. package/sdk/ios/wasm/include/sys/mman.h +1 -1
  111. package/sdk/ios/wasm/include/sys/resource.h +31 -0
  112. package/sdk/ios/wasm/include/unistd.h +4 -0
  113. package/src/answeredNativePackages.ts +43 -0
  114. package/src/cli-runtime.ts +2 -9
  115. package/src/expo-discovery-cache.ts +71 -52
  116. package/src/expo-kotlin-host.ts +11 -9
  117. package/src/expo-swift-host.ts +55 -13
  118. package/src/installed-native-libraries.ts +103 -20
  119. package/src/native-static-libraries.ts +69 -33
  120. package/src/nitro-adapter.ts +0 -9
  121. package/src/nitro-bundle.ts +8 -6
  122. package/src/nitro-compile.ts +45 -16
  123. package/src/nitro-compiler-digest.ts +2 -4
  124. package/src/nitro-superset.lock.json +19 -251
  125. package/src/nitro-superset.ts +63 -68
  126. package/src/plist-bytes.ts +9 -0
  127. package/src/portable-expo-workspace.ts +4 -3
  128. package/src/react-native-bridge-modules.ts +13 -19
  129. package/src/swift-compile.ts +379 -269
  130. package/src/swift-cxx-reachable.ts +13 -0
  131. package/src/swift-distribution.ts +3 -4
  132. package/src/swift-host.ts +5 -3
  133. package/src/swift-installed-targets.ts +32 -14
  134. package/src/swift-native-pin.ts +45 -0
  135. package/src/swift-objc-compile.ts +23 -1
  136. package/src/swift-objc-standin.ts +14 -7
  137. package/src/swift-package-manifest.ts +2 -2
  138. package/src/swift-root-lock.ts +4 -3
  139. package/src/swift-standins.ts +41 -38
  140. package/src/swift-toolchain.ts +69 -12
  141. package/src/swift-wasm-prune.ts +1 -0
  142. package/src/swift-xcframework.ts +23 -12
  143. package/src/swiftContract.ts +2 -0
  144. package/src/swiftNativePinContract.ts +68 -0
  145. package/src/turbo-bundle.ts +14 -6
  146. package/src/turbo-compile.ts +76 -11
  147. package/src/turbo-source.ts +93 -18
@@ -1,19 +1,23 @@
1
1
  // the shared Nitro executable (plans/peach/native-prebuild-registry.md). every
2
2
  // compiled Nitro provider links one Swift, Foundation and UIKit closure that is
3
3
  // most of an executable's bytes, so building each app's own copy ships the same
4
- // closure per app. one executable of every provider in the lock is published
5
- // under a content address on the prebuilt registry, and an app whose providers are byte-identical to the ones
6
- // it was built from points its metadata at that address: the browser downloads
7
- // it once for every app, port and deployment. an app with a provider outside
8
- // the lock, a different provider build, or a HybridObject or view its config
9
- // answers compiles its own executable.
4
+ // closure per app. one executable of every provider in the capsule is published
5
+ // on the prebuilt registry under a key of its committed inputs and the compiler
6
+ // sources, and an app whose providers are byte-identical to the ones it was
7
+ // built from points its metadata at that key: the browser downloads it once for
8
+ // every app, port and deployment. an app with a provider outside the lock, a
9
+ // different provider build, or a HybridObject or view its config answers
10
+ // compiles its own executable.
10
11
  import { createHash } from 'node:crypto'
11
12
  import { readdirSync, readFileSync } from 'node:fs'
12
13
  import { createRequire } from 'node:module'
13
14
  import { dirname, join } from 'node:path'
14
15
  import { isRecord } from './is-record'
15
- import { NATIVE_PREBUILT_ORIGIN, nativeEntryPrefix } from './native-prebuilt'
16
- import { committedAdapterLocks } from './nitro-adapter'
16
+ import {
17
+ NATIVE_PREBUILT_ORIGIN,
18
+ nativeEntryKey,
19
+ nativeEntryPrefix,
20
+ } from './native-prebuilt'
17
21
  import { nitroCompilerSourceDigest } from './nitro-compiler-digest'
18
22
  import supersetLockJson from './nitro-superset.lock.json' with { type: 'json' }
19
23
  import {
@@ -21,8 +25,7 @@ import {
21
25
  type NitroBuildConfiguration,
22
26
  type NitroCompiledModule,
23
27
  } from './nitroContract'
24
- import { parseSwiftDistributionLock } from './swift-distribution-contract'
25
- import swiftLockJson from './swift-distribution.lock.json' with { type: 'json' }
28
+ import { swiftNativePin } from './swift-native-pin'
26
29
  import { STANDIN_SOURCE_DIGEST } from './swift-standin-digest'
27
30
 
28
31
  export const NITRO_SUPERSET_ENTRY_NAME = 'superset'
@@ -49,10 +52,10 @@ const packageVersion = (root: string): string =>
49
52
 
50
53
  /**
51
54
  * what one executable of these providers depends on, apart from the sources
52
- * that compile it (the lock records their digest, scripts/ops/nitro-superset.ts
53
- * checks it when publishing): the toolchain and runtime identities, the build
54
- * configuration, the iOS deployment target its project compiles for, and each
55
- * provider's version and source tree, Nitro Modules' included.
55
+ * that compile it, which NITRO_COMPILER_DIGEST adds to the key: the toolchain
56
+ * and runtime identities, the build configuration, the iOS deployment target
57
+ * its project compiles for, and each provider's version and source tree, Nitro
58
+ * Modules' included.
56
59
  */
57
60
  export function nitroSupersetInputs(options: {
58
61
  appRoot: string
@@ -61,12 +64,13 @@ export function nitroSupersetInputs(options: {
61
64
  providers: readonly { name: string; root: string }[]
62
65
  }): Record<string, string> {
63
66
  const resolve = createRequire(join(options.appRoot, 'package.json')).resolve
67
+ const pin = swiftNativePin()
64
68
  const inputs: Record<string, string> = {
65
69
  configuration: options.configuration,
66
70
  'ios-deployment-target': options.iosDeploymentTarget,
67
71
  'react-native': packageVersion(dirname(resolve('react-native/package.json'))),
68
- 'swift-distribution': parseSwiftDistributionLock(swiftLockJson).id,
69
- 'nitro-runtime': JSON.stringify(committedAdapterLocks.nitro),
72
+ 'swift-distribution': pin.distribution.id,
73
+ 'nitro-runtime': JSON.stringify(pin.adapters.nitro),
70
74
  }
71
75
  const nitroModules = dirname(resolve('react-native-nitro-modules/package.json'))
72
76
  for (const { name, root } of [
@@ -77,64 +81,56 @@ export function nitroSupersetInputs(options: {
77
81
  return inputs
78
82
  }
79
83
 
80
- export function nitroCompilerDigest(): string {
81
- return nitroCompilerSourceDigest(import.meta.dirname, STANDIN_SOURCE_DIGEST)
82
- }
84
+ // build-cli replaces this in every bundle with the digest of the sources it
85
+ // bundles; source runs read the files once at load, like STANDIN_SOURCE_DIGEST.
86
+ declare const __NITRO_COMPILER_DIGEST__: string | undefined
87
+ export const NITRO_COMPILER_DIGEST =
88
+ typeof __NITRO_COMPILER_DIGEST__ === 'string'
89
+ ? __NITRO_COMPILER_DIGEST__
90
+ : nitroCompilerSourceDigest(import.meta.dirname, STANDIN_SOURCE_DIGEST)
83
91
 
84
- export interface NitroSupersetEntry {
85
- key: string
86
- inputs: Record<string, string>
87
- /** every provider the executable registers; urls are absolute. */
88
- metadata: NitroCompiledModule
89
- }
90
-
91
- /** the Release executable at the top level, where the lander reads its
92
- * compiler digest, and the Debug build of the same providers beside it. */
93
- export interface NitroSupersetLock extends NitroSupersetEntry {
94
- debug: NitroSupersetEntry
95
- }
92
+ /** each configuration's compiler-independent inputs, as `nitro-superset.ts inputs` wrote them. */
93
+ export type NitroSupersetLock = Record<NitroBuildConfiguration, Record<string, string>>
96
94
 
97
- function parseEntry(value: unknown): NitroSupersetEntry | null {
98
- if (!isRecord(value) || !isRecord(value.inputs)) return null
99
- const metadata = readNitroMetadata(value.metadata)
100
- if (!metadata || typeof value.key !== 'string') return null
101
- const inputs = Object.fromEntries(
102
- Object.entries(value.inputs).filter(
103
- (entry): entry is [string, string] => typeof entry[1] === 'string',
104
- ),
105
- )
106
- return { key: value.key, inputs, metadata }
95
+ function readInputs(value: unknown): Record<string, string> | null {
96
+ if (!isRecord(value)) return null
97
+ const inputs: Record<string, string> = {}
98
+ for (const [name, entry] of Object.entries(value)) {
99
+ if (typeof entry !== 'string') return null
100
+ inputs[name] = entry
101
+ }
102
+ return inputs
107
103
  }
108
104
 
109
105
  function parseLock(value: unknown): NitroSupersetLock | null {
110
- const release = parseEntry(value)
111
- const debug = isRecord(value) ? parseEntry(value.debug) : null
112
- return release && debug ? { ...release, debug } : null
106
+ if (!isRecord(value)) return null
107
+ const release = readInputs(value.Release)
108
+ const debug = readInputs(value.Debug)
109
+ return release && debug ? { Release: release, Debug: debug } : null
113
110
  }
114
111
 
115
112
  export const nitroSupersetLock = parseLock(supersetLockJson)
116
113
 
117
- /** the lock entry an executable of a configuration is addressed by. */
118
- export const nitroSupersetEntry = (
119
- lock: NitroSupersetLock,
120
- configuration: NitroBuildConfiguration,
121
- ): NitroSupersetEntry => (configuration === 'Debug' ? lock.debug : lock)
114
+ /** the registry key of an executable: its inputs and the compiler that builds it. */
115
+ export const nitroSupersetKey = (inputs: Record<string, string>): string =>
116
+ nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST })
122
117
 
123
118
  /** the registry prefix and file urls of an executable built for a key. */
124
119
  export function nitroSupersetUrl(key: string, file: string): string {
125
120
  return `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix('nitro', NITRO_SUPERSET_ENTRY_NAME, key)}/${file}`
126
121
  }
127
122
 
128
- // a lock names an address before the publish workflow has filled it, so each
129
- // address is asked for once per process
130
- const published = new Map<string, Promise<boolean>>()
131
- const isPublished = (url: string) => {
123
+ // the publish workflow fills a key after main moves its compiler, so each key's
124
+ // metadata is asked for once per process and a miss compiles the app's own.
125
+ const published = new Map<string, Promise<NitroCompiledModule | null>>()
126
+ const publishedMetadata = (url: string) => {
132
127
  let pending = published.get(url)
133
128
  if (!pending) {
134
- pending = fetch(url, { method: 'HEAD' }).then(
135
- (response) => response.ok,
136
- () => false,
137
- )
129
+ pending = fetch(url)
130
+ .then(async (response) =>
131
+ response.ok ? readNitroMetadata(await response.json()) : null,
132
+ )
133
+ .catch(() => null)
138
134
  published.set(url, pending)
139
135
  }
140
136
  return pending
@@ -143,8 +139,8 @@ const isPublished = (url: string) => {
143
139
  /**
144
140
  * the shared executable's metadata for an app's providers, or null when the app
145
141
  * needs its own: its inputs differ from the lock's anywhere, it holds a
146
- * provider the lock lacks, or its config answers a name or view the executable
147
- * would register.
142
+ * provider the lock lacks, its config answers a name or view the executable
143
+ * would register, or this compiler's executable is not published yet.
148
144
  */
149
145
  export async function sharedNitroModule(options: {
150
146
  appRoot: string
@@ -153,17 +149,16 @@ export async function sharedNitroModule(options: {
153
149
  providers: readonly { name: string; root: string }[]
154
150
  answers: { hybridObjects: ReadonlySet<string>; views: ReadonlySet<string> }
155
151
  }): Promise<NitroCompiledModule | null> {
156
- const lock =
157
- nitroSupersetLock && nitroSupersetEntry(nitroSupersetLock, options.configuration)
158
- if (!lock || options.answers.hybridObjects.size > 0 || options.answers.views.size > 0)
152
+ const locked = nitroSupersetLock?.[options.configuration]
153
+ if (!locked || options.answers.hybridObjects.size > 0 || options.answers.views.size > 0)
159
154
  return null
160
155
  const inputs = nitroSupersetInputs(options)
161
156
  for (const [name, value] of Object.entries(inputs))
162
- if (lock.inputs[name] !== value) return null
157
+ if (locked[name] !== value) return null
158
+ const metadata = await publishedMetadata(
159
+ nitroSupersetUrl(nitroSupersetKey(locked), 'metadata.json'),
160
+ )
161
+ if (!metadata) return null
163
162
  const own = new Set(options.providers.map(({ name }) => name))
164
- if (!(await isPublished(lock.metadata.url))) return null
165
- return {
166
- ...lock.metadata,
167
- packages: lock.metadata.packages.filter(({ name }) => own.has(name)),
168
- }
163
+ return { ...metadata, packages: metadata.packages.filter(({ name }) => own.has(name)) }
169
164
  }
@@ -0,0 +1,9 @@
1
+ import binaryPlist from 'bplist-parser'
2
+ import { parsePlistSource } from './plist'
3
+
4
+ export function parsePlistBytes(source: Uint8Array): unknown {
5
+ const bytes = Buffer.from(source)
6
+ return bytes.subarray(0, 8).toString('ascii') === 'bplist00'
7
+ ? binaryPlist.parseBuffer<unknown>(bytes)[0]
8
+ : parsePlistSource(bytes.toString('utf8'))
9
+ }
@@ -6,7 +6,7 @@ import { readExpoConfigAsync } from './native-firebase-config'
6
6
  import { portableInterfaceHash, readPortableExpoManifest } from './portable-expo-contract'
7
7
  import { preparedNativeInventory } from './prepared-native-inventory'
8
8
  import { registerPreparedXcodePhases } from './prepared-xcode-phases'
9
- import lock from './swift-distribution.lock.json' with { type: 'json' }
9
+ import { swiftNativePin } from './swift-native-pin'
10
10
 
11
11
  function stable(value: unknown, app: string): string {
12
12
  if (typeof value === 'string') return JSON.stringify(value.split(app).join('$APP'))
@@ -61,9 +61,10 @@ export async function portableExpoWorkspace(
61
61
  )
62
62
  continue
63
63
  }
64
- if (value.swiftDistribution !== lock.id) {
64
+ const { id } = swiftNativePin().distribution
65
+ if (value.swiftDistribution !== id) {
65
66
  mismatches.push(
66
- `${name}: Swift distribution ${lock.id} differs from ${value.swiftDistribution}`,
67
+ `${name}: Swift distribution ${id} differs from ${value.swiftDistribution}`,
67
68
  )
68
69
  continue
69
70
  }
@@ -6,9 +6,7 @@
6
6
  import fs from 'node:fs'
7
7
  import { createRequire } from 'node:module'
8
8
  import path from 'node:path'
9
- import { PEACH_ANSWERED_NATIVE_PACKAGE_NAMES } from '../../peach-compat/src/generated/supported-native-packages'
10
-
11
- const answeredPackages: ReadonlySet<string> = new Set(PEACH_ANSWERED_NATIVE_PACKAGE_NAMES)
9
+ import { peachAnsweredNativePackages } from './answeredNativePackages'
12
10
  import { swiftCodeMask, swiftSourceClosure } from './swift-compile'
13
11
  import { xcodeNativeFlags, xcodeObjCInputs } from './swift-objc-compile'
14
12
  import { SWIFT_NATIVE_INPUT_ROOT, SWIFT_NATIVE_SDK_INCLUDE } from './swiftContract'
@@ -478,15 +476,17 @@ export function collectBridgeModuleSources(
478
476
  if (bridgingHeader && target.objc && app) {
479
477
  nativeInputs ??= xcodeObjCInputs(app, [], null, undefined, projectRoot)
480
478
  const native = target.objc
479
+ // an installed package a monorepo hoists above the project keeps its
480
+ // absolute path under one reserved prefix.
481
481
  const key = (file: string) => {
482
482
  const relative = path.relative(projectRoot, file)
483
- if (
483
+ const outside =
484
484
  relative === '..' ||
485
485
  relative.startsWith(`..${path.sep}`) ||
486
486
  path.isAbsolute(relative)
487
- )
488
- throw new Error(`Xcode native input outside ${projectRoot}: ${file}`)
489
- return path.posix.join('__peach_xcode', relative.split(path.sep).join('/'))
487
+ return outside
488
+ ? path.posix.join('__peach_xcode/__outside', file.split(path.sep).join('/'))
489
+ : path.posix.join('__peach_xcode', relative.split(path.sep).join('/'))
490
490
  }
491
491
  const headerFiles = [...nativeInputs.sources].filter(([file]) =>
492
492
  /\.(?:h|hh|hpp|hxx|pch|inc|inl|modulemap)$/.test(file),
@@ -495,17 +495,11 @@ export function collectBridgeModuleSources(
495
495
  headerFiles.map(([file, bytes]) => [key(file), bytes.toString('utf8')]),
496
496
  )
497
497
  const directories = (files: string[]) =>
498
- files.flatMap((file) => {
499
- const relative = path.relative(projectRoot, file)
500
- if (
501
- relative !== '..' &&
502
- !relative.startsWith(`..${path.sep}`) &&
503
- !path.isAbsolute(relative)
504
- )
505
- return [key(file)]
506
- if (!fs.existsSync(file)) return []
507
- throw new Error(`Xcode native search path outside ${projectRoot}: ${file}`)
508
- })
498
+ files.flatMap((file) =>
499
+ key(file).startsWith('__peach_xcode/__outside/') && !fs.existsSync(file)
500
+ ? []
501
+ : [key(file)],
502
+ )
509
503
  const nativePath = (file: string) => {
510
504
  const absolute = path.resolve(app.rootDir, file)
511
505
  return absolute === '/usr/include' || absolute.startsWith('/usr/include/')
@@ -617,7 +611,7 @@ function collectInstalledSwiftBridgeUnits(
617
611
  const namespacesSeen = new Set(units.map((unit) => unit.namespace))
618
612
  for (const packageName of Object.keys(dependencies).sort()) {
619
613
  signal?.throwIfAborted()
620
- if (answeredPackages.has(packageName)) continue
614
+ if (peachAnsweredNativePackages().has(packageName)) continue
621
615
  let pkgRoot: string | null = null
622
616
  try {
623
617
  pkgRoot = fs.realpathSync(