Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/terminal

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/terminal - npm Package Compare versions

Comparing version 3.1.0-rc.0 to 3.1.0-rc.1

2

package.json
{
"name": "@travetto/terminal",
"version": "3.1.0-rc.0",
"version": "3.1.0-rc.1",
"description": "General terminal support",

@@ -5,0 +5,0 @@ "keywords": [

@@ -8,4 +8,14 @@ import { IterableUtil } from './iterable';

/**
* Standard Terminal Operations
*/
export class TerminalOperation {
static truncateIfNeeded(term: TermState, text: string, suffix = '...'): string {
if (text.length > term.width) {
return `${text.substring(0, term.width - suffix.length)}${suffix}`;
}
return text;
}
/**

@@ -108,3 +118,3 @@ * Allows for writing at top, bottom, or current position while new text is added

.replace(/%pct/, `${Math.trunc(pct * 100)}`);
const full = ` ${line}`.padEnd(term.width);
const full = this.truncateIfNeeded(term, ` ${line}`.padEnd(term.width));
const mid = Math.trunc(pct * term.width);

@@ -144,3 +154,3 @@ const [l, r] = [full.substring(0, mid), full.substring(mid)];

pos = await term.getCursorPosition();
writer = this.streamWaiting(term, msg, { ...cfg, at: pos, clearOnFinish: false });
writer = this.streamWaiting(term, this.truncateIfNeeded(term, msg), { ...cfg, at: pos, clearOnFinish: false });
line = msg;

@@ -147,0 +157,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc