@trap_stevo/filetide 0.0.49 → 0.0.50
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.
|
@@ -108,7 +108,7 @@ class ConsoleProgressBarManager {
|
|
|
108
108
|
};
|
|
109
109
|
},
|
|
110
110
|
redraw: () => {
|
|
111
|
-
if (!isNaN(newBar.taskIndex) && !isNaN(this.barsPerPage)) {
|
|
111
|
+
if (!isNaN(newBar.taskIndex) && !isNaN(this.barsPerPage) && process.stdout.isTTY) {
|
|
112
112
|
readline.cursorTo(process.stdout, 0, newBar.taskIndex % this.barsPerPage);
|
|
113
113
|
process.stdout.clearLine();
|
|
114
114
|
}
|
|
@@ -260,7 +260,9 @@ class ConsoleProgressBarManager {
|
|
|
260
260
|
clearPage() {
|
|
261
261
|
for (let i = 0; i < this.barsPerPage + 2; i++) {
|
|
262
262
|
readline.cursorTo(process.stdout, 0, i);
|
|
263
|
-
process.stdout.
|
|
263
|
+
if (process.stdout.isTTY) {
|
|
264
|
+
process.stdout.clearLine();
|
|
265
|
+
}
|
|
264
266
|
}
|
|
265
267
|
}
|
|
266
268
|
displayPage(customPagePrefix = "Page", bottomMessage, bottomMessageColor = chalk.gray) {
|
|
@@ -276,7 +278,7 @@ class ConsoleProgressBarManager {
|
|
|
276
278
|
}
|
|
277
279
|
redrawCompletionFeed(customPagePrefix = "Page", bottomMessage, pageFooterMessageColor = chalk.blue, bottomMessageColor = chalk.gray, recentlyCompletedColor = chalk.green) {
|
|
278
280
|
const bottomPosition = this.barsPerPage;
|
|
279
|
-
if (!isNaN(bottomPosition)) {
|
|
281
|
+
if (!isNaN(bottomPosition) && process.stdout.isTTY) {
|
|
280
282
|
readline.cursorTo(process.stdout, 0, bottomPosition);
|
|
281
283
|
process.stdout.clearLine();
|
|
282
284
|
}
|
|
@@ -284,7 +286,7 @@ class ConsoleProgressBarManager {
|
|
|
284
286
|
if (this.completionFeed.length > 0) {
|
|
285
287
|
process.stdout.write(recentlyCompletedColor(` | Recently completed: ${this.completionFeed.join(", ")}`));
|
|
286
288
|
}
|
|
287
|
-
if (!isNaN(bottomPosition)) {
|
|
289
|
+
if (!isNaN(bottomPosition) && process.stdout.isTTY) {
|
|
288
290
|
readline.cursorTo(process.stdout, 0, bottomPosition + 1);
|
|
289
291
|
process.stdout.clearLine();
|
|
290
292
|
}
|
|
@@ -321,7 +323,9 @@ class ConsoleProgressBarManager {
|
|
|
321
323
|
displayCompletionMessage() {
|
|
322
324
|
const lastLine = Math.min(this.taskBars.length, this.barsPerPage);
|
|
323
325
|
readline.cursorTo(process.stdout, 0, lastLine);
|
|
324
|
-
process.stdout.
|
|
326
|
+
if (process.stdout.isTTY) {
|
|
327
|
+
process.stdout.clearLine();
|
|
328
|
+
}
|
|
325
329
|
console.log(this.completionMessageColor(this.completionMessage));
|
|
326
330
|
}
|
|
327
331
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trap_stevo/filetide",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"description": "Revolutionizing real-time file transfer with seamless, instant communication across any device. Deliver files instantly, regardless of platform, and experience unparalleled speed and control in managing transfers. Elevate your file-sharing capabilities with a tool designed for precision, efficiency, and effortless connectivity.",
|
|
5
5
|
"main": "dist/cjs/FileTide.js",
|
|
6
6
|
"scripts": {
|