@axway/axway-central-cli 4.5.0 → 4.6.0-rc.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.
Files changed (83) hide show
  1. package/.security-profile-branches.json +18 -0
  2. package/package.json +1 -1
  3. package/dist/cli.js +0 -71
  4. package/dist/commands/apply/index.js +0 -112
  5. package/dist/commands/completion/index.js +0 -100
  6. package/dist/commands/config/common/index.js +0 -28
  7. package/dist/commands/config/index.js +0 -20
  8. package/dist/commands/config/list.js +0 -24
  9. package/dist/commands/config/set.js +0 -102
  10. package/dist/commands/config/unset.js +0 -48
  11. package/dist/commands/create/agentResource.js +0 -108
  12. package/dist/commands/create/environment.js +0 -62
  13. package/dist/commands/create/index.js +0 -109
  14. package/dist/commands/create/serviceAccount.js +0 -15
  15. package/dist/commands/delete/index.js +0 -196
  16. package/dist/commands/edit/environment.js +0 -101
  17. package/dist/commands/edit/index.js +0 -28
  18. package/dist/commands/get/index.js +0 -272
  19. package/dist/commands/install/agents.js +0 -290
  20. package/dist/commands/install/apigeexAgents.js +0 -223
  21. package/dist/commands/install/apigeexSaasAgents.js +0 -300
  22. package/dist/commands/install/awsAgents.js +0 -525
  23. package/dist/commands/install/awsSaasAgents.js +0 -508
  24. package/dist/commands/install/azureAgents.js +0 -242
  25. package/dist/commands/install/azureSaasAgents.js +0 -519
  26. package/dist/commands/install/backstageAgents.js +0 -167
  27. package/dist/commands/install/edgeAgents.js +0 -409
  28. package/dist/commands/install/gitHubSaasAgents.js +0 -294
  29. package/dist/commands/install/gitLabAgents.js +0 -178
  30. package/dist/commands/install/graylogAgent.js +0 -147
  31. package/dist/commands/install/helpers/creators.js +0 -359
  32. package/dist/commands/install/helpers/deleters.js +0 -36
  33. package/dist/commands/install/helpers/getters.js +0 -95
  34. package/dist/commands/install/helpers/index.js +0 -267
  35. package/dist/commands/install/helpers/inputs.js +0 -593
  36. package/dist/commands/install/helpers/regex.js +0 -67
  37. package/dist/commands/install/helpers/templates/apigeexTemplates.js +0 -109
  38. package/dist/commands/install/helpers/templates/awsTemplates.js +0 -129
  39. package/dist/commands/install/helpers/templates/azureTemplates.js +0 -125
  40. package/dist/commands/install/helpers/templates/backstageTemplates.js +0 -95
  41. package/dist/commands/install/helpers/templates/edgeTemplates.js +0 -360
  42. package/dist/commands/install/helpers/templates/gitLabTemplates.js +0 -66
  43. package/dist/commands/install/helpers/templates/graylogTemplates.js +0 -75
  44. package/dist/commands/install/helpers/templates/ibmAPIConnectTemplates.js +0 -116
  45. package/dist/commands/install/helpers/templates/istioTemplates.js +0 -214
  46. package/dist/commands/install/helpers/templates/kafkaTemplates.js +0 -194
  47. package/dist/commands/install/helpers/templates/sapApiPortalTemplates.js +0 -114
  48. package/dist/commands/install/helpers/templates/softwareAGWebMethodsTemplates.js +0 -93
  49. package/dist/commands/install/helpers/templates/traceableTemplates.js +0 -135
  50. package/dist/commands/install/helpers/templates/wso2Templates.js +0 -85
  51. package/dist/commands/install/helpers/util.js +0 -26
  52. package/dist/commands/install/ibmAPIConnectAgents.js +0 -213
  53. package/dist/commands/install/index.js +0 -36
  54. package/dist/commands/install/istioAgents.js +0 -346
  55. package/dist/commands/install/kafkaAgents.js +0 -303
  56. package/dist/commands/install/platform.js +0 -175
  57. package/dist/commands/install/sapApiPortalAgents.js +0 -198
  58. package/dist/commands/install/softwareAGWebMethodsAgents.js +0 -161
  59. package/dist/commands/install/swaggerHubSaasAgents.js +0 -272
  60. package/dist/commands/install/traceableAgents.js +0 -257
  61. package/dist/commands/install/traceableSaasAgents.js +0 -275
  62. package/dist/commands/install/wso2Agents.js +0 -163
  63. package/dist/commands/productize/helpers/productizationHelper.js +0 -408
  64. package/dist/commands/productize/index.js +0 -99
  65. package/dist/common/ApiServerClient.js +0 -1109
  66. package/dist/common/CacheController.js +0 -146
  67. package/dist/common/CliConfigManager.js +0 -76
  68. package/dist/common/CompositeError.js +0 -95
  69. package/dist/common/CoreConfigController.js +0 -174
  70. package/dist/common/DefinitionsManager.js +0 -298
  71. package/dist/common/Kubectl.js +0 -68
  72. package/dist/common/PlatformClient.js +0 -128
  73. package/dist/common/Renderer.js +0 -409
  74. package/dist/common/TmpFile.js +0 -96
  75. package/dist/common/bashCommands.js +0 -97
  76. package/dist/common/basicPrompts.js +0 -160
  77. package/dist/common/dataService.js +0 -312
  78. package/dist/common/errorHandler.js +0 -46
  79. package/dist/common/modules.d.js +0 -1
  80. package/dist/common/resultsRenderers.js +0 -164
  81. package/dist/common/types.js +0 -746
  82. package/dist/common/utils.js +0 -476
  83. package/dist/main.js +0 -8
@@ -1,746 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.docsUrl = exports.commonCmdArgsDescription = exports.cliVersionHeader = exports.YesNoChoices = exports.YesNo = exports.WAIT_TIMEOUT = exports.TrueFalseChoices = exports.TrueFalse = exports.TraceableRegionType = exports.TraceabilityConfig = 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.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.ApigeeMetricsFilterConfig = exports.AgentTypes = exports.AgentResourceKind = exports.AgentNames = exports.AgentInstallSwitches = exports.AgentInstallConfig = exports.AgentConfigTypes = exports.AWSRegions = exports.APIGEEXDISCOVERYMODES = exports.APIGEEXAuthType = exports.APICDeployments = exports.ABORT_TIMEOUT = void 0;
7
- var _utils = require("./utils");
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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
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
- const cliVersionHeader = exports.cliVersionHeader = 'x-axway-cli-version';
12
- const docsUrl = exports.docsUrl = 'https://docs.axway.com/bundle/amplify-central/page/docs/index.html';
13
- const ABORT_TIMEOUT = exports.ABORT_TIMEOUT = process.env.NODE_ENV === 'test' ? 1e3 : process.env.DEBUG || process.env.SNOOPLOGG ? 1e9 : 30e3;
14
- const MAX_TABLE_STRING_LENGTH = exports.MAX_TABLE_STRING_LENGTH = 50;
15
- const MAX_FILE_SIZE = exports.MAX_FILE_SIZE = process.env.NODE_ENV === 'test' ? 1e5 : 20 * 1024 * 1024;
16
- const MAX_CACHE_FILE_SIZE = exports.MAX_CACHE_FILE_SIZE = 5 * 1024 * 1024;
17
-
18
- // 12 hours
19
- const CACHE_FILE_TTL_MILLISECONDS = exports.CACHE_FILE_TTL_MILLISECONDS = process.env.NODE_ENV === 'test' ? 100 : 60000 * 60 * 12;
20
- const WAIT_TIMEOUT = exports.WAIT_TIMEOUT = process.env.NODE_ENV === 'test' ? 1e3 : 1e4;
21
- let Kind = exports.Kind = /*#__PURE__*/function (Kind) {
22
- Kind["Environment"] = "Environment";
23
- Kind["APIService"] = "APIService";
24
- Kind["APIServiceRevision"] = "APIServiceRevision";
25
- Kind["APIServiceInstance"] = "APIServiceInstance";
26
- Kind["Asset"] = "Asset";
27
- Kind["AssetMapping"] = "AssetMapping";
28
- Kind["Product"] = "Product";
29
- Kind["ReleaseTag"] = "ReleaseTag";
30
- Kind["Secret"] = "Secret";
31
- Kind["Webhook"] = "Webhook";
32
- Kind["ConsumerSubscriptionDefinition"] = "ConsumerSubscriptionDefinition";
33
- Kind["ConsumerInstance"] = "ConsumerInstance";
34
- return Kind;
35
- }({});
36
- /**
37
- * temporary solution to validate "kind" values.
38
- * NOTE: order of this array is used to orchestrate bulk api calls (see utils/compareDocsByKind)
39
- */
40
- const KindTypes = exports.KindTypes = [Kind.Environment, Kind.APIService, Kind.APIServiceRevision, Kind.APIServiceInstance, Kind.Secret, Kind.Webhook, Kind.ConsumerSubscriptionDefinition, Kind.ConsumerInstance];
41
- const PublicRepoUrl = exports.PublicRepoUrl = 'https://axway.jfrog.io';
42
- const PublicDockerRepoBaseUrl = exports.PublicDockerRepoBaseUrl = 'axway.jfrog.io/ampc-public-docker-release';
43
- let BasePaths = exports.BasePaths = /*#__PURE__*/function (BasePaths) {
44
- BasePaths["ApiServer"] = "/apis";
45
- BasePaths["ApiCentral"] = "/api/v1";
46
- BasePaths["Platform"] = "/platform/api/v1";
47
- BasePaths["V7Agents"] = "/artifactory/ampc-public-generic-release/v7-agents";
48
- BasePaths["AWSAgents"] = "/artifactory/ampc-public-generic-release/aws-agents";
49
- BasePaths["DockerAgentPublicRepo"] = "/agent";
50
- BasePaths["DockerAgentAPIRepoPath"] = "/artifactory/api/docker/ampc-public-docker-release/v2/agent";
51
- return BasePaths;
52
- }({});
53
- let ConfigTypes = exports.ConfigTypes = /*#__PURE__*/function (ConfigTypes) {
54
- ConfigTypes["APIC_DEPLOYMENT"] = "apic-deployment";
55
- ConfigTypes["BASE_URL"] = "base-url";
56
- ConfigTypes["EXTENSIONS"] = "extensions";
57
- ConfigTypes["REGION"] = "region";
58
- ConfigTypes["PLATFORM"] = "platform";
59
- ConfigTypes["AXWAY_MANAGED"] = "axway-managed";
60
- ConfigTypes["CLIENT_ID"] = "client-id";
61
- return ConfigTypes;
62
- }({});
63
- let AuthUrls = exports.AuthUrls = /*#__PURE__*/function (AuthUrls) {
64
- AuthUrls["Staging"] = "https://login.axwaytest.net";
65
- AuthUrls["Prod"] = "https://login.axway.com";
66
- return AuthUrls;
67
- }({});
68
- let Regions = exports.Regions = /*#__PURE__*/function (Regions) {
69
- Regions["US"] = "US";
70
- Regions["EU"] = "EU";
71
- Regions["AP"] = "AP";
72
- return Regions;
73
- }({});
74
- let Platforms = exports.Platforms = /*#__PURE__*/function (Platforms) {
75
- Platforms["prod"] = "prod";
76
- Platforms["staging"] = "staging";
77
- return Platforms;
78
- }({});
79
- const ProdBaseUrls = exports.ProdBaseUrls = {
80
- US: 'https://apicentral.axway.com',
81
- EU: 'https://central.eu-fr.axway.com',
82
- AP: 'https://central.ap-sg.axway.com'
83
- };
84
- const APICDeployments = exports.APICDeployments = {
85
- EU: 'prod-eu',
86
- EUStaging: 'staging-eu',
87
- QA: 'qa',
88
- US: 'prod',
89
- USStaging: 'staging',
90
- TEAMS: 'teams',
91
- AP: 'prod-ap',
92
- APStaging: 'preprod'
93
- };
94
- const commonCmdArgsDescription = exports.commonCmdArgsDescription = {
95
- '--account [value]': 'Override your default account config',
96
- '--region [value]': 'Override your region config',
97
- '--no-cache': 'Do not use cache when communicating with the server',
98
- '--base-url [value]': {
99
- hidden: true
100
- },
101
- '--apic-deployment [value]': {
102
- hidden: true
103
- },
104
- '--axway-managed': {
105
- hidden: true
106
- }
107
- };
108
- let OutputTypes = exports.OutputTypes = /*#__PURE__*/function (OutputTypes) {
109
- OutputTypes["yaml"] = "yaml";
110
- OutputTypes["json"] = "json";
111
- return OutputTypes;
112
- }({});
113
- let LanguageTypes = exports.LanguageTypes = /*#__PURE__*/function (LanguageTypes) {
114
- LanguageTypes["French"] = "fr-fr";
115
- LanguageTypes["US"] = "en-us";
116
- LanguageTypes["German"] = "de-de";
117
- LanguageTypes["Portugese"] = "pt-br";
118
- return LanguageTypes;
119
- }({});
120
- let TrueFalse = exports.TrueFalse = /*#__PURE__*/function (TrueFalse) {
121
- TrueFalse["True"] = "True";
122
- TrueFalse["False"] = "False";
123
- return TrueFalse;
124
- }({});
125
- const TrueFalseChoices = exports.TrueFalseChoices = [{
126
- name: TrueFalse.True,
127
- value: TrueFalse.True
128
- }, {
129
- name: TrueFalse.False,
130
- value: TrueFalse.False
131
- }];
132
- let YesNo = exports.YesNo = /*#__PURE__*/function (YesNo) {
133
- YesNo["Yes"] = "Yes";
134
- YesNo["No"] = "No";
135
- return YesNo;
136
- }({});
137
- const YesNoChoices = exports.YesNoChoices = [{
138
- name: YesNo.Yes,
139
- value: YesNo.Yes
140
- }, {
141
- name: YesNo.No,
142
- value: YesNo.No
143
- }];
144
- const IstioProfileChoices = exports.IstioProfileChoices = [{
145
- name: 'default',
146
- value: 'default'
147
- }, {
148
- name: 'demo',
149
- value: 'demo'
150
- }, {
151
- name: 'empty',
152
- value: 'empty'
153
- }, {
154
- name: 'minimal',
155
- value: 'minimal'
156
- }, {
157
- name: 'openshift',
158
- value: 'openshift'
159
- }, {
160
- name: 'preview',
161
- value: 'preview'
162
- }];
163
- // exporting for tests
164
- let AgentConfigTypes = exports.AgentConfigTypes = /*#__PURE__*/function (AgentConfigTypes) {
165
- AgentConfigTypes["HOSTED"] = "Hosted";
166
- AgentConfigTypes["BINARIES"] = "Binaries";
167
- AgentConfigTypes["DOCKERIZED"] = "Dockerized";
168
- AgentConfigTypes["HELM"] = "Helm";
169
- return AgentConfigTypes;
170
- }({});
171
- let GatewayMode = exports.GatewayMode = /*#__PURE__*/function (GatewayMode) {
172
- GatewayMode["GatewayManagerMode"] = "With API Manager";
173
- GatewayMode["GatewayOnlyMode"] = "Gateway only";
174
- return GatewayMode;
175
- }({});
176
- let LoggingSource = exports.LoggingSource = /*#__PURE__*/function (LoggingSource) {
177
- LoggingSource["Event"] = "event";
178
- LoggingSource["OpenTraffic"] = "open traffic";
179
- return LoggingSource;
180
- }({});
181
- let BundleType = exports.BundleType = /*#__PURE__*/function (BundleType) {
182
- BundleType["ALL_AGENTS"] = "All Agents";
183
- BundleType["DISCOVERY"] = "Discovery";
184
- BundleType["TRACEABILITY"] = "Traceability";
185
- BundleType["TRACEABILITY_OFFLINE"] = "Traceability offline mode";
186
- return BundleType;
187
- }({});
188
- let AgentNames = exports.AgentNames = /*#__PURE__*/function (AgentNames) {
189
- AgentNames["AWS_DA"] = "aws-apigw-discovery-agent";
190
- AgentNames["AWS_TA"] = "aws-apigw-traceability-agent";
191
- AgentNames["GITHUB_DA"] = "github-discovery-agent";
192
- AgentNames["GITLAB_DA"] = "gitlab-discovery-agent";
193
- AgentNames["APIGEEX_DA"] = "apigeex-discovery-agent";
194
- AgentNames["APIGEEX_TA"] = "apigeex-traceability-agent";
195
- AgentNames["AZURE_DA"] = "azure-discovery-agent";
196
- AgentNames["AZURE_TA"] = "azure-traceability-agent";
197
- AgentNames["AZURE_EVENTHUB_DA"] = "azure-eventhub-discovery-agent";
198
- AgentNames["EDGE_DA"] = "v7-discovery-agent";
199
- AgentNames["EDGE_TA"] = "v7-traceability-agent";
200
- AgentNames["KAFKA_DA"] = "kafka-discovery-agent";
201
- AgentNames["KAFKA_TA"] = "kafka-traceability-agent";
202
- AgentNames["SWAGGERHUB_DA"] = "swaggerhub-discovery-agent";
203
- AgentNames["GRAYLOG_CA"] = "graylog-compliance-agent";
204
- AgentNames["IBMAPICONNECT_DA"] = "ibm-apiconnect-discovery-agent";
205
- AgentNames["IBMAPICONNECT_TA"] = "ibm-apiconnect-traceability-agent";
206
- AgentNames["TRACEABLE_CA"] = "traceable-compliance-agent";
207
- AgentNames["SOFTWAREAGWEBMETHODS_DA"] = "software-ag-webmethods-discovery-agent";
208
- AgentNames["SOFTWAREAGWEBMETHODS_TA"] = "software-ag-webmethods-traceability-agent";
209
- AgentNames["BACKSTAGE_DA"] = "backstage-discovery-agent";
210
- AgentNames["SAPAPIPORTAL_DA"] = "sap-discovery-agent";
211
- AgentNames["SAPAPIPORTAL_TA"] = "sap-traceability-agent";
212
- AgentNames["WSO2_DA"] = "wso2-discovery-agent";
213
- AgentNames["WSO2_TA"] = "wso2-traceability-agent";
214
- return AgentNames;
215
- }({});
216
- let GatewayTypes = exports.GatewayTypes = /*#__PURE__*/function (GatewayTypes) {
217
- GatewayTypes["EDGE_GATEWAY"] = "Amplify API Gateway";
218
- GatewayTypes["APIGEEX_GATEWAY"] = "Apigee X Gateway";
219
- GatewayTypes["AWS_GATEWAY"] = "Amazon API Gateway";
220
- GatewayTypes["AZURE_GATEWAY"] = "Azure API Gateway";
221
- GatewayTypes["AZURE_EVENTHUB"] = "Azure EventHub";
222
- GatewayTypes["GITLAB"] = "GitLab";
223
- GatewayTypes["ISTIO"] = "Istio";
224
- GatewayTypes["EDGE_GATEWAY_ONLY"] = "Amplify API Gateway only";
225
- GatewayTypes["KAFKA"] = "Kafka";
226
- GatewayTypes["GRAYLOG"] = "Graylog";
227
- GatewayTypes["IBMAPICONNECT"] = "IBM API Connect";
228
- GatewayTypes["SOFTWAREAGWEBMETHODS"] = "Software AG WebMethods";
229
- GatewayTypes["TRACEABLE"] = "Traceable";
230
- GatewayTypes["BACKSTAGE"] = "Backstage";
231
- GatewayTypes["SAPAPIPORTAL"] = "SAP API Portal";
232
- GatewayTypes["WSO2"] = "WSO2";
233
- return GatewayTypes;
234
- }({});
235
- let SaaSGatewayTypes = exports.SaaSGatewayTypes = /*#__PURE__*/function (SaaSGatewayTypes) {
236
- SaaSGatewayTypes["AWS_GATEWAY"] = "Amazon API Gateway";
237
- SaaSGatewayTypes["APIGEEX_GATEWAY"] = "Apigee X Gateway";
238
- SaaSGatewayTypes["GITHUB"] = "GitHub";
239
- SaaSGatewayTypes["SWAGGERHUB"] = "SwaggerHub";
240
- SaaSGatewayTypes["TRACEABLE"] = "Traceable";
241
- return SaaSGatewayTypes;
242
- }({});
243
- let DataPlaneNames = exports.DataPlaneNames = /*#__PURE__*/function (DataPlaneNames) {
244
- DataPlaneNames["APIGEEX"] = "Apigee X";
245
- DataPlaneNames["AWS"] = "AWS";
246
- DataPlaneNames["GITHUB"] = "GitHub";
247
- DataPlaneNames["GITLAB"] = "GitLab";
248
- DataPlaneNames["AZURE"] = "Azure";
249
- DataPlaneNames["EDGE"] = "APIM";
250
- DataPlaneNames["KAFKA"] = "Kafka";
251
- DataPlaneNames["GRAYLOG"] = "Graylog";
252
- DataPlaneNames["IBMAPICONNECT"] = "APIConnect";
253
- DataPlaneNames["KONG"] = "Kong";
254
- DataPlaneNames["SOFTWAREAGWEBMETHODS"] = "WebMethods";
255
- DataPlaneNames["SWAGGERHUB"] = "SwaggerHub";
256
- DataPlaneNames["TRACEABLE"] = "Traceable";
257
- DataPlaneNames["MULESOFT"] = "Mulesoft";
258
- DataPlaneNames["BACKSTAGE"] = "Backstage";
259
- DataPlaneNames["SAPAPIPORTAL"] = "SAP API Portal";
260
- DataPlaneNames["WSO2"] = "WSO2";
261
- DataPlaneNames["OTHER"] = "Unidentified";
262
- return DataPlaneNames;
263
- }({});
264
- const GatewayTypeToDataPlane = exports.GatewayTypeToDataPlane = {
265
- [GatewayTypes.EDGE_GATEWAY]: DataPlaneNames.EDGE,
266
- [GatewayTypes.EDGE_GATEWAY_ONLY]: DataPlaneNames.EDGE,
267
- [GatewayTypes.APIGEEX_GATEWAY]: DataPlaneNames.APIGEEX,
268
- [GatewayTypes.AWS_GATEWAY]: DataPlaneNames.AWS,
269
- [SaaSGatewayTypes.GITHUB]: DataPlaneNames.GITHUB,
270
- [GatewayTypes.GITLAB]: DataPlaneNames.GITLAB,
271
- [GatewayTypes.AZURE_GATEWAY]: DataPlaneNames.AZURE,
272
- [GatewayTypes.AZURE_EVENTHUB]: DataPlaneNames.AZURE,
273
- [GatewayTypes.ISTIO]: 'Istio',
274
- [GatewayTypes.KAFKA]: DataPlaneNames.KAFKA,
275
- [GatewayTypes.SOFTWAREAGWEBMETHODS]: DataPlaneNames.SOFTWAREAGWEBMETHODS,
276
- [SaaSGatewayTypes.SWAGGERHUB]: DataPlaneNames.SWAGGERHUB,
277
- [GatewayTypes.GRAYLOG]: DataPlaneNames.GRAYLOG,
278
- [GatewayTypes.IBMAPICONNECT]: DataPlaneNames.IBMAPICONNECT,
279
- [GatewayTypes.TRACEABLE]: DataPlaneNames.TRACEABLE,
280
- [GatewayTypes.BACKSTAGE]: DataPlaneNames.BACKSTAGE,
281
- [GatewayTypes.SAPAPIPORTAL]: DataPlaneNames.SAPAPIPORTAL,
282
- [GatewayTypes.WSO2]: DataPlaneNames.WSO2
283
- };
284
- let AgentResourceKind = exports.AgentResourceKind = /*#__PURE__*/function (AgentResourceKind) {
285
- AgentResourceKind["da"] = "DiscoveryAgent";
286
- AgentResourceKind["ta"] = "TraceabilityAgent";
287
- AgentResourceKind["ca"] = "ComplianceAgent";
288
- return AgentResourceKind;
289
- }({});
290
- let AgentTypes = exports.AgentTypes = /*#__PURE__*/function (AgentTypes) {
291
- AgentTypes["da"] = "da";
292
- AgentTypes["ta"] = "ta";
293
- AgentTypes["ca"] = "ca";
294
- return AgentTypes;
295
- }({}); // AWSRegions - base set of regions, may use option outside this list
296
- let AWSRegions = exports.AWSRegions = /*#__PURE__*/function (AWSRegions) {
297
- AWSRegions["US_EAST_1"] = "us-east-1";
298
- AWSRegions["US_EAST_2"] = "us-east-2";
299
- AWSRegions["US_WEST_1"] = "us-west-1";
300
- AWSRegions["US_WEST_2"] = "us-west-2";
301
- AWSRegions["EU_WEST_1"] = "eu-west-1";
302
- AWSRegions["EU_WEST_2"] = "eu-west-2";
303
- AWSRegions["EU_WEST_3"] = "eu-west-3";
304
- return AWSRegions;
305
- }({});
306
- let APIGEEXDISCOVERYMODES = exports.APIGEEXDISCOVERYMODES = /*#__PURE__*/function (APIGEEXDISCOVERYMODES) {
307
- APIGEEXDISCOVERYMODES["PROXY"] = "proxy";
308
- APIGEEXDISCOVERYMODES["PRODUCT"] = "product";
309
- return APIGEEXDISCOVERYMODES;
310
- }({});
311
- let AzureDataplaneMode = exports.AzureDataplaneMode = /*#__PURE__*/function (AzureDataplaneMode) {
312
- AzureDataplaneMode["APIM"] = "APIM";
313
- AzureDataplaneMode["EventHub"] = "EventHub";
314
- return AzureDataplaneMode;
315
- }({});
316
- class EnvironmentConfigInfo {
317
- constructor() {
318
- _defineProperty(this, "name", void 0);
319
- _defineProperty(this, "isNew", void 0);
320
- _defineProperty(this, "isUpdated", void 0);
321
- _defineProperty(this, "referencedEnvironments", void 0);
322
- _defineProperty(this, "referencedIdentityProviders", void 0);
323
- this.name = '';
324
- this.isNew = false;
325
- this.isUpdated = false;
326
- this.referencedEnvironments = [];
327
- this.referencedIdentityProviders = [];
328
- }
329
- }
330
- exports.EnvironmentConfigInfo = EnvironmentConfigInfo;
331
- class DOSAConfigInfo {
332
- constructor() {
333
- _defineProperty(this, "clientId", void 0);
334
- _defineProperty(this, "name", void 0);
335
- _defineProperty(this, "isNew", void 0);
336
- this.clientId = null;
337
- this.name = '';
338
- this.isNew = false;
339
- }
340
- }
341
- exports.DOSAConfigInfo = DOSAConfigInfo;
342
- class CentralAgentConfig {
343
- constructor() {
344
- _defineProperty(this, "orgId", void 0);
345
- _defineProperty(this, "ampcEnvInfo", void 0);
346
- _defineProperty(this, "ampcDosaInfo", void 0);
347
- _defineProperty(this, "ampcTeamName", void 0);
348
- _defineProperty(this, "daAgentName", void 0);
349
- _defineProperty(this, "taAgentName", void 0);
350
- _defineProperty(this, "caAgentName", void 0);
351
- _defineProperty(this, "dosaAccount", void 0);
352
- _defineProperty(this, "environment", void 0);
353
- _defineProperty(this, "environmentId", void 0);
354
- _defineProperty(this, "region", void 0);
355
- _defineProperty(this, "deployment", void 0);
356
- _defineProperty(this, "production", void 0);
357
- _defineProperty(this, "axwayManaged", void 0);
358
- _defineProperty(this, "apiServerClient", void 0);
359
- _defineProperty(this, "definitionManager", void 0);
360
- _defineProperty(this, "gatewayConfig", void 0);
361
- this.orgId = '';
362
- this.ampcTeamName = '';
363
- this.region = Regions.US;
364
- this.daAgentName = '';
365
- this.taAgentName = '';
366
- this.caAgentName = '';
367
- this.ampcEnvInfo = new EnvironmentConfigInfo();
368
- this.ampcDosaInfo = new DOSAConfigInfo();
369
- this.dosaAccount = new DosaAccount();
370
- this.environment = '';
371
- this.environmentId = '';
372
- this.deployment = '';
373
- this.production = false;
374
- this.axwayManaged = false;
375
- }
376
- }
377
- exports.CentralAgentConfig = CentralAgentConfig;
378
- class AgentInstallSwitches {
379
- constructor() {
380
- _defineProperty(this, "isDaEnabled", void 0);
381
- _defineProperty(this, "isTaEnabled", void 0);
382
- _defineProperty(this, "isHostedInstall", void 0);
383
- _defineProperty(this, "isHelmInstall", void 0);
384
- _defineProperty(this, "isGatewayOnly", void 0);
385
- _defineProperty(this, "isDockerInstall", void 0);
386
- _defineProperty(this, "isBinaryInstall", void 0);
387
- _defineProperty(this, "isOrgRep", void 0);
388
- this.isDaEnabled = false;
389
- this.isTaEnabled = false;
390
- this.isHostedInstall = false;
391
- this.isHelmInstall = false;
392
- this.isGatewayOnly = false;
393
- this.isDockerInstall = false;
394
- this.isBinaryInstall = false;
395
- this.isOrgRep = false;
396
- }
397
- }
398
- exports.AgentInstallSwitches = AgentInstallSwitches;
399
- class AgentInstallConfig {
400
- constructor() {
401
- _defineProperty(this, "centralConfig", void 0);
402
- _defineProperty(this, "bundleType", void 0);
403
- _defineProperty(this, "gatewayType", void 0);
404
- _defineProperty(this, "deploymentType", void 0);
405
- _defineProperty(this, "daVersion", void 0);
406
- _defineProperty(this, "taVersion", void 0);
407
- _defineProperty(this, "gatewayConfig", void 0);
408
- _defineProperty(this, "idpConfig", void 0);
409
- _defineProperty(this, "traceabilityConfig", void 0);
410
- _defineProperty(this, "switches", void 0);
411
- this.centralConfig = new CentralAgentConfig();
412
- this.bundleType = BundleType.ALL_AGENTS;
413
- this.gatewayType = GatewayTypes.EDGE_GATEWAY;
414
- this.deploymentType = AgentConfigTypes.DOCKERIZED;
415
- this.gatewayConfig = new Object();
416
- this.idpConfig = [[], []];
417
- this.daVersion = 'latest';
418
- this.taVersion = 'latest';
419
- this.switches = new AgentInstallSwitches();
420
- this.traceabilityConfig = new TraceabilityConfig();
421
- }
422
- }
423
- exports.AgentInstallConfig = AgentInstallConfig;
424
- class DosaAccount {
425
- constructor(clientId, publicKey, privateKey) {
426
- _defineProperty(this, "clientId", void 0);
427
- _defineProperty(this, "privateKey", void 0);
428
- _defineProperty(this, "publicKey", void 0);
429
- _defineProperty(this, "templatePrivateKey", void 0);
430
- _defineProperty(this, "templatePublicKey", void 0);
431
- _defineProperty(this, "updateKeyTemplateValues", configType => {
432
- switch (configType) {
433
- case AgentConfigTypes.BINARIES:
434
- {
435
- this.templatePrivateKey = 'private_key.pem';
436
- this.templatePublicKey = 'public_key.pem';
437
- break;
438
- }
439
- case AgentConfigTypes.DOCKERIZED:
440
- {
441
- this.templatePrivateKey = '/keys/private_key.pem';
442
- this.templatePublicKey = '/keys/public_key.pem';
443
- break;
444
- }
445
- default:
446
- {
447
- this.templatePrivateKey = this.privateKey;
448
- this.templatePublicKey = this.publicKey;
449
- break;
450
- }
451
- }
452
- });
453
- this.clientId = clientId || '';
454
- this.privateKey = privateKey || 'private_key.pem';
455
- this.publicKey = publicKey || 'public_key.pem';
456
- }
457
- }
458
- exports.DosaAccount = DosaAccount;
459
- class TraceabilityConfig {
460
- constructor() {
461
- _defineProperty(this, "usageReportingOffline", void 0);
462
- this.usageReportingOffline = false;
463
- }
464
- }
465
- exports.TraceabilityConfig = TraceabilityConfig;
466
- let Protocol = exports.Protocol = /*#__PURE__*/function (Protocol) {
467
- Protocol["HTTP"] = "http";
468
- Protocol["HTTPS"] = "https";
469
- return Protocol;
470
- }({});
471
- let Certificate = exports.Certificate = /*#__PURE__*/function (Certificate) {
472
- Certificate["PROVIDE"] = "PROVIDE";
473
- Certificate["GENERATE"] = "GENERATE";
474
- return Certificate;
475
- }({});
476
- class CloudFormationConfig {
477
- constructor() {
478
- _defineProperty(this, "AgentResourcesBucket", void 0);
479
- _defineProperty(this, "APIGWCWRoleSetup", void 0);
480
- _defineProperty(this, "APIGWTrafficLogGroupName", void 0);
481
- _defineProperty(this, "DeploymentType", void 0);
482
- _defineProperty(this, "EC2VPCID", void 0);
483
- _defineProperty(this, "EC2KeyName", void 0);
484
- _defineProperty(this, "EC2InstanceType", void 0);
485
- _defineProperty(this, "EC2SSHLocation", void 0);
486
- _defineProperty(this, "EC2PublicIPAddress", void 0);
487
- _defineProperty(this, "ECSClusterName", void 0);
488
- _defineProperty(this, "ECSCentralOrganizationID", void 0);
489
- _defineProperty(this, "ECSCentralEnvironmentName", void 0);
490
- _defineProperty(this, "ECSCentralDiscoveryAgentName", void 0);
491
- _defineProperty(this, "ECSCentralTraceabilityAgentName", void 0);
492
- _defineProperty(this, "ECSCentralClientID", void 0);
493
- _defineProperty(this, "ECSCentralRegion", void 0);
494
- _defineProperty(this, "DiscoveryAgentLogGroupName", void 0);
495
- _defineProperty(this, "DiscoveryAgentVersion", void 0);
496
- _defineProperty(this, "TraceabilityAgentLogGroupName", void 0);
497
- _defineProperty(this, "TraceabilityAgentVersion", void 0);
498
- _defineProperty(this, "SSMPrivateKeyParameter", void 0);
499
- _defineProperty(this, "SSMPublicKeyParameter", void 0);
500
- _defineProperty(this, "SecurityGroup", void 0);
501
- _defineProperty(this, "Subnet", void 0);
502
- this.AgentResourcesBucket = '';
503
- this.APIGWCWRoleSetup = 'true';
504
- this.APIGWTrafficLogGroupName = 'aws-apigw-traffic-logs';
505
- this.DeploymentType = 'EC2';
506
- this.EC2VPCID = '';
507
- this.EC2KeyName = '';
508
- this.EC2InstanceType = 't3.micro';
509
- this.EC2SSHLocation = '0.0.0.0/0';
510
- this.EC2PublicIPAddress = 'true';
511
- this.ECSClusterName = '';
512
- this.ECSCentralOrganizationID = '';
513
- this.ECSCentralEnvironmentName = '';
514
- this.ECSCentralClientID = '';
515
- this.ECSCentralDiscoveryAgentName = '';
516
- this.ECSCentralTraceabilityAgentName = '';
517
- this.ECSCentralRegion = '';
518
- this.DiscoveryAgentLogGroupName = 'amplify-discovery-agent-logs';
519
- this.DiscoveryAgentVersion = 'latest';
520
- this.TraceabilityAgentLogGroupName = 'amplify-traceability-agent-logs';
521
- this.TraceabilityAgentVersion = 'latest';
522
- this.SSMPrivateKeyParameter = 'AmplifyPrivateKey';
523
- this.SSMPublicKeyParameter = 'AmplifyPublicKey';
524
- this.SecurityGroup = '';
525
- this.Subnet = '';
526
- }
527
- }
528
- exports.CloudFormationConfig = CloudFormationConfig;
529
- class IstioAgentValues {
530
- constructor() {
531
- _defineProperty(this, "alsEnabled", void 0);
532
- _defineProperty(this, "alsMode", void 0);
533
- _defineProperty(this, "apicDeployment", void 0);
534
- _defineProperty(this, "envoyFilterNamespace", void 0);
535
- _defineProperty(this, "clientId", void 0);
536
- _defineProperty(this, "clusterName", void 0);
537
- _defineProperty(this, "keysSecretName", void 0);
538
- _defineProperty(this, "discoveryEnabled", void 0);
539
- _defineProperty(this, "namespace", void 0);
540
- _defineProperty(this, "discoveryNamespaces", void 0);
541
- // The extra Overrides listed below are not used in the actual hybridTemplate
542
- _defineProperty(this, "demoSvcEnabled", void 0);
543
- this.alsEnabled = false;
544
- this.alsMode = 'default';
545
- this.apicDeployment = '';
546
- this.envoyFilterNamespace = '';
547
- this.clientId = '';
548
- this.clusterName = '';
549
- this.keysSecretName = 'amplify-agents-keys';
550
- this.discoveryEnabled = true;
551
- this.namespace = {
552
- name: '',
553
- isNew: false
554
- };
555
- this.demoSvcEnabled = false;
556
- this.discoveryNamespaces = [];
557
- }
558
- }
559
- exports.IstioAgentValues = IstioAgentValues;
560
- class IstioInstallValues {
561
- constructor() {
562
- _defineProperty(this, "alsNamespace", void 0);
563
- _defineProperty(this, "certSecretName", void 0);
564
- _defineProperty(this, "enableAls", void 0);
565
- _defineProperty(this, "enableTracing", void 0);
566
- _defineProperty(this, "envoyFilterNamespace", void 0);
567
- _defineProperty(this, "host", void 0);
568
- _defineProperty(this, "isNewInstall", void 0);
569
- _defineProperty(this, "port", void 0);
570
- _defineProperty(this, "protocol", void 0);
571
- _defineProperty(this, "profile", void 0);
572
- _defineProperty(this, "targetPort", void 0);
573
- // The extra IstioOverrides listed below are not used in the actual istioOverrideTemplate
574
- _defineProperty(this, "certificateOption", void 0);
575
- this.alsNamespace = 'amplify-agents';
576
- this.certificateOption = '';
577
- this.enableAls = false;
578
- this.enableTracing = false;
579
- this.envoyFilterNamespace = 'istio-system';
580
- this.host = '';
581
- this.isNewInstall = true;
582
- this.port = 8080;
583
- this.profile = 'demo';
584
- this.protocol = Protocol.HTTP;
585
- this.targetPort = 0;
586
- }
587
- }
588
-
589
- /** Provides information for a platform team. */
590
-
591
- /**
592
- * Invoked multiple times to indicate progress on something, such as download progress.
593
- * @param progress Value ranging from 0 to 100.
594
- */
595
- exports.IstioInstallValues = IstioInstallValues;
596
- class ReqHeadersQParams {
597
- constructor() {
598
- _defineProperty(this, "requestHeaders", void 0);
599
- _defineProperty(this, "queryParameters", void 0);
600
- }
601
- }
602
- class IDPConfiguration extends ReqHeadersQParams {
603
- constructor() {
604
- super();
605
- _defineProperty(this, "title", void 0);
606
- _defineProperty(this, "type", void 0);
607
- _defineProperty(this, "metadataURL", void 0);
608
- _defineProperty(this, "clientProperties", void 0);
609
- _defineProperty(this, "clientTimeout", void 0);
610
- this.title = '';
611
- this.type = IDPType.Generic;
612
- this.metadataURL = '';
613
- this.clientTimeout = 60;
614
- }
615
- getSpec() {
616
- let spec = new Map([['metadataUrl', this.metadataURL], ['providerType', this.type], ['clientTimeout', this.clientTimeout], ['requestHeaders', this.requestHeaders ? (0, _utils.KeyValueMapToNameValueArray)(this.requestHeaders) : undefined], ['queryParameters', this.queryParameters ? (0, _utils.KeyValueMapToNameValueArray)(this.queryParameters) : undefined], ['additionalClientProperties', this.clientProperties ? (0, _utils.KeyValueMapToNameValueArray)(this.clientProperties) : undefined]]);
617
- let omitUndefinedSpec = new Map();
618
- spec.forEach((v, k) => {
619
- if (v !== undefined) {
620
- omitUndefinedSpec.set(k, v);
621
- }
622
- });
623
- return Object.fromEntries(omitUndefinedSpec.entries());
624
- }
625
- }
626
- exports.IDPConfiguration = IDPConfiguration;
627
- class IDPAuthConfiguration extends ReqHeadersQParams {
628
- constructor() {
629
- super();
630
- _defineProperty(this, "authType", void 0);
631
- _defineProperty(this, "authConfig", void 0);
632
- this.authType = IDPAuthType.AccessToken;
633
- this.authConfig = new IDPAuthAccessToken();
634
- }
635
- getAccessData() {
636
- return this.authConfig.getAccessData();
637
- }
638
- setAccessData(data) {
639
- this.authConfig.setAccessData(data);
640
- }
641
- getSpec() {
642
- let spec = new Map([['type', this.authType], ['config', this.authConfig.getSpec(this.authType)], ['requestHeaders', this.requestHeaders ? (0, _utils.KeyValueMapToNameValueArray)(this.requestHeaders) : undefined], ['queryParameters', this.queryParameters ? (0, _utils.KeyValueMapToNameValueArray)(this.queryParameters) : undefined]]);
643
- let omitUndefinedSpec = new Map();
644
- spec.forEach((v, k) => {
645
- if (v !== undefined) {
646
- omitUndefinedSpec.set(k, v);
647
- }
648
- });
649
- return Object.fromEntries(omitUndefinedSpec.entries());
650
- }
651
- }
652
-
653
- // IDPType - which idp configuration can be used
654
- exports.IDPAuthConfiguration = IDPAuthConfiguration;
655
- let IDPType = exports.IDPType = /*#__PURE__*/function (IDPType) {
656
- IDPType["KeyCloak"] = "keycloak";
657
- IDPType["Okta"] = "okta";
658
- IDPType["Generic"] = "generic";
659
- return IDPType;
660
- }({});
661
- class IDPAuthAccessToken {
662
- constructor() {
663
- _defineProperty(this, "token", void 0);
664
- this.token = '';
665
- }
666
- getAccessData() {
667
- return JSON.stringify({
668
- token: this.token
669
- });
670
- }
671
- setAccessData(data) {
672
- this.token = data;
673
- }
674
- getSpec(authType) {
675
- return {
676
- type: authType,
677
- token: this.token
678
- };
679
- }
680
- }
681
- exports.IDPAuthAccessToken = IDPAuthAccessToken;
682
- class IDPAuthClientSecret {
683
- constructor() {
684
- _defineProperty(this, "authMethod", void 0);
685
- _defineProperty(this, "clientID", void 0);
686
- _defineProperty(this, "clientSecret", void 0);
687
- _defineProperty(this, "clientScopes", void 0);
688
- this.authMethod = IDPClientSecretAuthMethod.ClientSecretBasic;
689
- this.clientID = '';
690
- this.clientSecret = '';
691
- }
692
- getAccessData() {
693
- return JSON.stringify({
694
- clientSecret: this.clientSecret
695
- });
696
- }
697
- setAccessData(data) {
698
- this.clientSecret = data;
699
- }
700
- getSpec(authType) {
701
- let spec = new Map([['type', authType], ['authMethod', this.authMethod], ['clientId', this.clientID], ['clientSecret', this.clientSecret], ['clientScopes', this.clientScopes ? this.clientScopes : undefined]]);
702
- let omitUndefinedSpec = new Map();
703
- spec.forEach((v, k) => {
704
- if (v !== undefined) {
705
- omitUndefinedSpec.set(k, v);
706
- }
707
- });
708
- return Object.fromEntries(omitUndefinedSpec.entries());
709
- }
710
- }
711
- exports.IDPAuthClientSecret = IDPAuthClientSecret;
712
- let IDPClientSecretAuthMethod = exports.IDPClientSecretAuthMethod = /*#__PURE__*/function (IDPClientSecretAuthMethod) {
713
- IDPClientSecretAuthMethod["ClientSecretBasic"] = "client_secret_basic";
714
- IDPClientSecretAuthMethod["ClientSecretPost"] = "client_secret_post";
715
- IDPClientSecretAuthMethod["ClientSecretJWT"] = "client_secret_jwt";
716
- return IDPClientSecretAuthMethod;
717
- }({});
718
- let IDPAuthType = exports.IDPAuthType = /*#__PURE__*/function (IDPAuthType) {
719
- IDPAuthType["AccessToken"] = "AccessToken";
720
- IDPAuthType["ClientSecret"] = "ClientSecret";
721
- return IDPAuthType;
722
- }({});
723
- let TraceableRegionType = exports.TraceableRegionType = /*#__PURE__*/function (TraceableRegionType) {
724
- TraceableRegionType["US"] = "US";
725
- TraceableRegionType["US1"] = "US-1";
726
- TraceableRegionType["EU"] = "EU";
727
- TraceableRegionType["APAC"] = "APAC";
728
- TraceableRegionType["APAC2"] = "APAC-2";
729
- TraceableRegionType["Canada"] = "Canada";
730
- TraceableRegionType["UAE"] = "UAE";
731
- return TraceableRegionType;
732
- }({}); // APIGEEXAuthType - how the agent will authenticate to APIGEEX
733
- let APIGEEXAuthType = exports.APIGEEXAuthType = /*#__PURE__*/function (APIGEEXAuthType) {
734
- APIGEEXAuthType["IMP_SVC_ACC"] = "Impersonate Service Account";
735
- APIGEEXAuthType["ACCESS_CREDENTIAL"] = "Access Credential";
736
- return APIGEEXAuthType;
737
- }({});
738
- class ApigeeMetricsFilterConfig {
739
- constructor(filterMetrics, filteredAPIs) {
740
- _defineProperty(this, "filterMetrics", void 0);
741
- _defineProperty(this, "filteredAPIs", void 0);
742
- this.filterMetrics = filterMetrics;
743
- this.filteredAPIs = filteredAPIs;
744
- }
745
- }
746
- exports.ApigeeMetricsFilterConfig = ApigeeMetricsFilterConfig;