@cloudflare/cli-helpers
Advanced tools
Comparing version 2.1.15 to 2.1.16
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.16](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/cli-helpers@2.1.15...@cloudflare/cli-helpers@2.1.16) (2023-08-17) | ||
**Note:** Version bump only for package @cloudflare/cli-helpers | ||
## [2.1.15](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/cli-helpers@2.1.12...@cloudflare/cli-helpers@2.1.15) (2021-10-28) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@cloudflare/cli-helpers", | ||
"description": "Helpers for cli's written in node", | ||
"version": "2.1.15", | ||
"version": "2.1.16", | ||
"main": "src/index.js", | ||
@@ -23,3 +23,3 @@ "author": "James Culveyhouse <jculveyhouse@cloudflare.com>", | ||
}, | ||
"gitHead": "a1a7ca299c6676e5222e50aee57bc5beedb44882" | ||
"gitHead": "b4920fe24d7d502d6bfb6f1c43de759f34b03d8b" | ||
} |
@@ -9,16 +9,13 @@ const chalk = require('chalk'); | ||
// Use to create a custom logger | ||
const createLogger = ({ | ||
actionName, | ||
labelColorer = identity, | ||
msgColorer = identity, | ||
action | ||
}) => (msg, { cliName } = {}) => { | ||
let logMessage = msg; | ||
if (typeof msg === 'object') { | ||
logMessage = msg.message || JSON.stringify(msg, null, 2); | ||
} | ||
const label = buildLabel(actionName, cliName); | ||
console.log(`${labelColorer(label)} ${msgColorer(logMessage)}`); | ||
action && action(); | ||
}; | ||
const createLogger = | ||
({ actionName, labelColorer = identity, msgColorer = identity, action }) => | ||
(msg, { cliName } = {}) => { | ||
let logMessage = msg; | ||
if (typeof msg === 'object') { | ||
logMessage = msg.message || JSON.stringify(msg, null, 2); | ||
} | ||
const label = buildLabel(actionName, cliName); | ||
console.log(`${labelColorer(label)} ${msgColorer(logMessage)}`); | ||
action && action(); | ||
}; | ||
@@ -25,0 +22,0 @@ // Use to display successful scenarios |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
12068
236
1