@routr/ctl 2.13.17 → 2.13.20

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.
Files changed (43) hide show
  1. package/README.md +36 -36
  2. package/dist/commands/acl/create.js +18 -8
  3. package/dist/commands/acl/delete.js +1 -1
  4. package/dist/commands/acl/describe.js +1 -1
  5. package/dist/commands/acl/get.js +18 -8
  6. package/dist/commands/acl/update.js +1 -1
  7. package/dist/commands/agents/create.js +18 -8
  8. package/dist/commands/agents/delete.js +1 -1
  9. package/dist/commands/agents/describe.js +1 -1
  10. package/dist/commands/agents/get.js +18 -8
  11. package/dist/commands/agents/update.js +1 -1
  12. package/dist/commands/credentials/create.js +18 -8
  13. package/dist/commands/credentials/delete.js +1 -1
  14. package/dist/commands/credentials/describe.js +1 -1
  15. package/dist/commands/credentials/get.js +18 -8
  16. package/dist/commands/credentials/update.js +1 -1
  17. package/dist/commands/domains/create.js +18 -8
  18. package/dist/commands/domains/delete.js +1 -1
  19. package/dist/commands/domains/describe.js +1 -1
  20. package/dist/commands/domains/get.js +18 -8
  21. package/dist/commands/domains/update.js +1 -1
  22. package/dist/commands/numbers/create.js +18 -8
  23. package/dist/commands/numbers/delete.js +1 -1
  24. package/dist/commands/numbers/describe.js +1 -1
  25. package/dist/commands/numbers/get.js +18 -8
  26. package/dist/commands/numbers/update.js +1 -1
  27. package/dist/commands/peers/create.js +18 -8
  28. package/dist/commands/peers/delete.js +1 -1
  29. package/dist/commands/peers/describe.js +1 -1
  30. package/dist/commands/peers/get.js +18 -8
  31. package/dist/commands/peers/update.js +1 -1
  32. package/dist/commands/trunks/create.js +18 -8
  33. package/dist/commands/trunks/delete.js +1 -1
  34. package/dist/commands/trunks/describe.js +1 -1
  35. package/dist/commands/trunks/get.js +18 -8
  36. package/dist/commands/trunks/update.js +1 -1
  37. package/dist/delete.js +1 -1
  38. package/dist/help.js +17 -7
  39. package/dist/index.js +0 -1
  40. package/dist/utils.js +6 -6
  41. package/dist/validators.js +17 -18
  42. package/oclif.manifest.json +1 -1
  43. package/package.json +10 -10
package/dist/utils.js CHANGED
@@ -3,7 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTextForBalancingAlgorithm = exports.stringToHeaders = exports.toPascalCase = exports.showPaginatedList = exports.stringToAcl = exports.capitalize = void 0;
6
+ exports.stringToAcl = void 0;
7
+ exports.capitalize = capitalize;
8
+ exports.showPaginatedList = showPaginatedList;
9
+ exports.toPascalCase = toPascalCase;
10
+ exports.stringToHeaders = stringToHeaders;
11
+ exports.getTextForBalancingAlgorithm = getTextForBalancingAlgorithm;
7
12
  const common_1 = require("@routr/common");
8
13
  const sdk_1 = __importDefault(require("@routr/sdk"));
9
14
  // NOTE: Newer versions of inquirer have a bug that causes the following error:
@@ -12,7 +17,6 @@ const inquirer_1 = __importDefault(require("inquirer"));
12
17
  function capitalize(s) {
13
18
  return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
14
19
  }
15
- exports.capitalize = capitalize;
16
20
  const stringToAcl = (aclRule) => aclRule.split(",").map((rule) => rule.trim());
17
21
  exports.stringToAcl = stringToAcl;
18
22
  function getFunctionMapping(kind) {
@@ -81,13 +85,11 @@ async function showPaginatedList(request) {
81
85
  break;
82
86
  }
83
87
  }
