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

pixl-cli

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixl-cli - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

14

cli.js

@@ -177,6 +177,10 @@ // Tools for writing command-line apps in Node.

applyStyles: function(text, styles) {
// apply one or more chalk styles to text string
// apply one or more chalk styles or functions to text string
if (!styles) return text;
styles.forEach( function(style) {
text = chalk[style]( text );
if (typeof style === 'function') {
text = style( text );
} else {
text = chalk[style]( text );
}
} );

@@ -550,3 +554,3 @@ return text;

end: function() {
end: function(erase) {
// end of progress session

@@ -556,3 +560,5 @@ if (!cli.tty()) return;

this.erase();
if (erase !== false) {
this.erase();
}
clearTimeout( this.timer );

@@ -559,0 +565,0 @@ this.running = false;

{
"name": "pixl-cli",
"version": "1.0.4",
"version": "1.0.5",
"description": "Tools for building command-line apps for Node.js.",

@@ -25,6 +25,6 @@ "author": "Joseph Huckaby <jhuckaby@gmail.com>",

"dependencies": {
"pixl-class": "*",
"pixl-args": "*",
"pixl-tools": "*",
"chalk": "^1.1.1",
"pixl-class": "^1.0.0",
"pixl-args": "^1.0.0",
"pixl-tools": "^1.0.0",
"chalk": "^2.4.1",
"string-width": "^1.0.1",

@@ -31,0 +31,0 @@ "widest-line": "^1.0.0",

@@ -235,3 +235,3 @@ # Overview

| `width` | An optional fixed width. If specified and the string exceeds the width, it will be word-wrapped. |
| `styles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles to apply to the box border graphics, defaults to `["gray"]`. |
| `styles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles or functions to apply to the box border graphics, defaults to `["gray"]`. |
| `hspace` | An optional number of spaces to insert on the left and right sides of the text (defaults to `1`). |

@@ -249,3 +249,3 @@ | `vspace` | An optional number of vertical lines to insert above and below the text (defaults to `0`). |

width: 40,
styles: ["magenta"],
styles: ["magenta", function( text ) { return text.toUpperCase() }],
hspace: 2,

@@ -367,5 +367,5 @@ vspace: 1,

|---------------|-------------|
| `headerStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles to apply to the header cell text. |
| `textStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles to apply to the table cell text. |
| `borderStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles to apply to the border graphics. |
| `headerStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles or functions to apply to the header cell text. |
| `textStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles or functions to apply to the table cell text. |
| `borderStyles` | An array of [chalk](https://www.npmjs.com/package/chalk) styles or functions to apply to the border graphics. |
| `indent` | Number of characters to indent the table by (defaults to `0`). |

@@ -379,3 +379,3 @@

headerStyles: ["bold", "yellow"],
textStyles: ["cyan"],
textStyles: ["cyan", function( text ) { return text.toUpperCase() }],
borderStyles: ["gray"],

@@ -387,3 +387,3 @@ indent: 0

Each of the three style keys should be set to an array of style names supported by the [chalk](https://www.npmjs.com/package/chalk) module. These are arrays because each component may contain multiple styles. For example, the `headerStyles` is rendered with both `yellow` and `bold` by default.
Each of the three style keys should be set to an array of style names supported by the [chalk](https://www.npmjs.com/package/chalk) module or a custom function to support different text transformations. These are arrays because each component may contain multiple styles. For example, the `headerStyles` is rendered with both `yellow` and `bold` by default.

@@ -491,3 +491,3 @@ Note that each text cell must only be one line (multi-line is not supported).

The progress bar uses a set of color styles from the [chalk](https://www.npmjs.com/package/chalk) module for the spinner, braces, bar chunks, percentage display, remaining time, and your custom text (if applicable). To customize these, pass in a `styles` object with the following keys:
The progress bar uses a set of color styles from the [chalk](https://www.npmjs.com/package/chalk) module or a custom function for the spinner, braces, bar chunks, percentage display, remaining time, and your custom text (if applicable). To customize these, pass in a `styles` object with the following keys:

@@ -502,3 +502,3 @@ ```js

remain: ['green'],
text: []
text: [function( text ) { return text.toUpperCase() }]
}

@@ -508,3 +508,3 @@ });

Each key should be set to an array of styles supported by the [chalk](https://www.npmjs.com/package/chalk) module. These are arrays because each component may contain multiple styles. For example, by default the `spinner`, `bar` and `pct` are styled with both a color and `bold`.
Each key should be set to an array of styles supported by the [chalk](https://www.npmjs.com/package/chalk) module or a function. These are arrays because each component may contain multiple styles. For example, by default the `spinner`, `bar` and `pct` are styled with both a color and `bold`.

@@ -530,2 +530,7 @@ ### Automatic Width

### Keep progress bar visible after it ends
To keep the progress bar visible after it reaches 100%, just pass the value `false` to the
`cli.progress.end()` function. This will prevent it from being erased from the screen.
### Unicode or ASCII

@@ -532,0 +537,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