peachsim 0.1.1814 → 0.1.1817
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.
- package/cli/commands/control.ts +5 -2
- package/cli/commands/inspect.ts +43 -385
- package/cli/commands/package.ts +88 -32
- package/cli/commands/runtime.ts +2 -2
- package/cli/outbound-endpoints.ts +2 -2
- package/cli/packaged-app-launcher.ts +6 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +5186 -5881
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +100 -16
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3949 -4535
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +3724 -4482
- package/dist-lib/host/fetch-proxy-handler.cjs +25 -14
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +26 -36
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +26 -36
- package/dist-lib/native-app-identity-project.cjs +4 -23
- package/dist-lib/native-app-identity-project.mjs +4 -23
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +87 -76
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +4265 -4982
- package/dist-lib/swift-compile.cjs +218 -243
- package/dist-lib/swift-compile.mjs +218 -243
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +274 -251
- package/dist-lib/vite.cjs +25 -14
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +2 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/answeredNativePackages.ts +41 -0
- package/src/cli-runtime.ts +34 -13
- package/src/expo-discovery-cache.ts +2 -0
- package/src/expo-kotlin-host.ts +11 -9
- package/src/expo-swift-host.ts +10 -6
- package/src/expo-swift-ready.ts +16 -2
- package/src/installed-native-libraries.ts +79 -18
- package/src/nitro-adapter.lock.json +240 -240
- package/src/nitro-bundle.ts +8 -6
- package/src/nitro-compile.ts +6 -3
- package/src/nitro-compiler-digest.ts +2 -4
- package/src/nitro-dependencies.ts +8 -2
- package/src/nitro-source.ts +34 -3
- package/src/nitro-superset.lock.json +21 -253
- package/src/nitro-superset.ts +59 -63
- package/src/nitroContract.ts +26 -3
- package/src/react-native-bridge-modules.ts +2 -4
- package/src/runtime-delivery.ts +2 -2
- package/src/swift-compile.ts +260 -255
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-installed-targets.ts +13 -0
- package/src/swift-objc-standin.ts +10 -6
- package/src/swift-standins.ts +44 -14
- package/src/turbo-bundle.ts +20 -1
- package/src/turbo-compile.ts +6 -12
- package/src/turbo-runtime.lock.json +19 -19
- package/src/turbo-source.ts +18 -3
package/src/swift-standins.ts
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from './swift-compile'
|
|
36
36
|
import { emitCxxStandin } from './swift-cxx-standin'
|
|
37
37
|
import {
|
|
38
|
-
|
|
38
|
+
iosSdkId,
|
|
39
39
|
WASI_EMULATION,
|
|
40
40
|
WASI_EMULATION_FLAGS,
|
|
41
41
|
moduleMapHeaders,
|
|
@@ -305,12 +305,18 @@ function stageDeclaredFramework(
|
|
|
305
305
|
): void {
|
|
306
306
|
const name = path.basename(framework, '.framework')
|
|
307
307
|
const own = `${name}-Swift.h`
|
|
308
|
-
const
|
|
308
|
+
const declaration = fs.readFileSync(
|
|
309
309
|
path.join(framework, 'Modules/module.modulemap'),
|
|
310
310
|
'utf8',
|
|
311
311
|
)
|
|
312
|
+
// expo's use_frameworks setup removes React's framework module from the pod's
|
|
313
|
+
// module map, so the module is declared again from the umbrella the framework ships.
|
|
314
|
+
const modulemap = declaration.includes(`framework module ${name}`)
|
|
315
|
+
? declaration
|
|
316
|
+
: `framework module ${name} {\n umbrella header "${name}-umbrella.h"\n export *\n}\n`
|
|
312
317
|
const umbrella = /umbrella header "([^"]+)"/.exec(modulemap)?.[1]
|
|
313
|
-
if (!umbrella
|
|
318
|
+
if (!umbrella || !fs.existsSync(path.join(framework, 'Headers', umbrella)))
|
|
319
|
+
throw new Error(`${name} module map names no umbrella header`)
|
|
314
320
|
const headers = new Map(
|
|
315
321
|
fs
|
|
316
322
|
.readdirSync(path.join(framework, 'Headers'))
|
|
@@ -450,7 +456,11 @@ export function binaryHeaderSearchPaths(
|
|
|
450
456
|
// the interface header's bytes change with the module, so the staged
|
|
451
457
|
// directory names the declarations and imports it was cut by, and the
|
|
452
458
|
// header is written into it on every call. framework identity is relative
|
|
453
|
-
// to the artifact so the host's cache location never enters staged paths
|
|
459
|
+
// to the artifact so the host's cache location never enters staged paths.
|
|
460
|
+
// each staged tree is immutable and named by its bytes: clang units name it
|
|
461
|
+
// in their flags, so a stand-in revision that stages the same headers keeps
|
|
462
|
+
// a warm build root's objects, and a concurrent reader never sees a rewrite.
|
|
463
|
+
// a per-revision record finds the tree without restaging.
|
|
454
464
|
const declaredDigest = createHash('sha256')
|
|
455
465
|
for (const [framework, { declared: names, imports, sdkHeader }] of declared)
|
|
456
466
|
declaredDigest
|
|
@@ -459,16 +469,16 @@ export function binaryHeaderSearchPaths(
|
|
|
459
469
|
.update('\n')
|
|
460
470
|
.update([...imports].sort().join('\0'))
|
|
461
471
|
.update(sdkHeader ?? '')
|
|
462
|
-
const
|
|
472
|
+
const staging = path.join(
|
|
463
473
|
root,
|
|
464
|
-
'peach-binary-
|
|
465
|
-
STANDIN_SOURCE_DIGEST.slice(0, 32),
|
|
474
|
+
'peach-binary-trees',
|
|
466
475
|
declared.size
|
|
467
476
|
? `${artifact.digest.slice(0, 32)}-${declaredDigest.digest('hex').slice(0, 16)}`
|
|
468
477
|
: artifact.digest.slice(0, 32),
|
|
469
478
|
)
|
|
470
|
-
|
|
471
|
-
|
|
479
|
+
const revision = path.join(staging, 'revisions', STANDIN_SOURCE_DIGEST.slice(0, 32))
|
|
480
|
+
const stageTree = (): string => {
|
|
481
|
+
const pending = path.join(staging, `pending.${process.pid}`)
|
|
472
482
|
fs.rmSync(pending, { recursive: true, force: true })
|
|
473
483
|
for (const framework of frameworks) {
|
|
474
484
|
const swift = declared.get(framework)
|
|
@@ -504,13 +514,31 @@ export function binaryHeaderSearchPaths(
|
|
|
504
514
|
}
|
|
505
515
|
: {}),
|
|
506
516
|
})
|
|
517
|
+
const contents = createHash('sha256')
|
|
518
|
+
for (const relative of fs
|
|
519
|
+
.readdirSync(pending, { recursive: true, encoding: 'utf8' })
|
|
520
|
+
.sort()) {
|
|
521
|
+
const file = path.join(pending, relative)
|
|
522
|
+
contents.update(`${relative}\0`)
|
|
523
|
+
if (fs.statSync(file).isFile()) contents.update(fs.readFileSync(file))
|
|
524
|
+
}
|
|
525
|
+
const name = contents.digest('hex').slice(0, 32)
|
|
507
526
|
try {
|
|
508
|
-
fs.renameSync(pending,
|
|
527
|
+
fs.renameSync(pending, path.join(staging, name))
|
|
509
528
|
} catch (error) {
|
|
510
529
|
fs.rmSync(pending, { recursive: true, force: true })
|
|
511
|
-
if (!fs.existsSync(
|
|
530
|
+
if (!fs.existsSync(path.join(staging, name))) throw error
|
|
512
531
|
}
|
|
532
|
+
fs.mkdirSync(path.dirname(revision), { recursive: true })
|
|
533
|
+
const record = `${revision}.${process.pid}`
|
|
534
|
+
fs.writeFileSync(record, name)
|
|
535
|
+
fs.renameSync(record, revision)
|
|
536
|
+
return name
|
|
513
537
|
}
|
|
538
|
+
const search = path.join(
|
|
539
|
+
staging,
|
|
540
|
+
fs.existsSync(revision) ? fs.readFileSync(revision, 'utf8') : stageTree(),
|
|
541
|
+
)
|
|
514
542
|
for (const [framework, { header }] of declared) {
|
|
515
543
|
if (header === null) continue
|
|
516
544
|
const name = path.basename(framework, '.framework')
|
|
@@ -521,8 +549,10 @@ export function binaryHeaderSearchPaths(
|
|
|
521
549
|
'Headers',
|
|
522
550
|
`${name}-Swift.h`,
|
|
523
551
|
)
|
|
524
|
-
if (!fs.existsSync(staged) || fs.readFileSync(staged, 'utf8') !== header)
|
|
525
|
-
fs.writeFileSync(staged
|
|
552
|
+
if (!fs.existsSync(staged) || fs.readFileSync(staged, 'utf8') !== header) {
|
|
553
|
+
fs.writeFileSync(`${staged}.${process.pid}`, header)
|
|
554
|
+
fs.renameSync(`${staged}.${process.pid}`, staged)
|
|
555
|
+
}
|
|
526
556
|
}
|
|
527
557
|
return {
|
|
528
558
|
frameworks: frameworks.length ? [path.join(search, 'frameworks')] : [],
|
|
@@ -2374,7 +2404,7 @@ export function standinGenerationInputs(
|
|
|
2374
2404
|
sdk.wasmSdkChecksum,
|
|
2375
2405
|
swiftModuleDigest(moduleRoot).toString('hex'),
|
|
2376
2406
|
`sources/${digest}`,
|
|
2377
|
-
`ios-sdk/${
|
|
2407
|
+
`ios-sdk/${iosSdkId()}`,
|
|
2378
2408
|
]
|
|
2379
2409
|
const modules = new Set(
|
|
2380
2410
|
binaries.flatMap((binary) => {
|
package/src/turbo-bundle.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import { prepareNativeAppRoot } from './expo-native-workspace'
|
|
4
|
+
import { installedNativeLibraries } from './installed-native-libraries'
|
|
4
5
|
import {
|
|
5
6
|
compiledModuleAssets,
|
|
6
7
|
compiledModuleRequestHandler,
|
|
@@ -10,6 +11,7 @@ import { swiftDistributionRoot } from './swift-distribution'
|
|
|
10
11
|
import { icuUrl, type SwiftArtifact } from './swift-host'
|
|
11
12
|
import { compileTurboModule } from './turbo-compile'
|
|
12
13
|
import { discoverTurboProviders } from './turbo-source'
|
|
14
|
+
import { installedXcodeWorkspace } from './xcode-project'
|
|
13
15
|
import type { TurboCompiledModule } from './nitroContract'
|
|
14
16
|
|
|
15
17
|
export const TURBO_ROUTE = '/__peach/turbo'
|
|
@@ -38,6 +40,21 @@ export async function compileTurboApp(
|
|
|
38
40
|
// the app's own committed ios directory has no installed pods: the compile
|
|
39
41
|
// reads the prepared workspace, as the Nitro compile does
|
|
40
42
|
const projectRoot = await prepareNativeAppRoot(appRoot)
|
|
43
|
+
const installed = installedXcodeWorkspace(projectRoot)
|
|
44
|
+
? installedNativeLibraries(providers, projectRoot, module, iosTarget)
|
|
45
|
+
: null
|
|
46
|
+
// a provider that links a prebuilt binary stays out of the executable, so
|
|
47
|
+
// the app finds its modules absent where it calls them, as on a device
|
|
48
|
+
// that never linked the pod.
|
|
49
|
+
const unavailable = [...(installed?.unavailable ?? [])].map(([name, diagnostic]) => ({
|
|
50
|
+
name,
|
|
51
|
+
diagnostic,
|
|
52
|
+
}))
|
|
53
|
+
const compiled = providers.filter(({ name }) => !installed?.unavailable.has(name))
|
|
54
|
+
if (compiled.length === 0) {
|
|
55
|
+
for (const { diagnostic } of unavailable) console.warn(`[peach] ${diagnostic}`)
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
41
58
|
const { artifact, collection } = await compileTurboModule({
|
|
42
59
|
appRoot,
|
|
43
60
|
reactNativeRoot: path.dirname(
|
|
@@ -45,10 +62,11 @@ export async function compileTurboApp(
|
|
|
45
62
|
'react-native/package.json',
|
|
46
63
|
),
|
|
47
64
|
),
|
|
48
|
-
providers,
|
|
65
|
+
providers: compiled,
|
|
49
66
|
moduleRoot: module,
|
|
50
67
|
projectRoot,
|
|
51
68
|
iosTarget,
|
|
69
|
+
installedPods: installed?.pods,
|
|
52
70
|
})
|
|
53
71
|
return {
|
|
54
72
|
artifact,
|
|
@@ -59,6 +77,7 @@ export async function compileTurboApp(
|
|
|
59
77
|
hash: artifact.hash,
|
|
60
78
|
icuUrl: icuUrl(origin, artifact),
|
|
61
79
|
bundleFiles: artifact.package.bundleFiles.files,
|
|
80
|
+
...(unavailable.length > 0 ? { unavailable } : {}),
|
|
62
81
|
},
|
|
63
82
|
}
|
|
64
83
|
}
|
package/src/turbo-compile.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { createHash } from 'node:crypto'
|
|
|
2
2
|
import fs from 'node:fs'
|
|
3
3
|
import os from 'node:os'
|
|
4
4
|
import path from 'node:path'
|
|
5
|
-
import { installedNativeLibraries } from './installed-native-libraries'
|
|
6
5
|
import { readIosAppTarget } from './native-app-identity-project'
|
|
7
6
|
import {
|
|
8
7
|
committedAdapterLocks,
|
|
@@ -36,6 +35,7 @@ import {
|
|
|
36
35
|
collectTurboSources,
|
|
37
36
|
prepareTurboSourceDependencies,
|
|
38
37
|
TURBO_CORE_TARGET,
|
|
38
|
+
type TurboInstalledPod,
|
|
39
39
|
type TurboProvider,
|
|
40
40
|
type TurboSourceCollection,
|
|
41
41
|
} from './turbo-source'
|
|
@@ -171,6 +171,8 @@ export async function compileTurboModule(options: {
|
|
|
171
171
|
moduleRoot: string
|
|
172
172
|
projectRoot: string
|
|
173
173
|
iosTarget?: string
|
|
174
|
+
/** the installed workspace's pods; without them the podspecs' literal source membership applies. */
|
|
175
|
+
installedPods?: ReadonlyMap<string, TurboInstalledPod>
|
|
174
176
|
}): Promise<{ artifact: SwiftArtifact; collection: TurboSourceCollection }> {
|
|
175
177
|
await prepareTurboSourceDependencies(options.reactNativeRoot)
|
|
176
178
|
const key = createHash('sha256')
|
|
@@ -186,15 +188,7 @@ export async function compileTurboModule(options: {
|
|
|
186
188
|
reactNativeRoot: options.reactNativeRoot,
|
|
187
189
|
providers: options.providers,
|
|
188
190
|
codegenDir: path.join(scratch, 'codegen'),
|
|
189
|
-
|
|
190
|
-
installedPods: installedXcodeWorkspace(options.projectRoot)
|
|
191
|
-
? installedNativeLibraries(
|
|
192
|
-
options.providers,
|
|
193
|
-
options.projectRoot,
|
|
194
|
-
options.moduleRoot,
|
|
195
|
-
options.iosTarget,
|
|
196
|
-
)
|
|
197
|
-
: undefined,
|
|
191
|
+
installedPods: options.installedPods,
|
|
198
192
|
})
|
|
199
193
|
const swiftTargets = collection.targets.filter((target) =>
|
|
200
194
|
Object.keys(collection.files).some(
|
|
@@ -211,7 +205,7 @@ export async function compileTurboModule(options: {
|
|
|
211
205
|
options.projectRoot,
|
|
212
206
|
`Swift TurboModule providers (${workspaceSwift.map(({ name }) => name).join(', ')})`,
|
|
213
207
|
)
|
|
214
|
-
await prepareXcodeSwiftPackages(workspace)
|
|
208
|
+
await prepareXcodeSwiftPackages(workspace, options.iosTarget)
|
|
215
209
|
await withXcodeProject(
|
|
216
210
|
workspace,
|
|
217
211
|
{
|
|
@@ -298,7 +292,7 @@ export async function compileTurboModule(options: {
|
|
|
298
292
|
options.projectRoot,
|
|
299
293
|
`the modules no collected source provides (${missing.join(', ')})`,
|
|
300
294
|
)
|
|
301
|
-
await prepareXcodeSwiftPackages(workspace)
|
|
295
|
+
await prepareXcodeSwiftPackages(workspace, options.iosTarget)
|
|
302
296
|
dependencies = await withXcodeProject(
|
|
303
297
|
workspace,
|
|
304
298
|
{
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"checksum": "d91882af99821a296c3db4459896b46ceaef37e9a30caad14e5f24cf6b964ae9"
|
|
13
13
|
},
|
|
14
14
|
"framework": {
|
|
15
|
-
"distribution": "
|
|
15
|
+
"distribution": "92d08dea86eafc17",
|
|
16
16
|
"wireAbi": "246b8412514b644113e6a26252c8ebd6de49ab4156ac5f5c98bb9e4c2ff2568b"
|
|
17
17
|
},
|
|
18
18
|
"archives": [
|
|
@@ -20,64 +20,64 @@
|
|
|
20
20
|
"headers": {
|
|
21
21
|
"reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
|
|
22
22
|
},
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "1c025e16714e307807927e6dc402e5969380379348b81239ae0e51893579bf86",
|
|
24
|
+
"size": 25410
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"headers": {
|
|
28
28
|
"reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
|
|
29
29
|
},
|
|
30
|
-
"sha256": "
|
|
31
|
-
"size":
|
|
30
|
+
"sha256": "5f3ff09bd19438a4241b04886b8faed29653c9a0496f71456fed04773024743d",
|
|
31
|
+
"size": 26143
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"headers": {
|
|
35
35
|
"reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
|
|
36
36
|
},
|
|
37
|
-
"sha256": "
|
|
38
|
-
"size":
|
|
37
|
+
"sha256": "f338727cb59425568a5431cb46fee1929a0eeb7e74e137784c3a6b4032e3b8f7",
|
|
38
|
+
"size": 25399
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"headers": {
|
|
42
42
|
"reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
|
|
43
43
|
},
|
|
44
|
-
"sha256": "
|
|
45
|
-
"size":
|
|
44
|
+
"sha256": "aa26e40d43b57677bae9770d4fae08005974d97727ede149a6075ec1e9f49330",
|
|
45
|
+
"size": 25175
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"headers": {
|
|
49
49
|
"reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
|
|
50
50
|
},
|
|
51
|
-
"sha256": "
|
|
52
|
-
"size":
|
|
51
|
+
"sha256": "b16b3f3357aa86ad40c207bbb81d4a4ce21152f7c9dfdc092e4d070895dd1868",
|
|
52
|
+
"size": 25410
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"headers": {
|
|
56
56
|
"reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
|
|
57
57
|
},
|
|
58
|
-
"sha256": "
|
|
59
|
-
"size":
|
|
58
|
+
"sha256": "38ea876c785d0febcf2428d98d539e7394c0fd25b930843750a8a24352973736",
|
|
59
|
+
"size": 26143
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"headers": {
|
|
63
63
|
"reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
|
|
64
64
|
},
|
|
65
|
-
"sha256": "
|
|
66
|
-
"size":
|
|
65
|
+
"sha256": "a5874458a8784cfa5aaea1f4e2ca3b5a5de1c1f0192daae419a4b1b0d4d921f4",
|
|
66
|
+
"size": 26144
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"headers": {
|
|
70
70
|
"reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
|
|
71
71
|
},
|
|
72
|
-
"sha256": "
|
|
73
|
-
"size":
|
|
72
|
+
"sha256": "d2032854a6a40112f989cc819eb08ea810872bf8f0493da984ac73baffb68381",
|
|
73
|
+
"size": 25275
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"headers": {
|
|
77
77
|
"reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
|
|
78
78
|
},
|
|
79
|
-
"sha256": "
|
|
80
|
-
"size":
|
|
79
|
+
"sha256": "6c0ef47aa726477eeb9fd3968287b90aca798f47777eaaccb526ca41dce1430e",
|
|
80
|
+
"size": 26149
|
|
81
81
|
}
|
|
82
82
|
]
|
|
83
83
|
}
|
package/src/turbo-source.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { createHash } from 'node:crypto'
|
|
|
12
12
|
import fs from 'node:fs'
|
|
13
13
|
import path from 'node:path'
|
|
14
14
|
import { promisify } from 'node:util'
|
|
15
|
-
import { PEACH_ANSWERED_NATIVE_PACKAGE_NAMES } from '../../peach-compat/src/generated/supported-native-packages'
|
|
16
15
|
import { rnxHomeDir } from './home-paths'
|
|
17
16
|
|
|
18
17
|
const execFileAsync = promisify(execFile)
|
|
@@ -24,6 +23,7 @@ function codegenSpecRoot(codegen: string): string {
|
|
|
24
23
|
const nested = path.join(codegen, 'ReactCodegen')
|
|
25
24
|
return fs.existsSync(nested) ? nested : codegen
|
|
26
25
|
}
|
|
26
|
+
import { peachAnsweredNativePackages } from './answeredNativePackages'
|
|
27
27
|
import {
|
|
28
28
|
glogSources,
|
|
29
29
|
nitroDependencyIncludes,
|
|
@@ -104,7 +104,6 @@ const CODEGEN_OBJC = /@generated by codegen project: GenerateModuleObjCpp\b/
|
|
|
104
104
|
const UNIT = /\.(?:c|cc|cpp|cxx)$/
|
|
105
105
|
const HEADER = /\.(?:h|hh|hpp|hxx|inl|ipp)$/
|
|
106
106
|
const OBJC = /\.(?:m|mm)$/
|
|
107
|
-
const answeredPackages: ReadonlySet<string> = new Set(PEACH_ANSWERED_NATIVE_PACKAGE_NAMES)
|
|
108
107
|
// an Objective-C TurboModule: a class whose getTurboModule: returns the C++
|
|
109
108
|
// object React Native's TurboModule manager installs
|
|
110
109
|
const OBJC_TURBO =
|
|
@@ -886,7 +885,7 @@ export async function discoverTurboProviders(appRoot: string): Promise<TurboProv
|
|
|
886
885
|
const providers: TurboProvider[] = []
|
|
887
886
|
for (const { name, root, podspecPath } of await iosAutolinkedDependencies(appRoot)) {
|
|
888
887
|
// a package peach-compat answers keeps its answer, Fabric views included.
|
|
889
|
-
if (
|
|
888
|
+
if (peachAnsweredNativePackages().has(name)) continue
|
|
890
889
|
// a pod can register Nitro objects and Fabric components independently.
|
|
891
890
|
const fabric = fabricComponents(root)
|
|
892
891
|
if (!podspecPath) continue
|
|
@@ -1186,6 +1185,7 @@ export async function collectTurboSources(options: {
|
|
|
1186
1185
|
// an include a file names, resolved as clang would against the pod's own
|
|
1187
1186
|
// directory, then the search paths CocoaPods gives a module pod. unresolved
|
|
1188
1187
|
// names are the SDK's own headers.
|
|
1188
|
+
const podFileLists = new Map<string, Set<string>>()
|
|
1189
1189
|
const resolve = (from: Scan, include: string, quoted: boolean) => {
|
|
1190
1190
|
if (quoted) {
|
|
1191
1191
|
const relative = path.posix.normalize(
|
|
@@ -1261,6 +1261,21 @@ export async function collectTurboSources(options: {
|
|
|
1261
1261
|
)
|
|
1262
1262
|
return
|
|
1263
1263
|
}
|
|
1264
|
+
if (quoted && from.root) {
|
|
1265
|
+
// a pod's private headers share one flattened header map, so a quoted
|
|
1266
|
+
// include reaches a sibling in another directory of the same pod
|
|
1267
|
+
let files = podFileLists.get(from.root)
|
|
1268
|
+
if (!files) {
|
|
1269
|
+
files = new Set()
|
|
1270
|
+
walkFiles(from.root, '', files)
|
|
1271
|
+
podFileLists.set(from.root, files)
|
|
1272
|
+
}
|
|
1273
|
+
const found = [...files].find((file) => file.endsWith(`/${include}`))
|
|
1274
|
+
if (found) {
|
|
1275
|
+
alias(own, original(from.targetName, from.label, from.root, found, false))
|
|
1276
|
+
return
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1264
1279
|
if (codegen && HEADER.test(include)) {
|
|
1265
1280
|
const generated = codegenSpecRoot(codegen)
|
|
1266
1281
|
const relative = path.posix.normalize(include.replace(/^ReactCodegen\//, ''))
|