teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.82k stars 924 forks source link

fix(bit-cli-server), support all args types and subcommands #9079

Closed davidfirst closed 1 month ago

davidfirst commented 1 month ago

Related to the new bit-cli-server feature. Turns out that cli args that accept array were parsed as non-array. Also, sub-commands weren't working.

This PR changes the way how it communicates with bit-server. Instead of parsing the args from the cli and sending the parsed data into api/cli/:cmd route, it sends them as is to a new api/cli-raw route. The new route, instead of calling the report or json command method directly, it goes to Yargs, let it finds the command and then returns the CommandRunner instance which the return result can be retrieved from.