scripts/binary-with-tui.ts is a Bun-only entry that registers the bundled TUI and starts the CLI, so the Node build is untouched. The build installs OpenTUI's native package for every target (bun install --os='*' --cpu='*' in packages/tui), pins OPENTUI_LIBC per Linux libc and defines QQQ_BUILD_UI, which qqq --version prints as "with ui". Source maps that bun writes beside each binary now go to dist/sourcemaps/, so the release glob dist/qqq-* no longer uploads them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
18 lines
609 B
TypeScript
18 lines
609 B
TypeScript
/*
|
|
* Copyright 2026 QRun.IO, Inc.
|
|
* Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
*/
|
|
|
|
/**
|
|
* Entry point of a qqq binary that carries the terminal UI (scripts/build-binaries.mjs --with-tui).
|
|
* Only Bun builds it: the CLI stays a Node program, and `qqq ui` hands over to the bundled TUI in the
|
|
* same process instead of spawning `bun run packages/tui/src/main.tsx` from a checkout.
|
|
*/
|
|
|
|
globalThis.__qqqRunTui = async (args: string[]) => {
|
|
process.argv = [process.argv[0]!, 'qqq-ui', ...args]
|
|
await import('../packages/tui/src/main.tsx')
|
|
}
|
|
|
|
await import('../packages/cli/src/main.ts')
|