mirror of
https://github.com/stablyai/orca.git
synced 2026-10-04 00:02:21 +00:00
Bundle a pinned, verified Bun runtime for headless Orca so existing Node launch commands can hand off before opening a profile. Keep desktop execution on Electron. Add the Bun SQLite adapter and terminal backend, bounded shutdown, process inspection and cross-platform artifact qualification. Keep future managed SSH deployment separate from current production launch paths.
21 lines
630 B
TypeScript
21 lines
630 B
TypeScript
import { join } from 'node:path'
|
|
|
|
/** The destination must already exist; callers extract only checksum-verified archives. */
|
|
export function getZipExtractorCommand(
|
|
zipPath: string,
|
|
extractDir: string
|
|
): { file: string; args: string[]; label: string } {
|
|
if (process.platform === 'win32' && !process.env.ORCA_UNZIP_BIN) {
|
|
return {
|
|
file: join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'tar.exe'),
|
|
args: ['-xf', zipPath, '-C', extractDir],
|
|
label: 'tar'
|
|
}
|
|
}
|
|
return {
|
|
file: process.env.ORCA_UNZIP_BIN || 'unzip',
|
|
args: ['-q', zipPath, '-d', extractDir],
|
|
label: 'unzip'
|
|
}
|
|
}
|