@axway/axway-central-cli 2.26.0-rc.2 → 2.26.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.
|
@@ -16,6 +16,7 @@ var _Renderer = _interopRequireDefault(require("../../common/Renderer"));
|
|
|
16
16
|
var _types = require("../../common/types");
|
|
17
17
|
var _utils = require("../../common/utils");
|
|
18
18
|
var awsAgents = _interopRequireWildcard(require("./awsAgents"));
|
|
19
|
+
var awsSaaSAgents = _interopRequireWildcard(require("./awsSaasAgents"));
|
|
19
20
|
var gitHubAgents = _interopRequireWildcard(require("./gitHubSaasAgents"));
|
|
20
21
|
var gitLabAgents = _interopRequireWildcard(require("./gitLabAgents"));
|
|
21
22
|
var azureAgents = _interopRequireWildcard(require("./azureAgents"));
|
|
@@ -23,7 +24,6 @@ var edgeAgents = _interopRequireWildcard(require("./edgeAgents"));
|
|
|
23
24
|
var apigeeSaaSAgents = _interopRequireWildcard(require("./apigeexSaasAgents"));
|
|
24
25
|
var helpers = _interopRequireWildcard(require("./helpers"));
|
|
25
26
|
var istioAgents = _interopRequireWildcard(require("./istioAgents"));
|
|
26
|
-
var saasAgents = _interopRequireWildcard(require("./awsSaasAgents"));
|
|
27
27
|
var kafkaAgents = _interopRequireWildcard(require("./kafkaAgents"));
|
|
28
28
|
var swaggerHubAgents = _interopRequireWildcard(require("./swaggerHubSaasAgents"));
|
|
29
29
|
var platform = _interopRequireWildcard(require("./platform"));
|
|
@@ -43,13 +43,12 @@ const agentInstallFlows = {
|
|
|
43
43
|
[_types.GatewayTypes.EDGE_GATEWAY_ONLY]: edgeAgents.EdgeGWOnlyInstallMethods,
|
|
44
44
|
[_types.GatewayTypes.AWS_GATEWAY]: awsAgents.AWSInstallMethods,
|
|
45
45
|
[_types.GatewayTypes.GITLAB]: gitLabAgents.GitLabInstallMethods,
|
|
46
|
-
[_types.GatewayTypes.APIGEEX_GATEWAY]: apigeeSaaSAgents.APIGEEXSaaSInstallMethods,
|
|
47
46
|
[_types.GatewayTypes.AZURE_GATEWAY]: azureAgents.AzureInstallMethods,
|
|
48
47
|
[_types.GatewayTypes.ISTIO]: istioAgents.IstioInstallMethods,
|
|
49
48
|
[_types.GatewayTypes.KAFKA]: kafkaAgents.KafkaInstallMethods
|
|
50
49
|
};
|
|
51
50
|
const saasAgentInstallFlows = {
|
|
52
|
-
[_types.SaaSGatewayTypes.AWS_GATEWAY]:
|
|
51
|
+
[_types.SaaSGatewayTypes.AWS_GATEWAY]: awsSaaSAgents.AWSSaaSInstallMethods,
|
|
53
52
|
[_types.SaaSGatewayTypes.GITHUB]: gitHubAgents.GitHubSaaSInstallMethods,
|
|
54
53
|
[_types.SaaSGatewayTypes.APIGEEX_GATEWAY]: apigeeSaaSAgents.APIGEEXSaaSInstallMethods,
|
|
55
54
|
[_types.SaaSGatewayTypes.SWAGGERHUB]: swaggerHubAgents.SwaggerHubSaaSInstallMethods
|
|
@@ -113,9 +112,12 @@ const agents = exports.agents = {
|
|
|
113
112
|
// top priority is region option on command line, second priority is region from config file, default is US
|
|
114
113
|
installConfig.centralConfig.region = await determineRegion(region);
|
|
115
114
|
installConfig.centralConfig.singleEntryPointUrl = _types.SingleEntryPointUrls[installConfig.centralConfig.region];
|
|
115
|
+
let gatewayTypeChoices = [];
|
|
116
|
+
Object.values(_types.GatewayTypes).forEach(v => gatewayTypeChoices.push(v));
|
|
117
|
+
Object.values(_types.SaaSGatewayTypes).filter(v => v !== _types.SaaSGatewayTypes.AWS_GATEWAY).forEach(v => gatewayTypeChoices.push(v));
|
|
116
118
|
let gatewayType = await (0, _basicPrompts.askList)({
|
|
117
119
|
msg: prompts.selectGatewayType,
|
|
118
|
-
choices:
|
|
120
|
+
choices: gatewayTypeChoices.sort().filter(v => v !== _types.GatewayTypes.EDGE_GATEWAY_ONLY)
|
|
119
121
|
});
|
|
120
122
|
if (gatewayType === _types.GatewayTypes.AWS_GATEWAY) {
|
|
121
123
|
// hosted vs on premise
|
|
@@ -125,7 +127,7 @@ const agents = exports.agents = {
|
|
|
125
127
|
default: _types.YesNo.Yes
|
|
126
128
|
})) === _types.YesNo.Yes;
|
|
127
129
|
}
|
|
128
|
-
if (gatewayType === _types.
|
|
130
|
+
if (gatewayType === _types.SaaSGatewayTypes.APIGEEX_GATEWAY || gatewayType === _types.SaaSGatewayTypes.GITHUB || gatewayType === _types.SaaSGatewayTypes.SWAGGERHUB) {
|
|
129
131
|
installConfig.switches.isHostedInstall = true;
|
|
130
132
|
}
|
|
131
133
|
|
|
@@ -157,7 +157,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
157
157
|
|
|
158
158
|
// DeploymentType
|
|
159
159
|
let hostedAgentValues = new SaasAgentValues();
|
|
160
|
-
if (installConfig.gatewayType === _types.
|
|
160
|
+
if (installConfig.gatewayType === _types.SaaSGatewayTypes.APIGEEX_GATEWAY) {
|
|
161
161
|
// APIGEE X connection details
|
|
162
162
|
hostedAgentValues = new SaasAPIGEEXAgentValues();
|
|
163
163
|
hostedAgentValues = await askForAPIGEEXCredentials(hostedAgentValues);
|
|
@@ -217,7 +217,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
|
|
|
217
217
|
axwayManaged: installConfig.centralConfig.axwayManaged,
|
|
218
218
|
production: installConfig.centralConfig.production
|
|
219
219
|
}) : installConfig.centralConfig.ampcEnvInfo.name;
|
|
220
|
-
if (installConfig.gatewayType === _types.
|
|
220
|
+
if (installConfig.gatewayType === _types.SaaSGatewayTypes.APIGEEX_GATEWAY) {
|
|
221
221
|
apigeeXAgentValues.dataplaneConfig = new APIGEEXDataplaneConfig(apigeeXAgentValues.projectId, apigeeXAgentValues.developerEmailAddress, apigeeXAgentValues.mode);
|
|
222
222
|
}
|
|
223
223
|
|
|
@@ -256,7 +256,7 @@ const APIGEEXSaaSInstallMethods = exports.APIGEEXSaaSInstallMethods = {
|
|
|
256
256
|
[_types.AgentTypes.da]: _types.AgentNames.APIGEEX_DA,
|
|
257
257
|
[_types.AgentTypes.ta]: _types.AgentNames.APIGEEX_TA
|
|
258
258
|
},
|
|
259
|
-
GatewayDisplay: _types.
|
|
259
|
+
GatewayDisplay: _types.SaaSGatewayTypes.APIGEEX_GATEWAY
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
// These are the items that are not exported, but need to be for testing
|
package/dist/common/types.js
CHANGED
|
@@ -229,14 +229,13 @@ let AgentNames = exports.AgentNames = /*#__PURE__*/function (AgentNames) {
|
|
|
229
229
|
let GatewayTypes = exports.GatewayTypes = /*#__PURE__*/function (GatewayTypes) {
|
|
230
230
|
GatewayTypes["EDGE_GATEWAY"] = "Amplify API Gateway";
|
|
231
231
|
GatewayTypes["AWS_GATEWAY"] = "Amazon API Gateway";
|
|
232
|
-
GatewayTypes["APIGEEX_GATEWAY"] = "Apigee X Gateway";
|
|
233
232
|
GatewayTypes["AZURE_GATEWAY"] = "Azure API Gateway";
|
|
234
233
|
GatewayTypes["GITLAB"] = "GitLab";
|
|
235
234
|
GatewayTypes["ISTIO"] = "Istio";
|
|
236
235
|
GatewayTypes["EDGE_GATEWAY_ONLY"] = "Amplify API Gateway only";
|
|
237
236
|
GatewayTypes["KAFKA"] = "Kafka";
|
|
238
237
|
return GatewayTypes;
|
|
239
|
-
}({});
|
|
238
|
+
}({});
|
|
240
239
|
let SaaSGatewayTypes = exports.SaaSGatewayTypes = /*#__PURE__*/function (SaaSGatewayTypes) {
|
|
241
240
|
SaaSGatewayTypes["AWS_GATEWAY"] = "Amazon API Gateway";
|
|
242
241
|
SaaSGatewayTypes["APIGEEX_GATEWAY"] = "Apigee X Gateway";
|
|
@@ -267,7 +266,7 @@ const GatewayTypeToDataPlane = exports.GatewayTypeToDataPlane = {
|
|
|
267
266
|
[GatewayTypes.GITLAB]: DataPlaneNames.GITLAB,
|
|
268
267
|
[GatewayTypes.AZURE_GATEWAY]: DataPlaneNames.AZURE,
|
|
269
268
|
[GatewayTypes.ISTIO]: 'Istio',
|
|
270
|
-
[
|
|
269
|
+
[SaaSGatewayTypes.APIGEEX_GATEWAY]: DataPlaneNames.APIGEE,
|
|
271
270
|
[GatewayTypes.KAFKA]: DataPlaneNames.KAFKA,
|
|
272
271
|
[SaaSGatewayTypes.SWAGGERHUB]: DataPlaneNames.SWAGGERHUB
|
|
273
272
|
};
|