@knit/logger
Advanced tools
Comparing version 0.8.1 to 0.8.2
38
index.js
@@ -1,25 +0,31 @@ | ||
/* @flow */ | ||
"use strict"; | ||
const chalk = require("chalk"); | ||
const updateRdrr = require("listr-update-renderer"); | ||
const silentRdrr = require("listr-silent-renderer"); | ||
const verboseRdrr = require("listr-verbose-renderer"); | ||
type TLog = (...e: Array<mixed>) => void; | ||
const info = (...msg) => console.log(chalk.blue("info"), ...msg); | ||
const info: TLog = (...msg) => console.log(chalk.blue("info"), ...msg); | ||
const command: TLog = (...msg) => console.log(chalk.blue("command"), ...msg); | ||
const warning: TLog = (...msg) => console.log(chalk.yellow("warning"), ...msg); | ||
const error: TLog = (...msg) => console.log(chalk.red("error"), ...msg); | ||
const success: TLog = (...msg) => console.log(chalk.green("success"), ...msg); | ||
const missing: TLog = (...msg) => console.log(chalk.red("missing"), ...msg); | ||
const subtree: TLog = (...msg) => console.log(chalk.white("└─"), ...msg); | ||
const command = (...msg) => console.log(chalk.blue("command"), ...msg); | ||
export type TGetRenderer = { | ||
silent: boolean, | ||
verbose: boolean | ||
}; | ||
const warning = (...msg) => console.log(chalk.yellow("warning"), ...msg); | ||
const getRenderer = (opts: TGetRenderer) => { | ||
const { silent, verbose } = opts || {}; | ||
const error = (...msg) => console.log(chalk.red("error"), ...msg); | ||
const success = (...msg) => console.log(chalk.green("success"), ...msg); | ||
const missing = (...msg) => console.log(chalk.red("missing"), ...msg); | ||
const subtree = (...msg) => console.log(chalk.white("└─"), ...msg); | ||
const getRenderer = opts => { | ||
const { | ||
silent, | ||
verbose | ||
} = opts || {}; | ||
if (silent) { | ||
@@ -43,2 +49,2 @@ return silentRdrr; | ||
getRenderer | ||
}; | ||
}; |
{ | ||
"homepage": "https://github.com/knitjs/knit#readme", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Shane Wilson" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/knitjs/knit/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/knitjs/knit.git" | ||
}, | ||
"engines": { | ||
"node": ">=10", | ||
"npm": ">=5" | ||
}, | ||
"private": false, | ||
"name": "@knit/logger", | ||
"description": "cli logger", | ||
"version": "0.8.1" | ||
"description": "cli-logger", | ||
"version": "0.8.2", | ||
"dependencies": { | ||
"chalk": "3.0.0-beta.1", | ||
"listr-silent-renderer": "^1.1.1", | ||
"listr-update-renderer": "^0.5.0", | ||
"listr-verbose-renderer": "^0.5.0" | ||
} | ||
} |
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1634
0
0
1
0
4
33
+ Addedchalk@3.0.0-beta.1
+ Addedlistr-silent-renderer@^1.1.1
+ Addedlistr-update-renderer@^0.5.0
+ Added@samverschueren/stream-to-observable@0.3.1(transitive)
+ Addedansi-escapes@3.2.0(transitive)
+ Addedansi-regex@2.1.13.0.1(transitive)
+ Addedansi-styles@2.2.13.2.14.3.0(transitive)
+ Addedany-observable@0.3.0(transitive)
+ Addedchalk@1.1.32.4.23.0.0-beta.1(transitive)
+ Addedcli-cursor@2.1.0(transitive)
+ Addedcli-truncate@0.2.1(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcolor-convert@1.9.32.0.1(transitive)
+ Addedcolor-name@1.1.31.1.4(transitive)
+ Addeddate-fns@1.30.1(transitive)
+ Addedelegant-spinner@1.0.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfigures@1.7.02.0.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-flag@3.0.04.0.0(transitive)
+ Addedindent-string@3.2.0(transitive)
+ Addedis-fullwidth-code-point@1.0.02.0.0(transitive)
+ Addedis-observable@1.1.0(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedlistr@0.14.3(transitive)
+ Addedlistr-silent-renderer@1.1.1(transitive)
+ Addedlistr-update-renderer@0.5.0(transitive)
+ Addedlistr-verbose-renderer@0.5.0(transitive)
+ Addedlog-symbols@1.0.2(transitive)
+ Addedlog-update@2.3.0(transitive)
+ Addedmimic-fn@1.2.0(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonetime@2.0.1(transitive)
+ Addedp-map@2.1.0(transitive)
+ Addedrestore-cursor@2.0.0(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedslice-ansi@0.0.4(transitive)
+ Addedstring-width@1.0.22.1.1(transitive)
+ Addedstrip-ansi@3.0.14.0.0(transitive)
+ Addedsupports-color@2.0.05.5.07.2.0(transitive)
+ Addedsymbol-observable@1.2.0(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedwrap-ansi@3.0.1(transitive)