(commands: Command[], initOptions: InitConfig)
| 23 | export type { CliSession } from './run'; |
| 24 | |
| 25 | export async function run(commands: Command[], initOptions: InitConfig) { |
| 26 | if (shouldStartRepl(Bun.argv)) { |
| 27 | await startRepl(commands, initOptions); |
| 28 | } else { |
| 29 | await runSingleInvocation(commands, Bun.argv, initOptions); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | function shouldStartRepl(argv: string[]): boolean { |
| 34 | return argv[2] == null || argv[2] === ''; |
no test coverage detected