@axway/axway-central-cli 1.29.0-rc.8 → 1.29.0-rc.9

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.
@@ -74,12 +74,13 @@ exports.getTraceabilityConfig = getTraceabilityConfig;
74
74
  const getCentralConfig = async (apiCentralClient, apiServerClient, platformClient, defsManager, apicDeployment, installConfig) => {
75
75
  // initiate CentralAgentConfig
76
76
  let centralConfig = new _types.CentralAgentConfig();
77
+ await centralConfig.setBaseHost();
77
78
  centralConfig.authUrl = `${helpers.getAuthUrl()}/auth`;
78
79
  centralConfig.region = String(apiCentralClient.region || (await (0, _utils.getConfig)())[_types.ConfigTypes.REGION] || _types.Regions.US).toUpperCase();
79
80
  centralConfig.url = _types.ProdBaseUrls[centralConfig.region];
80
81
  log(apicDeployment);
81
- log(getApicDeployment(centralConfig.region, _types.Platforms.prod));
82
- centralConfig.deployment = apicDeployment || getApicDeployment(centralConfig.region, _types.Platforms.prod); // apic config
82
+ log(getApicDeployment(centralConfig.region, helpers.getEnv()));
83
+ centralConfig.deployment = apicDeployment || getApicDeployment(centralConfig.region, helpers.getEnv()); // apic config
83
84
 
84
85
  console.log('\nCONNECTION TO AMPLIFY PLATFORM:');
85
86
  console.log(_chalk.default.gray(`The agents need access to the Amplify Platform to register services.`)); // create/find environment
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.IstioInstallValues = exports.IstioAgentValues = exports.CloudFormationConfig = exports.Certificate = exports.Protocol = exports.TraceabilityConfig = exports.DosaAccount = exports.AgentInstallConfig = exports.AgentInstallSwitches = exports.CentralAgentConfig = exports.DOSAConfigInfo = exports.EnvironmentConfigInfo = exports.AgentTypes = exports.AgentResourceKind = exports.GatewayTypeToDataPlane = exports.DataPlaneNames = exports.GatewayTypes = exports.AgentNames = exports.BundleType = exports.GatewayMode = exports.AgentConfigTypes = exports.YesNoChoices = exports.YesNo = exports.TrueFalseChoices = exports.TrueFalse = exports.OutputTypes = exports.commonCmdArgsDescription = exports.APICDeployments = exports.IngestionProtocolToHosts = exports.IngestionHostsHTTP = exports.IngestionHTTPHosts = exports.IngestionHosts = exports.IngestionProtocol = exports.ProdBaseUrls = exports.Platforms = exports.Regions = exports.AuthUrls = exports.ConfigTypes = exports.BasePaths = exports.PublicDockerRepoBaseUrl = exports.PublicRepoUrl = exports.KindTypes = exports.Kind = exports.WAIT_TIMEOUT = exports.CACHE_FILE_TTL_MILLISECONDS = exports.MAX_CACHE_FILE_SIZE = exports.MAX_FILE_SIZE = exports.ABORT_TIMEOUT = exports.docsUrl = exports.cliVersionHeader = exports.defaultClientId = void 0;
7
7
 
8
+ var _dataService = require("./dataService");
9
+
8
10
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
11
 
10
12
  const defaultClientId = 'amplify-cli';
@@ -352,6 +354,11 @@ class CentralAgentConfig {
352
354
 
353
355
  _defineProperty(this, "scheme", void 0);
354
356
 
357
+ _defineProperty(this, "setBaseHost", async () => {
358
+ this.url = await (0, _dataService.getBaseUrl)();
359
+ [this.scheme, this.host] = this.url.split('://');
360
+ });
361
+
355
362
  this.orgId = '';
356
363
  this.ampcTeamName = '';
357
364
  this.region = Regions.US;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "1.29.0-rc.8",
3
+ "version": "1.29.0-rc.9",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {