({ standard = [], verbose = [], error = [], summary = [], detail = [] })
| 1 | const { log, output } = require('proc-log') |
| 2 | |
| 3 | const outputError = ({ standard = [], verbose = [], error = [], summary = [], detail = [] }) => { |
| 4 | for (const line of standard) { |
| 5 | // Each output line is just a single string |
| 6 | output.standard(line) |
| 7 | } |
| 8 | for (const line of verbose) { |
| 9 | log.verbose(...line) |
| 10 | } |
| 11 | for (const line of [...error, ...summary, ...detail]) { |
| 12 | log.error(...line) |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | const jsonError = (error, npm) => { |
| 17 | if (error && npm?.loaded && npm?.config.get('json')) { |
no test coverage detected
searching dependent graphs…