webiny-js
webiny-js copied to clipboard
Expose CLI commands to JS api
Is your feature request related to a problem? Please describe.
Sometimes there is a need to use CLI command in a JS script, for example, in a custom CI pipeline.
Currently, we have to do it with running the CLI as a child process (ie. using execa
). We even do it in our own code to retrieve stack output (check this https://github.com/webiny/webiny-js/blob/next/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js#L14).
Describe the solution you'd like.
We should have all of our CLI commands inside our packages to be used programmatically. CLI should be merely a wrapper to access these commands from a terminal.
Describe alternatives you've considered.
No response
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.