(line: string)
| 39 | } |
| 40 | |
| 41 | function parseInteractiveArgv(line: string) { |
| 42 | const args = parse(line); |
| 43 | if (!checkStringArray(args)) throw new Error('Shell operators are not supported in interactive mode.'); |
| 44 | if (args[0] === 'hydrooj') args.shift(); |
| 45 | if (args[0] === 'cli') args.shift(); |
| 46 | return cac().parse(['node', 'hydrooj', 'cli', ...args], { run: false }); |
| 47 | } |
| 48 | |
| 49 | async function cli(commandArgv = argv) { |
| 50 | const [, modelName, func, ...args] = commandArgv.args as [string, string, string, ...any[]]; |
no test coverage detected