@axway/axway-central-cli 2.7.0 → 2.7.1

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.
@@ -45,7 +45,7 @@ class CoreConfigController {
45
45
 
46
46
  configCtrl.validateSavedConfigKeys();
47
47
  log(`getAuthInfo, received clientId = ${clientId}, account = ${account}, team = ${team}`);
48
- const baseUrl = configCtrl.get(_CliConfigManager.CliConfigKeys.BASE_URL); // environment defined by using central cli "base-url" or axway "env" configs if set,
48
+ const baseUrl = process.env.AXWAY_CENTRAL_BASE_URL || configCtrl.get(_CliConfigManager.CliConfigKeys.BASE_URL); // environment defined by using central cli "base-url" or axway "env" configs if set,
49
49
  // otherwise its undefined (equals to prod)
50
50
 
51
51
  const environment = !baseUrl || baseUrl === _types.ProdBaseUrls.US || baseUrl === _types.ProdBaseUrls.EU ? config.get('env') : 'preprod';
@@ -120,13 +120,14 @@ class CoreConfigController {
120
120
  const result = {
121
121
  orgId: devOpsAccount.isPlatform ? `${devOpsAccount.org.id}` : undefined,
122
122
  orgRegion: (_devOpsAccount$org = devOpsAccount.org) === null || _devOpsAccount$org === void 0 ? void 0 : _devOpsAccount$org.region,
123
- token: devOpsAccount.auth.tokens.access_token
123
+ token: process.env.AXWAY_CENTRAL_AUTH_TOKEN || config.get('central.authToken', devOpsAccount.auth.tokens.access_token)
124
124
  }; // now that we have resolved the account, we can validate the team
125
125
 
126
126
  if (team) {
127
- var _devOpsAccount$org$te;
128
-
129
- const teamObj = (_devOpsAccount$org$te = devOpsAccount.org.teams) === null || _devOpsAccount$org$te === void 0 ? void 0 : _devOpsAccount$org$te.find(t => {
127
+ const {
128
+ teams
129
+ } = await sdk.team.list(devOpsAccount);
130
+ const teamObj = teams.find(t => {
130
131
  return t.guid.toLowerCase() === team.toLowerCase() || t.name.toLowerCase() === team.toLowerCase();
131
132
  });
132
133
 
@@ -64,7 +64,7 @@ const getDefaultHeaders = ({
64
64
 
65
65
 
66
66
  const getBaseUrl = async (baseUrl, basePath, region, orgRegion) => {
67
- const configuredBaseUrl = baseUrl || (await (0, _utils.getConfig)())[_types.ConfigTypes.BASE_URL];
67
+ const configuredBaseUrl = baseUrl || process.env.AXWAY_CENTRAL_BASE_URL || (await (0, _utils.getConfig)())[_types.ConfigTypes.BASE_URL];
68
68
 
69
69
  if (configuredBaseUrl) {
70
70
  return basePath ? configuredBaseUrl + basePath : configuredBaseUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {