Comparing version 0.5.6 to 0.5.7
@@ -103,2 +103,10 @@ "use strict"; | ||
.then(function () { | ||
// If --no-color specified, Patch console.log to never output color bytes | ||
return _this.commandArgs.noColor.val(true).then(function (noColor) { | ||
if (noColor) { | ||
console.log = logNoColors; | ||
} | ||
}); | ||
}) | ||
.then(function () { | ||
// Set the cached service url | ||
@@ -228,2 +236,3 @@ return _this.commandArgs.serviceUrl.val(true).then(function (serviceUrl) { | ||
this.registerCommandArgument("traceLevel", "Trace Level", "Tracing threshold can be specified as \"none\", \"info\" (default), and \"debug\".", args.StringArgument, null); | ||
this.registerCommandArgument("noColor", "No colored output", "Do not emit bytes that affect text color in any output.", args.BooleanArgument, "false"); | ||
}; | ||
@@ -631,3 +640,3 @@ /** | ||
try { | ||
console.log(colors_1.reset(JSON.stringify(data, null, 4))); | ||
console.log(colors_1.stripColors(JSON.stringify(data, null, 4))); | ||
} | ||
@@ -641,2 +650,10 @@ catch (e) { | ||
exports.TfCommand = TfCommand; | ||
var originalConsoleLog = console.log.bind(console); | ||
function logNoColors() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
originalConsoleLog.apply(console, args.map(colors_1.stripColors)); | ||
} | ||
//# sourceMappingURL=tfcommand.js.map |
{ | ||
"name": "tfx-cli", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"description": "CLI for Visual Studio Team Services and Team Foundation Server", | ||
@@ -5,0 +5,0 @@ "repository": { |
{ | ||
"name": "tfx-cli", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"description": "CLI for Visual Studio Team Services and Team Foundation Server", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
601221
7961