bloq / cloud-cli

☁️💻
MIT License
0 stars 0 forks source link

Spreads fetcher refactor on all requests #201

Closed raiseerco closed 2 years ago

raiseerco commented 2 years ago

This PR abstracts the node-fetch implementation into a little helper on utils.js, saving hundreds of lines of code. It manages the spinner, request headers and some standard error responses in a single function, returning a promise (and so removing the await) consumed by almost every command.

Additional commit adds cluster/nodes sanitization on id input with Inquirer.js validator function.

Process checklist

Related issue(s)

Closes #197 Closes #199 Requires https://github.com/bloqpriv/cloud-accounts/pull/214

Metrics

Actual effort: 4d