@travetto/terminal
Advanced tools
Comparing version 5.0.11 to 5.0.12
{ | ||
"name": "@travetto/terminal", | ||
"version": "5.0.11", | ||
"version": "5.0.12", | ||
"description": "General terminal support", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -79,4 +79,4 @@ import tty from 'node:tty'; | ||
if (q.length && restorePosition) { | ||
q.unshift(Codes.POSITION_SAVE); | ||
q.push(Codes.POSITION_RESTORE); | ||
this.storePosition(true); | ||
this.restorePosition(); | ||
} | ||
@@ -90,4 +90,4 @@ if (q.length && !this.#term.output.write(q.join(''))) { | ||
write(...text: (string | number)[]): this { | ||
this.#buffer.push(...text); | ||
write(text: (string | number), beforeAll = false): this { | ||
beforeAll ? this.#buffer.unshift(text) : this.#buffer.push(text); | ||
return this; | ||
@@ -97,4 +97,4 @@ } | ||
/** Stores current cursor position, if called multiple times before restore, last one ones */ | ||
storePosition(): this { | ||
return this.write(Codes.POSITION_SAVE); | ||
storePosition(beforeAll = false): this { | ||
return this.write(Codes.POSITION_SAVE, beforeAll); | ||
} | ||
@@ -101,0 +101,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21906