@axway/axway-central-cli 2.10.0-rc.2 → 2.10.0

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.
@@ -47,6 +47,12 @@ const get = {
47
47
  argv,
48
48
  console
49
49
  }) {
50
+ if (!argv.team && argv.owner === false) {
51
+ // no --team set and --no-owner was set, so we set the team to `null` which will know
52
+ // to get teams that do not have an owner
53
+ argv.team = null;
54
+ }
55
+
50
56
  const {
51
57
  args,
52
58
  attribute,
@@ -204,7 +210,8 @@ ${defsManager.getDefsTableForHelpMsg()}`);
204
210
  '--tag [tag]': {
205
211
  desc: 'Tag of resource(s) to fetch'
206
212
  },
207
- '--team [guid|name]': 'The team name or guid to use'
213
+ '--team [guid|name]': 'The team name or guid to use',
214
+ '--no-owner': 'Returns resources which do not have an owner'
208
215
  }
209
216
  };
210
217
  exports.get = get;
@@ -174,7 +174,7 @@ const agents = {
174
174
 
175
175
  createConfigBackup(agentInstallFlow.ConfigFiles, agentInstallFlow.GatewayDisplay); // run any install preprocess steps
176
176
 
177
- if (agentInstallFlow.InstallPreprocess) installConfig = await agentInstallFlow.InstallPreprocess(installConfig); // finalize Pplatform setup
177
+ if (agentInstallFlow.InstallPreprocess) installConfig = await agentInstallFlow.InstallPreprocess(installConfig); // finalize Platform setup
178
178
 
179
179
  installConfig = await platform.finalizeCentralInstall(apiServerClient, platformClient, defsManager, installConfig); // finalize gateway setup and output
180
180
 
@@ -161,6 +161,8 @@ class CoreConfigController {
161
161
  }
162
162
 
163
163
  result.teamGuid = teamObj.guid;
164
+ } else if (team === null) {
165
+ result.teamGuid = null;
164
166
  }
165
167
 
166
168
  log(`getAuthInfo, returning account = ${devOpsAccount.name}`);
@@ -154,9 +154,9 @@ const dataService = async ({
154
154
  const fetch = async (method, url, params = {}) => {
155
155
  try {
156
156
  // add the team guid
157
- if (teamGuid) {
157
+ if (teamGuid !== undefined) {
158
158
  const parsed = new _url.URL(url);
159
- parsed.searchParams.set('query', `owner.id==${teamGuid}`);
159
+ parsed.searchParams.set('query', teamGuid ? `owner.id==${teamGuid},(owner.id==null;metadata.scope.owner.id==${teamGuid})` : 'owner.id==null');
160
160
  url = parsed.toString();
161
161
  }
162
162
 
@@ -167,16 +167,22 @@ async function resolveTeamNames({
167
167
  const targetJsonPath = jsonPath.split('.').slice(0, -1).join('.') + '.teamName';
168
168
  column.jsonPath = `.${targetJsonPath}`; // next loop over data and set the team name
169
169
 
170
- for (const {
170
+ for (let {
171
171
  data
172
172
  } of results) {
173
- if (Array.isArray(data)) {
174
- for (const obj of data) {
175
- const value = (0, _get.default)(obj, jsonPath, null);
173
+ if (!data || typeof data !== 'object') {
174
+ continue;
175
+ }
176
+
177
+ if (!Array.isArray(data)) {
178
+ data = [data];
179
+ }
180
+
181
+ for (const obj of data) {
182
+ const value = (0, _get.default)(obj, jsonPath, null);
176
183
 
177
- if (value !== null) {
178
- (0, _set.default)(obj, targetJsonPath, value && teamNames[value] || value || '');
179
- }
184
+ if (value !== null) {
185
+ (0, _set.default)(obj, targetJsonPath, value && teamNames[value] || value || '');
180
186
  }
181
187
  }
182
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.10.0-rc.2",
3
+ "version": "2.10.0",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {
@@ -41,19 +41,21 @@
41
41
  "name": "central"
42
42
  },
43
43
  "dependencies": {
44
- "@axway/amplify-cli-utils": "^5.0.6",
44
+ "@axway/amplify-cli-utils": "^5.0.7",
45
45
  "chalk": "^4.1.2",
46
46
  "cli-kit": "^1.15.0",
47
- "dayjs": "^1.10.7",
47
+ "dayjs": "^1.11.0",
48
48
  "easy-table": "^1.2.0",
49
49
  "extract-zip": "^2.0.1",
50
50
  "form-data": "^4.0.0",
51
- "fs-extra": "^10.0.0",
51
+ "fs-extra": "^10.0.1",
52
+ "g": "^2.0.1",
52
53
  "handlebars": "^4.7.7",
53
- "inquirer": "^8.2.0",
54
+ "inquirer": "^8.2.1",
54
55
  "js-yaml": "^4.1.0",
55
56
  "lodash": "^4.17.21",
56
57
  "node-cache": "^5.1.2",
58
+ "npm-check-updates": "^12.5.4",
57
59
  "ora": "^5.4.1",
58
60
  "promise-limit": "^2.7.0",
59
61
  "semver": "^7.3.5",
@@ -61,41 +63,41 @@
61
63
  "tmp": "^0.2.1"
62
64
  },
63
65
  "devDependencies": {
64
- "@babel/cli": "^7.16.8",
65
- "@babel/core": "^7.16.12",
66
+ "@babel/cli": "^7.17.6",
67
+ "@babel/core": "^7.17.8",
66
68
  "@babel/plugin-proposal-class-properties": "^7.16.7",
67
69
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
68
70
  "@babel/plugin-proposal-optional-chaining": "^7.16.7",
69
71
  "@babel/preset-env": "^7.16.11",
70
72
  "@babel/preset-typescript": "^7.16.7",
71
73
  "@types/chai": "^4.3.0",
72
- "@types/chai-as-promised": "^7.1.4",
74
+ "@types/chai-as-promised": "^7.1.5",
73
75
  "@types/form-data": "^2.5.0",
74
76
  "@types/fs-extra": "^9.0.13",
75
77
  "@types/inquirer": "^8.2.0",
76
78
  "@types/js-yaml": "^4.0.5",
77
- "@types/lodash": "^4.14.178",
79
+ "@types/lodash": "^4.14.180",
78
80
  "@types/mocha": "^9.1.0",
79
- "@types/node": "^17.0.14",
81
+ "@types/node": "^17.0.22",
80
82
  "@types/rx": "^4.1.2",
81
83
  "@types/semver": "^7.3.9",
82
- "@types/sinon": "^10.0.9",
84
+ "@types/sinon": "^10.0.11",
83
85
  "@types/tmp": "^0.2.3",
84
86
  "@types/update-notifier": "^5.1.0",
85
87
  "@types/uuid": "^8.3.4",
86
88
  "babel-plugin-lodash": "^3.3.4",
87
89
  "chai": "^4.3.6",
88
90
  "chai-as-promised": "^7.1.1",
89
- "core-js": "^3.21.0",
90
- "mocha": "^9.2.0",
91
- "nock": "^13.2.2",
91
+ "core-js": "^3.21.1",
92
+ "mocha": "^9.2.2",
93
+ "nock": "^13.2.4",
92
94
  "nodemon": "^2.0.15",
93
95
  "nyc": "^15.1.0",
94
- "prettier": "^2.5.1",
96
+ "prettier": "^2.6.0",
95
97
  "sinon": "^11.1.2",
96
98
  "source-map-support": "^0.5.21",
97
99
  "ts-mocha": "^9.0.2",
98
- "typescript": "^4.5.5"
100
+ "typescript": "^4.6.2"
99
101
  },
100
102
  "jest": {
101
103
  "verbose": true,