@ms-cloudpack/task-reporter
Advanced tools
Comparing version 0.13.1 to 0.14.0
@@ -7,2 +7,3 @@ /// <reference types="node" /> | ||
message?: string; | ||
errors?: string[]; | ||
details?: string; | ||
@@ -17,2 +18,3 @@ extended?: string; | ||
status: TaskReporterTaskStatus; | ||
errors?: string[]; | ||
timeStarted?: number; | ||
@@ -19,0 +21,0 @@ timeEnded?: number; |
@@ -164,3 +164,4 @@ import { Writer } from './Writer.js'; | ||
status: 'fail', | ||
message: err.message || String(err), | ||
message: 'The task threw an unexpected exception.', | ||
errors: [err.message || String(err)], | ||
extended: err instanceof Error && err.stack | ||
@@ -252,4 +253,4 @@ ? err.stack.includes(err.message) | ||
this._writer.write(`${darkGrey(`[${getTimestamp()}]`)} ${char} ${messageType} ${task.name} ${resultDetails} ${darkGrey(resultDuration)}`); | ||
if (task.details && (this._options.showTaskDetails || task.status === 'fail')) { | ||
this._writer.write(`${task.status === 'fail' ? lightRed(task.details) : task.details}`); | ||
if (task.details && this._options.showTaskDetails) { | ||
this._writer.write(task.details); | ||
} | ||
@@ -259,2 +260,5 @@ if (task.extended && this._options.showTaskExtended) { | ||
} | ||
if (task.errors && this._options.showErrors) { | ||
this._writer.write(bulletedList(task.errors, 1, lightRed(statusCharacter.error))); | ||
} | ||
} | ||
@@ -261,0 +265,0 @@ } |
@@ -7,2 +7,3 @@ /// <reference types="node" resolution-mode="require"/> | ||
message?: string; | ||
errors?: string[]; | ||
details?: string; | ||
@@ -17,2 +18,3 @@ extended?: string; | ||
status: TaskReporterTaskStatus; | ||
errors?: string[]; | ||
timeStarted?: number; | ||
@@ -19,0 +21,0 @@ timeEnded?: number; |
@@ -15,3 +15,3 @@ import { EventEmitter } from 'events'; | ||
complete(result = {}) { | ||
const { status = 'complete', message, details, extended, forceShow } = result; | ||
const { status = 'complete', message, errors, details, extended, forceShow } = result; | ||
this.timeEnded = performance.now(); | ||
@@ -23,2 +23,3 @@ if (this.timeStarted) { | ||
this.message = message; | ||
this.errors = errors; | ||
this.details = details; | ||
@@ -25,0 +26,0 @@ this.extended = extended; |
{ | ||
"name": "@ms-cloudpack/task-reporter", | ||
"version": "0.13.1", | ||
"version": "0.14.0", | ||
"description": "Helpers for logging tasks to the console.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
280498
2612