@extrahorizon/exh-cli 1.13.6-dev-217-47bf800 → 1.13.6-dev-218-55112c3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/build/helpers/util.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Extra Horizon CLI changelog
|
|
2
2
|
|
|
3
3
|
### v1.13.6
|
|
4
|
+
* Improved the reporting of errors from the API, including additional information when available
|
|
4
5
|
* Fixed a bug in `exh data schemas sync` where permission mode arrays were not being correctly compared
|
|
5
6
|
* Updated the ExH SDK to `8.13.0` to fix a security warning from `form-data` (vulnerable code was not in use)
|
|
6
7
|
|
package/build/helpers/util.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getAjvErrorStrings = exports.ajvValidate = exports.getSwaggerDocumentati
|
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const path = require("path");
|
|
7
|
+
const javascript_sdk_1 = require("@extrahorizon/javascript-sdk");
|
|
7
8
|
const ajv_1 = require("ajv");
|
|
8
9
|
const chalk = require("chalk");
|
|
9
10
|
const error_1 = require("./error");
|
|
@@ -14,11 +15,19 @@ function epilogue(y) {
|
|
|
14
15
|
process.exit(1);
|
|
15
16
|
}
|
|
16
17
|
if (err) {
|
|
17
|
-
console.log(chalk.red(err.message));
|
|
18
|
+
console.log(chalk.red(`${err.name}: ${err.message}`));
|
|
18
19
|
}
|
|
19
20
|
else {
|
|
20
21
|
console.log(chalk.red(msg));
|
|
21
22
|
}
|
|
23
|
+
if (err instanceof javascript_sdk_1.ApiError && err.response) {
|
|
24
|
+
for (const [key, value] of Object.entries(err.response)) {
|
|
25
|
+
if (['code', 'name', 'message'].includes(key)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
console.log(chalk.red(` ${key}:`), value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
console.log('\nUsage:');
|
|
23
32
|
console.log(argv.help());
|
|
24
33
|
process.exit(1);
|