(values, { chalk, json, predicate = defaultPredicate })
| 8 | } |
| 9 | |
| 10 | function logObject (values, { chalk, json, predicate = defaultPredicate }) { |
| 11 | if (json) { |
| 12 | output.standard(JSON.stringify(values, null, 2), { [META]: true, redact: false }) |
| 13 | return |
| 14 | } |
| 15 | |
| 16 | const lines = [] |
| 17 | for (const [key, value] of Object.entries(values)) { |
| 18 | const formatted = predicate(key, value, chalk) |
| 19 | if (formatted !== null) { |
| 20 | lines.push(`${chalk.cyan(key)}: ${formatted}`) |
| 21 | } |
| 22 | } |
| 23 | if (lines.length) { |
| 24 | output.standard(lines.join('\n'), { [META]: true, redact: false }) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | function logStageItem (item, { chalk }) { |
| 29 | const { id, packageName, version, tag, createdAt, actor, actorType, shasum, ...rest } = item |
no test coverage detected
searching dependent graphs…