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

@keg-hub/cli-utils

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keg-hub/cli-utils - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

logger.js

4

package.json
{
"name": "@keg-hub/cli-utils",
"version": "0.8.0",
"version": "0.9.0",
"description": "Utility methods for writing Custom Tasks consumed by the Keg-CLI",

@@ -17,2 +17,4 @@ "main": "index.js",

"index.js",
"runTask.js",
"logger.js",
"registerTs.js",

@@ -19,0 +21,0 @@ "src/"

@@ -34,4 +34,5 @@ const colorMap = {

brightRed: (log) => addColor(colorMap.bright, colorMap.red, log),
brightBlue: (log) => addColor(colorMap.bright, colorMap.blue, log),
brightGray: (log) => addColor(colorMap.bright, colorMap.gray, log),
brightCyan: (log) => addColor(colorMap.bright, colorMap.cyan, log),
brightBlue: (log) => addColor(colorMap.bright, colorMap.blue, log),
brightWhite: (log) => addColor(colorMap.bright, colorMap.white, log),

@@ -49,5 +50,11 @@ brightGreen: (log) => addColor(colorMap.bright, colorMap.green, log),

colors.dim = Object.keys(colors).reduce((acc, key) => {
acc[key] = (log) => addColor(colorMap.dim, colors[key](log))
return acc
}, {})
module.exports = {
colors,
}

@@ -1,2 +0,2 @@

const { get, isColl, isObj, isFunc } = require('@keg-hub/jsutils')
const { get, isColl } = require('@keg-hub/jsutils')
const { colors } = require('./colors')

@@ -34,3 +34,3 @@

? colors[logColor](JSON.stringify(data, null, 2))
: isFunc(data.toString)
: typeof data.toString === `function`
? colors[logColor](data.toString())

@@ -167,4 +167,6 @@ : colors[logColor](data)

*/
setColors = colorMap =>
isObj(colorMap) && (this.colorMap = { ...this.colorMap, ...colorMap })
setColors = colorMap => {
typeof colorMap === `object`
&& (this.colorMap = { ...this.colorMap, ...colorMap })
}

@@ -171,0 +173,0 @@ /**

@@ -72,7 +72,2 @@ #!/usr/bin/env node

// Check if the parent module ( task module ) has a parent
// If it does, then it was called by the Keg-CLI
// So we should return the task definition instead of running the task action
module.parent
? (module.exports = { runTask })
: runTask()
module.exports = { runTask }
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