Function
logCommandResult
(command, args, elapsedMs, stdout)
Source from the content-addressed store, hash-verified
| 2167 | } |
| 2168 | |
| 2169 | function logCommandResult(command, args, elapsedMs, stdout) { |
| 2170 | if (!verbose) { |
| 2171 | return; |
| 2172 | } |
| 2173 | const output = typeof stdout === "string" ? stdout.trim() : String(stdout); |
| 2174 | const preview = |
| 2175 | output.length > 0 && output.length <= 1_000 ? `\n${output}` : ""; |
| 2176 | console.log( |
| 2177 | `[ok ${elapsedMs}ms] ${path.basename(command)} ${args[0] ?? ""}${preview}`, |
| 2178 | ); |
| 2179 | } |
| 2180 | |
| 2181 | function logHttp(method, requestPath, body) { |
| 2182 | if (traceHttp) { |
Tested by
no test coverage detected