mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(cli): add Bun single executable binary support
Enables building hapi as standalone Bun-compiled executables for macOS, Linux, and Windows (x64/arm64). Adds build script, bootstrap entry point, runtime asset management, and automatic deployment of bundled tools (ripgrep, difftastic). Includes MCP stdio bridge support and proper environment handling for compiled binaries. Updates documentation with build and installation instructions for single executable distribution.
This commit is contained in:
@@ -5,7 +5,9 @@ import packageJson from '../package.json';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const bunRuntime = (globalThis as typeof globalThis & { Bun?: { isCompiled?: boolean } }).Bun;
|
||||
const isCompiled = Boolean(bunRuntime?.isCompiled);
|
||||
const argv1 = process.argv[1] ?? '';
|
||||
const bunFsMarker = argv1.includes('$bunfs');
|
||||
const isCompiled = Boolean(bunRuntime?.isCompiled) || bunFsMarker;
|
||||
|
||||
export function projectPath(): string {
|
||||
return resolve(__dirname, '..');
|
||||
|
||||
Reference in New Issue
Block a user