84
- exports.showPaginatedList = showPaginatedList;
85
88
  function toPascalCase(s) {
86
89
  return s.replace(/(\w)(\w*)/g, function (g0, g1, g2) {
87
90
  return g1.toUpperCase() + g2.toLowerCase();
88
91
  });
89
92
  }
90
- exports.toPascalCase = toPascalCase;
91
93
  function stringToHeaders(headers) {
92
94
  return headers
93
95
  .split(",")
@@ -97,10 +99,8 @@ function stringToHeaders(headers) {
97
99
  return { name, value };
98
100
  });
99
101
  }
100
- exports.stringToHeaders = stringToHeaders;
101
102
  function getTextForBalancingAlgorithm(balancingAlgorithm) {
102
103
  return balancingAlgorithm === common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN
103
104
  ? "Round Robin"
104
105
  : "Least Connections";
105
106
  }
106
- exports.getTextForBalancingAlgorithm = getTextForBalancingAlgorithm;
@@ -1,6 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.maxContactsValidator = exports.domainUriValidator = exports.priorityValidator = exports.weightValidator = exports.portValidator = exports.hostValidator = exports.contactAddrValidator = exports.inboundUriValidator = exports.telUrlValidator = exports.aorLinkValidator = exports.aorValidator = exports.headersValidator = exports.sessionAffinityHeaderValidator = exports.optionalUsernameValidator = exports.usernameValidator = exports.aclRuleValidator = exports.nameValidator = void 0;
3
+ exports.nameValidator = nameValidator;
4
+ exports.aclRuleValidator = aclRuleValidator;
5
+ exports.usernameValidator = usernameValidator;
6
+ exports.optionalUsernameValidator = optionalUsernameValidator;
7
+ exports.sessionAffinityHeaderValidator = sessionAffinityHeaderValidator;
8
+ exports.headersValidator = headersValidator;
9
+ exports.aorValidator = aorValidator;
10
+ exports.aorLinkValidator = aorLinkValidator;
11
+ exports.telUrlValidator = telUrlValidator;
12
+ exports.inboundUriValidator = inboundUriValidator;
13
+ exports.contactAddrValidator = contactAddrValidator;
14
+ exports.hostValidator = hostValidator;
15
+ exports.portValidator = portValidator;
16
+ exports.weightValidator = weightValidator;
17
+ exports.priorityValidator = priorityValidator;
18
+ exports.domainUriValidator = domainUriValidator;
19
+ exports.maxContactsValidator = maxContactsValidator;
4
20
  /*
5
21
  * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
22
  * http://github.com/fonoster
@@ -33,7 +49,6 @@ function nameValidator(value) {
33
49
  }
34
50
  return true;
35
51
  }
36
- exports.nameValidator = nameValidator;
37
52
  function aclRuleValidator(value) {
38
53
  const hasValidACLRules = common_1.CommonConnect.isValidACLRule((0, utils_1.stringToAcl)(value));
39
54
  if ((0, utils_1.stringToAcl)(value).length === 0) {
@@ -44,7 +59,6 @@ function aclRuleValidator(value) {
44
59
  }
45
60
  return true;
46
61
  }
47
- exports.aclRuleValidator = aclRuleValidator;
48
62
  function usernameValidator(value) {
49
63
  const hasUsername = common_1.CommonConnect.hasUsername(value);
50
64
  const isValidUsername = common_1.CommonConnect.isValidUsername(value);
@@ -56,7 +70,6 @@ function usernameValidator(value) {
56
70
  }
57
71
  return true;
58
72
  }
59
- exports.usernameValidator = usernameValidator;
60
73
  function optionalUsernameValidator(value) {
61
74
  const isValidUsername = common_1.CommonConnect.isValidUsername(value);
62
75
  if (isValidUsername instanceof Error) {
@@ -64,7 +77,6 @@ function optionalUsernameValidator(value) {
64
77
  }
65
78
  return true;
66
79
  }
67
- exports.optionalUsernameValidator = optionalUsernameValidator;
68
80
  function sessionAffinityHeaderValidator(value) {
69
81
  const isValidSessionAffinityHeader = common_1.CommonConnect.isValidSessionAffinityHeader(value);
70
82
  if (isValidSessionAffinityHeader instanceof Error) {
@@ -72,7 +84,6 @@ function sessionAffinityHeaderValidator(value) {
72
84
  }
73
85
  return true;
74
86
  }
75
- exports.sessionAffinityHeaderValidator = sessionAffinityHeaderValidator;
76
87
  function headersValidator(value) {
77
88
  const headers = (0, utils_1.stringToHeaders)(value);
78
89
  const hasValidHeaders = common_1.CommonConnect.hasValidHeaders(headers);
@@ -81,7 +92,6 @@ function headersValidator(value) {
81
92
  }
82
93
  return true;
83
94
  }
84
- exports.headersValidator = headersValidator;
85
95
  function aorValidator(value) {
86
96
  const hasAOR = common_1.CommonConnect.hasAOR(value);
87
97
  const isValidAOR = common_1.CommonConnect.isValidAOR(value);
@@ -93,7 +103,6 @@ function aorValidator(value) {
93
103
  }
94
104
  return true;
95
105
  }
96
- exports.aorValidator = aorValidator;
97
106
  function aorLinkValidator(value) {
98
107
  const isValidAORLink = common_1.CommonConnect.isValidAORLink(value);
99
108
  if (isValidAORLink instanceof Error) {
@@ -101,7 +110,6 @@ function aorLinkValidator(value) {
101
110
  }
102
111
  return true;
103
112
  }
104
- exports.aorLinkValidator = aorLinkValidator;
105
113
  function telUrlValidator(value) {
106
114
  const isValidTelURL = common_1.CommonConnect.isValidTelUrl(value);
107
115
  if (isValidTelURL instanceof Error) {
@@ -109,7 +117,6 @@ function telUrlValidator(value) {
109
117
  }
110
118
  return true;
111
119
  }
112
- exports.telUrlValidator = telUrlValidator;
113
120
  function inboundUriValidator(value) {
114
121
  const hasInboundUri = common_1.CommonConnect.hasInboundUri(value);
115
122
  const isValidInboundUri = common_1.CommonConnect.isValidInboundUri(value);
@@ -121,7 +128,6 @@ function inboundUriValidator(value) {
121
128
  }
122
129
  return true;
123
130
  }
124
- exports.inboundUriValidator = inboundUriValidator;
125
131
  function contactAddrValidator(value) {
126
132
  const isValidContactAddress = common_1.CommonConnect.isValidContactAddress(value);
127
133
  if (isValidContactAddress instanceof Error) {
@@ -129,7 +135,6 @@ function contactAddrValidator(value) {
129
135
  }
130
136
  return true;
131
137
  }
132
- exports.contactAddrValidator = contactAddrValidator;
133
138
  function hostValidator(value) {
134
139
  const hasHost = common_1.CommonConnect.hasHost(value);
135
140
  const isValidHost = common_1.CommonConnect.isValidHost(value);
@@ -141,7 +146,6 @@ function hostValidator(value) {
141
146
  }
142
147
  return true;
143
148
  }
144
- exports.hostValidator = hostValidator;
145
149
  function portValidator(value) {
146
150
  const isValidPort = common_1.CommonConnect.isValidPort(value);
147
151
  if (isValidPort instanceof Error) {
@@ -149,7 +153,6 @@ function portValidator(value) {
149
153
  }
150
154
  return true;
151
155
  }
152
- exports.portValidator = portValidator;
153
156
  function weightValidator(value) {
154
157
  const isValidWeight = common_1.CommonConnect.isValidWeight(value);
155
158
  if (isValidWeight instanceof Error) {
@@ -157,7 +160,6 @@ function weightValidator(value) {
157
160
  }
158
161
  return true;
159
162
  }
160
- exports.weightValidator = weightValidator;
161
163
  function priorityValidator(value) {
162
164
  const isValidPriority = common_1.CommonConnect.isValidPriority(value);
163
165
  if (isValidPriority instanceof Error) {
@@ -165,7 +167,6 @@ function priorityValidator(value) {
165
167
  }
166
168
  return true;
167
169
  }
168
- exports.priorityValidator = priorityValidator;
169
170
  function domainUriValidator(value) {
170
171
  const hasDomainUri = common_1.CommonConnect.hasDomainUri(value);
171
172
  const isValidDomainUri = common_1.CommonConnect.isValidDomainUri(value);
@@ -177,7 +178,6 @@ function domainUriValidator(value) {
177
178
  }
178
179
  return true;
179
180
  }
180
- exports.domainUriValidator = domainUriValidator;
181
181
  function maxContactsValidator(value) {
182
182
  if (!value)
183
183
  return true;
@@ -187,4 +187,3 @@ function maxContactsValidator(value) {
187
187
  return "maxContacts must be 0 or greater";
188
188
  return true;
189
189
  }
190
- exports.maxContactsValidator = maxContactsValidator;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.13.17",
2
+ "version": "2.13.20",
3
3
  "commands": {
4
4
  "acl:create": {
5
5
  "id": "acl:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/ctl",
3
- "version": "2.13.17",
3
+ "version": "2.13.20",
4
4
  "description": "Routr Command-Line Tool",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "bin": {
@@ -25,11 +25,11 @@
25
25
  "@oclif/plugin-help": "^5",
26
26
  "@oclif/plugin-plugins": "^2.1.12",
27
27
  "@oclif/plugin-warn-if-update-available": "^2.0.19",
28
- "@routr/common": "^2.13.17",
29
- "@routr/sdk": "^2.13.17",
30
- "figlet": "^1.5.2",
28
+ "@routr/common": "^2.13.20",
29
+ "@routr/sdk": "^2.13.20",
30
+ "figlet": "^1.9.4",
31
31
  "fuzzy-search": "^3.2.1",
32
- "inquirer": "^8.2.6",
32
+ "inquirer": "^8.2.7",
33
33
  "inquirer-autocomplete-prompt": "^2.0.1",
34
34
  "moment": "^2.29.4",
35
35
  "prettyjson": "^1.2.5"
@@ -37,12 +37,12 @@
37
37
  "devDependencies": {
38
38
  "@oclif/test": "^2.2.20",
39
39
  "@types/chai": "^4.2.11",
40
- "@types/figlet": "^1.5.5",
40
+ "@types/figlet": "^1.7.0",
41
41
  "@types/fuzzy-search": "^2.1.2",
42
- "@types/inquirer": "^8.2.6",
42
+ "@types/inquirer": "^8.2.12",
43
43
  "@types/inquirer-autocomplete-prompt": "^2.0.2",
44
44
  "@types/mocha": "^8.2.3",
45
- "@types/node": "^18.11.9",
45
+ "@types/node": "^24.10.4",
46
46
  "@types/prettyjson": "^0.0.30",
47
47
  "chai": "^4",
48
48
  "mocha": "^9.2.2",
@@ -50,7 +50,7 @@
50
50
  "shx": "^0.3.3",
51
51
  "ts-node": "^10.9.1",
52
52
  "tslib": "^2.4.1",
53
- "typescript": "^4.9.5"
53
+ "typescript": "^5.9.3"
54
54
  },
55
55
  "oclif": {
56
56
  "bin": "rctl",
@@ -84,5 +84,5 @@
84
84
  "oclif"
85
85
  ],
86
86
  "types": "dist/index.d.ts",
87
- "gitHead": "c36b09038352bb1823003c581c8864483ed60997"
87
+ "gitHead": "642c22cc90bf362768411318c7d2e26ff7651ee3"
88
88
  }