refactor(certs-v5): Move command `certs:auto` (index) to CLI
Description
Moves the certs:auto (index) command to CLI, converting to OClif Core and TS.
This PR introduces a big refactor to most certs commands. I needed to correct the Heroku Schema interfaces for SniEndpoint and Domain for heroku certs:auto to have any sense at all. In doing so, it created compatibility issues with code already migrated, that required alignment with the new data type interfaces.
Moreover, all certs commands accepting the --endpoint flag were broken since 3 years ago, when Heroku moved away from SSL Endpoints to SNI Endpoints. I needed to make adjustments to bring the flag back to life and have any meaning at all. Fixes to the schema also brought to life displaying the renewal date for ACM certificates.
Test instructions
Here's the first command where I don't expect it to match the current one (because it was broken).
You can test by pulling this branch, installing dependencies with yarn and building with yarn build. Then trying:
./bin/run certs:auto --help # always test that help looks ok.
./bin/run certs:auto -a test_app. # show ACM status on app
./bin/run certs:auto -a test_app --wait # show ACM status on app and wait for certificates to be issued
You can add domains with heroku domains:add domain_name -a test_app, but issuing certificates for the domain will fail unless it has a real DNS configuration.
It makes sense to re-test previous commands:
./bin/run certs --help
./bin/run certs -a test_app
./bin/run certs:info -a test_app --endpoint ssl_cert_hostname # info for SNI Endpoint
./bin/run certs:info -a test_app --name sni_endpoint_name # info for named SNI Endpoint
SOC2 Compliance GUS Work Item