cli
cli copied to clipboard
Nx executor shouldn't assume autorun
The code-pushup target needs to accept different commands so that the GitHub Action can use it - see https://github.com/code-pushup/github-action/issues/35#issuecomment-2248507862
- [ ] remove
autorunfrom executor command - https://github.com/code-pushup/cli/blob/main/packages/nx-plugin/src/executors/autorun/executor.ts#L26- default behaviour is the same because
autorunis implicit, but we can append other commands likecomparewithout interference
- default behaviour is the same because
- [ ] rename
@code-pushup/nx-plugin:autorunto@code-pushup/nx-plugin:cli
The problem I see here is we would either loose options parsing or have to implement very complicated schema fitting all commands.
I can try to come up with a PoC, maybe put basic core config and keep the options open for additional unspecified fields and document limitations etc.
If it helps, these are commands the GitHub Action relies on or will rely on:
autorun(implicit, but could be explicit)compareprint-config- will also need to use the new "
merge-diffs" command
And these are the arguments used:
--persist.outputDir,--persist.filenameand--persist.format--config--beforeand--after(onlycomparecommand)- whatever arguments the new "
merge-diffs" command will define (e.g. something like--reports .code-pushup/**/report-diff.json)