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

@njakob/cli-utils

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@njakob/cli-utils - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

51

lib/ConsoleReporter.js

@@ -9,8 +9,8 @@ 'use strict';

var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']),
_templateObject2 = _taggedTemplateLiteral(['', '\n'], ['', '\\n']),
_templateObject3 = _taggedTemplateLiteral(['', ' \xD7\n'], ['', ' \xD7\\n']),
var _templateObject = _taggedTemplateLiteral(['', '\n'], ['', '\\n']),
_templateObject2 = _taggedTemplateLiteral(['', ' ', '\n'], ['', ' ', '\\n']),
_templateObject3 = _taggedTemplateLiteral(['\u2713'], ['\u2713']),
_templateObject4 = _taggedTemplateLiteral(['', ' !\n'], ['', ' !\\n']),
_templateObject5 = _taggedTemplateLiteral(['', ' ', '\n'], ['', ' ', '\\n']),
_templateObject6 = _taggedTemplateLiteral(['\u2713'], ['\u2713']);
_templateObject5 = _taggedTemplateLiteral(['', ' \xD7\n'], ['', ' \xD7\\n']),
_templateObject6 = _taggedTemplateLiteral(['', ''], ['', '']);

@@ -70,12 +70,2 @@ var _rainbow = require('@njakob/rainbow');

}, {
key: 'header',
value: function header(message) {
this.log(message, 1);
}
}, {
key: 'footer',
value: function footer(message) {
this.log(this.styles.dim(_templateObject, message), 1);
}
}, {
key: 'log',

@@ -86,3 +76,3 @@ value: function log(message) {

if (this.verbose >= verbose) {
this.stdout.write(this.format(this.styles.parse(_templateObject2, message)));
this.stdout.write(this.format(this.parse(_templateObject, message)));
}

@@ -93,3 +83,7 @@ }

value: function error(message) {
this.stderr.write(this.format(this.styles.bold.red(_templateObject3, message)));
var verbose = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (this.verbose >= verbose) {
this.stderr.write(this.format(this.parse(_templateObject, message)));
}
}

@@ -99,5 +93,10 @@ }, {

value: function info(message) {
this.stdout.write(this.format(this.styles.parse(_templateObject2, message)));
this.stdout.write(this.format(this.styles.dim(_templateObject, message)));
}
}, {
key: 'success',
value: function success(message) {
this.stdout.write(this.format(this.parse(_templateObject2, message, this.styles.bold.green(_templateObject3))));
}
}, {
key: 'warning',

@@ -108,7 +107,17 @@ value: function warning(message) {

}, {
key: 'success',
value: function success(message) {
this.stdout.write(this.format(this.styles.parse(_templateObject5, message, this.styles.bold.green(_templateObject6))));
key: 'failure',
value: function failure(message) {
this.stderr.write(this.format(this.styles.bold.red(_templateObject5, message)));
}
}, {
key: 'header',
value: function header(message) {
this.log(message, 1);
}
}, {
key: 'footer',
value: function footer(message) {
this.log(this.styles.dim(_templateObject6, message), 1);
}
}, {
key: 'activity',

@@ -115,0 +124,0 @@ value: function activity(message) {

@@ -44,8 +44,8 @@ 'use strict';

}
// eslint-disable-next-line no-unused-vars
}, {
key: 'header',
value: function header(message) {}
key: 'setVerbose',
value: function setVerbose(verbose) {
this.verbose = verbose;
return this;
}

@@ -55,8 +55,2 @@ // eslint-disable-next-line no-unused-vars

}, {
key: 'footer',
value: function footer(message) {}
// eslint-disable-next-line no-unused-vars
}, {
key: 'log',

@@ -71,3 +65,5 @@ value: function log(message) {

key: 'error',
value: function error(message) {}
value: function error(message) {
var verbose = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
}

@@ -83,2 +79,8 @@ // eslint-disable-next-line no-unused-vars

}, {
key: 'success',
value: function success(message) {}
// eslint-disable-next-line no-unused-vars
}, {
key: 'warning',

@@ -90,4 +92,4 @@ value: function warning(message) {}

}, {
key: 'success',
value: function success(message) {}
key: 'failure',
value: function failure(message) {}

@@ -97,2 +99,14 @@ // eslint-disable-next-line no-unused-vars

}, {
key: 'header',
value: function header(message) {}
// eslint-disable-next-line no-unused-vars
}, {
key: 'footer',
value: function footer(message) {}
// eslint-disable-next-line no-unused-vars
}, {
key: 'activity',

@@ -99,0 +113,0 @@ value: function activity(message) {

{
"name": "@njakob/cli-utils",
"version": "1.0.1",
"version": "1.1.0",
"description": "Collection of utils to build CLI Node based applications",

@@ -5,0 +5,0 @@ "author": "Nicolas Jakob <nicow.jakob@gmail.com>",

@@ -34,5 +34,6 @@

reporter.log(reporter.parse`Something to ${reporter.styles.red`log`}`, 2);
reporter.error(reporter.parse`${reporter.styles.red`Error`}: Something went wrong`);
reporter.success(reporter.parse`Something was a success`);
reporter.warning(reporter.parse`Something went not too good`);
reporter.error(reporter.parse`Something went totally wrong`);
reporter.failure(reporter.parse`Something went totally wrong`);
```

@@ -39,0 +40,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