jbcarpanelli / spinnies

Node.js module to create and manage multiple spinners in command-line interface programs
MIT License
147 stars 32 forks source link

Ability to update success/failure prefixes #29

Open Makeshift opened 3 years ago

Makeshift commented 3 years ago

I'm using spinnies to display the status of various stack deployments in makeshift/terragrunt-status, and it's working pretty great.

However, due to the binary nature of success/failure, it's sometimes hard to convey at a glance the status of a command that's been ran. Currently I'm using 'failed' as 'the whole command failed' and success for everything else. For anything in-between I have the text become yellow, but the successPrefix is still a green tick as it's defined when the spinny is created and can't (currently) be updated later.

I'd like to be able to update the successPrefix later in the spinnies lifecycle, so I can emulate statuses that are neither success nor failure by simply having a different prefix + text colour.