@vexify-org/yaggs 6.6.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -0
- package/lib/parser.js +18 -0
- package/package.json +1 -1
package/index.js
CHANGED
package/lib/parser.js
CHANGED
|
@@ -863,6 +863,24 @@ complete -c ${this.scriptName} `;
|
|
|
863
863
|
this.log(message, 'success');
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
+
countdown(seconds, message = 'Countdown') {
|
|
867
|
+
let remaining = seconds;
|
|
868
|
+
|
|
869
|
+
return new Promise((resolve) => {
|
|
870
|
+
const timer = setInterval(() => {
|
|
871
|
+
process.stdout.write(`\r\u001b[33m${message}: ${remaining} seconds remaining...\u001b[0m`);
|
|
872
|
+
|
|
873
|
+
remaining--;
|
|
874
|
+
|
|
875
|
+
if (remaining <= 0) {
|
|
876
|
+
clearInterval(timer);
|
|
877
|
+
process.stdout.write('\n');
|
|
878
|
+
resolve();
|
|
879
|
+
}
|
|
880
|
+
}, 1000);
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
|
|
866
884
|
getHelp() {
|
|
867
885
|
let help = `\u001b[36m${this.scriptName}\u001b[0m`;
|
|
868
886
|
|