Socket
Socket
Sign inDemoInstall

listr-update-renderer

Package Overview
Dependencies
24
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.2.0

32

index.js

@@ -16,26 +16,28 @@ 'use strict';

for (const task of tasks) {
const skipped = task.isSkipped() ? ` ${chalk.dim('[skipped]')}` : '';
if (task.isEnabled()) {
const skipped = task.isSkipped() ? ` ${chalk.dim('[skipped]')}` : '';
output.push(indentString(` ${utils.getSymbol(task, options)} ${task.title}${skipped}`, level, ' '));
output.push(indentString(` ${utils.getSymbol(task, options)} ${task.title}${skipped}`, level, ' '));
if ((task.isPending() || task.isSkipped()) && utils.isDefined(task.output)) {
let data = task.output;
if ((task.isPending() || task.isSkipped() || task.hasFailed()) && utils.isDefined(task.output)) {
let data = task.output;
if (typeof data === 'string') {
data = stripAnsi(data.trim().split('\n').filter(Boolean).pop());
if (typeof data === 'string') {
data = stripAnsi(data.trim().split('\n').filter(Boolean).pop());
if (data === '') {
data = undefined;
if (data === '') {
data = undefined;
}
}
if (utils.isDefined(data)) {
const out = indentString(`${figures.arrowRight} ${data}`, level, ' ');
output.push(` ${chalk.gray(cliTruncate(out, process.stdout.columns - 3))}`);
}
}
if (utils.isDefined(data)) {
const out = indentString(`${figures.arrowRight} ${data}`, level, ' ');
output.push(` ${chalk.gray(cliTruncate(out, process.stdout.columns - 3))}`);
if ((task.isPending() || task.hasFailed() || options.collapse === false) && (task.hasFailed() || options.showSubtasks !== false) && task.subtasks.length > 0) {
output = output.concat(renderHelper(task.subtasks, options, level + 1));
}
}
if ((task.isPending() || task.hasFailed() || options.collapse === false) && (task.hasFailed() || options.showSubtasks !== false) && task.subtasks.length > 0) {
output = output.concat(renderHelper(task.subtasks, options, level + 1));
}
}

@@ -42,0 +44,0 @@

{
"name": "listr-update-renderer",
"version": "0.1.4",
"version": "0.2.0",
"description": "Listr update renderer",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc