From be2257153c0bfcd806c983b75f7b84a2bf76e189 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Fri, 26 Feb 2021 17:50:47 +0100 Subject: [PATCH] feat(proxy-cli): clearer call headers --- @xen-orchestra/proxy-cli/package.json | 1 + @xen-orchestra/proxy-cli/src/index.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/@xen-orchestra/proxy-cli/package.json b/@xen-orchestra/proxy-cli/package.json index 4a356d303..c386c1a77 100644 --- a/@xen-orchestra/proxy-cli/package.json +++ b/@xen-orchestra/proxy-cli/package.json @@ -31,6 +31,7 @@ "dependencies": { "@iarna/toml": "^2.2.0", "@vates/read-chunk": "^0.1.1", + "ansi-colors": "^4.1.1", "app-conf": "^0.9.0", "content-type": "^1.0.4", "cson-parser": "^4.0.7", diff --git a/@xen-orchestra/proxy-cli/src/index.js b/@xen-orchestra/proxy-cli/src/index.js index f9582a20a..a212db7f4 100755 --- a/@xen-orchestra/proxy-cli/src/index.js +++ b/@xen-orchestra/proxy-cli/src/index.js @@ -1,6 +1,7 @@ #!/usr/bin/env node import assert from 'assert' +import colors from 'ansi-colors' import contentType from 'content-type' import CSON from 'cson-parser' import fromCallback from 'promise-toolbox/fromCallback' @@ -84,7 +85,7 @@ ${pkg.name} v${pkg.version}` } const call = async ({ method, params }) => { if (callPath.length !== 0) { - process.stderr.write(`\ncall #${callPath.join('.')}\n`) + process.stderr.write(`\n${colors.bold(`--- call #${callPath.join('.')}`)} ---\n\n`) } const response = await hrp.post(baseRequest, {