mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 16:02:50 +00:00
- runner-command-exec.test.ts: drop the branch's gh stdin case (main's gh now spawns through runProcess, so the execFile mock never fed it) and restore main's copy, which also brings the file back under max-lines. The stdin contract moves to gh-exec-file-deadline.test.ts where the spawn mock already carries a stdin. - orca-runtime-mobile-file-path-search.test.ts: main's file commands route by executionHostId and refuse an unnamed host, so the fixture resolves to 'local'. - hosted-mobile-webview-ssh e2e runners: resolve pnpm through pnpm-cli-invocation instead of naming the Windows batch shim (windows-cmd-shim-spawn-boundary ratchet). Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
import { spawnSync } from 'node:child_process'
|
|
import process from 'node:process'
|
|
import { resolvePnpmCliInvocation } from './pnpm-cli-invocation.mjs'
|
|
|
|
if (process.platform !== 'darwin') {
|
|
throw new Error('Hosted iOS WebView automation requires macOS and Xcode.')
|
|
}
|
|
|
|
const { command: pnpm, prefixArgs: pnpmPrefix, shell } = resolvePnpmCliInvocation()
|
|
const env = { ...process.env, ORCA_E2E_SSH_DOCKER: '1' }
|
|
const prebuildCommands =
|
|
process.env.SKIP_BUILD === '1'
|
|
? []
|
|
: [
|
|
['run', 'build:cli'],
|
|
['run', 'build:mobile-web-rnw']
|
|
]
|
|
const commands = [
|
|
...prebuildCommands,
|
|
['run', 'ensure:electron-runtime'],
|
|
[
|
|
'exec',
|
|
'playwright',
|
|
'test',
|
|
'tests/e2e/hosted-mobile-webview-ssh.spec.ts',
|
|
'--config',
|
|
'tests/playwright.config.ts',
|
|
'--project',
|
|
'electron-headless',
|
|
'--workers=1',
|
|
...process.argv.slice(2)
|
|
]
|
|
]
|
|
|
|
for (const args of commands) {
|
|
const result = spawnSync(pnpm, [...pnpmPrefix, ...args], {
|
|
cwd: process.cwd(),
|
|
env,
|
|
stdio: 'inherit',
|
|
shell
|
|
})
|
|
if (result.error) {
|
|
throw result.error
|
|
}
|
|
if (result.status !== 0) {
|
|
process.exit(result.status ?? 1)
|
|
}
|
|
}
|