MCPcopy Create free account
hub / github.com/npm/cli / trustedDisplay

Function trustedDisplay

workspaces/arborist/lib/script-allowed.js:369–376  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

367// falls back to node.version when the URL doesn't carry one. Do not
368// use for policy matching.
369const trustedDisplay = (node) => {
370 const trusted = getTrustedRegistryIdentity(node)
371 /* istanbul ignore next: defensive fallbacks for nodes without name/version */
372 return {
373 name: (trusted && trusted.name) || node.name || null,
374 version: (trusted && trusted.version) || node.version || null,
375 }
376}
377
378module.exports = isScriptAllowed
379module.exports.isScriptAllowed = isScriptAllowed

Callers 8

runPendingMethod · 0.85
pendingSummaryMethod · 0.85
findNodesForArgsMethod · 0.85
reifyOutputFunction · 0.85
unreviewedScriptsMessageFunction · 0.85
execMethod · 0.85
script-allowed.jsFile · 0.85

Calls 1

Tested by

no test coverage detected