@axway/axway-central-cli 2.29.0-rc.6 → 2.29.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.
@@ -114,9 +114,16 @@ const agents = exports.agents = {
114
114
  console.log(_chalk.default.gray(`This command configures and installs the agents so that you can manage your gateway environment within the Amplify Platform.\n`));
115
115
  let installConfig = new _types.AgentInstallConfig();
116
116
  installConfig.centralConfig.axwayManaged = !!axwayManaged;
117
+ let orgRegion = '';
118
+ orgRegion = region;
119
+
120
+ // if region cmd arg is not passed in, then consider the region from the account info
121
+ if (region === undefined) {
122
+ orgRegion = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.org.region;
123
+ }
117
124
 
118
125
  // top priority is region option on command line, second priority is region from config file, default is US
119
- installConfig.centralConfig.region = await determineRegion(region);
126
+ installConfig.centralConfig.region = await determineRegion(orgRegion);
120
127
  installConfig.centralConfig.singleEntryPointUrl = _types.SingleEntryPointUrls[installConfig.centralConfig.region];
121
128
  let gatewayTypeChoices = [];
122
129
  Object.values(_types.GatewayTypes).forEach(v => gatewayTypeChoices.push(v));
@@ -77,16 +77,8 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
77
77
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
78
78
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
79
79
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
80
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
81
- {{#compare . centralConfig.region "US" operator="!="}}
82
- CENTRAL_URL={{centralConfig.url}}
83
- CENTRAL_DEPLOYMENT={{centralConfig.deployment}}
80
+ CENTRAL_REGION={{centralConfig.region}}
84
81
 
85
- TRACEABILITY_HOST={{traceabilityConfig.host}}
86
- {{/compare}}
87
- {{#compare . centralConfig.region "US"}}
88
-
89
- {{/compare}}
90
82
  {{#compare . traceabilityConfig.protocol "https"}}
91
83
  TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
92
84
  {{/compare}}
@@ -128,10 +120,7 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
128
120
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
129
121
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
130
122
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
131
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
132
- {{#compare . centralConfig.region "US" operator="!="}}
133
- CENTRAL_URL={{centralConfig.url}}
134
- {{/compare}}
123
+ CENTRAL_REGION={{centralConfig.region}}
135
124
 
136
125
  # Logging configs
137
126
  # Define the logging level: info, debug, error
@@ -70,16 +70,8 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
70
70
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
71
71
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
72
72
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
73
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
74
- {{#compare . centralConfig.region "US" operator="!="}}
75
- CENTRAL_URL={{centralConfig.url}}
76
- CENTRAL_DEPLOYMENT={{centralConfig.deployment}}
73
+ CENTRAL_REGION={{centralConfig.region}}
77
74
 
78
- TRACEABILITY_HOST={{traceabilityConfig.host}}
79
- {{/compare}}
80
- {{#compare . centralConfig.region "US"}}
81
-
82
- {{/compare}}
83
75
  {{#compare . traceabilityConfig.protocol "https"}}
84
76
  TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
85
77
  {{/compare}}
@@ -118,10 +110,7 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
118
110
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
119
111
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
120
112
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
121
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
122
- {{#compare . centralConfig.region "US" operator="!="}}
123
- CENTRAL_URL={{centralConfig.url}}
124
- {{/compare}}
113
+ CENTRAL_REGION={{centralConfig.region}}
125
114
 
126
115
  # Logging configs
127
116
  # Define the logging level: info, debug, error
@@ -112,16 +112,7 @@ CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
112
112
  {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
113
113
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
114
114
  {{/compare}}
115
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
116
- {{#compare . centralConfig.region "US" operator="!="}}
117
- CENTRAL_URL={{centralConfig.url}}
118
- CENTRAL_DEPLOYMENT={{centralConfig.deployment}}
119
-
120
- TRACEABILITY_HOST={{traceabilityConfig.host}}
121
- {{/compare}}
122
- {{#compare . centralConfig.region "US"}}
123
-
124
- {{/compare}}
115
+ CENTRAL_REGION={{centralConfig.region}}
125
116
  {{#compare . traceabilityConfig.protocol "https"}}
126
117
  TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
127
118
  {{/compare}}
@@ -165,10 +156,7 @@ statusPort: 8990
165
156
  env:
166
157
  LOG_LEVEL: info
167
158
  CENTRAL_AGENTNAME: {{centralConfig.taAgentName}}
168
- CENTRAL_URL: {{centralConfig.url}}
169
- CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
170
- CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
171
- CENTRAL_DEPLOYMENT: {{centralConfig.deployment}}
159
+ CENTRAL_REGION: {{centralConfig.region}}
172
160
  CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
173
161
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
174
162
  CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
@@ -182,7 +170,6 @@ env:
182
170
  # API Gateway event logs
183
171
  EVENT_LOG_PATHS: /events/*.log
184
172
  {{/if}}
185
- TRACEABILITY_HOST: {{traceabilityConfig.host}}
186
173
  TRACEABILITY_PROTOCOL: {{traceabilityConfig.protocol}}
187
174
  TRACEABILITY_SAMPLING_PERCENTAGE: {{traceabilityConfig.samplingPercentage}}
188
175
  TRACEABILITY_SAMPLING_REPORTALLERRORS: {{traceabilityConfig.samplingReportAllErrors}}
@@ -279,10 +266,7 @@ CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
279
266
  {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
280
267
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
281
268
  {{/compare}}
282
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
283
- {{#compare . centralConfig.region "US" operator="!="}}
284
- CENTRAL_URL={{centralConfig.url}}
285
- {{/compare}}
269
+ CENTRAL_REGION={{centralConfig.region}}
286
270
 
287
271
  # Logging configs
288
272
  # Define the logging level: info, debug, error
@@ -321,9 +305,7 @@ statusPort: 8989
321
305
  env:
322
306
  LOG_LEVEL: info
323
307
  CENTRAL_AGENTNAME: {{centralConfig.daAgentName}}
324
- CENTRAL_URL: {{centralConfig.url}}
325
- CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
326
- CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
308
+ CENTRAL_REGION: {{centralConfig.region}}
327
309
  CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
328
310
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
329
311
  CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
@@ -54,10 +54,7 @@ CENTRAL_GRPC_ENABLED=true
54
54
  {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
55
55
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
56
56
  {{/compare}}
57
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
58
- {{#compare . centralConfig.region "US" operator="!="}}
59
- CENTRAL_URL={{centralConfig.url}}
60
- {{/compare}}
57
+ CENTRAL_REGION={{centralConfig.region}}
61
58
 
62
59
  # Logging configs
63
60
  # Define the logging level: info, debug, error
@@ -54,16 +54,12 @@ secrets:
54
54
  name: {{agentKeysSecret}}
55
55
 
56
56
  env:
57
- CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
58
- CENTRAL_URL: {{centralConfig.url}}
59
- CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
57
+ CENTRAL_REGION={{centralConfig.region}}
60
58
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
61
- CENTRAL_DEPLOYMENT: {{centralConfig.deployment}}
62
59
  CENTRAL_TEAM: {{centralConfig.ampcTeamName}}
63
60
  CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
64
61
  CENTRAL_AGENTNAME: {{centralConfig.taAgentName}}
65
62
  CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
66
- TRACEABILITY_HOST: {{traceabilityConfig.host}}
67
63
  TRACEABILITY_PROTOCOL: {{traceabilityConfig.protocol}}
68
64
  `;
69
65
  };
@@ -99,10 +99,7 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
99
99
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
100
100
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
101
101
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
102
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
103
- {{#compare . centralConfig.region "US" operator="!="}}
104
- CENTRAL_URL={{centralConfig.url}}
105
- {{/compare}}
102
+ CENTRAL_REGION={{centralConfig.region}}
106
103
 
107
104
  # Logging configs
108
105
  # Define the logging level: info, debug, error
@@ -145,16 +142,7 @@ CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
145
142
  CENTRAL_ENVIRONMENT={{centralConfig.environment}}
146
143
  CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
147
144
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
148
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
149
- {{#compare . centralConfig.region "US" operator="!="}}
150
- CENTRAL_URL={{centralConfig.url}}
151
- CENTRAL_DEPLOYMENT={{centralConfig.deployment}}
152
-
153
- TRACEABILITY_HOST={{traceabilityConfig.host}}
154
- {{/compare}}
155
- {{#compare . centralConfig.region "US"}}
156
-
157
- {{/compare}}
145
+ CENTRAL_REGION={{centralConfig.region}}
158
146
  {{#compare . traceabilityConfig.protocol "https"}}
159
147
  TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
160
148
  {{/compare}}
@@ -9,7 +9,6 @@ var _basicPrompts = require("../../common/basicPrompts");
9
9
  var _CliConfigManager = require("../../common/CliConfigManager");
10
10
  var _CoreConfigController = require("../../common/CoreConfigController");
11
11
  var _types = require("../../common/types");
12
- var _utils = require("../../common/utils");
13
12
  var _awsAgents = require("./awsAgents");
14
13
  var helpers = _interopRequireWildcard(require("./helpers"));
15
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -69,7 +68,6 @@ const getCentralConfig = async (apiServerClient, platformClient, defsManager, ap
69
68
  let centralConfig = installConfig.centralConfig;
70
69
  await centralConfig.setBaseHost();
71
70
  centralConfig.authUrl = `${_CoreConfigController.CoreConfigController.getAuthUrl()}/auth`;
72
- centralConfig.region = String(apiServerClient.region || (await (0, _utils.getConfig)())[_types.ConfigTypes.REGION] || _types.Regions.US).toUpperCase();
73
71
  centralConfig.deployment = apicDeployment || getApicDeployment(centralConfig.region, _CoreConfigController.CoreConfigController.getEnv());
74
72
 
75
73
  // apic config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.29.0-rc.6",
3
+ "version": "2.29.0",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {