Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
cli-progress-footer
Advanced tools
[![Build status][build-image]][build-url] [![Tests coverage][cov-image]][cov-url] [![npm version][npm-image]][npm-url]
Content agnostic. For reliable output all of process std output needs go through this utility. To ensure that by default process.stdout.write
is overriden and process.stderr
is redirected into process.stdout
(with possibility to opt out from both).
npm install cli-progress-footer
const cliProgressFooter = require("cli-progress-footer")();
// Write progress
cliProgresssFooter.updateProgress("# processing 1\n# processing 2\n# processing 3\n");
...
// Update progress content when necessary
cliProgresssFooter.updateProgress("# processing 2\n# processing 3\n# processing 4\n");
...
// Update progress content when necessary
cliProgresssFooter.updateProgress("# processing 3\n# processing 4\n");
By default both stdout
and stderr
output is automatically handled and ensured to appear above progress content
bool
(default: true
)Whether to override data written to process.stdout
stream so it appears in all cases above progress bar.
Modified writes are passed immediately to native process.stdout.write
so there's no risk of losing some log content or seing it out of sync
You may opt out but then if any content is written to process.stdout
, process output may appear as not reliable.
When opting out you may write regular log content via cliProgressFooter.writeStdout(data)
bool
(default: true
)When progress footer is in play, all output should be treated as one std
stream. If it's not the case then
any stderr
output may break visible log output. Therefore by default all stderr
content is redirected to stdout
.
If you wish to redirect stderr
somewhere else with cli means, then it's best turn this function off (so proces.stderr.write
is not overriden)
bool
(default: true
)Whether to mute stdin input (so it doesn't add to displayed progress output). In scope of that setting also cursor is hidden
bool
(default: true
)Whether to hide a progress bar for a time being of child process runs with inherited stdio
.
Problem is that output of such processes cannot be controlled, and if happens will break the progress bar output.
Internal workaround is to decorate child_process
module functions, and react accordingly whenever problematic child process is created
Additionally each progress line may be automatically prefixed with throbber (frames customizable at cliProgresssFooter.progressAnimationPrefixFrames
), for that apply following setting:
cliProgressFooter.shouldAddProgressAnimationPrefix = true;
npm test
FAQs
[![Build status][build-image]][build-url] [![Tests coverage][cov-image]][cov-url] [![npm version][npm-image]][npm-url]
The npm package cli-progress-footer receives a total of 574,249 weekly downloads. As such, cli-progress-footer popularity was classified as popular.
We found that cli-progress-footer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.