@vexify-org/yaggs 6.3.0 → 6.4.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 +15 -0
- package/package.json +1 -1
package/index.js
CHANGED
package/lib/parser.js
CHANGED
|
@@ -771,6 +771,21 @@ complete -c ${this.scriptName} `;
|
|
|
771
771
|
return answers;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
progress(percentage, message = '') {
|
|
775
|
+
const barLength = 40;
|
|
776
|
+
const filled = Math.round(barLength * percentage / 100);
|
|
777
|
+
const empty = barLength - filled;
|
|
778
|
+
|
|
779
|
+
const bar = '\u001b[32m' + '█'.repeat(filled) + '\u001b[0m' + '░'.repeat(empty);
|
|
780
|
+
const percent = percentage.toFixed(1);
|
|
781
|
+
|
|
782
|
+
process.stdout.write(`\r${bar} ${percent}% ${message}`);
|
|
783
|
+
|
|
784
|
+
if (percentage >= 100) {
|
|
785
|
+
process.stdout.write('\n');
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
774
789
|
getHelp() {
|
|
775
790
|
let help = `\u001b[36m${this.scriptName}\u001b[0m`;
|
|
776
791
|
|