@axway/axway-central-cli 2.6.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.
- package/README.md +2 -2
- package/dist/commands/install/helpers/index.js +4 -4
- package/dist/commands/install/helpers/inputs.js +1 -1
- package/dist/commands/install/helpers/templates/edgeTemplates.js +6 -6
- package/dist/commands/install/istioAgents.js +1 -1
- package/dist/common/CoreConfigController.js +6 -5
- package/dist/common/PlatformClient.js +4 -1
- package/dist/common/dataService.js +1 -1
- package/dist/common/types.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Axway Central CLI package for managing Amplify Central resources and DevOps operations.
|
|
4
4
|
|
|
5
|
-
**For more documentation and examples please visit [Amplify Central CLI documentation portal](https://docs.axway.com/bundle/
|
|
5
|
+
**For more documentation and examples please visit [Amplify Central CLI documentation portal](https://docs.axway.com/bundle/amplify-central/page/docs/integrate_with_central/cli_central/index.html).**
|
|
6
6
|
|
|
7
7
|
# Installation
|
|
8
8
|
|
|
@@ -250,7 +250,7 @@ PROXIES OPTIONS:
|
|
|
250
250
|
--json Show JSON output
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
CLI supports multiple versions of proxy definition file. For more details and examples visit our [docs portal](https://docs.axway.com/bundle/
|
|
253
|
+
CLI supports multiple versions of proxy definition file. For more details and examples visit our [docs portal](https://docs.axway.com/bundle/amplify-central/page/docs/integrate_with_central/cli_central/index.html) and [stoplight hub](https://d-api.docs.stoplight.io/).
|
|
254
254
|
|
|
255
255
|
- **v0**
|
|
256
256
|
|
|
@@ -174,10 +174,10 @@ const configFiles = {
|
|
|
174
174
|
};
|
|
175
175
|
exports.configFiles = configFiles;
|
|
176
176
|
const agentsDocsUrl = {
|
|
177
|
-
V7: 'https://docs.axway.com/bundle/
|
|
178
|
-
AWS: 'https://docs.axway.com/bundle/
|
|
179
|
-
AZURE: 'https://docs.axway.com/bundle/
|
|
180
|
-
ISTIO: 'https://docs.axway.com/bundle/
|
|
177
|
+
V7: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/index.html',
|
|
178
|
+
AWS: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_aws_gateway/index.html',
|
|
179
|
+
AZURE: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_azure_gateway/index.html',
|
|
180
|
+
ISTIO: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/mesh_management/index.html'
|
|
181
181
|
}; // export * from './updaters';
|
|
182
182
|
|
|
183
183
|
exports.agentsDocsUrl = agentsDocsUrl;
|
|
@@ -411,7 +411,7 @@ const askToEnableTransactionLogging = async () => {
|
|
|
411
411
|
console.log(_chalk.default.gray(transactionLoggingMessages.samplingPercentageInfoMsg));
|
|
412
412
|
const samplingPercentage = await (0, _basicPrompts.askInput)({
|
|
413
413
|
msg: transactionLoggingMessages.enterSamplingPercentage,
|
|
414
|
-
defaultValue:
|
|
414
|
+
defaultValue: 10,
|
|
415
415
|
validate: (0, _basicPrompts.runValidations)((0, _basicPrompts.validateRegex)(_regex.percentageRegex, _regex.invalidPercentage))
|
|
416
416
|
});
|
|
417
417
|
let shouldReportAllErrors = _types.YesNo.Yes;
|
|
@@ -178,9 +178,9 @@ fullnameOverride: ""
|
|
|
178
178
|
# Health Check port
|
|
179
179
|
statusPort: 8990
|
|
180
180
|
|
|
181
|
-
#
|
|
182
|
-
# https://docs.axway.com/bundle/
|
|
183
|
-
#
|
|
181
|
+
# The following links document the environment variables for traceability.
|
|
182
|
+
# https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#common-variables-to-both-agents
|
|
183
|
+
# https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#specific-variables-for-traceability-agent
|
|
184
184
|
env:
|
|
185
185
|
APIGATEWAY_HEALTHCHECKPORT: 8090
|
|
186
186
|
APIGATEWAY_HEALTHCHECKPROTOCOL: "https"
|
|
@@ -304,9 +304,9 @@ fullnameOverride: ""
|
|
|
304
304
|
# Health Check port
|
|
305
305
|
statusPort: 8989
|
|
306
306
|
|
|
307
|
-
#
|
|
308
|
-
# https://docs.axway.com/bundle/
|
|
309
|
-
#
|
|
307
|
+
# The following links document the environment variables for discovery.
|
|
308
|
+
# https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#common-variables-to-both-agents
|
|
309
|
+
# https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/agent-variables/index.html#specific-variables-for-discovery-agent
|
|
310
310
|
env:
|
|
311
311
|
APIMANAGER_HOST: {{apiManagerHost}}
|
|
312
312
|
APIMANAGER_PORT: {{apiManagerPort}}
|
|
@@ -100,7 +100,7 @@ const gatewayConnectivity = async (installConfig, apiServerClient, defsManager)
|
|
|
100
100
|
The Amplify Istio Traceability Agent needs to be deployed to your Kubernetes cluster to collect transaction telemetry to send to the Amplify Central Observer and Visibility Dashboard.`));
|
|
101
101
|
console.log(`
|
|
102
102
|
For more details on client prerequesites or Kubernetes preparation refer to the documentation here:
|
|
103
|
-
https://docs.axway.com/bundle/
|
|
103
|
+
https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/mesh_management/build_hybrid_env/index.html
|
|
104
104
|
`);
|
|
105
105
|
const {
|
|
106
106
|
error
|
|
@@ -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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
|
@@ -161,13 +161,16 @@ class PlatformClient {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
async getTeams() {
|
|
164
|
+
var _account$team, _teams$find;
|
|
165
|
+
|
|
164
166
|
log(`getTeams`);
|
|
165
167
|
const account = await this.getAccountInfo();
|
|
166
168
|
const {
|
|
167
169
|
teams
|
|
168
170
|
} = await _classPrivateFieldGet(this, _amplifySdk).team.list(account);
|
|
171
|
+
const teamGuid = ((_account$team = account.team) === null || _account$team === void 0 ? void 0 : _account$team.guid) && ((_teams$find = teams.find(team => team.guid === account.team.guid)) === null || _teams$find === void 0 ? void 0 : _teams$find.guid);
|
|
169
172
|
return teams.map(team => ({ ...team,
|
|
170
|
-
default: team.guid ===
|
|
173
|
+
default: teamGuid && team.guid === teamGuid || !teamGuid && team.default
|
|
171
174
|
}));
|
|
172
175
|
}
|
|
173
176
|
|
|
@@ -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/dist/common/types.js
CHANGED
|
@@ -11,7 +11,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11
11
|
|
|
12
12
|
const cliVersionHeader = 'x-axway-cli-version';
|
|
13
13
|
exports.cliVersionHeader = cliVersionHeader;
|
|
14
|
-
const docsUrl = 'https://docs.axway.com/bundle/
|
|
14
|
+
const docsUrl = 'https://docs.axway.com/bundle/amplify-central/page/docs/index.html';
|
|
15
15
|
exports.docsUrl = docsUrl;
|
|
16
16
|
const ABORT_TIMEOUT = process.env.NODE_ENV === 'test' ? 1e3 : 30e3;
|
|
17
17
|
exports.ABORT_TIMEOUT = ABORT_TIMEOUT;
|