@axway/axway-central-cli 3.2.0-rc.0 → 3.2.0-rc.1

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.
@@ -15,6 +15,7 @@ class TraceableAgentValues {
15
15
  constructor() {
16
16
  _defineProperty(this, "namespace", void 0);
17
17
  _defineProperty(this, "traceableToken", void 0);
18
+ _defineProperty(this, "traceableRegion", void 0);
18
19
  _defineProperty(this, "environments", void 0);
19
20
  _defineProperty(this, "internalDomains", void 0);
20
21
  _defineProperty(this, "basePathSegmentLen", void 0);
@@ -25,6 +26,7 @@ class TraceableAgentValues {
25
26
  isNew: false
26
27
  };
27
28
  this.traceableToken = '';
29
+ this.traceableRegion = _types.TraceableRegionType.US;
28
30
  this.environments = [];
29
31
  this.internalDomains = false;
30
32
  this.basePathSegmentLen = 2;
@@ -42,6 +44,7 @@ const traceableHelmOverrideTemplate = () => {
42
44
  traceable:
43
45
  token: {{traceableToken}}
44
46
  environments: {{environments}}
47
+ region: {{traceableRegion}}
45
48
  internalDomains: {{internalDomains}}
46
49
  basePathSegmentLen: {{basePathSegmentLen}}
47
50
 
@@ -63,6 +66,7 @@ exports.traceableHelmOverrideTemplate = traceableHelmOverrideTemplate;
63
66
  const traceableEnvVarTemplate = () => {
64
67
  return `# Traceable configs
65
68
  TRACEABLE_TOKEN={{traceableToken}}
69
+ TRACEABLE_REGION={{traceableRegion}}
66
70
  TRACEABLE_ENVIRONMENTS={{environments}}
67
71
  TRACEABLE_INTERNAL_DOMAINS={{internalDomains}}
68
72
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.testables = exports.gatewayConnectivity = exports.completeInstall = exports.askConfigType = exports.askBundleType = exports.amplifyAgentsNs = exports.TraceableInstallMethods = exports.ConfigFiles = void 0;
6
+ exports.testables = exports.gatewayConnectivity = exports.completeInstall = exports.askTraceableRegion = exports.askConfigType = exports.askBundleType = exports.amplifyAgentsNs = exports.TraceableInstallMethods = exports.ConfigFiles = void 0;
7
7
  var _chalk = _interopRequireDefault(require("chalk"));
8
8
  var _snooplogg = _interopRequireDefault(require("snooplogg"));
9
9
  var _Kubectl = require("../../common/Kubectl");
@@ -34,6 +34,7 @@ const prompts = {
34
34
  configTypeMsg: 'Select the mode of installation',
35
35
  agentNamespace: 'Enter the namespace to use for the Amplify Traceable Agents',
36
36
  enterToken: 'Enter the token that the agent will use',
37
+ enterRegion: 'Enter the region that the agent will use',
37
38
  enterEnvironments: 'Enter an environment that the agent will use',
38
39
  enterInternalDomains: 'Enter if the internal domains should be used by the agent',
39
40
  enterBasePathSegmentLen: 'Enter the base path segment length that agent will use for lookup',
@@ -58,6 +59,19 @@ const askToken = async () => await (0, _basicPrompts.askInput)({
58
59
  msg: prompts.enterToken,
59
60
  allowEmptyInput: false
60
61
  });
62
+ const askTraceableRegion = async () => {
63
+ return await (0, _basicPrompts.askList)({
64
+ msg: prompts.enterRegion,
65
+ choices: Object.entries(_types.TraceableRegionType).reduce((accumulator, curr) => {
66
+ return accumulator.concat({
67
+ name: curr[0],
68
+ value: curr[1]
69
+ });
70
+ }, []),
71
+ default: _types.TraceableRegionType.US
72
+ });
73
+ };
74
+ exports.askTraceableRegion = askTraceableRegion;
61
75
  const askEnvironments = async () => {
62
76
  let askEnvs = true;
63
77
  let envs = [];
@@ -65,9 +79,14 @@ const askEnvironments = async () => {
65
79
  while (askEnvs) {
66
80
  const env = await (0, _basicPrompts.askInput)({
67
81
  msg: prompts.enterEnvironments,
68
- allowEmptyInput: false
82
+ allowEmptyInput: true
69
83
  });
70
- envs.push(env);
84
+ if (envs.length === 0 && env.toString().trim() === "") {
85
+ break;
86
+ }
87
+ if (env && env.toString().trim() !== "") {
88
+ envs.push(env);
89
+ }
71
90
  askEnvs = (await (0, _basicPrompts.askList)({
72
91
  msg: prompts.enterMoreEnviroments,
73
92
  default: _types.YesNo.No,
@@ -103,6 +122,7 @@ const gatewayConnectivity = async installConfig => {
103
122
  console.log(_chalk.default.gray("The Discovery Agent needs to connect to the Traceable API Gateway to discover API's for publishing to Amplify Central."));
104
123
  }
105
124
  traceableAgentValues.traceableToken = await askToken();
125
+ traceableAgentValues.traceableRegion = await askTraceableRegion();
106
126
  traceableAgentValues.environments = await askEnvironments();
107
127
  traceableAgentValues.internalDomains = await askInternalDomains();
108
128
  traceableAgentValues.basePathSegmentLen = await askBasePathSegmentLen();
@@ -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.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.AuthUrls = exports.AgentTypes = exports.AgentResourceKind = exports.AgentNames = exports.AgentInstallSwitches = exports.AgentInstallConfig = exports.AgentConfigTypes = exports.AWSRegions = exports.APIGEEXDISCOVERYMODES = 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.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.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; }
@@ -742,4 +742,10 @@ let IDPAuthType = exports.IDPAuthType = /*#__PURE__*/function (IDPAuthType) {
742
742
  IDPAuthType["AccessToken"] = "AccessToken";
743
743
  IDPAuthType["ClientSecret"] = "ClientSecret";
744
744
  return IDPAuthType;
745
+ }({});
746
+ let TraceableRegionType = exports.TraceableRegionType = /*#__PURE__*/function (TraceableRegionType) {
747
+ TraceableRegionType["US"] = "US";
748
+ TraceableRegionType["EU"] = "EU";
749
+ TraceableRegionType["AP"] = "AP";
750
+ return TraceableRegionType;
745
751
  }({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "3.2.0-rc.0",
3
+ "version": "3.2.0-rc.1",
4
4
  "description": "Manage APIs, services and publish to the Amplify Marketplace",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {