MCPcopy Index your code
hub / github.com/nodejs/node / denyWarning

Function denyWarning

deps/npm/lib/utils/allow-scripts-writer.js:113–122  ·  view source on GitHub ↗
(key, subject, name)

Source from the content-addressed store, hash-verified

111// the user can either widen it via `npm deny-scripts <name>` or remove
112// it to approve the currently-installed version only.
113const denyWarning = (key, subject, name) => {
114 if (isNameOnlyKey(key)) {
115 return `${key} is denied; remove the entry from allowScripts to approve ${subject}.`
116 }
117 /* istanbul ignore next: name fallback is defensive; callers pass nameKeyFor(sample) */
118 const widenTarget = name || 'this package'
119 return `${key} is a versioned deny; run \`npm deny-scripts ${widenTarget}\` ` +
120 `to widen the deny to all versions of ${widenTarget}, or remove the entry ` +
121 `to approve ${subject}.`
122}
123
124const isNameOnlyKey = (key) => {
125 try {

Callers 1

applyApprovalForPackageFunction · 0.85

Calls 1

isNameOnlyKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…