@axway/axway-central-cli 4.9.0-rc.1 → 4.10.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.
- package/dist/commands/install/agents.js +3 -6
- package/dist/commands/install/akamaiSaasAgents.js +7 -25
- 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/swaggerHubSaasAgents.js +1 -1
- package/dist/commands/install/traceableSaasAgents.js +1 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ var _Renderer = _interopRequireDefault(require("../../common/Renderer"));
|
|
|
16
16
|
var _types = require("../../common/types");
|
|
17
17
|
var _utils = require("../../common/utils");
|
|
18
18
|
var akamaiAgents = _interopRequireWildcard(require("./akamaiAgents"));
|
|
19
|
+
var akamaiSaasAgents = _interopRequireWildcard(require("./akamaiSaasAgents"));
|
|
19
20
|
var apigeeXAgents = _interopRequireWildcard(require("./apigeexAgents"));
|
|
20
21
|
var awsAgents = _interopRequireWildcard(require("./awsAgents"));
|
|
21
22
|
var awsSaaSAgents = _interopRequireWildcard(require("./awsSaasAgents"));
|
|
@@ -41,8 +42,6 @@ var sensediaAgents = _interopRequireWildcard(require("./sensediaAgents"));
|
|
|
41
42
|
var wso2Agents = _interopRequireWildcard(require("./wso2Agents"));
|
|
42
43
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
43
44
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
44
|
-
// import * as akamaiSaasAgents from './akamaiSaasAgents';
|
|
45
|
-
|
|
46
45
|
const {
|
|
47
46
|
log
|
|
48
47
|
} = (0, _snooplogg.default)('engage: install: agents');
|
|
@@ -73,7 +72,7 @@ const agentInstallFlows = {
|
|
|
73
72
|
[_types.GatewayTypes.WSO2]: wso2Agents.WSO2InstallMethods
|
|
74
73
|
};
|
|
75
74
|
const saasAgentInstallFlows = {
|
|
76
|
-
|
|
75
|
+
[_types.GatewayTypes.AKAMAI]: akamaiSaasAgents.AkamaiSaaSInstallMethods,
|
|
77
76
|
[_types.SaaSGatewayTypes.AWS_GATEWAY]: awsSaaSAgents.AWSSaaSInstallMethods,
|
|
78
77
|
[_types.SaaSGatewayTypes.GITHUB]: gitHubAgents.GitHubSaaSInstallMethods,
|
|
79
78
|
[_types.SaaSGatewayTypes.APIGEEX_GATEWAY]: apigeeSaaSAgents.APIGEEXSaaSInstallMethods,
|
|
@@ -169,9 +168,7 @@ const agents = exports.agents = {
|
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
// if this check gets bigger, may think about an array of agents that can be both ground and embedded until ground agents become obsolete
|
|
172
|
-
if (gatewayType === _types.GatewayTypes.AWS_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_EVENTHUB || gatewayType === _types.GatewayTypes.APIGEEX_GATEWAY || gatewayType === _types.GatewayTypes.TRACEABLE
|
|
173
|
-
// gatewayType === GatewayTypes.AKAMAI
|
|
174
|
-
) {
|
|
171
|
+
if (gatewayType === _types.GatewayTypes.AWS_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_GATEWAY || gatewayType === _types.GatewayTypes.AZURE_EVENTHUB || gatewayType === _types.GatewayTypes.APIGEEX_GATEWAY || gatewayType === _types.GatewayTypes.TRACEABLE || gatewayType === _types.GatewayTypes.AKAMAI) {
|
|
175
172
|
// hosted vs on premise
|
|
176
173
|
installConfig.switches.isHostedInstall = (await (0, _basicPrompts.askList)({
|
|
177
174
|
msg: prompts.hostedAgentOption,
|
|
@@ -25,16 +25,14 @@ class DataplaneConfig {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
class AkamaiDataplaneConfig extends DataplaneConfig {
|
|
28
|
-
constructor(
|
|
28
|
+
constructor(baseUrl, segmentLength, groups) {
|
|
29
29
|
super("Akamai");
|
|
30
|
-
_defineProperty(this, "clientId", void 0);
|
|
31
30
|
_defineProperty(this, "baseUrl", void 0);
|
|
32
31
|
_defineProperty(this, "segmentLength", void 0);
|
|
33
|
-
_defineProperty(this, "
|
|
34
|
-
this.clientId = clientId;
|
|
32
|
+
_defineProperty(this, "environments", void 0);
|
|
35
33
|
this.baseUrl = baseUrl;
|
|
36
34
|
this.segmentLength = segmentLength;
|
|
37
|
-
this.
|
|
35
|
+
this.environments = groups;
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
class AkamaiGroups {
|
|
@@ -74,7 +72,8 @@ class SaasAkamaiAgentValues extends SaasAgentValues {
|
|
|
74
72
|
}
|
|
75
73
|
getAccessData() {
|
|
76
74
|
let data = JSON.stringify({
|
|
77
|
-
|
|
75
|
+
clientID: this.clientId,
|
|
76
|
+
clientSecret: this.clientSecret
|
|
78
77
|
});
|
|
79
78
|
return data;
|
|
80
79
|
}
|
|
@@ -146,21 +145,6 @@ const askEnvironments = async (centralEnvs, hostedAgentValues, excludeEnvironmen
|
|
|
146
145
|
hostedAgentValues.environments = envs;
|
|
147
146
|
hostedAgentValues.centralEnvironments = mappedCentralEnvs;
|
|
148
147
|
};
|
|
149
|
-
const validateFrequency = () => input => {
|
|
150
|
-
let val = (0, _basicPrompts.validateRegex)(helpers.frequencyRegex, helpers.invalidValueExampleErrMsg('frequency', '3d5h12m'))(input);
|
|
151
|
-
if (typeof val === "string") {
|
|
152
|
-
return val;
|
|
153
|
-
}
|
|
154
|
-
let r = input.toString().match(/^(\d*)m/);
|
|
155
|
-
if (r) {
|
|
156
|
-
// only minutes
|
|
157
|
-
let mins = r[1];
|
|
158
|
-
if (parseInt(mins, 10) < 30) {
|
|
159
|
-
return "Minimum frequency is 30m";
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return true;
|
|
163
|
-
};
|
|
164
148
|
|
|
165
149
|
//
|
|
166
150
|
// Questions for the configuration of Akamai agents
|
|
@@ -204,7 +188,7 @@ const gatewayConnectivity = async installConfig => {
|
|
|
204
188
|
return hostedAgentValues;
|
|
205
189
|
};
|
|
206
190
|
const generateOutput = async installConfig => {
|
|
207
|
-
return `Install complete of hosted agent for ${installConfig.gatewayType}
|
|
191
|
+
return `Install complete of hosted agent for ${installConfig.gatewayType}`;
|
|
208
192
|
};
|
|
209
193
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
210
194
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -236,7 +220,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
|
|
|
236
220
|
}) : installConfig.centralConfig.ampcEnvInfo.name;
|
|
237
221
|
if (installConfig.gatewayType === _types.GatewayTypes.AKAMAI) {
|
|
238
222
|
const akamaiGroupObjs = (akamaiAgentValues.environments || []).map((env, idx) => new AkamaiGroups(env, akamaiAgentValues.centralEnvironments[idx]));
|
|
239
|
-
akamaiAgentValues.dataplaneConfig = new AkamaiDataplaneConfig(akamaiAgentValues.
|
|
223
|
+
akamaiAgentValues.dataplaneConfig = new AkamaiDataplaneConfig(akamaiAgentValues.baseUrl, akamaiAgentValues.segmentLength, akamaiGroupObjs);
|
|
240
224
|
}
|
|
241
225
|
|
|
242
226
|
// create the data plane resource
|
|
@@ -279,7 +263,5 @@ const testables = exports.testables = {
|
|
|
279
263
|
ConfigFiles,
|
|
280
264
|
createEncryptedAccessData,
|
|
281
265
|
// <-- already exported
|
|
282
|
-
validateFrequency,
|
|
283
|
-
// <-- add this line for test access
|
|
284
266
|
askEnvironments // <-- add this for testing the new logic
|
|
285
267
|
};
|
|
@@ -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}`;
|
|
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}`;
|
|
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}`;
|
|
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}`;
|
|
224
224
|
};
|
|
225
225
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
226
226
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|
|
@@ -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}`;
|
|
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}`;
|
|
198
198
|
};
|
|
199
199
|
const createEncryptedAccessData = async (hostedAgentValues, dataplaneRes) => {
|
|
200
200
|
var _dataplaneRes$securit, _dataplaneRes$securit2;
|