(message: string)
| 218 | }) |
| 219 | |
| 220 | function shouldLogDebugMessage(message: string): boolean { |
| 221 | if (process.env.NODE_ENV === 'test' && !isDebugToStdErr()) { |
| 222 | return false |
| 223 | } |
| 224 | |
| 225 | // Non-ants only write debug logs when debug mode is active (via --debug at |
| 226 | // startup or /debug mid-session). Ants always log for /share, bug reports. |
| 227 | if ((process.env.NCODE_BUILD_MODE !== 'noumena' && process.env.USER_TYPE !== 'ant') && !isDebugMode()) { |
| 228 | return false |
| 229 | } |
| 230 | |
| 231 | if ( |
| 232 | typeof process === 'undefined' || |
| 233 | typeof process.versions === 'undefined' || |
| 234 | typeof process.versions.node === 'undefined' |
| 235 | ) { |
| 236 | return false |
| 237 | } |
| 238 | |
| 239 | const filter = getDebugFilter() |
| 240 | return shouldShowDebugMessage(message, filter) |
| 241 | } |
| 242 | |
| 243 | let hasFormattedOutput = false |
| 244 | export function setHasFormattedOutput(value: boolean): void { |
no test coverage detected