@axway/axway-central-cli 4.10.0-rc.0 → 4.10.0-rc.2
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/akamaiSaasAgents.js +1 -1
- package/dist/commands/install/apigeexSaasAgents.js +1 -1
- package/dist/commands/install/awsSaasAgents.js +1 -1
- package/dist/commands/install/azureSaasAgents.js +1 -1
- package/dist/commands/install/gitHubSaasAgents.js +1 -1
- package/dist/commands/install/platform.js +6 -3
- package/dist/commands/install/swaggerHubSaasAgents.js +1 -1
- package/dist/commands/install/traceableSaasAgents.js +1 -1
- package/dist/common/CoreConfigController.js +1 -1
- package/dist/common/types.js +16 -2
- package/package.json +3 -2
- package/src/cli.ts +65 -0
- package/src/commands/apply/index.spec.ts +756 -0
- package/src/commands/apply/index.ts +106 -0
- package/src/commands/completion/index.ts +91 -0
- package/src/commands/config/common/index.ts +21 -0
- package/src/commands/config/index.ts +15 -0
- package/src/commands/config/list.spec.ts +57 -0
- package/src/commands/config/list.ts +18 -0
- package/src/commands/config/set.spec.ts +242 -0
- package/src/commands/config/set.ts +102 -0
- package/src/commands/config/unset.spec.ts +74 -0
- package/src/commands/config/unset.ts +40 -0
- package/src/commands/create/agentResource.spec.ts +210 -0
- package/src/commands/create/agentResource.ts +154 -0
- package/src/commands/create/environment.spec.ts +104 -0
- package/src/commands/create/environment.ts +52 -0
- package/src/commands/create/index.spec.ts +489 -0
- package/src/commands/create/index.ts +101 -0
- package/src/commands/create/serviceAccount.spec.ts +33 -0
- package/src/commands/create/serviceAccount.ts +19 -0
- package/src/commands/delete/index.spec.ts +650 -0
- package/src/commands/delete/index.ts +196 -0
- package/src/commands/edit/environment.spec.ts +186 -0
- package/src/commands/edit/environment.ts +79 -0
- package/src/commands/edit/index.ts +25 -0
- package/src/commands/get/index.spec.ts +1257 -0
- package/src/commands/get/index.ts +305 -0
- package/src/commands/install/agent.spec.ts +592 -0
- package/src/commands/install/agents.ts +385 -0
- package/src/commands/install/akamaiAgents.spec.ts +511 -0
- package/src/commands/install/akamaiAgents.ts +334 -0
- package/src/commands/install/akamaiSaasAgents.spec.ts +265 -0
- package/src/commands/install/akamaiSaasAgents.ts +376 -0
- package/src/commands/install/apigeexAgents.spec.ts +339 -0
- package/src/commands/install/apigeexAgents.ts +277 -0
- package/src/commands/install/apigeexSaasAgents.spec.ts +359 -0
- package/src/commands/install/apigeexSaasAgents.ts +428 -0
- package/src/commands/install/awsAgents.spec.ts +1203 -0
- package/src/commands/install/awsAgents.ts +611 -0
- package/src/commands/install/awsSaasAgents.spec.ts +741 -0
- package/src/commands/install/awsSaasAgents.ts +739 -0
- package/src/commands/install/azureAgents.spec.ts +636 -0
- package/src/commands/install/azureAgents.ts +310 -0
- package/src/commands/install/azureSaasAgents.spec.ts +743 -0
- package/src/commands/install/azureSaasAgents.ts +783 -0
- package/src/commands/install/backstageAgents.spec.ts +299 -0
- package/src/commands/install/backstageAgents.ts +207 -0
- package/src/commands/install/edgeAgents.spec.ts +1139 -0
- package/src/commands/install/edgeAgents.ts +524 -0
- package/src/commands/install/gitHubSaasAgents.spec.ts +360 -0
- package/src/commands/install/gitHubSaasAgents.ts +408 -0
- package/src/commands/install/gitLabAgents.spec.ts +236 -0
- package/src/commands/install/gitLabAgents.ts +221 -0
- package/src/commands/install/graylogAgent.ts +203 -0
- package/src/commands/install/graylogAgents.spec.ts +381 -0
- package/src/commands/install/helpers/creators.spec.ts +46 -0
- package/src/commands/install/helpers/creators.ts +434 -0
- package/src/commands/install/helpers/deleters.ts +38 -0
- package/src/commands/install/helpers/getters.spec.ts +38 -0
- package/src/commands/install/helpers/getters.ts +111 -0
- package/src/commands/install/helpers/index.ts +65 -0
- package/src/commands/install/helpers/inputs.spec.ts +78 -0
- package/src/commands/install/helpers/inputs.ts +699 -0
- package/src/commands/install/helpers/regex.ts +74 -0
- package/src/commands/install/helpers/templates/akamaiTemplates.ts +109 -0
- package/src/commands/install/helpers/templates/apigeexTemplates.ts +99 -0
- package/src/commands/install/helpers/templates/awsTemplates.ts +124 -0
- package/src/commands/install/helpers/templates/azureTemplates.ts +115 -0
- package/src/commands/install/helpers/templates/backstageTemplates.ts +87 -0
- package/src/commands/install/helpers/templates/edgeTemplates.ts +345 -0
- package/src/commands/install/helpers/templates/gitLabTemplates.ts +60 -0
- package/src/commands/install/helpers/templates/graylogTemplates.ts +63 -0
- package/src/commands/install/helpers/templates/ibmAPIConnectTemplates.ts +106 -0
- package/src/commands/install/helpers/templates/istioTemplates.ts +204 -0
- package/src/commands/install/helpers/templates/kafkaTemplates.ts +184 -0
- package/src/commands/install/helpers/templates/sapApiPortalTemplates.ts +104 -0
- package/src/commands/install/helpers/templates/sensediaTemplates.ts +108 -0
- package/src/commands/install/helpers/templates/softwareAGWebMethodsTemplates.ts +86 -0
- package/src/commands/install/helpers/templates/traceableTemplates.ts +123 -0
- package/src/commands/install/helpers/templates/wso2Templates.ts +75 -0
- package/src/commands/install/helpers/util.ts +45 -0
- package/src/commands/install/ibmAPIConnectAgents.spec.ts +539 -0
- package/src/commands/install/ibmAPIConnectAgents.ts +259 -0
- package/src/commands/install/index.ts +30 -0
- package/src/commands/install/istioAgents.spec.ts +1086 -0
- package/src/commands/install/istioAgents.ts +471 -0
- package/src/commands/install/kafkaAgents.spec.ts +707 -0
- package/src/commands/install/kafkaAgents.ts +358 -0
- package/src/commands/install/platform.ts +296 -0
- package/src/commands/install/sapApiPortalAgents.spec.ts +318 -0
- package/src/commands/install/sapApiPortalAgents.ts +248 -0
- package/src/commands/install/sensediaAgents.spec.ts +364 -0
- package/src/commands/install/sensediaAgents.ts +270 -0
- package/src/commands/install/softwareAGWebMethodsAgents.spec.ts +503 -0
- package/src/commands/install/softwareAGWebMethodsAgents.ts +191 -0
- package/src/commands/install/swaggerHubSaasAgents.spec.ts +351 -0
- package/src/commands/install/swaggerHubSaasAgents.ts +358 -0
- package/src/commands/install/traceableAgents.spec.ts +505 -0
- package/src/commands/install/traceableAgents.ts +323 -0
- package/src/commands/install/traceableSaasAgents.spec.ts +289 -0
- package/src/commands/install/traceableSaasAgents.ts +388 -0
- package/src/commands/install/wso2Agents.spec.ts +275 -0
- package/src/commands/install/wso2Agents.ts +197 -0
- package/src/commands/productize/helpers/productizationHelper.ts +466 -0
- package/src/commands/productize/index.spec.ts +367 -0
- package/src/commands/productize/index.ts +87 -0
- package/src/common/ApiServerClient.spec.ts +176 -0
- package/src/common/ApiServerClient.ts +1341 -0
- package/src/common/CacheController.spec.ts +207 -0
- package/src/common/CacheController.ts +162 -0
- package/src/common/CliConfigManager.spec.ts +83 -0
- package/src/common/CliConfigManager.ts +84 -0
- package/src/common/CompositeError.spec.ts +137 -0
- package/src/common/CompositeError.ts +94 -0
- package/src/common/CoreConfigController.spec.ts +107 -0
- package/src/common/CoreConfigController.ts +272 -0
- package/src/common/DefinitionsManager.spec.ts +267 -0
- package/src/common/DefinitionsManager.ts +328 -0
- package/src/common/Kubectl.ts +72 -0
- package/src/common/PlatformClient.ts +144 -0
- package/src/common/Renderer.spec.ts +141 -0
- package/src/common/Renderer.ts +426 -0
- package/src/common/TmpFile.spec.ts +85 -0
- package/src/common/TmpFile.ts +77 -0
- package/src/common/bashCommands.ts +88 -0
- package/src/common/basicPrompts.spec.ts +200 -0
- package/src/common/basicPrompts.ts +186 -0
- package/src/common/dataService.spec.ts +74 -0
- package/src/common/dataService.ts +330 -0
- package/src/common/errorHandler.ts +45 -0
- package/src/common/kubectl.spec.ts +72 -0
- package/src/common/modules.d.ts +6 -0
- package/src/common/resultRenderers.spec.ts +26 -0
- package/src/common/resultsRenderers.ts +169 -0
- package/src/common/types.ts +881 -0
- package/src/common/utils.spec.ts +200 -0
- package/src/common/utils.ts +530 -0
- package/src/main.ts +6 -0
- package/src/scripts/postinstall.js +54 -0
- package/src/scripts/resources/amplify-cli-utils-envs.js +83 -0
- package/src/scripts/resources/amplify-sdk-envs.js +62 -0
|
@@ -188,7 +188,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
188
188
|
return hostedAgentValues;
|
|
189
189
|
};
|
|
190
190
|
const generateOutput = async installConfig => {
|
|
191
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
191
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
192
192
|
};
|
|
193
193
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
194
194
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -220,7 +220,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
220
220
|
return hostedAgentValues;
|
|
221
221
|
};
|
|
222
222
|
const generateOutput = async installConfig => {
|
|
223
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
223
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
224
224
|
};
|
|
225
225
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
226
226
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -357,7 +357,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
357
357
|
return hostedAgentValues;
|
|
358
358
|
};
|
|
359
359
|
const generateOutput = async installConfig => {
|
|
360
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
360
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
361
361
|
};
|
|
362
362
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
363
363
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -367,7 +367,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
367
367
|
return hostedAgentValues;
|
|
368
368
|
};
|
|
369
369
|
const generateOutput = async installConfig => {
|
|
370
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
370
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
371
371
|
};
|
|
372
372
|
const createEncryptedAccessData = async (agentValues, dataplaneRes) => {
|
|
373
373
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -220,7 +220,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
220
220
|
return hostedAgentValues;
|
|
221
221
|
};
|
|
222
222
|
const generateOutput = async installConfig => {
|
|
223
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
223
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
224
224
|
};
|
|
225
225
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
226
226
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -158,15 +158,18 @@ const getApicDeployment = (region, env) => {
|
|
|
158
158
|
const deployments = {
|
|
159
159
|
[_types.Regions.US]: {
|
|
160
160
|
[_types.Platforms.prod]: _types.APICDeployments.US,
|
|
161
|
-
[_types.Platforms.staging]: _types.APICDeployments.TEAMS
|
|
161
|
+
[_types.Platforms.staging]: _types.APICDeployments.TEAMS,
|
|
162
|
+
[_types.Platforms.preprod]: _types.APICDeployments.USPreprod
|
|
162
163
|
},
|
|
163
164
|
[_types.Regions.EU]: {
|
|
164
165
|
[_types.Platforms.prod]: _types.APICDeployments.EU,
|
|
165
|
-
[_types.Platforms.staging]: _types.APICDeployments.EUStaging
|
|
166
|
+
[_types.Platforms.staging]: _types.APICDeployments.EUStaging,
|
|
167
|
+
[_types.Platforms.preprod]: _types.APICDeployments.EUPreprod
|
|
166
168
|
},
|
|
167
169
|
[_types.Regions.AP]: {
|
|
168
170
|
[_types.Platforms.prod]: _types.APICDeployments.AP,
|
|
169
|
-
[_types.Platforms.staging]: _types.APICDeployments.APStaging
|
|
171
|
+
[_types.Platforms.staging]: _types.APICDeployments.APStaging,
|
|
172
|
+
[_types.Platforms.preprod]: _types.APICDeployments.APPreprod
|
|
170
173
|
}
|
|
171
174
|
};
|
|
172
175
|
const savedDeployment = new _CliConfigManager.CliConfigManager().getAll()['apic-deployment'];
|
|
@@ -198,7 +198,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
198
198
|
return hostedAgentValues;
|
|
199
199
|
};
|
|
200
200
|
const generateOutput = async installConfig => {
|
|
201
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
201
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
202
202
|
};
|
|
203
203
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
204
204
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -194,7 +194,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
194
194
|
return hostedAgentValues;
|
|
195
195
|
};
|
|
196
196
|
const generateOutput = async installConfig => {
|
|
197
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
197
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType} region`;
|
|
198
198
|
};
|
|
199
199
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
200
200
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -68,7 +68,7 @@ class CoreConfigController {
|
|
|
68
68
|
|
|
69
69
|
// environment defined by using central cli "base-url" or axway "env" configs if set,
|
|
70
70
|
// otherwise its undefined (equals to prod)
|
|
71
|
-
const environment = !baseUrl || baseUrl === _types.ProdBaseUrls.US || baseUrl === _types.ProdBaseUrls.EU || baseUrl === _types.ProdBaseUrls.AP ? config.get('env') : 'staging';
|
|
71
|
+
const environment = !baseUrl || baseUrl === _types.ProdBaseUrls.US || baseUrl === _types.ProdBaseUrls.EU || baseUrl === _types.ProdBaseUrls.AP || baseUrl === _types.PreprodBaseUrls.US || baseUrl === _types.PreprodBaseUrls.EU ? config.get('env') : 'staging';
|
|
72
72
|
log(`getAuthInfo, baseUrl = ${baseUrl}, environment = ${environment}`);
|
|
73
73
|
const {
|
|
74
74
|
sdk
|
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.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;
|
|
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.PreprodRegions = exports.PreprodBaseUrls = 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
7
|
var _utils = require("./utils");
|
|
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 + ""; }
|
|
@@ -63,6 +63,7 @@ let ConfigTypes = exports.ConfigTypes = /*#__PURE__*/function (ConfigTypes) {
|
|
|
63
63
|
let AuthUrls = exports.AuthUrls = /*#__PURE__*/function (AuthUrls) {
|
|
64
64
|
AuthUrls["Staging"] = "https://login.axwaytest.net";
|
|
65
65
|
AuthUrls["Prod"] = "https://login.axway.com";
|
|
66
|
+
AuthUrls["Preprod"] = "https://login.na-us.axwaypreprod.net";
|
|
66
67
|
return AuthUrls;
|
|
67
68
|
}({});
|
|
68
69
|
let Regions = exports.Regions = /*#__PURE__*/function (Regions) {
|
|
@@ -71,9 +72,15 @@ let Regions = exports.Regions = /*#__PURE__*/function (Regions) {
|
|
|
71
72
|
Regions["AP"] = "AP";
|
|
72
73
|
return Regions;
|
|
73
74
|
}({});
|
|
75
|
+
let PreprodRegions = exports.PreprodRegions = /*#__PURE__*/function (PreprodRegions) {
|
|
76
|
+
PreprodRegions["US"] = "US";
|
|
77
|
+
PreprodRegions["EU"] = "EU";
|
|
78
|
+
return PreprodRegions;
|
|
79
|
+
}({});
|
|
74
80
|
let Platforms = exports.Platforms = /*#__PURE__*/function (Platforms) {
|
|
75
81
|
Platforms["prod"] = "prod";
|
|
76
82
|
Platforms["staging"] = "staging";
|
|
83
|
+
Platforms["preprod"] = "preprod";
|
|
77
84
|
return Platforms;
|
|
78
85
|
}({});
|
|
79
86
|
const ProdBaseUrls = exports.ProdBaseUrls = {
|
|
@@ -81,6 +88,10 @@ const ProdBaseUrls = exports.ProdBaseUrls = {
|
|
|
81
88
|
EU: 'https://central.eu-fr.axway.com',
|
|
82
89
|
AP: 'https://central.ap-sg.axway.com'
|
|
83
90
|
};
|
|
91
|
+
const PreprodBaseUrls = exports.PreprodBaseUrls = {
|
|
92
|
+
US: 'https://engage.na-us.axwaypreprod.net',
|
|
93
|
+
EU: 'https://engage.eu-fr.axwaypreprod.net'
|
|
94
|
+
};
|
|
84
95
|
const APICDeployments = exports.APICDeployments = {
|
|
85
96
|
EU: 'prod-eu',
|
|
86
97
|
EUStaging: 'staging-eu',
|
|
@@ -89,7 +100,10 @@ const APICDeployments = exports.APICDeployments = {
|
|
|
89
100
|
USStaging: 'staging',
|
|
90
101
|
TEAMS: 'teams',
|
|
91
102
|
AP: 'prod-ap',
|
|
92
|
-
APStaging: 'preprod'
|
|
103
|
+
APStaging: 'preprod',
|
|
104
|
+
USPreprod: 'preprod',
|
|
105
|
+
EUPreprod: 'preprod',
|
|
106
|
+
APPreprod: 'preprod'
|
|
93
107
|
};
|
|
94
108
|
const commonCmdArgsDescription = exports.commonCmdArgsDescription = {
|
|
95
109
|
'--account [value]': 'Override your default account config',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axway/axway-central-cli",
|
|
3
|
-
"version": "4.10.0-rc.
|
|
3
|
+
"version": "4.10.0-rc.2",
|
|
4
4
|
"description": "Manage APIs, services and publish to the Amplify Marketplace",
|
|
5
5
|
"homepage": "https://platform.axway.com",
|
|
6
6
|
"author": {
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"test:w": "yarn test -w --watch-extensions ts",
|
|
33
33
|
"type-check": "tsc -p tsconfig.build.json",
|
|
34
34
|
"start": "nodemon --watch src -e yaml,ts,js,json -i *.spec.ts --exec npm run build",
|
|
35
|
-
"sonar": "bash sonar.sh"
|
|
35
|
+
"sonar": "bash sonar.sh",
|
|
36
|
+
"postinstall": "node src/scripts/postinstall.js || node -e true"
|
|
36
37
|
},
|
|
37
38
|
"main": "./dist/main.js",
|
|
38
39
|
"amplify": {
|
package/src/cli.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import CLI from 'cli-kit';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
4
|
+
import { existsSync, outputJsonSync, readJsonSync } from 'fs-extra';
|
|
5
|
+
import { apply } from './commands/apply';
|
|
6
|
+
import { completion } from './commands/completion';
|
|
7
|
+
import { config } from './commands/config';
|
|
8
|
+
import { create } from './commands/create';
|
|
9
|
+
import { deleteCmd } from './commands/delete';
|
|
10
|
+
import { edit } from './commands/edit';
|
|
11
|
+
import { get } from './commands/get';
|
|
12
|
+
import { install } from './commands/install';
|
|
13
|
+
import { configFile, hbsCompare } from './common/utils';
|
|
14
|
+
import { productize } from './commands/productize';
|
|
15
|
+
|
|
16
|
+
dayjs.extend(relativeTime);
|
|
17
|
+
require('tls').DEFAULT_ECDH_CURVE = 'auto';
|
|
18
|
+
hbsCompare();
|
|
19
|
+
|
|
20
|
+
const { version } = require('../package.json');
|
|
21
|
+
|
|
22
|
+
// Create the configFile if it doesn't exist yet and read all extensions on load
|
|
23
|
+
if (!existsSync(configFile)) {
|
|
24
|
+
outputJsonSync(configFile, {});
|
|
25
|
+
}
|
|
26
|
+
const extensions = [...Object.values(readJsonSync(configFile).extensions || {})];
|
|
27
|
+
|
|
28
|
+
// cliParams export only needed for "completion" command and its testing
|
|
29
|
+
export const cliParams = {
|
|
30
|
+
title: 'Axway Engage CLI',
|
|
31
|
+
name: 'engage',
|
|
32
|
+
banner: '',
|
|
33
|
+
version,
|
|
34
|
+
commands: {
|
|
35
|
+
completion,
|
|
36
|
+
apply,
|
|
37
|
+
config,
|
|
38
|
+
create,
|
|
39
|
+
delete: deleteCmd,
|
|
40
|
+
edit,
|
|
41
|
+
get,
|
|
42
|
+
install,
|
|
43
|
+
productize,
|
|
44
|
+
},
|
|
45
|
+
extensions,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default new CLI({
|
|
49
|
+
title: 'Axway Central CLI',
|
|
50
|
+
name: 'central',
|
|
51
|
+
banner: '',
|
|
52
|
+
version,
|
|
53
|
+
commands: {
|
|
54
|
+
completion,
|
|
55
|
+
apply,
|
|
56
|
+
config,
|
|
57
|
+
create,
|
|
58
|
+
delete: deleteCmd,
|
|
59
|
+
edit,
|
|
60
|
+
get,
|
|
61
|
+
install,
|
|
62
|
+
productize,
|
|
63
|
+
},
|
|
64
|
+
extensions,
|
|
65
|
+
});
|