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

Method runAll

lib/utils/allow-scripts-cmd.js:182–196  ·  view source on GitHub ↗
(unreviewed)

Source from the content-addressed store, hash-verified

180 }
181
182 async runAll (unreviewed) {
183 if (unreviewed.length === 0) {
184 if (this.npm.flatOptions.json) {
185 output.buffer({ allowScripts: [] })
186 return
187 }
188 output.standard('No packages with unreviewed install scripts.')
189 return
190 }
191 // Bundled dependencies never appear in `unreviewed` (checkAllowScripts
192 // skips them because they never run their install scripts and cannot
193 // be allowlisted), so there is nothing extra to filter here.
194 const groups = this.groupByPackage(unreviewed.map(({ node }) => node))
195 await this.writePolicyChanges(groups)
196 }
197
198 async runPositional (args, arb) {
199 const { matched, unmatched } = this.findNodesForArgs(args, arb)

Callers 1

runModeMethod · 0.95

Calls 2

groupByPackageMethod · 0.95
writePolicyChangesMethod · 0.95

Tested by

no test coverage detected