@axway/axway-central-cli 2.15.0-rc.1 → 2.15.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.
@@ -10,7 +10,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
12
  const deleteByResourceType = async (client, defsManager, name, resourceType, resourceShortName, scopeName = '') => {
13
- console.log(`Creating a new ${resourceType}`); // NOTE: only a first found set is used
13
+ console.log(`Deleting ${resourceType}`); // NOTE: only a first found set is used
14
14
 
15
15
  const defs = defsManager.findDefsByWord(resourceShortName);
16
16
 
@@ -170,6 +170,27 @@ const askForAWSCredentials = async hostedAgentValues => {
170
170
  }
171
171
 
172
172
  return hostedAgentValues;
173
+ };
174
+
175
+ const validateFrequency = () => input => {
176
+ let val = (0, _basicPrompts.validateRegex)(helpers.frequencyRegex, helpers.invalidValueExampleErrMsg('frequency', '3d5h12m'))(input);
177
+
178
+ if (typeof val === "string") {
179
+ return val;
180
+ }
181
+
182
+ let r = input.toString().match(/^(\d*)m/);
183
+
184
+ if (r) {
185
+ // only minutes
186
+ let mins = r[1];
187
+
188
+ if (parseInt(mins, 10) < 30) {
189
+ return "Minimum frequency is 30m";
190
+ }
191
+ }
192
+
193
+ return true;
173
194
  }; // @ts-ignore
174
195
 
175
196
 
@@ -187,10 +208,10 @@ const gatewayConnectivity = async installConfig => {
187
208
 
188
209
 
189
210
  log("getting the frequency and if the agent should run now");
190
- console.log(_chalk.default.gray(`XXdXXhXXm format, where 30m = 30 minutes, 1h = 1 hour, 7d = 7 days, and 7d1h30m = 7 days 1 hour and 30 minutes`));
211
+ console.log(_chalk.default.gray(`00d00h00m format, where 30m = 30 minutes, 1h = 1 hour, 7d = 7 days, and 7d1h30m = 7 days 1 hour and 30 minutes. Minimum of 30m.`));
191
212
  hostedAgentValues.frequency = await (0, _basicPrompts.askInput)({
192
213
  msg: SaasPrompts.FREQUENCY,
193
- validate: (0, _basicPrompts.validateRegex)(helpers.frequencyRegex, helpers.invalidValueExampleErrMsg('frequency', '3d5h12m')),
214
+ validate: validateFrequency(),
194
215
  allowEmptyInput: true
195
216
  });
196
217
  hostedAgentValues.queue = (await (0, _basicPrompts.askList)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "2.15.0-rc.1",
3
+ "version": "2.15.0-rc.2",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {