@routr/ctl 2.0.8-alpha.21

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 (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +973 -0
  3. package/bin/dev +17 -0
  4. package/bin/dev.cmd +3 -0
  5. package/bin/run +25 -0
  6. package/bin/run.cmd +3 -0
  7. package/dist/base.d.ts +8 -0
  8. package/dist/base.js +42 -0
  9. package/dist/commands/acl/create.d.ts +6 -0
  10. package/dist/commands/acl/create.js +122 -0
  11. package/dist/commands/acl/delete.d.ts +6 -0
  12. package/dist/commands/acl/delete.js +40 -0
  13. package/dist/commands/acl/get.d.ts +19 -0
  14. package/dist/commands/acl/get.js +135 -0
  15. package/dist/commands/acl/update.d.ts +11 -0
  16. package/dist/commands/acl/update.js +100 -0
  17. package/dist/commands/agents/create.d.ts +6 -0
  18. package/dist/commands/agents/create.js +179 -0
  19. package/dist/commands/agents/delete.d.ts +6 -0
  20. package/dist/commands/agents/delete.js +40 -0
  21. package/dist/commands/agents/get.d.ts +19 -0
  22. package/dist/commands/agents/get.js +149 -0
  23. package/dist/commands/agents/update.d.ts +11 -0
  24. package/dist/commands/agents/update.js +150 -0
  25. package/dist/commands/credentials/create.d.ts +6 -0
  26. package/dist/commands/credentials/create.js +122 -0
  27. package/dist/commands/credentials/delete.d.ts +6 -0
  28. package/dist/commands/credentials/delete.js +40 -0
  29. package/dist/commands/credentials/get.d.ts +19 -0
  30. package/dist/commands/credentials/get.js +130 -0
  31. package/dist/commands/credentials/update.d.ts +11 -0
  32. package/dist/commands/credentials/update.js +98 -0
  33. package/dist/commands/domains/create.d.ts +6 -0
  34. package/dist/commands/domains/create.js +187 -0
  35. package/dist/commands/domains/delete.d.ts +6 -0
  36. package/dist/commands/domains/delete.js +40 -0
  37. package/dist/commands/domains/get.d.ts +19 -0
  38. package/dist/commands/domains/get.js +142 -0
  39. package/dist/commands/domains/update.d.ts +11 -0
  40. package/dist/commands/domains/update.js +163 -0
  41. package/dist/commands/numbers/create.d.ts +6 -0
  42. package/dist/commands/numbers/create.js +171 -0
  43. package/dist/commands/numbers/delete.d.ts +6 -0
  44. package/dist/commands/numbers/delete.js +40 -0
  45. package/dist/commands/numbers/get.d.ts +19 -0
  46. package/dist/commands/numbers/get.js +147 -0
  47. package/dist/commands/numbers/update.d.ts +11 -0
  48. package/dist/commands/numbers/update.js +130 -0
  49. package/dist/commands/peers/create.d.ts +6 -0
  50. package/dist/commands/peers/create.js +177 -0
  51. package/dist/commands/peers/delete.d.ts +6 -0
  52. package/dist/commands/peers/delete.js +40 -0
  53. package/dist/commands/peers/get.d.ts +19 -0
  54. package/dist/commands/peers/get.js +159 -0
  55. package/dist/commands/peers/update.d.ts +11 -0
  56. package/dist/commands/peers/update.js +156 -0
  57. package/dist/commands/trunks/create.d.ts +6 -0
  58. package/dist/commands/trunks/create.js +231 -0
  59. package/dist/commands/trunks/delete.d.ts +6 -0
  60. package/dist/commands/trunks/delete.js +40 -0
  61. package/dist/commands/trunks/get.d.ts +19 -0
  62. package/dist/commands/trunks/get.js +145 -0
  63. package/dist/commands/trunks/update.d.ts +11 -0
  64. package/dist/commands/trunks/update.js +217 -0
  65. package/dist/countries.d.ts +4 -0
  66. package/dist/countries.js +270 -0
  67. package/dist/delete.d.ts +9 -0
  68. package/dist/delete.js +46 -0
  69. package/dist/help.d.ts +6 -0
  70. package/dist/help.js +84 -0
  71. package/dist/index.d.ts +1 -0
  72. package/dist/index.js +23 -0
  73. package/dist/utils.d.ts +22 -0
  74. package/dist/utils.js +97 -0
  75. package/dist/validators.d.ts +16 -0
  76. package/dist/validators.js +180 -0
  77. package/oclif.manifest.json +1 -0
  78. package/package.json +89 -0
package/dist/delete.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
5
+ * http://github.com/fonoster/fonoster
6
+ *
7
+ * This file is part of Fonoster
8
+ *
9
+ * Licensed under the MIT License (the "License");
10
+ * you may not use this file except in compliance with
11
+ * the License. You may obtain a copy of the License at
12
+ *
13
+ * https://opensource.org/licenses/MIT
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ /* eslint-disable require-jsdoc */
22
+ const core_1 = require("@oclif/core");
23
+ const base_1 = require("./base");
24
+ const errors_1 = require("@oclif/core/lib/errors");
25
+ class DeleteCommand extends base_1.BaseCommand {
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ async deleteResource(API, funcName) {
28
+ const { args } = await this.parse(DeleteCommand);
29
+ if (!args.ref) {
30
+ core_1.CliUx.ux.action.stop();
31
+ throw new errors_1.CLIError("You must provide a resource ref before continuing");
32
+ }
33
+ core_1.CliUx.ux.action.start(`Deleting item ${args.ref}`);
34
+ await API[funcName](args.ref);
35
+ await core_1.CliUx.ux.wait(1000);
36
+ core_1.CliUx.ux.action.stop("Done");
37
+ }
38
+ async catch(err) {
39
+ return super.catch(err);
40
+ }
41
+ async finally(err) {
42
+ return super.finally(err);
43
+ }
44
+ }
45
+ exports.default = DeleteCommand;
46
+ DeleteCommand.args = [{ name: "ref" }];
package/dist/help.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Help } from "@oclif/core";
2
+ export default class MyHelpClass extends Help {
3
+ protected showRootHelp(): Promise<void>;
4
+ private showLogo;
5
+ private get customCommands();
6
+ }
package/dist/help.js ADDED
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
4
+ * http://github.com/fonoster
5
+ *
6
+ * This file is part of Routr.
7
+ *
8
+ * Licensed under the MIT License (the "License");
9
+ * you may not use this file except in compliance with
10
+ * the License. You may obtain a copy of the License at
11
+ *
12
+ * https://opensource.org/licenses/MIT
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ /* eslint-disable require-jsdoc */
21
+ // import { Help } from "@oclif/plugin-help"
22
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ var desc = Object.getOwnPropertyDescriptor(m, k);
25
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
26
+ desc = { enumerable: true, get: function() { return m[k]; } };
27
+ }
28
+ Object.defineProperty(o, k2, desc);
29
+ }) : (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ o[k2] = m[k];
32
+ }));
33
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
35
+ }) : function(o, v) {
36
+ o["default"] = v;
37
+ });
38
+ var __importStar = (this && this.__importStar) || function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ const core_1 = require("@oclif/core");
47
+ const figlet = __importStar(require("figlet"));
48
+ class MyHelpClass extends core_1.Help {
49
+ async showRootHelp() {
50
+ this.showLogo();
51
+ this.log(this.formatRoot());
52
+ this.log();
53
+ this.log(this.formatCommands(this.customCommands));
54
+ this.log();
55
+ }
56
+ showLogo() {
57
+ this.log("\x1b[32m");
58
+ this.log(figlet.textSync("Routr", {
59
+ horizontalLayout: "default",
60
+ verticalLayout: "default",
61
+ width: 60,
62
+ whitespaceBreak: true
63
+ }));
64
+ this.log("\x1b[0m");
65
+ }
66
+ get customCommands() {
67
+ const removeLastDot = (s) => {
68
+ const str = s.split("\n")[0].trim();
69
+ return str.endsWith(".") ? str.slice(0, str.length - 1) : s;
70
+ };
71
+ const lowercaseFirstLetter = (s) => s.charAt(0).toLowerCase() + s.slice(1);
72
+ return this.sortedCommands
73
+ .filter((c) => c.id)
74
+ .sort((a, b) => (a.id.includes(":") ? 1 : b.id.includes(":") ? -1 : 0))
75
+ .map((c) => {
76
+ const { description } = c;
77
+ return {
78
+ ...c,
79
+ description: removeLastDot(lowercaseFirstLetter(description))
80
+ };
81
+ });
82
+ }
83
+ }
84
+ exports.default = MyHelpClass;
@@ -0,0 +1 @@
1
+ export { run } from "@oclif/core";
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.run = void 0;
4
+ /*
5
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * http://github.com/fonoster
7
+ *
8
+ * This file is part of Routr.
9
+ *
10
+ * Licensed under the MIT License (the "License");
11
+ * you may not use this file except in compliance with
12
+ * the License. You may obtain a copy of the License at
13
+ *
14
+ * https://opensource.org/licenses/MIT
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ var core_1 = require("@oclif/core");
23
+ Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
@@ -0,0 +1,22 @@
1
+ import { Command } from "@oclif/core";
2
+ import { CommonConnect as CC } from "@routr/common";
3
+ export declare const capitalize: (s: string) => string;
4
+ export declare const stringToACL: (aclRule: string) => string[];
5
+ export type ShowTable = (request: {
6
+ showHeader: boolean;
7
+ data: Record<string, unknown>[];
8
+ self: Command;
9
+ flags: Record<string, unknown>;
10
+ }) => void;
11
+ export declare function showPaginatedList(request: {
12
+ showTable: ShowTable;
13
+ args: Record<string, string>;
14
+ flags: Record<string, unknown>;
15
+ kind: CC.Kind;
16
+ self: Command;
17
+ }): Promise<void>;
18
+ export declare function toPascalCase(s: string): string;
19
+ export declare function stringToHeaders(headers: string): {
20
+ name: string;
21
+ value: string;
22
+ }[];
package/dist/utils.js ADDED
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.stringToHeaders = exports.toPascalCase = exports.showPaginatedList = exports.stringToACL = exports.capitalize = void 0;
7
+ const common_1 = require("@routr/common");
8
+ const sdk_1 = __importDefault(require("@routr/sdk"));
9
+ // NOTE: Newer versions of inquirer have a bug that causes the following error:
10
+ // (node:75345) [ERR_REQUIRE_ESM] Error Plugin: @routr/ctl [ERR_REQUIRE_ESM]: require() of ES Module
11
+ const inquirer_1 = __importDefault(require("inquirer"));
12
+ const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
13
+ exports.capitalize = capitalize;
14
+ const stringToACL = (aclRule) => aclRule.split(",").map((rule) => rule.trim());
15
+ exports.stringToACL = stringToACL;
16
+ function getFunctionMapping(kind) {
17
+ switch (kind) {
18
+ case common_1.CommonConnect.Kind.ACL:
19
+ return { api: "ACL", get: "getACL", list: "listACLs" };
20
+ case common_1.CommonConnect.Kind.CREDENTIALS:
21
+ return {
22
+ api: "Credentials",
23
+ get: "getCredentials",
24
+ list: "listCredentials"
25
+ };
26
+ case common_1.CommonConnect.Kind.DOMAIN:
27
+ case common_1.CommonConnect.Kind.AGENT:
28
+ case common_1.CommonConnect.Kind.PEER:
29
+ case common_1.CommonConnect.Kind.TRUNK:
30
+ case common_1.CommonConnect.Kind.NUMBER:
31
+ return {
32
+ api: `${(0, exports.capitalize)(kind)}s`,
33
+ get: `get${(0, exports.capitalize)(kind)}`,
34
+ list: `list${(0, exports.capitalize)(kind)}s`
35
+ };
36
+ }
37
+ }
38
+ async function showPaginatedList(request) {
39
+ const { showTable, args, flags, kind, self } = request;
40
+ const api = new sdk_1.default[getFunctionMapping(kind).api]({
41
+ endpoint: flags.endpoint,
42
+ insecure: flags.insecure
43
+ });
44
+ // Show single item
45
+ if (args.ref) {
46
+ const result = [
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ await api[getFunctionMapping(kind).get](args.ref)
49
+ ];
50
+ showTable({ showHeader: true, data: result, self, flags });
51
+ return;
52
+ }
53
+ let firstBatch = true;
54
+ let pageToken = "";
55
+ const pageSize = flags.size;
56
+ // eslint-disable-next-line no-loops/no-loops, no-constant-condition
57
+ while (true) {
58
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
+ const result = await api[getFunctionMapping(kind).list]({
60
+ pageSize: pageSize,
61
+ pageToken
62
+ });
63
+ const list = result.items;
64
+ pageToken = result.nextPageToken;
65
+ // Dont ask this if is the first time or empty data
66
+ if (list.length > 0 && !firstBatch) {
67
+ const answer = await inquirer_1.default.prompt([
68
+ { name: "q", message: "More", type: "confirm" }
69
+ ]);
70
+ if (!answer.q)
71
+ break;
72
+ }
73
+ if (list.length < 1)
74
+ break;
75
+ showTable({ showHeader: firstBatch, data: list, self, flags });
76
+ firstBatch = false;
77
+ if (!pageToken)
78
+ break;
79
+ }
80
+ }
81
+ exports.showPaginatedList = showPaginatedList;
82
+ function toPascalCase(s) {
83
+ return s.replace(/(\w)(\w*)/g, function (g0, g1, g2) {
84
+ return g1.toUpperCase() + g2.toLowerCase();
85
+ });
86
+ }
87
+ exports.toPascalCase = toPascalCase;
88
+ function stringToHeaders(headers) {
89
+ return headers
90
+ .split(",")
91
+ .filter((header) => header)
92
+ .map((header) => {
93
+ const [name, value] = header.split(":");
94
+ return { name, value };
95
+ });
96
+ }
97
+ exports.stringToHeaders = stringToHeaders;
@@ -0,0 +1,16 @@
1
+ export declare function nameValidator(value: string): string | true;
2
+ export declare function aclRuleValidator(value: string): string | true;
3
+ export declare function usernameValidator(value: string): string | true;
4
+ export declare function optionalUsernameValidator(value: string): string | true;
5
+ export declare function sessionAffinityHeaderValidator(value: string): string | true;
6
+ export declare function headersValidator(value: string): string | true;
7
+ export declare function aorValidator(value: string): string | true;
8
+ export declare function aorLinkValidator(value: string): string | true;
9
+ export declare function telUrlValidator(value: string): string | true;
10
+ export declare function inboundUriValidator(value: string): string | true;
11
+ export declare function contactAddrValidator(value: string): string | true;
12
+ export declare function hostValidator(value: string): string | true;
13
+ export declare function portValidator(value: string): string | true;
14
+ export declare function weightValidator(value: string): string | true;
15
+ export declare function priorityValidator(value: string): string | true;
16
+ export declare function domainUriValidator(value: string): string | true;
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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;
4
+ /*
5
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * http://github.com/fonoster
7
+ *
8
+ * This file is part of Routr.
9
+ *
10
+ * Licensed under the MIT License (the "License");
11
+ * you may not use this file except in compliance with
12
+ * the License. You may obtain a copy of the License at
13
+ *
14
+ * https://opensource.org/licenses/MIT
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ /* eslint-disable require-jsdoc */
23
+ const common_1 = require("@routr/common");
24
+ const utils_1 = require("./utils");
25
+ function nameValidator(value) {
26
+ const hasName = common_1.CommonConnect.hasName(value);
27
+ const isValidName = common_1.CommonConnect.isValidName(value);
28
+ if (hasName instanceof Error) {
29
+ return hasName.message;
30
+ }
31
+ else if (isValidName instanceof Error) {
32
+ return isValidName.message;
33
+ }
34
+ return true;
35
+ }
36
+ exports.nameValidator = nameValidator;
37
+ function aclRuleValidator(value) {
38
+ const hasValidACLRules = common_1.CommonConnect.isValidACLRule((0, utils_1.stringToACL)(value));
39
+ if ((0, utils_1.stringToACL)(value).length === 0) {
40
+ return "acl rules are required";
41
+ }
42
+ else if (hasValidACLRules instanceof Error) {
43
+ return hasValidACLRules.message;
44
+ }
45
+ return true;
46
+ }
47
+ exports.aclRuleValidator = aclRuleValidator;
48
+ function usernameValidator(value) {
49
+ const hasUsername = common_1.CommonConnect.hasUsername(value);
50
+ const isValidUsername = common_1.CommonConnect.isValidUsername(value);
51
+ if (hasUsername instanceof Error) {
52
+ return hasUsername.message;
53
+ }
54
+ else if (isValidUsername instanceof Error) {
55
+ return isValidUsername.message;
56
+ }
57
+ return true;
58
+ }
59
+ exports.usernameValidator = usernameValidator;
60
+ function optionalUsernameValidator(value) {
61
+ const isValidUsername = common_1.CommonConnect.isValidUsername(value);
62
+ if (isValidUsername instanceof Error) {
63
+ return isValidUsername.message;
64
+ }
65
+ return true;
66
+ }
67
+ exports.optionalUsernameValidator = optionalUsernameValidator;
68
+ function sessionAffinityHeaderValidator(value) {
69
+ const isValidSessionAffinityHeader = common_1.CommonConnect.isValidSessionAffinityHeader(value);
70
+ if (isValidSessionAffinityHeader instanceof Error) {
71
+ return isValidSessionAffinityHeader.message;
72
+ }
73
+ return true;
74
+ }
75
+ exports.sessionAffinityHeaderValidator = sessionAffinityHeaderValidator;
76
+ function headersValidator(value) {
77
+ const headers = (0, utils_1.stringToHeaders)(value);
78
+ const hasValidHeaders = common_1.CommonConnect.hasValidHeaders(headers);
79
+ if (hasValidHeaders instanceof Error) {
80
+ return hasValidHeaders.message;
81
+ }
82
+ return true;
83
+ }
84
+ exports.headersValidator = headersValidator;
85
+ function aorValidator(value) {
86
+ const hasAOR = common_1.CommonConnect.hasAOR(value);
87
+ const isValidAOR = common_1.CommonConnect.isValidAOR(value);
88
+ if (hasAOR instanceof Error) {
89
+ return hasAOR.message;
90
+ }
91
+ else if (isValidAOR instanceof Error) {
92
+ return isValidAOR.message;
93
+ }
94
+ return true;
95
+ }
96
+ exports.aorValidator = aorValidator;
97
+ function aorLinkValidator(value) {
98
+ const isValidAORLink = common_1.CommonConnect.isValidAORLink(value);
99
+ if (isValidAORLink instanceof Error) {
100
+ return isValidAORLink.message;
101
+ }
102
+ return true;
103
+ }
104
+ exports.aorLinkValidator = aorLinkValidator;
105
+ function telUrlValidator(value) {
106
+ const hasTelUrl = common_1.CommonConnect.hasTelUrl(value);
107
+ if (hasTelUrl instanceof Error) {
108
+ return hasTelUrl.message;
109
+ }
110
+ return true;
111
+ }
112
+ exports.telUrlValidator = telUrlValidator;
113
+ function inboundUriValidator(value) {
114
+ const hasInboundUri = common_1.CommonConnect.hasInboundUri(value);
115
+ const isValidInboundUri = common_1.CommonConnect.isValidInboundUri(value);
116
+ if (hasInboundUri instanceof Error) {
117
+ return hasInboundUri.message;
118
+ }
119
+ else if (isValidInboundUri instanceof Error) {
120
+ return isValidInboundUri.message;
121
+ }
122
+ return true;
123
+ }
124
+ exports.inboundUriValidator = inboundUriValidator;
125
+ function contactAddrValidator(value) {
126
+ const isValidContactAddress = common_1.CommonConnect.isValidContactAddress(value);
127
+ if (isValidContactAddress instanceof Error) {
128
+ return isValidContactAddress.message;
129
+ }
130
+ return true;
131
+ }
132
+ exports.contactAddrValidator = contactAddrValidator;
133
+ function hostValidator(value) {
134
+ const hasHost = common_1.CommonConnect.hasHost(value);
135
+ const isValidHost = common_1.CommonConnect.isValidHost(value);
136
+ if (hasHost instanceof Error) {
137
+ return hasHost.message;
138
+ }
139
+ else if (isValidHost instanceof Error) {
140
+ return isValidHost.message;
141
+ }
142
+ return true;
143
+ }
144
+ exports.hostValidator = hostValidator;
145
+ function portValidator(value) {
146
+ const isValidPort = common_1.CommonConnect.isValidPort(value);
147
+ if (isValidPort instanceof Error) {
148
+ return isValidPort.message;
149
+ }
150
+ return true;
151
+ }
152
+ exports.portValidator = portValidator;
153
+ function weightValidator(value) {
154
+ const isValidWeight = common_1.CommonConnect.isValidWeight(value);
155
+ if (isValidWeight instanceof Error) {
156
+ return isValidWeight.message;
157
+ }
158
+ return true;
159
+ }
160
+ exports.weightValidator = weightValidator;
161
+ function priorityValidator(value) {
162
+ const isValidPriority = common_1.CommonConnect.isValidPriority(value);
163
+ if (isValidPriority instanceof Error) {
164
+ return isValidPriority.message;
165
+ }
166
+ return true;
167
+ }
168
+ exports.priorityValidator = priorityValidator;
169
+ function domainUriValidator(value) {
170
+ const hasDomainUri = common_1.CommonConnect.hasDomainUri(value);
171
+ const isValidDomainUri = common_1.CommonConnect.isValidDomainUri(value);
172
+ if (hasDomainUri instanceof Error) {
173
+ return hasDomainUri.message;
174
+ }
175
+ else if (isValidDomainUri instanceof Error) {
176
+ return isValidDomainUri.message;
177
+ }
178
+ return true;
179
+ }
180
+ exports.domainUriValidator = domainUriValidator;
@@ -0,0 +1 @@
1
+ {"version":"2.0.8-alpha.21","commands":{"acl:create":{"id":"acl:create","description":"Creates a new ACL","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating ACL US Eeast... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"acl:delete":{"id":"acl:delete","description":"Deletes an Access Control List","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"acl:get":{"id":"acl:get","description":"Shows a list of paginated ACLs or a single ACL if a ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Deny List Allow List\n9e7a88f0-8390-42f5-a2cb-689583ba9f4f Local Network ACL 0.0.0.0/0 10.0.0.28 \n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to an ACL","required":false}]},"acl:update":{"id":"acl:update","description":"Updates an existing ACL","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating ACL US East... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an ACL","required":true}]},"agents:create":{"id":"agents:create","description":"Creates a new Agent","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Agent Jhon Doe... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"agents:delete":{"id":"agents:delete","description":"Deletes an Agent","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"agents:get":{"id":"agents:get","description":"Shows a list of paginated Agents or a single Agent if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Username Domain Privacy Enabled\nd31f5fb8-e367-42f7-9884-1a7999f53fe8 John Doe jdoe sip.local PRIVATE Yes\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"The number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"Optional Agents reference","required":false}]},"agents:update":{"id":"agents:update","description":"Updates an existing Agent","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Agent John Doe... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing Agent","required":true}]},"credentials:create":{"id":"credentials:create","description":"Creates a new set of Credentials","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Credentials JDoe Access... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"credentials:delete":{"id":"credentials:delete","description":"Deletes a set of Credentials","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"credentials:get":{"id":"credentials:get","description":"Shows a list of paginated Credentials or a single set if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Deny List Allow List\n80181ca6-d4aa-4575-9375-8f72b07d6666 Europe ACL 0.0.0.0/0 10.0.0.25 \n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to a set of Credentials","required":false}]},"credentials:update":{"id":"credentials:update","description":"Updates an existing set of Credentials","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Credentials JDoe Credentials... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing set of Credentials","required":true}]},"domains:create":{"id":"domains:create","description":"Creates a new set Domain","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Domain Local Domain... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"domains:delete":{"id":"domains:delete","description":"Deletes a Domain","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"domains:get":{"id":"domains:get","description":"Shows a list of paginated Domains or a single Domain if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name URI \nab2b6959-f497-4b14-903b-85a7c464b564 Local Domain sip.local\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to a Domain","required":false}]},"domains:update":{"id":"domains:update","description":"Updates an existing Domain","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Domain Local... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing Domain","required":true}]},"numbers:create":{"id":"numbers:create","description":"Creates a new Number","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Number (784) 317-8170... a134487f-a668-4509-9ddd-dcbc98175468\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"numbers:delete":{"id":"numbers:delete","description":"Deletes a Number","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"numbers:get":{"id":"numbers:get","description":"Shows a list of paginated Numbers or a single Number if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Telephony URL AOR Link Geo \na134487f-a668-4509-9ddd-dcbc98175468 (785) 317-8070 +17853178070 sip:1001@sip.local Cameron, USA (US)\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to a Number","required":false}]},"numbers:update":{"id":"numbers:update","description":"Updates an existing set of Credentials","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Number (785) 317-8070... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing Number","required":true}]},"peers:create":{"id":"peers:create","description":"Creates a new Peer","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Peer Asterisk Conference... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"peers:delete":{"id":"peers:delete","description":"Deletes a Peer","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"peers:get":{"id":"peers:get","description":"Shows a list of paginated Peers or a single Peer if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Username AOR Balancing Algorithm Session Affinity \n6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference backend:conference ROUND_ROBIN Yes \n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to a Peer","required":false}]},"peers:update":{"id":"peers:update","description":"Updates an existing Peer","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Peer Asterisk Conf... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing Peer","required":true}]},"trunks:create":{"id":"trunks:create","description":"Creates a new Trunk","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nCreating Trunk T01... b148b4b4-6884-4c06-bb7e-bd098f5fe793\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[]},"trunks:delete":{"id":"trunks:delete","description":"Deletes a Trunk","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nDeleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref"}]},"trunks:get":{"id":"trunks:get","description":"Shows a list of paginated Trunks or a single Trunk if ref is provided","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nRef Name Inbound SIP URI \n8cde8ea9-3c58-4dbe-b2cf-23c4413dd4cc Local sip.t01.provider.net\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"},"size":{"name":"size","type":"option","char":"s","description":"the number of items to return","multiple":false,"default":50}},"args":[{"name":"ref","description":"optional reference to a Trunk","required":false}]},"trunks:update":{"id":"trunks:update","description":"Updates an existing Trunk","strict":true,"pluginName":"@routr/ctl","pluginAlias":"@routr/ctl","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>\nUpdating Trunk T01... 80181ca6-d4aa-4575-9375-8f72b07d5555\n"],"flags":{"extended":{"name":"extended","type":"boolean","char":"x","description":"extended output format","allowNo":false},"insecure":{"name":"insecure","type":"boolean","char":"i","description":"allow insecure connections to the routr server","allowNo":false},"endpoint":{"name":"endpoint","type":"option","char":"e","description":"endpoint to connect to the routr server","multiple":false,"default":"localhost:51907"}},"args":[{"name":"ref","description":"reference to an existing Trunk","required":true}]}}}
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "@routr/ctl",
3
+ "version": "2.0.8-alpha.21",
4
+ "description": "Routr Command-Line Tool",
5
+ "author": "Pedro Sanders <psanders@fonoster.com>",
6
+ "bin": {
7
+ "rctl": "./bin/run"
8
+ },
9
+ "homepage": "https://github.com/fonoster/routr#readme",
10
+ "license": "MIT",
11
+ "main": "dist/index.js",
12
+ "repository": "https://github.com/fonoster/routr",
13
+ "files": [
14
+ "/bin",
15
+ "/dist",
16
+ "/npm-shrinkwrap.json",
17
+ "/oclif.manifest.json"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "dependencies": {
23
+ "@oclif/core": "^1.24.0",
24
+ "@oclif/plugin-autocomplete": "^1.3.10",
25
+ "@oclif/plugin-help": "^5",
26
+ "@oclif/plugin-plugins": "^2.1.12",
27
+ "@oclif/plugin-warn-if-update-available": "^2.0.19",
28
+ "@routr/common": "^2.0.8-alpha.21",
29
+ "@routr/sdk": "^2.0.8-alpha.21",
30
+ "figlet": "^1.5.2",
31
+ "fuzzy-search": "^3.2.1",
32
+ "inquirer": "^8.2.5",
33
+ "inquirer-autocomplete-prompt": "^2.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "@oclif/test": "^2.2.20",
37
+ "@types/chai": "^4.2.11",
38
+ "@types/figlet": "^1.5.5",
39
+ "@types/fuzzy-search": "^2.1.2",
40
+ "@types/inquirer": "^9.0.3",
41
+ "@types/inquirer-autocomplete-prompt": "^3.0.0",
42
+ "@types/mocha": "^8.2.3",
43
+ "@types/node": "^18.11.9",
44
+ "chai": "^4",
45
+ "mocha": "^9.2.2",
46
+ "oclif": "^3",
47
+ "shx": "^0.3.3",
48
+ "ts-node": "^10.9.1",
49
+ "tslib": "^2.4.1",
50
+ "typescript": "^4.9.4"
51
+ },
52
+ "oclif": {
53
+ "bin": "rctl",
54
+ "dirname": "rctl",
55
+ "commands": "./dist/commands",
56
+ "helpClass": "./dist/help",
57
+ "plugins": [
58
+ "@oclif/plugin-plugins",
59
+ "@oclif/plugin-warn-if-update-available",
60
+ "@oclif/plugin-autocomplete"
61
+ ],
62
+ "warn-if-update-available": {
63
+ "timeoutInDays": 1,
64
+ "message": "<%= config.name %> update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>."
65
+ },
66
+ "topicSeparator": " ",
67
+ "topics": {
68
+ "hello": {
69
+ "description": "Say hello to the world and others"
70
+ }
71
+ }
72
+ },
73
+ "scripts": {
74
+ "build": "shx rm -rf dist && tsc -b --force",
75
+ "postpack": "shx rm -f oclif.manifest.json",
76
+ "prepack": "yarn build && oclif manifest && oclif readme",
77
+ "test": "mocha --forbid-only \"test/**/*.test.ts\"",
78
+ "version": "oclif readme && git add README.md"
79
+ },
80
+ "engines": {
81
+ "node": ">=12.0.0"
82
+ },
83
+ "bugs": "https://github.com/https://github.com/fonoster/routr/https://github.com/fonoster/routr/issues",
84
+ "keywords": [
85
+ "oclif"
86
+ ],
87
+ "types": "dist/index.d.ts",
88
+ "gitHead": "1841d2d8d51bebfdc3af7e81435064e81b176449"
89
+ }