peachsim 0.1.1811 → 0.1.1813
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/cloud-box-artifact.ts +31 -9
- package/cli/cloud-client.ts +53 -23
- package/cli/commands/box/bundle-plane.ts +34 -5
- package/cli/commands/box.ts +12 -2
- package/cli/commands/control.ts +19 -1
- package/cli/commands/platform.ts +12 -18
- package/cli/commands/setup.ts +16 -3
- 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 +454 -371
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +129 -46
- 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 +445 -362
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -2
- 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 +35 -12
- 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 +35 -12
- package/dist-lib/native-app-identity-project.cjs +35 -11
- package/dist-lib/native-app-identity-project.mjs +35 -11
- 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 +54 -54
- 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 +589 -456
- package/dist-lib/swift-compile.cjs +46 -11
- package/dist-lib/swift-compile.mjs +46 -11
- package/dist-lib/swift-package.cjs +12 -4
- package/dist-lib/swift-package.mjs +9 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +18 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +75 -30
- package/dist-lib/vite.cjs +1 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISlider.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewController.h +12 -50
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewControllerLayoutEnvironment.h +2 -8
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +62 -0
- package/sdk/ios/usr/include/module.modulemap +8 -3
- package/src/expo-native-workspace.ts +64 -27
- package/src/nitro-adapter.lock.json +265 -265
- package/src/nitro-superset.lock.json +14 -14
- package/src/nitroContract.ts +1 -0
- package/src/swift-compile.ts +20 -6
- package/src/swift-distribution.lock.json +9 -9
- package/src/swift-link-roots.ts +13 -2
- package/src/swift-objc-compile.ts +12 -0
- package/src/swift-objc-standin.ts +5 -2
- package/src/swift-package.ts +21 -1
- package/src/swift-toolchain.ts +17 -0
- package/src/turbo-bundle.ts +3 -4
- package/src/turbo-runtime.lock.json +20 -20
- package/src/xcode-project.ts +29 -12
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// prepare Expo's own CocoaPods workspace in a private cache on the Mac.
|
|
2
|
-
import { execFileSync, spawnSync } from 'node:child_process'
|
|
2
|
+
import { execFile, execFileSync, spawnSync } from 'node:child_process'
|
|
3
3
|
import { createHash } from 'node:crypto'
|
|
4
4
|
import fs from 'node:fs'
|
|
5
5
|
import { createRequire } from 'node:module'
|
|
6
6
|
import path from 'node:path'
|
|
7
|
+
import { promisify } from 'node:util'
|
|
7
8
|
import { detectPackageManager } from '../cli/commands/detect'
|
|
8
9
|
import { teamMachineInstalled } from './admitted-mac-build'
|
|
9
10
|
import { workspaceExclusion } from './expo-workspace-exclusion'
|
|
@@ -71,9 +72,9 @@ const NATIVE_CONFIG_FILE =
|
|
|
71
72
|
const NATIVE_SOURCE_FILE = /\.(swift|mm?|hpp?|c|cc|cpp|kt|java)$/
|
|
72
73
|
|
|
73
74
|
// every file the native prepare can read, plus the toolchain that reads it.
|
|
74
|
-
// node_modules stays out: the js install
|
|
75
|
-
// and the discovery cache keys the live native inventory separately.
|
|
76
|
-
// yields so the bridge that runs it keeps answering its other requests.
|
|
75
|
+
// node_modules stays out: the js install reconciles it with the hashed
|
|
76
|
+
// lockfiles, and the discovery cache keys the live native inventory separately.
|
|
77
|
+
// the walk yields so the bridge that runs it keeps answering its other requests.
|
|
77
78
|
export async function hashExpoWorkspace(app: string, signal?: AbortSignal) {
|
|
78
79
|
if (process.platform !== 'darwin') {
|
|
79
80
|
const source = await hashExpoSourceWorkspace(app, signal)
|
|
@@ -458,6 +459,53 @@ function prepare(app: string, stage: 'project' | 'workspace', signal?: AbortSign
|
|
|
458
459
|
})
|
|
459
460
|
}
|
|
460
461
|
|
|
462
|
+
// a workspace starts from the app's own installed dependencies, which the js
|
|
463
|
+
// install then reconciles with the lockfile: an installed tree that matches
|
|
464
|
+
// takes it under a second, where a fresh install fetches, links and runs every
|
|
465
|
+
// lifecycle script again. cp clones the trees eight packages at a time; a
|
|
466
|
+
// per-file copy from node takes several times as long, one cp per tree twice.
|
|
467
|
+
async function copyInstalledWorkspace(
|
|
468
|
+
root: string,
|
|
469
|
+
destination: string,
|
|
470
|
+
excluded: (relative: string) => boolean,
|
|
471
|
+
) {
|
|
472
|
+
const installed: string[] = []
|
|
473
|
+
await fs.promises.cp(root, destination, {
|
|
474
|
+
recursive: true,
|
|
475
|
+
mode: fs.constants.COPYFILE_FICLONE,
|
|
476
|
+
preserveTimestamps: true,
|
|
477
|
+
verbatimSymlinks: true,
|
|
478
|
+
filter: (source) => {
|
|
479
|
+
const relative = path.relative(root, source)
|
|
480
|
+
if (path.basename(source) === 'node_modules') installed.push(relative)
|
|
481
|
+
return !excluded(relative)
|
|
482
|
+
},
|
|
483
|
+
})
|
|
484
|
+
const entries = installed.flatMap((relative) => {
|
|
485
|
+
const source = path.join(root, relative)
|
|
486
|
+
if (fs.lstatSync(source).isSymbolicLink()) {
|
|
487
|
+
fs.symlinkSync(fs.readlinkSync(source), path.join(destination, relative))
|
|
488
|
+
return []
|
|
489
|
+
}
|
|
490
|
+
fs.mkdirSync(path.join(destination, relative))
|
|
491
|
+
return fs.readdirSync(source).map((name) => path.join(relative, name))
|
|
492
|
+
})
|
|
493
|
+
const clone = async (): Promise<void> => {
|
|
494
|
+
const relative = entries.pop()
|
|
495
|
+
if (relative === undefined) return
|
|
496
|
+
await promisify(execFile)('cp', [
|
|
497
|
+
// -c clones on a Mac, as gnu cp already does where the filesystem can
|
|
498
|
+
...(process.platform === 'darwin' ? ['-c'] : []),
|
|
499
|
+
'-R',
|
|
500
|
+
'-p',
|
|
501
|
+
path.join(root, relative),
|
|
502
|
+
path.join(destination, relative),
|
|
503
|
+
])
|
|
504
|
+
return clone()
|
|
505
|
+
}
|
|
506
|
+
await Promise.all(Array.from({ length: 8 }, clone))
|
|
507
|
+
}
|
|
508
|
+
|
|
461
509
|
// release producers prepare the already installed app. this preserves the
|
|
462
510
|
// exact dependency tree selected by a replay, including a staged package.
|
|
463
511
|
export async function prepareInstalledExpoWorkspace(app: string, work: string) {
|
|
@@ -470,18 +518,7 @@ export async function prepareInstalledExpoWorkspace(app: string, work: string) {
|
|
|
470
518
|
throw new Error(`prepared Expo workspace already exists: ${work}`)
|
|
471
519
|
fs.mkdirSync(path.dirname(work), { recursive: true })
|
|
472
520
|
return withSwiftRootLock(work, async (lease) => {
|
|
473
|
-
|
|
474
|
-
recursive: true,
|
|
475
|
-
mode: fs.constants.COPYFILE_FICLONE,
|
|
476
|
-
preserveTimestamps: true,
|
|
477
|
-
verbatimSymlinks: true,
|
|
478
|
-
filter: (source) => {
|
|
479
|
-
const relative = path.relative(root, source)
|
|
480
|
-
const parts = relative.split(path.sep)
|
|
481
|
-
if (parts.includes('.git')) return false
|
|
482
|
-
return parts.includes('node_modules') || !excluded(relative)
|
|
483
|
-
},
|
|
484
|
-
})
|
|
521
|
+
await copyInstalledWorkspace(root, work, excluded)
|
|
485
522
|
initializeWorkspaceGit(work)
|
|
486
523
|
const preparedApp = path.join(work, appRelative)
|
|
487
524
|
const manifest = JSON.parse(
|
|
@@ -573,13 +610,7 @@ async function prepareWorkspace(
|
|
|
573
610
|
await fs.promises.rm(partial, { recursive: true, force: true })
|
|
574
611
|
await fs.promises.rm(work, { recursive: true, force: true })
|
|
575
612
|
fs.mkdirSync(path.dirname(work), { recursive: true })
|
|
576
|
-
await
|
|
577
|
-
recursive: true,
|
|
578
|
-
mode: fs.constants.COPYFILE_FICLONE,
|
|
579
|
-
preserveTimestamps: true,
|
|
580
|
-
verbatimSymlinks: true,
|
|
581
|
-
filter: (source) => !excluded(path.relative(root, source)),
|
|
582
|
-
})
|
|
613
|
+
await copyInstalledWorkspace(root, partial, excluded)
|
|
583
614
|
fs.renameSync(partial, work)
|
|
584
615
|
// a lifecycle script that installs git hooks needs a repository, and the copy gets its own.
|
|
585
616
|
// an app config may read HEAD, so the repository carries one empty commit
|
|
@@ -654,10 +685,8 @@ async function prepareWorkspace(
|
|
|
654
685
|
'install',
|
|
655
686
|
'--frozen-lockfile',
|
|
656
687
|
]
|
|
657
|
-
:
|
|
658
|
-
|
|
659
|
-
fs.existsSync(path.join(work, 'package-lock.json')) ? 'ci' : 'install',
|
|
660
|
-
]
|
|
688
|
+
: // npm ci would delete the cloned tree before installing it again
|
|
689
|
+
['npm', 'install', '--no-audit', '--no-fund']
|
|
661
690
|
// dependencies such as react-native-skia fetch their native binaries in a lifecycle
|
|
662
691
|
// script, so a host-wide ignore-scripts must not reach the workspace install
|
|
663
692
|
const installEnv = { npm_config_ignore_scripts: 'false', YARN_ENABLE_SCRIPTS: 'true' }
|
|
@@ -681,6 +710,14 @@ async function prepareWorkspace(
|
|
|
681
710
|
],
|
|
682
711
|
work,
|
|
683
712
|
)
|
|
713
|
+
// npm install keeps the cloned tree but can otherwise rewrite a stale lockfile.
|
|
714
|
+
if (install[0] === 'npm' && fs.existsSync(path.join(work, 'package-lock.json'))) {
|
|
715
|
+
await execute(
|
|
716
|
+
['npm', 'ci', '--dry-run', '--ignore-scripts', '--no-audit', '--no-fund'],
|
|
717
|
+
work,
|
|
718
|
+
installEnv,
|
|
719
|
+
)
|
|
720
|
+
}
|
|
684
721
|
await execute(install, work, installEnv)
|
|
685
722
|
report('installed js dependencies')
|
|
686
723
|
}
|