Files
orca/src/shared/appimage-node-runtime.ts
T
OrcaWinandm4air 49a1129aa6 build(linux): carry the pinned Node inside the AppImage so serve's slot works offline (#28204)
* build(linux): carry the pinned Node inside the AppImage so orca serve's slot works offline

Linux packaging places the pinned glibc Node at resources/node-runtime/bin/node before the
glibc-floor gate, proves it serves one PTY with the packaged daemon entry, and deb/rpm exclude
it through fpm. orca serve's orcad slot copies that Node (hash-checked) instead of downloading.

* test(serve): type the bundled Node fixture

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-13 00:39:39 -07:00

25 lines
998 B
TypeScript

/**
* The pinned Node a Linux AppImage carries, so what runs outside Electron needs no download.
* deb and rpm exclude it at packaging time: their installs never vanish under a running process.
*
* Keep this file erasable-only TypeScript with no imports — packaging scripts require it directly.
*/
/** Segments under the app's resources dir, laid out like the upstream archive (`bin/node`). */
export const APPIMAGE_NODE_RUNTIME_SEGMENTS = ['node-runtime', 'bin', 'node'] as const
/** fpm `--exclude` pattern, matched against each staged path (`*` crosses `/` there). */
export const APPIMAGE_NODE_RUNTIME_FPM_EXCLUDE = '*/resources/node-runtime'
/** AppImages are glibc builds, so only a glibc host of the same CPU can use the bundled Node. */
export function appImageNodeRuntimeTarget(
arch: string
): 'linux-x64-glibc' | 'linux-arm64-glibc' | null {
if (arch === 'x64') {
return 'linux-x64-glibc'
}
if (arch === 'arm64') {
return 'linux-arm64-glibc'
}
return null
}