2026-01-15 10:33:07 -05:00
|
|
|
import packageJson from "../../package.json" with { type: "json" }
|
2026-02-08 16:25:12 +09:00
|
|
|
import type { InstallArgs } from "./types"
|
|
|
|
|
import { runCliInstaller } from "./cli-installer"
|
|
|
|
|
import { runTuiInstaller } from "./tui-installer"
|
2025-12-23 22:26:19 +09:00
|
|
|
|
2026-01-11 12:53:41 +08:00
|
|
|
const VERSION = packageJson.version
|
|
|
|
|
|
2025-12-23 22:26:19 +09:00
|
|
|
export async function install(args: InstallArgs): Promise<number> {
|
2026-02-08 16:25:12 +09:00
|
|
|
return args.tui ? runTuiInstaller(args, VERSION) : runCliInstaller(args, VERSION)
|
2025-12-23 22:26:19 +09:00
|
|
|
}
|