@axway/axway-central-cli 3.10.0-rc.3 → 3.10.0-rc.5
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/dist/commands/install/agents.js +6 -6
- package/dist/commands/install/apigeexSaasAgents.js +20 -7
- package/dist/commands/install/helpers/index.js +2 -14
- package/dist/commands/install/helpers/regex.js +2 -1
- package/dist/commands/install/helpers/templates/{apigeexTemplates.js → sapApiPortalTemplates.js} +56 -51
- package/dist/commands/install/{apigeexAgents.js → sapApiPortalAgents.js} +84 -109
- package/dist/common/types.js +11 -21
- package/package.json +1 -1
|
@@ -15,7 +15,6 @@ var _CliConfigManager = require("../../common/CliConfigManager");
|
|
|
15
15
|
var _Renderer = _interopRequireDefault(require("../../common/Renderer"));
|
|
16
16
|
var _types = require("../../common/types");
|
|
17
17
|
var _utils = require("../../common/utils");
|
|
18
|
-
var apigeeXAgents = _interopRequireWildcard(require("./apigeexAgents"));
|
|
19
18
|
var awsAgents = _interopRequireWildcard(require("./awsAgents"));
|
|
20
19
|
var awsSaaSAgents = _interopRequireWildcard(require("./awsSaasAgents"));
|
|
21
20
|
var gitHubAgents = _interopRequireWildcard(require("./gitHubSaasAgents"));
|
|
@@ -34,6 +33,7 @@ var softwareAGWebMethodsAgent = _interopRequireWildcard(require("./softwareAGWeb
|
|
|
34
33
|
var traceableAgent = _interopRequireWildcard(require("./traceableAgents"));
|
|
35
34
|
var platform = _interopRequireWildcard(require("./platform"));
|
|
36
35
|
var backstageAgent = _interopRequireWildcard(require("./backstageAgents"));
|
|
36
|
+
var sapApiPortalAgent = _interopRequireWildcard(require("./sapApiPortalAgents"));
|
|
37
37
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
38
38
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
39
39
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -49,7 +49,6 @@ const agentInstallFlows = {
|
|
|
49
49
|
[_types.GatewayTypes.EDGE_GATEWAY]: edgeAgents.EdgeInstallMethods,
|
|
50
50
|
[_types.GatewayTypes.EDGE_GATEWAY_ONLY]: edgeAgents.EdgeGWOnlyInstallMethods,
|
|
51
51
|
[_types.GatewayTypes.AWS_GATEWAY]: awsAgents.AWSInstallMethods,
|
|
52
|
-
[_types.GatewayTypes.APIGEEX_GATEWAY]: apigeeXAgents.ApigeeXInstallMethods,
|
|
53
52
|
[_types.GatewayTypes.GITLAB]: gitLabAgents.GitLabInstallMethods,
|
|
54
53
|
[_types.GatewayTypes.AZURE_GATEWAY]: azureAgents.AzureInstallMethods,
|
|
55
54
|
[_types.GatewayTypes.AZURE_EVENTHUB]: azureAgents.AzureInstallMethods,
|
|
@@ -59,7 +58,8 @@ const agentInstallFlows = {
|
|
|
59
58
|
[_types.GatewayTypes.IBMAPICONNECT]: ibmAPIConnectAgent.IBMAPIConnectInstallMethods,
|
|
60
59
|
[_types.GatewayTypes.SOFTWAREAGWEBMETHODS]: softwareAGWebMethodsAgent.SoftwareAGWebMethodsInstallMethods,
|
|
61
60
|
[_types.GatewayTypes.TRACEABLE]: traceableAgent.TraceableInstallMethods,
|
|
62
|
-
[_types.GatewayTypes.BACKSTAGE]: backstageAgent.BackstageInstallMethods
|
|
61
|
+
[_types.GatewayTypes.BACKSTAGE]: backstageAgent.BackstageInstallMethods,
|
|
62
|
+
[_types.GatewayTypes.SAPAPIPORTAL]: sapApiPortalAgent.SAPAPIPortalInstallMethods
|
|
63
63
|
};
|
|
64
64
|
const saasAgentInstallFlows = {
|
|
65
65
|
[_types.SaaSGatewayTypes.AWS_GATEWAY]: awsSaaSAgents.AWSSaaSInstallMethods,
|
|
@@ -136,7 +136,7 @@ const agents = exports.agents = {
|
|
|
136
136
|
installConfig.centralConfig.singleEntryPointUrl = _types.SingleEntryPointUrls[installConfig.centralConfig.region];
|
|
137
137
|
let gatewayTypeChoices = [];
|
|
138
138
|
Object.values(_types.GatewayTypes).forEach(v => gatewayTypeChoices.push(v));
|
|
139
|
-
Object.values(_types.SaaSGatewayTypes).filter(v => v !== _types.SaaSGatewayTypes.AWS_GATEWAY
|
|
139
|
+
Object.values(_types.SaaSGatewayTypes).filter(v => v !== _types.SaaSGatewayTypes.AWS_GATEWAY).forEach(v => gatewayTypeChoices.push(v));
|
|
140
140
|
let gatewayChoices = gatewayTypeChoices.sort().filter(v => v !== _types.GatewayTypes.EDGE_GATEWAY_ONLY);
|
|
141
141
|
let gatewayType = await (0, _basicPrompts.askList)({
|
|
142
142
|
msg: prompts.selectGatewayType,
|
|
@@ -144,7 +144,7 @@ const agents = exports.agents = {
|
|
|
144
144
|
});
|
|
145
145
|
|
|
146
146
|
// if this check gets bigger, may think about an array of agents that can be both ground and embedded until ground agents become obsolete
|
|
147
|
-
if (gatewayType === _types.GatewayTypes.AWS_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_EVENTHUB
|
|
147
|
+
if (gatewayType === _types.GatewayTypes.AWS_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_EVENTHUB) {
|
|
148
148
|
// hosted vs on premise
|
|
149
149
|
installConfig.switches.isHostedInstall = (await (0, _basicPrompts.askList)({
|
|
150
150
|
msg: prompts.hostedAgentOption,
|
|
@@ -152,7 +152,7 @@ const agents = exports.agents = {
|
|
|
152
152
|
default: _types.YesNo.Yes
|
|
153
153
|
})) === _types.YesNo.Yes;
|
|
154
154
|
}
|
|
155
|
-
if (gatewayType === _types.SaaSGatewayTypes.GITHUB || gatewayType === _types.SaaSGatewayTypes.SWAGGERHUB) {
|
|
155
|
+
if (gatewayType === _types.SaaSGatewayTypes.APIGEEX_GATEWAY || gatewayType === _types.SaaSGatewayTypes.GITHUB || gatewayType === _types.SaaSGatewayTypes.SWAGGERHUB) {
|
|
156
156
|
installConfig.switches.isHostedInstall = true;
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -40,6 +40,14 @@ class APIGEEXDataplaneConfig extends DataplaneConfig {
|
|
|
40
40
|
this.environment = environment;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
class ApigeeMetricsFilterConfig {
|
|
44
|
+
constructor(filterMetrics, filteredAPIs) {
|
|
45
|
+
_defineProperty(this, "filterMetrics", void 0);
|
|
46
|
+
_defineProperty(this, "filteredAPIs", void 0);
|
|
47
|
+
this.filterMetrics = filterMetrics;
|
|
48
|
+
this.filteredAPIs = filteredAPIs;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
43
51
|
class SaasAgentValues {
|
|
44
52
|
constructor() {
|
|
45
53
|
_defineProperty(this, "frequencyDA", void 0);
|
|
@@ -65,20 +73,20 @@ class SaasAPIGEEXAgentValues extends SaasAgentValues {
|
|
|
65
73
|
_defineProperty(this, "mode", void 0);
|
|
66
74
|
_defineProperty(this, "metricsFilter", void 0);
|
|
67
75
|
_defineProperty(this, "environment", void 0);
|
|
68
|
-
this.authType =
|
|
76
|
+
this.authType = APIGEEXAuthType.IMP_SVC_ACC;
|
|
69
77
|
this.clientEmailAddress = '';
|
|
70
78
|
this.credentialJSON = '';
|
|
71
79
|
this.projectId = '';
|
|
72
80
|
this.developerEmailAddress = '';
|
|
73
81
|
this.mode = _types.APIGEEXDISCOVERYMODES.PROXY;
|
|
74
|
-
this.metricsFilter = new
|
|
82
|
+
this.metricsFilter = new ApigeeMetricsFilterConfig(true, []);
|
|
75
83
|
this.environment = '';
|
|
76
84
|
}
|
|
77
85
|
getAccessData() {
|
|
78
86
|
let data = JSON.stringify({
|
|
79
87
|
client_email: this.clientEmailAddress
|
|
80
88
|
});
|
|
81
|
-
if (this.authType ==
|
|
89
|
+
if (this.authType == APIGEEXAuthType.ACCESS_CREDENTIAL) {
|
|
82
90
|
data = JSON.stringify(this.credentialJSON);
|
|
83
91
|
}
|
|
84
92
|
return data;
|
|
@@ -88,7 +96,12 @@ class SaasAPIGEEXAgentValues extends SaasAgentValues {
|
|
|
88
96
|
// ConfigFiles - all the config file that are used in the setup
|
|
89
97
|
const ConfigFiles = {};
|
|
90
98
|
|
|
91
|
-
//
|
|
99
|
+
// APIGEEXAuthType - how the agent will authenticate to APIGEEX
|
|
100
|
+
var APIGEEXAuthType = /*#__PURE__*/function (APIGEEXAuthType) {
|
|
101
|
+
APIGEEXAuthType["IMP_SVC_ACC"] = "Impersonate Service Account";
|
|
102
|
+
APIGEEXAuthType["ACCESS_CREDENTIAL"] = "Access Credential";
|
|
103
|
+
return APIGEEXAuthType;
|
|
104
|
+
}(APIGEEXAuthType || {}); // APIGEEX SaaSPrompts - all APIGEEX Saas prompts to the user for input
|
|
92
105
|
const SaasPrompts = {
|
|
93
106
|
AUTHENTICATION_TYPE: 'Authenticate with an Impersonation of a Service Account or by providing a Credential File',
|
|
94
107
|
PROJECT_ID: 'Enter the APIGEE X Project ID the agent will use',
|
|
@@ -128,9 +141,9 @@ const askForAPIGEEXCredentials = async hostedAgentValues => {
|
|
|
128
141
|
defaultValue: hostedAgentValues.developerEmailAddress !== '' ? hostedAgentValues.developerEmailAddress : undefined,
|
|
129
142
|
allowEmptyInput: true
|
|
130
143
|
});
|
|
131
|
-
hostedAgentValues.authType =
|
|
144
|
+
hostedAgentValues.authType = APIGEEXAuthType.IMP_SVC_ACC;
|
|
132
145
|
console.log(_chalk.default.gray("Please refer to docs.axway.com for information on creating the necessary APIGEE X IAM policies"));
|
|
133
|
-
if (hostedAgentValues.authType ===
|
|
146
|
+
if (hostedAgentValues.authType === APIGEEXAuthType.IMP_SVC_ACC) {
|
|
134
147
|
log("using impersonate service account authentication");
|
|
135
148
|
// get client email address
|
|
136
149
|
hostedAgentValues.clientEmailAddress = await (0, _basicPrompts.askInput)({
|
|
@@ -295,7 +308,7 @@ const APIGEEXSaaSInstallMethods = exports.APIGEEXSaaSInstallMethods = {
|
|
|
295
308
|
const testables = exports.testables = {
|
|
296
309
|
SaasAgentValues,
|
|
297
310
|
SaasAPIGEEXAgentValues,
|
|
298
|
-
APIGEEXAuthType
|
|
311
|
+
APIGEEXAuthType,
|
|
299
312
|
SaasPrompts,
|
|
300
313
|
ConfigFiles
|
|
301
314
|
};
|
|
@@ -80,18 +80,6 @@ Object.keys(_regex).forEach(function (key) {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
|
-
var _apigeexTemplates = require("./templates/apigeexTemplates");
|
|
84
|
-
Object.keys(_apigeexTemplates).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
87
|
-
if (key in exports && exports[key] === _apigeexTemplates[key]) return;
|
|
88
|
-
Object.defineProperty(exports, key, {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
get: function () {
|
|
91
|
-
return _apigeexTemplates[key];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
83
|
var _awsTemplates = require("./templates/awsTemplates");
|
|
96
84
|
Object.keys(_awsTemplates).forEach(function (key) {
|
|
97
85
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -251,7 +239,6 @@ const configFiles = exports.configFiles = {
|
|
|
251
239
|
};
|
|
252
240
|
const agentsDocsUrl = exports.agentsDocsUrl = {
|
|
253
241
|
V7: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_api_manager/index.html',
|
|
254
|
-
APIGEEX: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_apigeex_gateway/index.html',
|
|
255
242
|
AWS: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_aws_gateway/index.html',
|
|
256
243
|
AZURE: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connect_azure_gateway/index.html',
|
|
257
244
|
ISTIO: 'https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/mesh_management/index.html',
|
|
@@ -259,7 +246,8 @@ const agentsDocsUrl = exports.agentsDocsUrl = {
|
|
|
259
246
|
IBMAPICONNECT: '',
|
|
260
247
|
SOFTWAREAGWEBMETHODS: '',
|
|
261
248
|
TRACEABLE: '',
|
|
262
|
-
BACKSTAGE: ''
|
|
249
|
+
BACKSTAGE: '',
|
|
250
|
+
SAPAPIPORTAL: ''
|
|
263
251
|
};
|
|
264
252
|
|
|
265
253
|
// export * from './updaters';
|
|
@@ -37,7 +37,8 @@ const AWSRegexPatterns = exports.AWSRegexPatterns = {
|
|
|
37
37
|
|
|
38
38
|
// APIGEEXRegexPatterns - regex patters to validate user inputs
|
|
39
39
|
const APIGEEXRegexPatterns = exports.APIGEEXRegexPatterns = {
|
|
40
|
-
APIGEEX_REGEXP_PROJECT_ID: '^[a-z][a-z0-9-]{4,28}[a-z0-9]$'
|
|
40
|
+
APIGEEX_REGEXP_PROJECT_ID: '^[a-z][a-z0-9-]{4,28}[a-z0-9]$',
|
|
41
|
+
AWS_REGEXP_EMAIL_ADDRESS: '^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
// AzureRegexPatterns - regex patters to validate user inputs
|
package/dist/commands/install/helpers/templates/{apigeexTemplates.js → sapApiPortalTemplates.js}
RENAMED
|
@@ -3,58 +3,59 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.sapAPIPortalTAEnvVarTemplate = exports.sapAPIPortalDAEnvVarTemplate = exports.SAPApiPortalAgentValues = void 0;
|
|
7
7
|
var _types = require("../../../../common/types");
|
|
8
8
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
/**
|
|
12
|
-
* @description Parameters to provide to the
|
|
12
|
+
* @description Parameters to provide to the SAP API Portal handlebars templates.
|
|
13
13
|
*/
|
|
14
|
-
class
|
|
14
|
+
class SAPApiPortalAgentValues {
|
|
15
15
|
constructor() {
|
|
16
|
-
_defineProperty(this, "
|
|
17
|
-
_defineProperty(this, "
|
|
18
|
-
_defineProperty(this, "
|
|
19
|
-
_defineProperty(this, "
|
|
20
|
-
_defineProperty(this, "
|
|
21
|
-
_defineProperty(this, "
|
|
16
|
+
_defineProperty(this, "authTokenURL", void 0);
|
|
17
|
+
_defineProperty(this, "authAPIPortalBaseURL", void 0);
|
|
18
|
+
_defineProperty(this, "authAPIPortalClientID", void 0);
|
|
19
|
+
_defineProperty(this, "authAPIPortalClientSecret", void 0);
|
|
20
|
+
_defineProperty(this, "authDevPortalBaseURL", void 0);
|
|
21
|
+
_defineProperty(this, "authDevPortalClientID", void 0);
|
|
22
|
+
_defineProperty(this, "authDevPortalClientSecret", void 0);
|
|
23
|
+
_defineProperty(this, "developerEmail", void 0);
|
|
24
|
+
_defineProperty(this, "specCreateUnstructuredAPI", void 0);
|
|
22
25
|
_defineProperty(this, "centralConfig", void 0);
|
|
23
26
|
_defineProperty(this, "traceabilityConfig", void 0);
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
27
|
+
this.authTokenURL = '';
|
|
28
|
+
this.authAPIPortalBaseURL = '';
|
|
29
|
+
this.authAPIPortalClientID = '';
|
|
30
|
+
this.authAPIPortalClientSecret = '';
|
|
31
|
+
this.authDevPortalBaseURL = '';
|
|
32
|
+
this.authDevPortalClientID = '';
|
|
33
|
+
this.authDevPortalClientSecret = '';
|
|
34
|
+
this.developerEmail = '';
|
|
35
|
+
this.specCreateUnstructuredAPI = false;
|
|
30
36
|
this.centralConfig = new _types.CentralAgentConfig();
|
|
31
37
|
this.traceabilityConfig = new _types.TraceabilityConfig();
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
/**
|
|
36
|
-
* @description Generates the
|
|
42
|
+
* @description Generates the SAP API Portal DA env vars file.
|
|
37
43
|
*/
|
|
38
|
-
exports.
|
|
39
|
-
const
|
|
40
|
-
return `#
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{{
|
|
48
|
-
|
|
49
|
-
{{
|
|
44
|
+
exports.SAPApiPortalAgentValues = SAPApiPortalAgentValues;
|
|
45
|
+
const sapAPIPortalDAEnvVarTemplate = () => {
|
|
46
|
+
return `# SAP API Portal configs
|
|
47
|
+
SAP_AUTH_TOKENURL={{authTokenURL}}
|
|
48
|
+
SAP_AUTH_APIPORTAL_BASEURL={{authAPIPortalBaseURL}}
|
|
49
|
+
SAP_AUTH_APIPORTAL_CLIENTID={{authAPIPortalClientID}}
|
|
50
|
+
SAP_AUTH_APIPORTAL_CLIENTSECRET={{authAPIPortalClientSecret}}
|
|
51
|
+
SAP_AUTH_DEVPORTAL_BASEURL={{authDevPortalBaseURL}}
|
|
52
|
+
SAP_AUTH_DEVPORTAL_CLIENTID={{authDevPortalClientID}}
|
|
53
|
+
SAP_AUTH_DEVPORTAL_CLIENTSECRET={{authDevPortalClientSecret}}
|
|
54
|
+
SAP_DEVELOPEREMAIL={{developerEmail}}
|
|
55
|
+
SAP_SPEC_CREATEUNSTRUCTUREDAPI={{specCreateUnstructuredAPI}}
|
|
50
56
|
|
|
51
57
|
# Amplify Central configs
|
|
52
|
-
{{
|
|
53
|
-
CENTRAL_USAGEREPORTING_OFFLINE={{traceabilityConfig.usageReportingOffline}}
|
|
54
|
-
CENTRAL_ENVIRONMENTID={{centralConfig.environmentId}}
|
|
55
|
-
CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
|
|
56
|
-
{{else}}
|
|
57
|
-
CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
|
|
58
|
+
CENTRAL_AGENTNAME={{centralConfig.daAgentName}}
|
|
58
59
|
CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
|
|
59
60
|
CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
|
|
60
61
|
CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
|
|
@@ -63,12 +64,6 @@ CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
|
|
|
63
64
|
CENTRAL_TEAM={{centralConfig.ampcTeamName}}
|
|
64
65
|
CENTRAL_REGION={{centralConfig.region}}
|
|
65
66
|
|
|
66
|
-
{{#compare . traceabilityConfig.protocol "https"}}
|
|
67
|
-
TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
|
|
68
|
-
{{/compare}}
|
|
69
|
-
TRACEABILITY_SAMPLING_PERCENTAGE={{traceabilityConfig.samplingPercentage}}
|
|
70
|
-
{{/if}}
|
|
71
|
-
|
|
72
67
|
# Logging configs
|
|
73
68
|
# Define the logging level: info, debug, error
|
|
74
69
|
LOG_LEVEL=info
|
|
@@ -80,19 +75,23 @@ LOG_FILE_PATH=logs
|
|
|
80
75
|
};
|
|
81
76
|
|
|
82
77
|
/**
|
|
83
|
-
* @description Generates the
|
|
78
|
+
* @description Generates the SAP API Portal TA env vars file.
|
|
84
79
|
*/
|
|
85
|
-
exports.
|
|
86
|
-
const
|
|
87
|
-
return `#
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
APIGEE_AUTHFILEPATH=/keys/{{filePath}}
|
|
80
|
+
exports.sapAPIPortalDAEnvVarTemplate = sapAPIPortalDAEnvVarTemplate;
|
|
81
|
+
const sapAPIPortalTAEnvVarTemplate = () => {
|
|
82
|
+
return `# SAP API Portal configs
|
|
83
|
+
SAP_AUTH_TOKENURL={{authTokenURL}}
|
|
84
|
+
SAP_AUTH_APIPORTAL_BASEURL={{authAPIPortalBaseURL}}
|
|
85
|
+
SAP_AUTH_APIPORTAL_CLIENTID={{authAPIPortalClientID}}
|
|
86
|
+
SAP_AUTH_APIPORTAL_CLIENTSECRET={{authAPIPortalClientSecret}}
|
|
93
87
|
|
|
94
88
|
# Amplify Central configs
|
|
95
|
-
|
|
89
|
+
{{#if traceabilityConfig.usageReportingOffline}}
|
|
90
|
+
CENTRAL_USAGEREPORTING_OFFLINE={{traceabilityConfig.usageReportingOffline}}
|
|
91
|
+
CENTRAL_ENVIRONMENTID={{centralConfig.environmentId}}
|
|
92
|
+
CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
|
|
93
|
+
{{else}}
|
|
94
|
+
CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
|
|
96
95
|
CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
|
|
97
96
|
CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
|
|
98
97
|
CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
|
|
@@ -101,6 +100,12 @@ CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
|
|
|
101
100
|
CENTRAL_TEAM={{centralConfig.ampcTeamName}}
|
|
102
101
|
CENTRAL_REGION={{centralConfig.region}}
|
|
103
102
|
|
|
103
|
+
{{#compare . traceabilityConfig.protocol "https"}}
|
|
104
|
+
TRACEABILITY_PROTOCOL={{traceabilityConfig.protocol}}
|
|
105
|
+
{{/compare}}
|
|
106
|
+
TRACEABILITY_SAMPLING_PERCENTAGE={{traceabilityConfig.samplingPercentage}}
|
|
107
|
+
{{/if}}
|
|
108
|
+
|
|
104
109
|
# Logging configs
|
|
105
110
|
# Define the logging level: info, debug, error
|
|
106
111
|
LOG_LEVEL=info
|
|
@@ -110,4 +115,4 @@ LOG_OUTPUT=stdout
|
|
|
110
115
|
LOG_FILE_PATH=logs
|
|
111
116
|
`;
|
|
112
117
|
};
|
|
113
|
-
exports.
|
|
118
|
+
exports.sapAPIPortalTAEnvVarTemplate = sapAPIPortalTAEnvVarTemplate;
|
|
@@ -3,61 +3,53 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.testables = exports.gatewayConnectivity = exports.defaultLogFiles = exports.completeInstall = exports.askConfigType = exports.askBundleType = exports.
|
|
6
|
+
exports.testables = exports.gatewayConnectivity = exports.defaultLogFiles = exports.completeInstall = exports.askConfigType = exports.askBundleType = exports.SAPAPIPortalInstallMethods = exports.ConfigFiles = void 0;
|
|
7
7
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
8
|
var _snooplogg = _interopRequireDefault(require("snooplogg"));
|
|
9
9
|
var _basicPrompts = require("../../common/basicPrompts");
|
|
10
10
|
var _types = require("../../common/types");
|
|
11
11
|
var _utils = require("../../common/utils");
|
|
12
12
|
var helpers = _interopRequireWildcard(require("./helpers"));
|
|
13
|
-
var
|
|
13
|
+
var _sapApiPortalTemplates = require("./helpers/templates/sapApiPortalTemplates");
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
const {
|
|
19
19
|
log
|
|
20
|
-
} = (0, _snooplogg.default)('central: install: agents:
|
|
21
|
-
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.
|
|
22
|
-
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.
|
|
20
|
+
} = (0, _snooplogg.default)('central: install: agents: SAP API Portal');
|
|
21
|
+
const daImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SAPAPIPORTAL_DA}`;
|
|
22
|
+
const taImage = `${_types.PublicDockerRepoBaseUrl}${_types.BasePaths.DockerAgentPublicRepo}/${_types.AgentNames.SAPAPIPORTAL_TA}`;
|
|
23
23
|
const defaultLogFiles = exports.defaultLogFiles = '/group-*_instance-*.log';
|
|
24
24
|
|
|
25
25
|
// ConfigFiles - all the config file that are used in the setup
|
|
26
26
|
const ConfigFiles = exports.ConfigFiles = {
|
|
27
27
|
DAEnvVars: `${helpers.configFiles.DA_ENV_VARS}`,
|
|
28
28
|
TAEnvVars: `${helpers.configFiles.TA_ENV_VARS}`,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
SAPAPIPortalDABinaryFile: 'discovery_agent',
|
|
30
|
+
SAPAPIPortalDAYaml: 'discovery_agent.yml',
|
|
31
|
+
SAPAPIPortalTABinaryFile: 'traceability_agent',
|
|
32
|
+
SAPAPIPortalTAYaml: 'traceability_agent.yml'
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
FILTERED_APIS: 'Enter APIs to filter metrics for',
|
|
48
|
-
ENTER_MORE_APIS: 'Do you want to add another API?',
|
|
49
|
-
ENVIRONMENT: 'Enter the Apigee Envirnoment to filter discovered APIs/metrics'
|
|
35
|
+
// SAPAPIPortalPrompts - prompts for user inputs
|
|
36
|
+
const SAPAPIPortalPrompts = {
|
|
37
|
+
configTypeMsg: 'Select the mode of installation',
|
|
38
|
+
enterAuthTokenURL: 'Enter the token URL used for agent authentication to SAP',
|
|
39
|
+
enterAuthAPIPortalBaseURL: 'Enter the SAP API Portal baseURL',
|
|
40
|
+
enterAuthAPIPortalClientID: 'Enter the SAP API Portal ClientID',
|
|
41
|
+
enterAuthAPIPortalClientSecret: 'Enter the SAP API Portal ClientSecret',
|
|
42
|
+
enterAuthDevPortalBaseURL: 'Enter the SAP Dev Portal baseURL',
|
|
43
|
+
enterAuthDevPortalClientID: 'Enter the SAP Dev Portal ClientID',
|
|
44
|
+
enterAuthDevPortalClientSecret: 'Enter the SAP Dev Portal ClientSecret',
|
|
45
|
+
enterDeveloperEmail: 'Enter the SAP developer email',
|
|
46
|
+
selectSpecCreateUnstructuredAPI: 'Select whether to create unstructured APIs for invalid/unknown API specs'
|
|
50
47
|
};
|
|
51
|
-
const askBundleType = async
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
choices: [_types.BundleType.ALL_AGENTS, _types.BundleType.DISCOVERY]
|
|
57
|
-
});
|
|
58
|
-
} else {
|
|
59
|
-
return _types.BundleType.DISCOVERY;
|
|
60
|
-
}
|
|
48
|
+
const askBundleType = async () => {
|
|
49
|
+
return await (0, _basicPrompts.askList)({
|
|
50
|
+
msg: helpers.agentMessages.selectAgentType,
|
|
51
|
+
choices: [_types.BundleType.ALL_AGENTS, _types.BundleType.DISCOVERY, _types.BundleType.TRACEABILITY]
|
|
52
|
+
});
|
|
61
53
|
};
|
|
62
54
|
exports.askBundleType = askBundleType;
|
|
63
55
|
const askConfigType = async () => {
|
|
@@ -65,66 +57,50 @@ const askConfigType = async () => {
|
|
|
65
57
|
};
|
|
66
58
|
|
|
67
59
|
//
|
|
68
|
-
// Questions for the configuration of
|
|
60
|
+
// Questions for the configuration of IBM API Connect agents
|
|
69
61
|
//
|
|
70
62
|
exports.askConfigType = askConfigType;
|
|
71
|
-
const
|
|
72
|
-
msg:
|
|
73
|
-
validate: (0, _basicPrompts.validateRegex)(helpers.APIGEEXRegexPatterns.APIGEEX_REGEXP_PROJECT_ID, helpers.invalidValueExampleErrMsg('Project ID', 'rd-amplify-apigee-x'))
|
|
63
|
+
const askAuthTokenURL = async () => await (0, _basicPrompts.askInput)({
|
|
64
|
+
msg: SAPAPIPortalPrompts.enterAuthTokenURL
|
|
74
65
|
});
|
|
75
|
-
const
|
|
76
|
-
msg:
|
|
66
|
+
const askAuthAPIPortalBaseURL = async () => await (0, _basicPrompts.askInput)({
|
|
67
|
+
msg: SAPAPIPortalPrompts.enterAuthAPIPortalBaseURL
|
|
77
68
|
});
|
|
78
|
-
const
|
|
79
|
-
msg:
|
|
69
|
+
const askAuthAPIPortalClientID = async () => await (0, _basicPrompts.askInput)({
|
|
70
|
+
msg: SAPAPIPortalPrompts.enterAuthAPIPortalClientID
|
|
80
71
|
});
|
|
81
|
-
const
|
|
82
|
-
msg:
|
|
83
|
-
defaultValue: '',
|
|
84
|
-
allowEmptyInput: true
|
|
72
|
+
const askAuthAPIPortalClientSecret = async () => await (0, _basicPrompts.askInput)({
|
|
73
|
+
msg: SAPAPIPortalPrompts.enterAuthAPIPortalClientSecret
|
|
85
74
|
});
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
msg: ApigeeXPrompts.ENTER_MORE_APIS,
|
|
104
|
-
default: _types.YesNo.No,
|
|
105
|
-
choices: _types.YesNoChoices
|
|
106
|
-
})) === _types.YesNo.Yes;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return new _types.ApigeeMetricsFilterConfig(filterMetricsEnabled, filteredAPIs);
|
|
110
|
-
};
|
|
75
|
+
const askAuthDevPortalBaseURL = async () => await (0, _basicPrompts.askInput)({
|
|
76
|
+
msg: SAPAPIPortalPrompts.enterAuthDevPortalBaseURL
|
|
77
|
+
});
|
|
78
|
+
const askAuthDevPortalClientID = async () => await (0, _basicPrompts.askInput)({
|
|
79
|
+
msg: SAPAPIPortalPrompts.enterAuthDevPortalClientID
|
|
80
|
+
});
|
|
81
|
+
const askAuthDevPortalClientSecret = async () => await (0, _basicPrompts.askInput)({
|
|
82
|
+
msg: SAPAPIPortalPrompts.enterAuthDevPortalClientSecret
|
|
83
|
+
});
|
|
84
|
+
const askDeveloperEmail = async () => await (0, _basicPrompts.askInput)({
|
|
85
|
+
msg: SAPAPIPortalPrompts.enterDeveloperEmail
|
|
86
|
+
});
|
|
87
|
+
const askSpecCreateUnstructuredAPI = async () => (await (0, _basicPrompts.askList)({
|
|
88
|
+
msg: SAPAPIPortalPrompts.selectSpecCreateUnstructuredAPI,
|
|
89
|
+
default: _types.YesNo.No,
|
|
90
|
+
choices: _types.YesNoChoices
|
|
91
|
+
})) === _types.YesNo.Yes;
|
|
111
92
|
const gatewayConnectivity = async installConfig => {
|
|
112
|
-
const
|
|
113
|
-
console.log('\nCONNECTION TO
|
|
114
|
-
console.log(_chalk.default.gray(`The discovery agent needs to connect to the
|
|
93
|
+
const agentValues = new _sapApiPortalTemplates.SAPApiPortalAgentValues();
|
|
94
|
+
console.log('\nCONNECTION TO IBM API Connect:');
|
|
95
|
+
console.log(_chalk.default.gray(`The discovery agent needs to connect to the IBM API Connect Gateway to discover API's for publishing to Amplify.\nThe traceability agent needs to connect to IBM API Connect for collecting APIs transactions. These will be forwarded to the Business Insights.\n`));
|
|
96
|
+
await askCommonPrompts(agentValues);
|
|
115
97
|
|
|
116
|
-
//
|
|
98
|
+
// SAP API Portal Discovery Agent Prompts
|
|
117
99
|
if (installConfig.switches.isDaEnabled) {
|
|
118
100
|
console.log(_chalk.default.gray(`\nDiscovery Agent Configuration\n`));
|
|
119
|
-
await askDiscoveryPrompts(
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Apigee X Traceability Agent Prompts
|
|
123
|
-
if (installConfig.switches.isTaEnabled) {
|
|
124
|
-
console.log(_chalk.default.gray(`\nTraceability Agent Configuration\n`));
|
|
125
|
-
await askTraceabilityPrompts(apigeeXAgentValues);
|
|
101
|
+
await askDiscoveryPrompts(agentValues);
|
|
126
102
|
}
|
|
127
|
-
return
|
|
103
|
+
return agentValues;
|
|
128
104
|
};
|
|
129
105
|
exports.gatewayConnectivity = gatewayConnectivity;
|
|
130
106
|
const generateSuccessHelpMsg = installConfig => {
|
|
@@ -132,7 +108,7 @@ const generateSuccessHelpMsg = installConfig => {
|
|
|
132
108
|
console.log(_chalk.default.yellow('\nPlease make sure to copy the "private_key.pem" and "public_key.pem" files for the existing service account you selected.'));
|
|
133
109
|
}
|
|
134
110
|
dockerSuccessMsg(installConfig);
|
|
135
|
-
console.log(_chalk.default.gray(`\nAdditional information about agent features can be found here:\n${helpers.agentsDocsUrl.
|
|
111
|
+
console.log(_chalk.default.gray(`\nAdditional information about agent features can be found here:\n${helpers.agentsDocsUrl.SAPAPIPORTAL}`));
|
|
136
112
|
};
|
|
137
113
|
const dockerSuccessMsg = installConfig => {
|
|
138
114
|
let dockerInfo;
|
|
@@ -169,56 +145,55 @@ const dockerSuccessMsg = installConfig => {
|
|
|
169
145
|
console.log('\t', _chalk.default.cyan(`-v /data ${taImageVersion}`), '\n');
|
|
170
146
|
}
|
|
171
147
|
};
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// Apigee X Developer Email Address
|
|
178
|
-
apigeeXAgentValues.developerEmailAddress = await askApigeeXDeveloperEmailAddress();
|
|
179
|
-
// Apigee X Auth File Path
|
|
180
|
-
apigeeXAgentValues.fileName = await askApigeeXAuthFileName();
|
|
181
|
-
// Apigee X Environment
|
|
182
|
-
apigeeXAgentValues.environment = await askApigeeXEnvironment();
|
|
148
|
+
async function askCommonPrompts(agentValues) {
|
|
149
|
+
agentValues.authTokenURL = await askAuthTokenURL();
|
|
150
|
+
agentValues.authAPIPortalBaseURL = await askAuthAPIPortalBaseURL();
|
|
151
|
+
agentValues.authAPIPortalClientID = await askAuthAPIPortalClientID();
|
|
152
|
+
agentValues.authAPIPortalClientSecret = await askAuthAPIPortalClientSecret();
|
|
183
153
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
154
|
+
|
|
155
|
+
// IBM API Connect DA prompts
|
|
156
|
+
async function askDiscoveryPrompts(agentValues) {
|
|
157
|
+
agentValues.authDevPortalBaseURL = await askAuthDevPortalBaseURL();
|
|
158
|
+
agentValues.authDevPortalClientID = await askAuthDevPortalClientID();
|
|
159
|
+
agentValues.authDevPortalClientSecret = await askAuthDevPortalClientSecret();
|
|
160
|
+
agentValues.developerEmail = await askDeveloperEmail();
|
|
161
|
+
agentValues.specCreateUnstructuredAPI = await askSpecCreateUnstructuredAPI();
|
|
187
162
|
}
|
|
188
163
|
const completeInstall = async installConfig => {
|
|
189
164
|
/**
|
|
190
165
|
* Create agent resources
|
|
191
166
|
*/
|
|
192
|
-
const
|
|
167
|
+
const agentValues = installConfig.gatewayConfig;
|
|
193
168
|
|
|
194
|
-
// Add final settings to
|
|
195
|
-
|
|
196
|
-
|
|
169
|
+
// Add final settings to SAP API Portal agentValues
|
|
170
|
+
agentValues.centralConfig = installConfig.centralConfig;
|
|
171
|
+
agentValues.traceabilityConfig = installConfig.traceabilityConfig;
|
|
197
172
|
console.log('Generating the configuration file(s)...');
|
|
198
173
|
if (installConfig.switches.isDaEnabled) {
|
|
199
|
-
(0, _utils.writeTemplates)(ConfigFiles.DAEnvVars,
|
|
174
|
+
(0, _utils.writeTemplates)(ConfigFiles.DAEnvVars, agentValues, _sapApiPortalTemplates.sapAPIPortalDAEnvVarTemplate);
|
|
200
175
|
}
|
|
201
176
|
if (installConfig.switches.isTaEnabled) {
|
|
202
|
-
(0, _utils.writeTemplates)(ConfigFiles.TAEnvVars,
|
|
177
|
+
(0, _utils.writeTemplates)(ConfigFiles.TAEnvVars, agentValues, _sapApiPortalTemplates.sapAPIPortalTAEnvVarTemplate);
|
|
203
178
|
}
|
|
204
179
|
console.log('Configuration file(s) have been successfully created.\n');
|
|
205
180
|
generateSuccessHelpMsg(installConfig);
|
|
206
181
|
};
|
|
207
182
|
exports.completeInstall = completeInstall;
|
|
208
|
-
const
|
|
183
|
+
const SAPAPIPortalInstallMethods = exports.SAPAPIPortalInstallMethods = {
|
|
209
184
|
GetBundleType: askBundleType,
|
|
210
185
|
GetDeploymentType: askConfigType,
|
|
211
186
|
AskGatewayQuestions: gatewayConnectivity,
|
|
212
187
|
FinalizeGatewayInstall: completeInstall,
|
|
213
188
|
ConfigFiles: Object.values(ConfigFiles),
|
|
214
189
|
AgentNameMap: {
|
|
215
|
-
[_types.AgentTypes.da]: _types.AgentNames.
|
|
216
|
-
[_types.AgentTypes.ta]: _types.AgentNames.
|
|
190
|
+
[_types.AgentTypes.da]: _types.AgentNames.SAPAPIPORTAL_DA,
|
|
191
|
+
[_types.AgentTypes.ta]: _types.AgentNames.SAPAPIPORTAL_TA
|
|
217
192
|
},
|
|
218
|
-
GatewayDisplay: _types.GatewayTypes.
|
|
193
|
+
GatewayDisplay: _types.GatewayTypes.SAPAPIPORTAL
|
|
219
194
|
};
|
|
220
195
|
const testables = exports.testables = {
|
|
221
|
-
|
|
196
|
+
SAPAPIPortalPrompts,
|
|
222
197
|
ConfigFiles,
|
|
223
198
|
defaultLogFiles
|
|
224
199
|
};
|
package/dist/common/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.docsUrl = exports.commonCmdArgsDescription = exports.cliVersionHeader = exports.YesNoChoices = exports.YesNo = exports.WAIT_TIMEOUT = exports.TrueFalseChoices = exports.TrueFalse = exports.TraceableRegionType = exports.TraceabilityConfig = exports.SingleEntryPointUrls = exports.SaaSGatewayTypes = exports.Regions = exports.PublicRepoUrl = exports.PublicDockerRepoBaseUrl = exports.Protocol = exports.ProdBaseUrls = exports.Platforms = exports.OutputTypes = exports.MAX_TABLE_STRING_LENGTH = exports.MAX_FILE_SIZE = exports.MAX_CACHE_FILE_SIZE = exports.LoggingSource = exports.LanguageTypes = exports.KindTypes = exports.Kind = exports.IstioProfileChoices = exports.IstioInstallValues = exports.IstioAgentValues = exports.IngestionProtocolToHosts = exports.IngestionProtocol = exports.IngestionHostsHTTP = exports.IngestionHosts = exports.IngestionHTTPHosts = exports.IDPType = exports.IDPConfiguration = exports.IDPClientSecretAuthMethod = exports.IDPAuthType = exports.IDPAuthConfiguration = exports.IDPAuthClientSecret = exports.IDPAuthAccessToken = exports.GatewayTypes = exports.GatewayTypeToDataPlane = exports.GatewayMode = exports.EnvironmentConfigInfo = exports.DosaAccount = exports.DataPlaneNames = exports.DOSAConfigInfo = exports.ConfigTypes = exports.CloudFormationConfig = exports.Certificate = exports.CentralAgentConfig = exports.CACHE_FILE_TTL_MILLISECONDS = exports.BundleType = exports.BasePaths = exports.AzureDataplaneMode = exports.AuthUrls = exports.
|
|
6
|
+
exports.docsUrl = exports.commonCmdArgsDescription = exports.cliVersionHeader = exports.YesNoChoices = exports.YesNo = exports.WAIT_TIMEOUT = exports.TrueFalseChoices = exports.TrueFalse = exports.TraceableRegionType = exports.TraceabilityConfig = exports.SingleEntryPointUrls = exports.SaaSGatewayTypes = exports.Regions = exports.PublicRepoUrl = exports.PublicDockerRepoBaseUrl = exports.Protocol = exports.ProdBaseUrls = exports.Platforms = exports.OutputTypes = exports.MAX_TABLE_STRING_LENGTH = exports.MAX_FILE_SIZE = exports.MAX_CACHE_FILE_SIZE = exports.LoggingSource = exports.LanguageTypes = exports.KindTypes = exports.Kind = exports.IstioProfileChoices = exports.IstioInstallValues = exports.IstioAgentValues = exports.IngestionProtocolToHosts = exports.IngestionProtocol = exports.IngestionHostsHTTP = exports.IngestionHosts = exports.IngestionHTTPHosts = exports.IDPType = exports.IDPConfiguration = exports.IDPClientSecretAuthMethod = exports.IDPAuthType = exports.IDPAuthConfiguration = exports.IDPAuthClientSecret = exports.IDPAuthAccessToken = exports.GatewayTypes = exports.GatewayTypeToDataPlane = exports.GatewayMode = exports.EnvironmentConfigInfo = exports.DosaAccount = exports.DataPlaneNames = exports.DOSAConfigInfo = exports.ConfigTypes = exports.CloudFormationConfig = exports.Certificate = exports.CentralAgentConfig = exports.CACHE_FILE_TTL_MILLISECONDS = exports.BundleType = exports.BasePaths = exports.AzureDataplaneMode = exports.AuthUrls = exports.AgentTypes = exports.AgentResourceKind = exports.AgentNames = exports.AgentInstallSwitches = exports.AgentInstallConfig = exports.AgentConfigTypes = exports.AWSRegions = exports.APIGEEXDISCOVERYMODES = exports.APICDeployments = exports.ABORT_TIMEOUT = void 0;
|
|
7
7
|
var _dataService = require("./dataService");
|
|
8
8
|
var _utils = require("./utils");
|
|
9
9
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -237,14 +237,15 @@ let AgentNames = exports.AgentNames = /*#__PURE__*/function (AgentNames) {
|
|
|
237
237
|
AgentNames["IBMAPICONNECT_DA"] = "ibm-apiconnect-discovery-agent";
|
|
238
238
|
AgentNames["IBMAPICONNECT_TA"] = "ibm-apiconnect-traceability-agent";
|
|
239
239
|
AgentNames["TRACEABLE_TA"] = "traceable-agent";
|
|
240
|
-
AgentNames["SOFTWAREAGWEBMETHODS_DA"] = "software-ag-
|
|
241
|
-
AgentNames["SOFTWAREAGWEBMETHODS_TA"] = "software-ag-
|
|
240
|
+
AgentNames["SOFTWAREAGWEBMETHODS_DA"] = "software-ag-webmethods-discovery-agent";
|
|
241
|
+
AgentNames["SOFTWAREAGWEBMETHODS_TA"] = "software-ag-webmethods-traceability-agent";
|
|
242
242
|
AgentNames["BACKSTAGE_DA"] = "backstage-discovery-agent";
|
|
243
|
+
AgentNames["SAPAPIPORTAL_DA"] = "sap-discovery-agent";
|
|
244
|
+
AgentNames["SAPAPIPORTAL_TA"] = "sap-traceability-agent";
|
|
243
245
|
return AgentNames;
|
|
244
246
|
}({});
|
|
245
247
|
let GatewayTypes = exports.GatewayTypes = /*#__PURE__*/function (GatewayTypes) {
|
|
246
248
|
GatewayTypes["EDGE_GATEWAY"] = "Amplify API Gateway";
|
|
247
|
-
GatewayTypes["APIGEEX_GATEWAY"] = "Apigee X Gateway";
|
|
248
249
|
GatewayTypes["AWS_GATEWAY"] = "Amazon API Gateway";
|
|
249
250
|
GatewayTypes["AZURE_GATEWAY"] = "Azure API Gateway";
|
|
250
251
|
GatewayTypes["AZURE_EVENTHUB"] = "Azure EventHub";
|
|
@@ -257,6 +258,7 @@ let GatewayTypes = exports.GatewayTypes = /*#__PURE__*/function (GatewayTypes) {
|
|
|
257
258
|
GatewayTypes["SOFTWAREAGWEBMETHODS"] = "Software AG WebMethods";
|
|
258
259
|
GatewayTypes["TRACEABLE"] = "Traceable";
|
|
259
260
|
GatewayTypes["BACKSTAGE"] = "Backstage";
|
|
261
|
+
GatewayTypes["SAPAPIPORTAL"] = "SAP API Portal";
|
|
260
262
|
return GatewayTypes;
|
|
261
263
|
}({});
|
|
262
264
|
let SaaSGatewayTypes = exports.SaaSGatewayTypes = /*#__PURE__*/function (SaaSGatewayTypes) {
|
|
@@ -282,26 +284,28 @@ let DataPlaneNames = exports.DataPlaneNames = /*#__PURE__*/function (DataPlaneNa
|
|
|
282
284
|
DataPlaneNames["TRACEABLE"] = "Traceable";
|
|
283
285
|
DataPlaneNames["MULESOFT"] = "Mulesoft";
|
|
284
286
|
DataPlaneNames["BACKSTAGE"] = "Backstage";
|
|
287
|
+
DataPlaneNames["SAPAPIPORTAL"] = "SAP API Portal";
|
|
285
288
|
DataPlaneNames["OTHER"] = "Unidentified";
|
|
286
289
|
return DataPlaneNames;
|
|
287
290
|
}({});
|
|
288
291
|
const GatewayTypeToDataPlane = exports.GatewayTypeToDataPlane = {
|
|
289
292
|
[GatewayTypes.EDGE_GATEWAY]: DataPlaneNames.EDGE,
|
|
290
293
|
[GatewayTypes.EDGE_GATEWAY_ONLY]: DataPlaneNames.EDGE,
|
|
291
|
-
[GatewayTypes.APIGEEX_GATEWAY]: DataPlaneNames.APIGEE,
|
|
292
294
|
[GatewayTypes.AWS_GATEWAY]: DataPlaneNames.AWS,
|
|
293
295
|
[SaaSGatewayTypes.GITHUB]: DataPlaneNames.GITHUB,
|
|
294
296
|
[GatewayTypes.GITLAB]: DataPlaneNames.GITLAB,
|
|
295
297
|
[GatewayTypes.AZURE_GATEWAY]: DataPlaneNames.AZURE,
|
|
296
298
|
[GatewayTypes.AZURE_EVENTHUB]: DataPlaneNames.AZURE,
|
|
297
299
|
[GatewayTypes.ISTIO]: 'Istio',
|
|
300
|
+
[SaaSGatewayTypes.APIGEEX_GATEWAY]: DataPlaneNames.APIGEE,
|
|
298
301
|
[GatewayTypes.KAFKA]: DataPlaneNames.KAFKA,
|
|
299
302
|
[GatewayTypes.SOFTWAREAGWEBMETHODS]: DataPlaneNames.SOFTWAREAGWEBMETHODS,
|
|
300
303
|
[SaaSGatewayTypes.SWAGGERHUB]: DataPlaneNames.SWAGGERHUB,
|
|
301
304
|
[GatewayTypes.GRAYLOG]: DataPlaneNames.GRAYLOG,
|
|
302
305
|
[GatewayTypes.IBMAPICONNECT]: DataPlaneNames.IBMAPICONNECT,
|
|
303
306
|
[GatewayTypes.TRACEABLE]: DataPlaneNames.TRACEABLE,
|
|
304
|
-
[GatewayTypes.BACKSTAGE]: DataPlaneNames.BACKSTAGE
|
|
307
|
+
[GatewayTypes.BACKSTAGE]: DataPlaneNames.BACKSTAGE,
|
|
308
|
+
[GatewayTypes.SAPAPIPORTAL]: DataPlaneNames.SAPAPIPORTAL
|
|
305
309
|
};
|
|
306
310
|
let AgentResourceKind = exports.AgentResourceKind = /*#__PURE__*/function (AgentResourceKind) {
|
|
307
311
|
AgentResourceKind["da"] = "DiscoveryAgent";
|
|
@@ -761,18 +765,4 @@ let TraceableRegionType = exports.TraceableRegionType = /*#__PURE__*/function (T
|
|
|
761
765
|
TraceableRegionType["EU"] = "EU";
|
|
762
766
|
TraceableRegionType["AP"] = "AP";
|
|
763
767
|
return TraceableRegionType;
|
|
764
|
-
}({});
|
|
765
|
-
let APIGEEXAuthType = exports.APIGEEXAuthType = /*#__PURE__*/function (APIGEEXAuthType) {
|
|
766
|
-
APIGEEXAuthType["IMP_SVC_ACC"] = "Impersonate Service Account";
|
|
767
|
-
APIGEEXAuthType["ACCESS_CREDENTIAL"] = "Access Credential";
|
|
768
|
-
return APIGEEXAuthType;
|
|
769
|
-
}({});
|
|
770
|
-
class ApigeeMetricsFilterConfig {
|
|
771
|
-
constructor(filterMetrics, filteredAPIs) {
|
|
772
|
-
_defineProperty(this, "filterMetrics", void 0);
|
|
773
|
-
_defineProperty(this, "filteredAPIs", void 0);
|
|
774
|
-
this.filterMetrics = filterMetrics;
|
|
775
|
-
this.filteredAPIs = filteredAPIs;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
exports.ApigeeMetricsFilterConfig = ApigeeMetricsFilterConfig;
|
|
768
|
+
}({});
|