@axway/axway-central-cli 2.28.0 → 2.29.0-rc.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.
@@ -112,9 +112,17 @@ const agents = exports.agents = {
112
112
  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`));
113
113
  let installConfig = new _types.AgentInstallConfig();
114
114
  installConfig.centralConfig.axwayManaged = !!axwayManaged;
115
+ let orgRegion = '';
116
+ orgRegion = region;
117
+
118
+ // if region cmd arg is not passed in, then consider the region from the account info
119
+ if (region === undefined) {
120
+ orgRegion = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.org.region;
121
+ }
115
122
 
116
123
  // top priority is region option on command line, second priority is region from config file, default is US
117
- installConfig.centralConfig.region = await determineRegion(region);
124
+ installConfig.centralConfig.region = await determineRegion(orgRegion);
125
+ console.log(installConfig.centralConfig.region);
118
126
  installConfig.centralConfig.singleEntryPointUrl = _types.SingleEntryPointUrls[installConfig.centralConfig.region];
119
127
  let gatewayTypeChoices = [];
120
128
  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,6 @@ 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}}
172
159
  CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
173
160
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
174
161
  CENTRAL_ENVIRONMENT: {{centralConfig.environment}}
@@ -182,7 +169,6 @@ env:
182
169
  # API Gateway event logs
183
170
  EVENT_LOG_PATHS: /events/*.log
184
171
  {{/if}}
185
- TRACEABILITY_HOST: {{traceabilityConfig.host}}
186
172
  TRACEABILITY_PROTOCOL: {{traceabilityConfig.protocol}}
187
173
  TRACEABILITY_SAMPLING_PERCENTAGE: {{traceabilityConfig.samplingPercentage}}
188
174
  TRACEABILITY_SAMPLING_REPORTALLERRORS: {{traceabilityConfig.samplingReportAllErrors}}
@@ -279,10 +265,7 @@ CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
279
265
  {{#compare . centralConfig.ampcTeamName "" operator="!=" }}
280
266
  CENTRAL_TEAM={{centralConfig.ampcTeamName}}
281
267
  {{/compare}}
282
- CENTRAL_SINGLEURL={{centralConfig.singleEntryPointUrl}}
283
- {{#compare . centralConfig.region "US" operator="!="}}
284
- CENTRAL_URL={{centralConfig.url}}
285
- {{/compare}}
268
+ CENTRAL_REGION = {{centralConfig.region}}
286
269
 
287
270
  # Logging configs
288
271
  # Define the logging level: info, debug, error
@@ -321,9 +304,7 @@ statusPort: 8989
321
304
  env:
322
305
  LOG_LEVEL: info
323
306
  CENTRAL_AGENTNAME: {{centralConfig.daAgentName}}
324
- CENTRAL_URL: {{centralConfig.url}}
325
- CENTRAL_AUTH_URL: {{centralConfig.authUrl}}
326
- CENTRAL_SINGLEURL: {{centralConfig.singleEntryPointUrl}}
307
+ CENTRAL_REGION = {{centralConfig.region}}
327
308
  CENTRAL_AUTH_CLIENTID: {{centralConfig.dosaAccount.clientId}}
328
309
  CENTRAL_ORGANIZATIONID: "{{centralConfig.orgId}}"
329
310
  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}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.28.0",
3
+ "version": "2.29.0-rc.1",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {