@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,109 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.apigeeXTAEnvVarTemplate = exports.apigeeXDAEnvVarTemplate = exports.ApigeeXAgentValues = void 0;
7
- var _types = require("../../../../common/types");
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
- /**
12
- * @description Parameters to provide to the Apigee X handlebars templates.
13
- */
14
- class ApigeeXAgentValues {
15
- constructor() {
16
- _defineProperty(this, "projectId", void 0);
17
- _defineProperty(this, "developerEmailAddress", void 0);
18
- _defineProperty(this, "mode", void 0);
19
- _defineProperty(this, "environment", void 0);
20
- _defineProperty(this, "fileName", void 0);
21
- _defineProperty(this, "metricsFilter", void 0);
22
- _defineProperty(this, "centralConfig", void 0);
23
- _defineProperty(this, "traceabilityConfig", void 0);
24
- this.projectId = "";
25
- this.developerEmailAddress = "";
26
- this.mode = _types.APIGEEXDISCOVERYMODES.PROXY;
27
- this.environment = "";
28
- this.fileName = "";
29
- this.metricsFilter = new _types.ApigeeMetricsFilterConfig(true, []);
30
- this.centralConfig = new _types.CentralAgentConfig();
31
- this.traceabilityConfig = new _types.TraceabilityConfig();
32
- }
33
- }
34
-
35
- /**
36
- * @description Generates the ApigeeX TA env vars file.
37
- */
38
- exports.ApigeeXAgentValues = ApigeeXAgentValues;
39
- const apigeeXTAEnvVarTemplate = () => {
40
- return `# ApigeeX configs
41
- APIGEE_PROJECTID={{projectId}}
42
- APIGEE_DEVELOPEREMAIL={{developerEmailAddress}}
43
- APIGEE_MODE={{mode}}
44
- APIGEE_ENVIRONMENT={{environment}}
45
- APIGEE_AUTHFILEPATH=/keys/{{fileName}}
46
- APIGEE_METRICSFILTER_FILTERMETRICS={{metricsFilter.filterMetrics}}
47
- {{#if metricsFilter.filterMetrics}}
48
- APIGEE_METRICSFILTER_FILTEREDAPIS={{metricsFilter.filteredAPIs}}
49
- {{/if}}
50
-
51
- # Amplify Central configs
52
- {{#if traceabilityConfig.usageReportingOffline}}
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_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
59
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
60
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
61
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
62
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
63
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
64
- CENTRAL_REGION={{centralConfig.region}}
65
-
66
- {{/if}}
67
-
68
- # Logging configs
69
- # Define the logging level: info, debug, error
70
- LOG_LEVEL=info
71
- # Specify where to send the log: stdout, file, both
72
- LOG_OUTPUT=stdout
73
- # Define where the log files are written
74
- LOG_FILE_PATH=logs
75
- `;
76
- };
77
-
78
- /**
79
- * @description Generates the ApigeeX DA env vars file.
80
- */
81
- exports.apigeeXTAEnvVarTemplate = apigeeXTAEnvVarTemplate;
82
- const apigeeXDAEnvVarTemplate = () => {
83
- return `# Azure configs
84
- APIGEE_PROJECTID={{projectId}}
85
- APIGEE_DEVELOPEREMAIL={{developerEmailAddress}}
86
- APIGEE_MODE={{mode}}
87
- APIGEE_ENVIRONMENT={{environment}}
88
- APIGEE_AUTHFILEPATH=/keys/{{fileName}}
89
-
90
- # Amplify Central configs
91
- CENTRAL_AGENTNAME={{centralConfig.daAgentName}}
92
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
93
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
94
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
95
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
96
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
97
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
98
- CENTRAL_REGION={{centralConfig.region}}
99
-
100
- # Logging configs
101
- # Define the logging level: info, debug, error
102
- LOG_LEVEL=info
103
- # Specify where to send the log: stdout, file, both
104
- LOG_OUTPUT=stdout
105
- # Define where the log files are written
106
- LOG_FILE_PATH=logs
107
- `;
108
- };
109
- exports.apigeeXDAEnvVarTemplate = apigeeXDAEnvVarTemplate;
@@ -1,129 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.awsTAEnvVarTemplate = exports.awsDAEnvVarTemplate = exports.AWSAgentValues = void 0;
7
- var _types = require("../../../../common/types");
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
- /**
12
- * @description Values to provide to the aws handlebars templates.
13
- */
14
-
15
- class AWSAgentValues {
16
- constructor(awsDeployment) {
17
- _defineProperty(this, "accessKey", void 0);
18
- _defineProperty(this, "secretKey", void 0);
19
- _defineProperty(this, "logGroup", void 0);
20
- _defineProperty(this, "stageTagName", void 0);
21
- _defineProperty(this, "fullTransactionLogging", void 0);
22
- _defineProperty(this, "region", void 0);
23
- _defineProperty(this, "apigwAgentConfigZipFile", void 0);
24
- _defineProperty(this, "centralConfig", void 0);
25
- _defineProperty(this, "traceabilityConfig", void 0);
26
- _defineProperty(this, "cloudFormationConfig", void 0);
27
- _defineProperty(this, "updateCloudFormationConfig", () => {
28
- this.cloudFormationConfig.ECSCentralRegion = this.centralConfig.region;
29
- if (this.cloudFormationConfig.DeploymentType === 'ECS Fargate') {
30
- this.cloudFormationConfig.ECSCentralOrganizationID = this.centralConfig.orgId;
31
- this.cloudFormationConfig.ECSCentralEnvironmentName = this.centralConfig.environment;
32
- this.cloudFormationConfig.ECSCentralClientID = this.centralConfig.dosaAccount.clientId;
33
- this.cloudFormationConfig.ECSCentralDiscoveryAgentName = this.centralConfig.daAgentName;
34
- this.cloudFormationConfig.ECSCentralTraceabilityAgentName = this.centralConfig.taAgentName;
35
- }
36
- });
37
- this.accessKey = awsDeployment === 'Other' ? '**Insert Access Key**' : '';
38
- this.secretKey = awsDeployment === 'Other' ? '**Insert Secret Key**' : '';
39
- this.logGroup = '';
40
- this.stageTagName = '';
41
- this.fullTransactionLogging = false;
42
- this.region = '';
43
- this.apigwAgentConfigZipFile = '';
44
- this.centralConfig = new _types.CentralAgentConfig();
45
- this.traceabilityConfig = new _types.TraceabilityConfig();
46
- this.cloudFormationConfig = new _types.CloudFormationConfig();
47
- }
48
- }
49
-
50
- /**
51
- * @description Generates the AWS TA env vars file.
52
- */
53
- exports.AWSAgentValues = AWSAgentValues;
54
- const awsTAEnvVarTemplate = () => {
55
- return `# AWS configs
56
- AWS_REGION={{region}}
57
- {{#if accessKey}}
58
- AWS_AUTH_ACCESSKEY={{accessKey}}
59
- {{/if}}
60
- {{#if secretKey}}
61
- AWS_AUTH_SECRETKEY={{secretKey}}
62
- {{/if}}
63
- {{#if fullTransactionLogging}}
64
- AWS_FULLTRANSACTIONLOGGING={{fullTransactionLogging}}
65
- {{/if}}
66
-
67
- # Amplify Central configs
68
- {{#if traceabilityConfig.usageReportingOffline}}
69
- CENTRAL_USAGEREPORTING_OFFLINE={{traceabilityConfig.usageReportingOffline}}
70
- CENTRAL_ENVIRONMENTID={{centralConfig.environmentId}}
71
- CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
72
- {{else}}
73
- CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
74
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
75
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
76
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
77
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
78
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
79
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
80
- CENTRAL_REGION={{centralConfig.region}}
81
-
82
- {{/if}}
83
-
84
- # Logging configs
85
- # Define the logging level: info, debug, error
86
- LOG_LEVEL=info
87
- # Specify where to send the log: stdout, file, both
88
- LOG_OUTPUT=stdout
89
- # Define where the log files are written
90
- LOG_FILE_PATH=logs
91
- `;
92
- };
93
-
94
- /**
95
- * @description Generates the AWS DA env vars file.
96
- */
97
- exports.awsTAEnvVarTemplate = awsTAEnvVarTemplate;
98
- const awsDAEnvVarTemplate = () => {
99
- return `# AWS configs
100
- AWS_REGION={{region}}
101
- {{#if accessKey}}
102
- AWS_AUTH_ACCESSKEY={{accessKey}}
103
- {{/if}}
104
- {{#if secretKey}}
105
- AWS_AUTH_SECRETKEY={{secretKey}}
106
- {{/if}}
107
- AWS_LOGGROUP={{logGroup}}
108
- AWS_STAGETAGNAME={{stageTagName}}
109
-
110
- # Amplify Central configs
111
- CENTRAL_AGENTNAME={{centralConfig.daAgentName}}
112
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
113
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
114
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
115
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
116
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
117
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
118
- CENTRAL_REGION={{centralConfig.region}}
119
-
120
- # Logging configs
121
- # Define the logging level: info, debug, error
122
- LOG_LEVEL=info
123
- # Specify where to send the log: stdout, file, both
124
- LOG_OUTPUT=stdout
125
- # Define where the log files are written
126
- LOG_FILE_PATH=logs
127
- `;
128
- };
129
- exports.awsDAEnvVarTemplate = awsDAEnvVarTemplate;
@@ -1,125 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.azureTAEnvVarTemplate = exports.azureDAEnvVarTemplate = exports.AzureAgentValues = void 0;
7
- var _types = require("../../../../common/types");
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
- /**
12
- * @description Parameters to provide to the Azure handlebars templates.
13
- */
14
- class AzureAgentValues {
15
- constructor() {
16
- _defineProperty(this, "apiManagementServiceName", void 0);
17
- _defineProperty(this, "eventHubName", void 0);
18
- _defineProperty(this, "eventHubNamespace", void 0);
19
- _defineProperty(this, "policyKey", void 0);
20
- _defineProperty(this, "policyName", void 0);
21
- _defineProperty(this, "resourceGroupName", void 0);
22
- _defineProperty(this, "servicePrincipalClientId", void 0);
23
- _defineProperty(this, "servicePrincipalClientSecret", void 0);
24
- _defineProperty(this, "subscriptionId", void 0);
25
- _defineProperty(this, "tenantId", void 0);
26
- _defineProperty(this, "isAzureEventHub", void 0);
27
- _defineProperty(this, "centralConfig", void 0);
28
- _defineProperty(this, "traceabilityConfig", void 0);
29
- this.apiManagementServiceName = '';
30
- this.eventHubName = '';
31
- this.eventHubNamespace = '';
32
- this.policyKey = '';
33
- this.policyName = '';
34
- this.resourceGroupName = '';
35
- this.servicePrincipalClientId = '';
36
- this.servicePrincipalClientSecret = '';
37
- this.subscriptionId = '';
38
- this.tenantId = '';
39
- this.isAzureEventHub = false;
40
- this.centralConfig = new _types.CentralAgentConfig();
41
- this.traceabilityConfig = new _types.TraceabilityConfig();
42
- }
43
- }
44
-
45
- /**
46
- * @description Generates the Azure TA env vars file.
47
- */
48
- exports.AzureAgentValues = AzureAgentValues;
49
- const azureTAEnvVarTemplate = () => {
50
- return `# Azure configs
51
- AZURE_EVENTHUBNAME={{eventHubName}}
52
- AZURE_EVENTHUBNAMESPACE={{eventHubNamespace}}
53
- AZURE_SHAREDACCESSKEYNAME={{policyName}}
54
- AZURE_SHAREDACCESSKEYVALUE={{policyKey}}
55
- AZURE_TENANTID={{tenantId}}
56
- AZURE_SUBSCRIPTIONID={{subscriptionId}}
57
- AZURE_RESOURCEGROUPNAME={{resourceGroupName}}
58
- AZURE_CLIENTID={{servicePrincipalClientId}}
59
- AZURE_CLIENTSECRET={{servicePrincipalClientSecret}}
60
- AZURE_APIMSERVICENAME={{apiManagementServiceName}}
61
-
62
- # Amplify Central configs
63
- {{#if traceabilityConfig.usageReportingOffline}}
64
- CENTRAL_USAGEREPORTING_OFFLINE={{traceabilityConfig.usageReportingOffline}}
65
- CENTRAL_ENVIRONMENTID={{centralConfig.environmentId}}
66
- CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
67
- {{else}}
68
- CENTRAL_AGENTNAME={{centralConfig.taAgentName}}
69
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
70
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
71
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
72
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
73
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
74
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
75
- CENTRAL_REGION={{centralConfig.region}}
76
-
77
- {{/if}}
78
-
79
- # Logging configs
80
- # Define the logging level: info, debug, error
81
- LOG_LEVEL=info
82
- # Specify where to send the log: stdout, file, both
83
- LOG_OUTPUT=stdout
84
- # Define where the log files are written
85
- LOG_FILE_PATH=logs
86
- `;
87
- };
88
-
89
- /**
90
- * @description Generates the Azure DA env vars file.
91
- */
92
- exports.azureTAEnvVarTemplate = azureTAEnvVarTemplate;
93
- const azureDAEnvVarTemplate = () => {
94
- return `# Azure configs
95
- AZURE_TENANTID={{tenantId}}
96
- AZURE_SUBSCRIPTIONID={{subscriptionId}}
97
- AZURE_RESOURCEGROUPNAME={{resourceGroupName}}
98
- AZURE_CLIENTID={{servicePrincipalClientId}}
99
- AZURE_CLIENTSECRET={{servicePrincipalClientSecret}}
100
- {{#if isAzureEventHub}}
101
- AZURE_EVENTHUBNAMESPACE={{eventHubNamespace}}
102
- {{else}}
103
- AZURE_APIMSERVICENAME={{apiManagementServiceName}}
104
- {{/if}}
105
-
106
- # Amplify Central configs
107
- CENTRAL_AGENTNAME={{centralConfig.daAgentName}}
108
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
109
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
110
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
111
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
112
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
113
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
114
- CENTRAL_REGION={{centralConfig.region}}
115
-
116
- # Logging configs
117
- # Define the logging level: info, debug, error
118
- LOG_LEVEL=info
119
- # Specify where to send the log: stdout, file, both
120
- LOG_OUTPUT=stdout
121
- # Define where the log files are written
122
- LOG_FILE_PATH=logs
123
- `;
124
- };
125
- exports.azureDAEnvVarTemplate = azureDAEnvVarTemplate;
@@ -1,95 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.backstageDAEnvVarTemplate = exports.UrlScheme = exports.BackstageAgentValues = exports.AuthMode = void 0;
7
- var _types = require("../../../../common/types");
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
- /**
12
- * @description Parameters to provide to the Backstage handlebars templates.
13
- */
14
- class BackstageAgentValues {
15
- constructor() {
16
- _defineProperty(this, "host", void 0);
17
- _defineProperty(this, "scheme", void 0);
18
- _defineProperty(this, "backendPort", void 0);
19
- _defineProperty(this, "urlPath", void 0);
20
- _defineProperty(this, "authMode", void 0);
21
- _defineProperty(this, "staticTokenValue", void 0);
22
- _defineProperty(this, "jwksClientID", void 0);
23
- _defineProperty(this, "jwksClientSecret", void 0);
24
- _defineProperty(this, "jwksTokenURL", void 0);
25
- _defineProperty(this, "centralConfig", void 0);
26
- this.host = '';
27
- this.scheme = UrlScheme.HTTP;
28
- this.backendPort = 0;
29
- this.urlPath = '';
30
- this.authMode = AuthMode.NoAuth;
31
- this.staticTokenValue = '';
32
- this.jwksClientID = '';
33
- this.jwksClientSecret = '';
34
- this.jwksTokenURL = '';
35
- this.centralConfig = new _types.CentralAgentConfig();
36
- }
37
- }
38
- exports.BackstageAgentValues = BackstageAgentValues;
39
- let UrlScheme = exports.UrlScheme = /*#__PURE__*/function (UrlScheme) {
40
- UrlScheme["HTTP"] = "http";
41
- UrlScheme["HTTPS"] = "https";
42
- return UrlScheme;
43
- }({});
44
- let AuthMode = exports.AuthMode = /*#__PURE__*/function (AuthMode) {
45
- AuthMode["NoAuth"] = "";
46
- AuthMode["Guest"] = "guest";
47
- AuthMode["StaticToken"] = "token";
48
- AuthMode["Jwks"] = "jwks";
49
- return AuthMode;
50
- }({});
51
- /**
52
- * @description Generates the Backstage DA env vars file.
53
- */
54
- const backstageDAEnvVarTemplate = () => {
55
- return `# Backstage configs
56
- BACKSTAGE_URL_SCHEME={{scheme}}
57
- BACKSTAGE_URL_HOST={{host}}
58
- {{#compare . backendPort 0 operator=">="}}
59
- BACKSTAGE_URL_BACKENDPORT={{backendPort}}
60
- {{/compare}}
61
- {{#compare . urlPart ""}}
62
- BACKSTAGE_URL_PATH={{urlPath}}
63
- {{/compare}}
64
- {{#compare . authMode "" operator="!="}}
65
- BACKSTAGE_AUTH_MODE={{authMode}}
66
- {{/compare}}
67
- {{#compare . authMode "token"}}
68
- BACKSTAGE_AUTH_STATICTOKEN={{staticTokenValue}}
69
- {{/compare}}
70
- {{#compare . authMode "jwks"}}
71
- BACKSTAGE_AUTH_CLIENTID={{jwksClientID}}
72
- BACKSTAGE_AUTH_CLIENTSECRET={{jwksClientSecret}}
73
- BACKSTAGE_AUTH_TOKENURL={{jwksTokenURL}}
74
- {{/compare}}
75
-
76
- # Amplify Central configs
77
- CENTRAL_AGENTNAME={{centralConfig.daAgentName}}
78
- CENTRAL_AUTH_CLIENTID={{centralConfig.dosaAccount.clientId}}
79
- CENTRAL_AUTH_PRIVATEKEY={{centralConfig.dosaAccount.templatePrivateKey}}
80
- CENTRAL_AUTH_PUBLICKEY={{centralConfig.dosaAccount.templatePublicKey}}
81
- CENTRAL_ENVIRONMENT={{centralConfig.environment}}
82
- CENTRAL_ORGANIZATIONID={{centralConfig.orgId}}
83
- CENTRAL_TEAM={{centralConfig.ampcTeamName}}
84
- CENTRAL_REGION={{centralConfig.region}}
85
-
86
- # Logging configs
87
- # Define the logging level: info, debug, error
88
- LOG_LEVEL=info
89
- # Specify where to send the log: stdout, file, both
90
- LOG_OUTPUT=stdout
91
- # Define where the log files are written
92
- LOG_FILE_PATH=logs
93
- `;
94
- };
95
- exports.backstageDAEnvVarTemplate = backstageDAEnvVarTemplate;