@axway/axway-central-cli 2.9.1 → 2.9.4

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.
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.renderResponse = exports.parseAsYaml = exports.parseAsJson = void 0;
7
7
  exports.resolveTeamNames = resolveTeamNames;
8
8
 
9
+ var _chalk = _interopRequireDefault(require("chalk"));
10
+
9
11
  var _dayjs = _interopRequireDefault(require("dayjs"));
10
12
 
11
13
  var _easyTable = _interopRequireDefault(require("easy-table"));
@@ -76,7 +78,7 @@ const parseAsTable = (response, columns) => {
76
78
  if (col.type === 'date') {
77
79
  value = (0, _dayjs.default)(value).fromNow();
78
80
  } else if (col.type === 'teamGuid' && !value) {
79
- value = '- - -';
81
+ value = _chalk.default.gray('---');
80
82
  }
81
83
 
82
84
  t.cell(col.name.toUpperCase(), value);
@@ -168,9 +170,14 @@ async function resolveTeamNames({
168
170
  for (const {
169
171
  data
170
172
  } of results) {
171
- for (const obj of data) {
172
- const value = (0, _get.default)(obj, jsonPath);
173
- (0, _set.default)(obj, targetJsonPath, value && teamNames[value] || value || '');
173
+ if (Array.isArray(data)) {
174
+ for (const obj of data) {
175
+ const value = (0, _get.default)(obj, jsonPath, null);
176
+
177
+ if (value !== null) {
178
+ (0, _set.default)(obj, targetJsonPath, value && teamNames[value] || value || '');
179
+ }
180
+ }
174
181
  }
175
182
  }
176
183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.9.1",
3
+ "version": "2.9.4",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {