peachsim 0.1.1815 → 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/package.ts +82 -31
- package/cli/outbound-endpoints.ts +1 -1
- 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 +4418 -5235
- 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 +12 -3
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3932 -4526
- 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 +3289 -4175
- package/dist-lib/host/fetch-proxy-handler.cjs +12 -3
- 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 +13 -24
- 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 +13 -24
- package/dist-lib/native-app-identity-project.cjs +2 -22
- package/dist-lib/native-app-identity-project.mjs +2 -22
- 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 +74 -66
- 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 +3793 -4671
- package/dist-lib/swift-compile.cjs +216 -242
- package/dist-lib/swift-compile.mjs +216 -242
- 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 +251 -236
- package/dist-lib/vite.cjs +12 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/answeredNativePackages.ts +41 -0
- package/src/cli-runtime.ts +2 -9
- 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/nitro-bundle.ts +8 -6
- package/src/nitro-compiler-digest.ts +2 -4
- package/src/nitro-superset.lock.json +19 -251
- package/src/nitro-superset.ts +59 -63
- package/src/react-native-bridge-modules.ts +2 -4
- package/src/swift-compile.ts +258 -254
- package/src/swift-objc-standin.ts +10 -6
- package/src/swift-standins.ts +36 -12
- package/src/turbo-source.ts +2 -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,
|
|
@@ -456,7 +456,11 @@ export function binaryHeaderSearchPaths(
|
|
|
456
456
|
// the interface header's bytes change with the module, so the staged
|
|
457
457
|
// directory names the declarations and imports it was cut by, and the
|
|
458
458
|
// header is written into it on every call. framework identity is relative
|
|
459
|
-
// 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.
|
|
460
464
|
const declaredDigest = createHash('sha256')
|
|
461
465
|
for (const [framework, { declared: names, imports, sdkHeader }] of declared)
|
|
462
466
|
declaredDigest
|
|
@@ -465,16 +469,16 @@ export function binaryHeaderSearchPaths(
|
|
|
465
469
|
.update('\n')
|
|
466
470
|
.update([...imports].sort().join('\0'))
|
|
467
471
|
.update(sdkHeader ?? '')
|
|
468
|
-
const
|
|
472
|
+
const staging = path.join(
|
|
469
473
|
root,
|
|
470
|
-
'peach-binary-
|
|
471
|
-
STANDIN_SOURCE_DIGEST.slice(0, 32),
|
|
474
|
+
'peach-binary-trees',
|
|
472
475
|
declared.size
|
|
473
476
|
? `${artifact.digest.slice(0, 32)}-${declaredDigest.digest('hex').slice(0, 16)}`
|
|
474
477
|
: artifact.digest.slice(0, 32),
|
|
475
478
|
)
|
|
476
|
-
|
|
477
|
-
|
|
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}`)
|
|
478
482
|
fs.rmSync(pending, { recursive: true, force: true })
|
|
479
483
|
for (const framework of frameworks) {
|
|
480
484
|
const swift = declared.get(framework)
|
|
@@ -510,13 +514,31 @@ export function binaryHeaderSearchPaths(
|
|
|
510
514
|
}
|
|
511
515
|
: {}),
|
|
512
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)
|
|
513
526
|
try {
|
|
514
|
-
fs.renameSync(pending,
|
|
527
|
+
fs.renameSync(pending, path.join(staging, name))
|
|
515
528
|
} catch (error) {
|
|
516
529
|
fs.rmSync(pending, { recursive: true, force: true })
|
|
517
|
-
if (!fs.existsSync(
|
|
530
|
+
if (!fs.existsSync(path.join(staging, name))) throw error
|
|
518
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
|
|
519
537
|
}
|
|
538
|
+
const search = path.join(
|
|
539
|
+
staging,
|
|
540
|
+
fs.existsSync(revision) ? fs.readFileSync(revision, 'utf8') : stageTree(),
|
|
541
|
+
)
|
|
520
542
|
for (const [framework, { header }] of declared) {
|
|
521
543
|
if (header === null) continue
|
|
522
544
|
const name = path.basename(framework, '.framework')
|
|
@@ -527,8 +549,10 @@ export function binaryHeaderSearchPaths(
|
|
|
527
549
|
'Headers',
|
|
528
550
|
`${name}-Swift.h`,
|
|
529
551
|
)
|
|
530
|
-
if (!fs.existsSync(staged) || fs.readFileSync(staged, 'utf8') !== header)
|
|
531
|
-
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
|
+
}
|
|
532
556
|
}
|
|
533
557
|
return {
|
|
534
558
|
frameworks: frameworks.length ? [path.join(search, 'frameworks')] : [],
|
|
@@ -2380,7 +2404,7 @@ export function standinGenerationInputs(
|
|
|
2380
2404
|
sdk.wasmSdkChecksum,
|
|
2381
2405
|
swiftModuleDigest(moduleRoot).toString('hex'),
|
|
2382
2406
|
`sources/${digest}`,
|
|
2383
|
-
`ios-sdk/${
|
|
2407
|
+
`ios-sdk/${iosSdkId()}`,
|
|
2384
2408
|
]
|
|
2385
2409
|
const modules = new Set(
|
|
2386
2410
|
binaries.flatMap((binary) => {
|
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
|