@travetto/terminal
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "@travetto/terminal", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "General terminal support", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
<!-- This file was generated by @travetto/doc and should not be modified directly --> | ||
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/terminal/DOC.ts and execute "npx trv doc" to rebuild --> | ||
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/terminal/DOC.tsx and execute "npx trv doc" to rebuild --> | ||
# Terminal | ||
## General terminal support | ||
@@ -15,5 +16,3 @@ | ||
This module provides basic support for interacting with the terminal, and provides the basis for output colorization and the basic command line interactions. The functionality can be broken down into: | ||
This module provides basic support for interacting with the terminal, and provides the basis for output colorization and the basic command line interactions. The functionality can be broken down into: | ||
* Output Colorization | ||
@@ -23,5 +22,3 @@ * Terminal Interactions | ||
## Output Colorization | ||
Oddly enough, colorizing output in a terminal is a fairly complex process. The standards are somewhat inconsistent and detection can be a tricky process. For terminals, [Node](https://nodejs.org) supports 4 different levels of coloring: | ||
* 0 - One color, essentially uncolored output | ||
@@ -31,3 +28,2 @@ * 1 - Basic color support, 16 colors | ||
* 3 - True color, 24bit color with R, G, B each getting 8-bits. Can represent any color needed | ||
This module provides the ability to define color palettes using RGB or [named colors](https://github.com/travetto/travetto/tree/main/module/terminal/src/named-colors.ts#L1) modeled after the standard HTML color names. The module also provides the ability to specify palettes based on a dark or light background for a given terminal. Support for this is widespread, but when it fails, it will gracefully assume a dark background. | ||
@@ -67,3 +63,3 @@ | ||
This would then produce colorized output based on the palette, and the terminal capabilities. | ||
This would then produce colorized output based on the palette, and the terminal capabilities. | ||
@@ -85,10 +81,7 @@ This module follows the pattern [Node](https://nodejs.org) follows with respect to the environment variables: `NO_COLOR`, `FORCE_COLOR` and `NODE_DISABLE_COLORS` | ||
Within the [Travetto](https://travetto.dev) framework, there are plenty of command line interactions that are enhanced with additional interactivity. This mainly revolves around indicating progress while a program is executing. The module provides support for: | ||
* Progress Bars | ||
* Waiting Indicators | ||
* Streaming Content | ||
This is generally meant for use within the framework, and so is highly tailored to the specific needs and scenarios. You can see this pattern play out in the [Compiler](https://github.com/travetto/travetto/tree/main/module/compiler#readme "The compiler infrastructure for the Travetto framework") progress output, or in [Pack](https://github.com/travetto/travetto/tree/main/module/pack#readme "Code packing utilities")'s output. | ||
This is generally meant for use within the framework, and so is highly tailored to the specific needs and scenarios. You can see this pattern play out in the [Compiler](https://github.com/travetto/travetto/tree/main/module/compiler#readme "The compiler infrastructure for the Travetto framework") progress output, or in [Pack](https://github.com/travetto/travetto/tree/main/module/pack#readme "Code packing utilities")'s output. | ||
In these scenarios, the dynamic behaviors are dependent on having an interactive TTY. When running without access to a proper stdin, the output will default to basic line printing. This dynamic behavior can also be disabled using the environment variable `TRV_QUIET`. When set to `1` will provide a minimal text-based experience. |
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
45979
83