Ora Progress Bar
A cli progress bar based on ora library.
Usage
Create a ProgressBar(title,numberOfSteps,options?)
const ProgressBar = ; const progressBar = "Current Progress" 100;
The options parameter is optional if you want to customize the ora spinner you can pass them see.
Increase the progress using progressBar.progress(progress=1)
progressBar; progressBar;
Fail or Succeed
By default when the progressBar reaches its goal, it stops and succeeds. But you can force them to fail or succeed manually.
try // do stuff progressBar; catch e progressBar;
if flag progressBar; else progressBar;
Update goal and current progress on the run
if newWorkReceived progressBar;
if batchFailed progressBar;
Note
Only one progress bar can be active at a time.