First pass at pulling the v1.5 CLI, TUI, and Launcher clients into v2.
This commit is contained in:
parent
d5f12b2a82
commit
467b01edd6
1 changed files with 24043 additions and 203 deletions
19
clients/cli/src/index.ts
Normal file
19
clients/cli/src/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { resolve } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { runCli, validLogLevels } from "./cli.js";
|
||||
import { handleError } from "./error-handler.js";
|
||||
|
||||
export { runCli, validLogLevels };
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const isMain =
|
||||
process.argv[1] !== undefined &&
|
||||
resolve(process.argv[1]) === resolve(__filename);
|
||||
|
||||
if (isMain) {
|
||||
runCli(process.argv)
|
||||
.then(() => process.exit(0))
|
||||
.catch(handleError);
|
||||
}
|
||||
Loading…
Reference in a new issue