@routr/ctl 2.0.8-alpha.23 → 2.0.8-alpha.25

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 (47) hide show
  1. package/README.md +170 -51
  2. package/dist/base.d.ts +0 -1
  3. package/dist/base.js +0 -4
  4. package/dist/commands/acl/create.js +43 -43
  5. package/dist/commands/acl/describe.d.ts +10 -0
  6. package/dist/commands/acl/describe.js +62 -0
  7. package/dist/commands/acl/get.d.ts +1 -0
  8. package/dist/commands/acl/get.js +5 -20
  9. package/dist/commands/acl/update.js +43 -43
  10. package/dist/commands/agents/create.js +97 -97
  11. package/dist/commands/agents/describe.d.ts +10 -0
  12. package/dist/commands/agents/describe.js +72 -0
  13. package/dist/commands/agents/get.d.ts +1 -0
  14. package/dist/commands/agents/get.js +4 -26
  15. package/dist/commands/agents/update.js +88 -88
  16. package/dist/commands/credentials/describe.d.ts +10 -0
  17. package/dist/commands/credentials/describe.js +61 -0
  18. package/dist/commands/credentials/get.d.ts +1 -0
  19. package/dist/commands/credentials/get.js +5 -20
  20. package/dist/commands/credentials/update.js +39 -39
  21. package/dist/commands/domains/create.js +105 -105
  22. package/dist/commands/domains/describe.d.ts +10 -0
  23. package/dist/commands/domains/describe.js +78 -0
  24. package/dist/commands/domains/get.d.ts +1 -0
  25. package/dist/commands/domains/get.js +4 -24
  26. package/dist/commands/domains/update.js +99 -99
  27. package/dist/commands/numbers/create.js +88 -88
  28. package/dist/commands/numbers/describe.d.ts +10 -0
  29. package/dist/commands/numbers/describe.js +72 -0
  30. package/dist/commands/numbers/get.d.ts +1 -0
  31. package/dist/commands/numbers/get.js +4 -24
  32. package/dist/commands/numbers/update.js +69 -69
  33. package/dist/commands/peers/create.js +106 -97
  34. package/dist/commands/peers/describe.d.ts +10 -0
  35. package/dist/commands/peers/describe.js +80 -0
  36. package/dist/commands/peers/get.d.ts +1 -0
  37. package/dist/commands/peers/get.js +6 -43
  38. package/dist/commands/peers/update.js +103 -94
  39. package/dist/commands/trunks/create.js +143 -139
  40. package/dist/commands/trunks/describe.d.ts +10 -0
  41. package/dist/commands/trunks/describe.js +85 -0
  42. package/dist/commands/trunks/get.d.ts +1 -0
  43. package/dist/commands/trunks/get.js +6 -33
  44. package/dist/commands/trunks/update.js +146 -142
  45. package/dist/delete.js +8 -3
  46. package/oclif.manifest.json +267 -183
  47. package/package.json +8 -5
@@ -59,56 +59,56 @@ class CreateCommand extends base_1.BaseCommand {
59
59
  async run() {
60
60
  const { flags } = await this.parse(CreateCommand);
61
61
  const { endpoint, insecure } = flags;
62
- this.log("This utility will help you create a new ACL");
63
- this.log("Press ^C at any time to quit.");
64
- const answers = await inquirer_1.default.prompt([
65
- {
66
- name: "name",
67
- message: "Friendly Name",
68
- type: "input",
69
- validate: validators_1.nameValidator
70
- },
71
- {
72
- name: "deny",
73
- message: "Deny CIDR Networks",
74
- type: "input",
75
- default: "0.0.0.0/0",
76
- validate: validators_1.aclRuleValidator
77
- },
78
- {
79
- name: "allow",
80
- message: "Allow CIDR Networks",
81
- type: "input",
82
- validate: validators_1.aclRuleValidator
83
- },
84
- {
85
- name: "confirm",
86
- message: "Ready?",
87
- type: "confirm"
62
+ try {
63
+ this.log("This utility will help you create a new ACL");
64
+ this.log("Press ^C at any time to quit.");
65
+ const answers = await inquirer_1.default.prompt([
66
+ {
67
+ name: "name",
68
+ message: "Friendly Name",
69
+ type: "input",
70
+ validate: validators_1.nameValidator
71
+ },
72
+ {
73
+ name: "deny",
74
+ message: "Deny CIDR Networks",
75
+ type: "input",
76
+ default: "0.0.0.0/0",
77
+ validate: validators_1.aclRuleValidator
78
+ },
79
+ {
80
+ name: "allow",
81
+ message: "Allow CIDR Networks",
82
+ type: "input",
83
+ validate: validators_1.aclRuleValidator
84
+ },
85
+ {
86
+ name: "confirm",
87
+ message: "Ready?",
88
+ type: "confirm"
89
+ }
90
+ ]);
91
+ // Re-assign allow and deny rules as arrays
92
+ answers.allow = (0, utils_1.stringToACL)(answers.allow);
93
+ answers.deny = (0, utils_1.stringToACL)(answers.deny);
94
+ if (!answers.confirm) {
95
+ this.warn("Aborted");
88
96
  }
89
- ]);
90
- // Re-assign allow and deny rules as arrays
91
- answers.allow = (0, utils_1.stringToACL)(answers.allow);
92
- answers.deny = (0, utils_1.stringToACL)(answers.deny);
93
- if (!answers.confirm) {
94
- this.warn("Aborted");
95
- }
96
- else {
97
- try {
97
+ else {
98
98
  core_1.CliUx.ux.action.start(`Creating ACL ${answers.name}`);
99
99
  const api = new sdk_1.default.ACL({ endpoint, insecure });
100
100
  const acl = await api.createACL(answers);
101
101
  await core_1.CliUx.ux.wait(1000);
102
102
  core_1.CliUx.ux.action.stop(acl.ref);
103
103
  }
104
- catch (e) {
105
- core_1.CliUx.ux.action.stop();
106
- if (e.code === grpc.status.ALREADY_EXISTS) {
107
- throw new errors_1.CLIError("This ACL already exist");
108
- }
109
- else {
110
- throw new errors_1.CLIError(e.message);
111
- }
104
+ }
105
+ catch (e) {
106
+ core_1.CliUx.ux.action.stop();
107
+ if (e.code === grpc.status.ALREADY_EXISTS) {
108
+ throw new errors_1.CLIError("This ACL already exist");
109
+ }
110
+ else {
111
+ throw new errors_1.CLIError(e.message);
112
112
  }
113
113
  }
114
114
  }
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from "../../base";
2
+ export default class DescribeCommand extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ name: string;
6
+ required: boolean;
7
+ description: string;
8
+ }[];
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,62 @@
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
+ /*
7
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * http://github.com/fonoster
9
+ *
10
+ * This file is part of Routr.
11
+ *
12
+ * Licensed under the MIT License (the "License");
13
+ * you may not use this file except in compliance with
14
+ * the License. You may obtain a copy of the License at
15
+ *
16
+ * https://opensource.org/licenses/MIT
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ /* eslint-disable require-jsdoc */
25
+ const base_1 = require("../../base");
26
+ const errors_1 = require("@oclif/core/lib/errors");
27
+ const prettyjson_1 = require("prettyjson");
28
+ const sdk_1 = __importDefault(require("@routr/sdk"));
29
+ const moment_1 = __importDefault(require("moment"));
30
+ class DescribeCommand extends base_1.BaseCommand {
31
+ async run() {
32
+ const { args, flags } = await this.parse(DescribeCommand);
33
+ const { endpoint, insecure } = flags;
34
+ const api = new sdk_1.default.ACL({ endpoint, insecure });
35
+ try {
36
+ const acl = await api.getACL(args.ref);
37
+ const jsonObj = {
38
+ Ref: acl.ref,
39
+ APIVersion: acl.apiVersion,
40
+ Name: acl.name,
41
+ Deny: acl.deny.join(","),
42
+ Allow: acl.allow.join(","),
43
+ Extended: acl.extended,
44
+ Created: (0, moment_1.default)(new Date(acl.createdAt * 1000)).toISOString(),
45
+ Updated: (0, moment_1.default)(new Date(acl.updatedAt * 1000)).toISOString()
46
+ };
47
+ this.log((0, prettyjson_1.render)(jsonObj, { noColor: true }));
48
+ }
49
+ catch (e) {
50
+ throw new errors_1.CLIError(e.message);
51
+ }
52
+ }
53
+ }
54
+ exports.default = DescribeCommand;
55
+ DescribeCommand.description = "shows details of an ACL";
56
+ DescribeCommand.args = [
57
+ {
58
+ name: "ref",
59
+ required: false,
60
+ description: "reference to the ACL"
61
+ }
62
+ ];
@@ -5,6 +5,7 @@ export default class GetCommand extends BaseCommand {
5
5
  static examples: string[];
6
6
  static flags: {
7
7
  size: import("@oclif/core/lib/interfaces").OptionFlag<number>;
8
+ extended: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
9
  };
9
10
  static args: {
10
11
  name: string;
@@ -42,12 +42,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
42
42
  * limitations under the License.
43
43
  */
44
44
  /* eslint-disable require-jsdoc */
45
+ const grpc = __importStar(require("@grpc/grpc-js"));
45
46
  const core_1 = require("@oclif/core");
46
47
  const base_1 = require("../../base");
47
48
  const utils_1 = require("../../utils");
48
49
  const common_1 = require("@routr/common");
49
50
  const errors_1 = require("@oclif/core/lib/errors");
50
- const grpc = __importStar(require("@grpc/grpc-js"));
51
51
  class GetCommand extends base_1.BaseCommand {
52
52
  async run() {
53
53
  const { args, flags } = await this.parse(GetCommand);
@@ -68,25 +68,6 @@ class GetCommand extends base_1.BaseCommand {
68
68
  allow: {
69
69
  header: "Allow CIDR Networks",
70
70
  get: (row) => row.allow.join(", ")
71
- },
72
- createdAt: {
73
- header: "Created",
74
- get: (row) => new Date(row.createdAt * 1000),
75
- extended: true
76
- },
77
- updatedAt: {
78
- header: "Updated",
79
- get: (row) => new Date(row.updatedAt * 1000),
80
- extended: true
81
- },
82
- extended: {
83
- header: "Extended",
84
- get: (row) => row.extended || {},
85
- extended: true
86
- },
87
- apiVersion: {
88
- header: "API",
89
- extended: true
90
71
  }
91
72
  }, {
92
73
  "no-header": !showHeader,
@@ -124,6 +105,10 @@ GetCommand.flags = {
124
105
  char: "s",
125
106
  description: "the number of items to return",
126
107
  default: 50
108
+ }),
109
+ extended: core_1.Flags.boolean({
110
+ char: "x",
111
+ description: "extended output format"
127
112
  })
128
113
  };
129
114
  GetCommand.args = [
@@ -36,55 +36,55 @@ class UpdateCommand extends base_1.BaseCommand {
36
36
  const { args, flags } = await this.parse(UpdateCommand);
37
37
  const { endpoint, insecure } = flags;
38
38
  const api = new sdk_1.default.ACL({ endpoint, insecure });
39
- this.log("This utility will help you update an existing ACL.");
40
- this.log("Press ^C at any time to quit.");
41
- const aclFromDB = await api.getACL(args.ref);
42
- const answers = await inquirer_1.default.prompt([
43
- {
44
- name: "name",
45
- message: "Friendly Name",
46
- type: "input",
47
- default: aclFromDB.name,
48
- validate: validators_1.nameValidator
49
- },
50
- {
51
- name: "deny",
52
- message: "Deny CIDR Networks",
53
- type: "input",
54
- default: aclFromDB.deny.join(","),
55
- validate: validators_1.aclRuleValidator
56
- },
57
- {
58
- name: "allow",
59
- message: "Allow CIDR Networks",
60
- type: "input",
61
- default: aclFromDB.allow.join(","),
62
- validate: validators_1.aclRuleValidator
63
- },
64
- {
65
- name: "confirm",
66
- message: "Ready?",
67
- type: "confirm"
39
+ try {
40
+ const aclFromDB = await api.getACL(args.ref);
41
+ this.log("This utility will help you update an existing ACL.");
42
+ this.log("Press ^C at any time to quit.");
43
+ const answers = await inquirer_1.default.prompt([
44
+ {
45
+ name: "name",
46
+ message: "Friendly Name",
47
+ type: "input",
48
+ default: aclFromDB.name,
49
+ validate: validators_1.nameValidator
50
+ },
51
+ {
52
+ name: "deny",
53
+ message: "Deny CIDR Networks",
54
+ type: "input",
55
+ default: aclFromDB.deny.join(","),
56
+ validate: validators_1.aclRuleValidator
57
+ },
58
+ {
59
+ name: "allow",
60
+ message: "Allow CIDR Networks",
61
+ type: "input",
62
+ default: aclFromDB.allow.join(","),
63
+ validate: validators_1.aclRuleValidator
64
+ },
65
+ {
66
+ name: "confirm",
67
+ message: "Ready?",
68
+ type: "confirm"
69
+ }
70
+ ]);
71
+ answers.ref = args.ref;
72
+ // Re-assign allow and deny rules as arrays
73
+ answers.allow = (0, utils_1.stringToACL)(answers.allow);
74
+ answers.deny = (0, utils_1.stringToACL)(answers.deny);
75
+ if (!answers.confirm) {
76
+ this.warn("Aborted");
68
77
  }
69
- ]);
70
- answers.ref = args.ref;
71
- // Re-assign allow and deny rules as arrays
72
- answers.allow = (0, utils_1.stringToACL)(answers.allow);
73
- answers.deny = (0, utils_1.stringToACL)(answers.deny);
74
- if (!answers.confirm) {
75
- this.warn("Aborted");
76
- }
77
- else {
78
- try {
78
+ else {
79
79
  core_1.CliUx.ux.action.start(`Updating ACL ${answers.name}`);
80
80
  const acl = await api.updateACL(answers);
81
81
  await core_1.CliUx.ux.wait(1000);
82
82
  core_1.CliUx.ux.action.stop(acl.ref);
83
83
  }
84
- catch (e) {
85
- core_1.CliUx.ux.action.stop();
86
- throw new errors_1.CLIError(e.message);
87
- }
84
+ }
85
+ catch (e) {
86
+ core_1.CliUx.ux.action.stop();
87
+ throw new errors_1.CLIError(e.message);
88
88
  }
89
89
  }
90
90
  }
@@ -62,110 +62,110 @@ class CreateAgentCommand extends base_1.BaseCommand {
62
62
  async run() {
63
63
  const { flags } = await this.parse(CreateAgentCommand);
64
64
  const { endpoint, insecure } = flags;
65
- this.log("This utility will help you create a new Agent.");
66
- this.log("Press ^C at any time to quit.");
67
- // TODO: Fix hardcoded pageSize
68
- const domains = await new sdk_1.default.Domains({ endpoint, insecure }).listDomains({
69
- pageSize: 25,
70
- pageToken: ""
71
- });
72
- // TODO: Fix hardcoded pageSize
73
- const credentials = await new sdk_1.default.Credentials({
74
- endpoint,
75
- insecure
76
- }).listCredentials({
77
- pageSize: 25,
78
- pageToken: ""
79
- });
80
- const domainsList = domains.items.map((domain) => {
81
- return {
82
- name: domain.domainUri,
83
- description: domain.name,
84
- value: domain.ref
85
- };
86
- });
87
- const credentialsList = credentials.items.map((credential) => {
88
- return { name: credential.name, value: credential.ref };
89
- });
90
- const searcher = new fuzzy_search_1.default(domainsList, ["name", "value", "description"], {
91
- caseSensitive: false
92
- });
93
- const answers = await inquirer_1.default.prompt([
94
- {
95
- name: "name",
96
- message: "Friendly Name",
97
- type: "input",
98
- validate: validators_1.nameValidator
99
- },
100
- {
101
- type: "autocomplete",
102
- name: "domainRef",
103
- message: "Select a Domain",
104
- source: (_, input) => searcher.search(input),
105
- when: () => domains.items.length > 0
106
- },
107
- {
108
- name: "username",
109
- message: "Username",
110
- type: "input",
111
- validate: validators_1.usernameValidator
112
- },
113
- {
114
- name: "credentialsRef",
115
- message: "Credentials Name",
116
- type: "list",
117
- choices: [{ name: "None", value: undefined }, ...credentialsList]
118
- },
119
- {
120
- name: "privacy",
121
- message: "Privacy",
122
- type: "list",
123
- choices: [
124
- {
125
- name: "None",
126
- value: common_1.CommonTypes.Privacy.NONE
127
- },
128
- {
129
- name: "Private",
130
- value: common_1.CommonTypes.Privacy.PRIVATE
131
- }
132
- ],
133
- default: common_1.CommonTypes.Privacy.NONE
134
- },
135
- {
136
- name: "enabled",
137
- message: "Enabled",
138
- type: "confirm",
139
- default: true
140
- },
141
- {
142
- name: "confirm",
143
- message: "Ready?",
144
- type: "confirm"
65
+ try {
66
+ // TODO: Fix hardcoded pageSize
67
+ const domains = await new sdk_1.default.Domains({ endpoint, insecure }).listDomains({
68
+ pageSize: 25,
69
+ pageToken: ""
70
+ });
71
+ // TODO: Fix hardcoded pageSize
72
+ const credentials = await new sdk_1.default.Credentials({
73
+ endpoint,
74
+ insecure
75
+ }).listCredentials({
76
+ pageSize: 25,
77
+ pageToken: ""
78
+ });
79
+ const domainsList = domains.items.map((domain) => {
80
+ return {
81
+ name: domain.domainUri,
82
+ description: domain.name,
83
+ value: domain.ref
84
+ };
85
+ });
86
+ const credentialsList = credentials.items.map((credential) => {
87
+ return { name: credential.name, value: credential.ref };
88
+ });
89
+ const searcher = new fuzzy_search_1.default(domainsList, ["name", "value", "description"], {
90
+ caseSensitive: false
91
+ });
92
+ this.log("This utility will help you create a new Agent.");
93
+ this.log("Press ^C at any time to quit.");
94
+ const answers = await inquirer_1.default.prompt([
95
+ {
96
+ name: "name",
97
+ message: "Friendly Name",
98
+ type: "input",
99
+ validate: validators_1.nameValidator
100
+ },
101
+ {
102
+ type: "autocomplete",
103
+ name: "domainRef",
104
+ message: "Select a Domain",
105
+ source: (_, input) => searcher.search(input),
106
+ when: () => domains.items.length > 0
107
+ },
108
+ {
109
+ name: "username",
110
+ message: "Username",
111
+ type: "input",
112
+ validate: validators_1.usernameValidator
113
+ },
114
+ {
115
+ name: "credentialsRef",
116
+ message: "Credentials Name",
117
+ type: "list",
118
+ choices: [{ name: "None", value: undefined }, ...credentialsList]
119
+ },
120
+ {
121
+ name: "privacy",
122
+ message: "Privacy",
123
+ type: "list",
124
+ choices: [
125
+ {
126
+ name: "None",
127
+ value: common_1.CommonTypes.Privacy.NONE
128
+ },
129
+ {
130
+ name: "Private",
131
+ value: common_1.CommonTypes.Privacy.PRIVATE
132
+ }
133
+ ],
134
+ default: common_1.CommonTypes.Privacy.NONE
135
+ },
136
+ {
137
+ name: "enabled",
138
+ message: "Enabled?",
139
+ type: "confirm",
140
+ default: true
141
+ },
142
+ {
143
+ name: "confirm",
144
+ message: "Ready?",
145
+ type: "confirm"
146
+ }
147
+ ]);
148
+ // Re-write privacy to enum
149
+ answers.privacy =
150
+ common_1.CommonTypes.Privacy[answers.privacy.toUpperCase()];
151
+ if (!answers.confirm) {
152
+ this.warn("Aborted");
145
153
  }
146
- ]);
147
- // Re-write privacy to enum
148
- answers.privacy =
149
- common_1.CommonTypes.Privacy[answers.privacy.toUpperCase()];
150
- if (!answers.confirm) {
151
- this.warn("Aborted");
152
- }
153
- else {
154
- try {
154
+ else {
155
155
  core_1.CliUx.ux.action.start(`Creating Agent ${answers.name}`);
156
156
  const api = new sdk_1.default.Agents({ endpoint, insecure });
157
157
  const agent = await api.createAgent(answers);
158
158
  await core_1.CliUx.ux.wait(1000);
159
159
  core_1.CliUx.ux.action.stop(agent.ref);
160
160
  }
161
- catch (e) {
162
- core_1.CliUx.ux.action.stop();
163
- if (e.code === grpc.status.ALREADY_EXISTS) {
164
- throw new errors_1.CLIError("This Agent already exist");
165
- }
166
- else {
167
- throw new errors_1.CLIError(e.message);
168
- }
161
+ }
162
+ catch (e) {
163
+ core_1.CliUx.ux.action.stop();
164
+ if (e.code === grpc.status.ALREADY_EXISTS) {
165
+ throw new errors_1.CLIError("This Agent already exist");
166
+ }
167
+ else {
168
+ throw new errors_1.CLIError(e.message);
169
169
  }
170
170
  }
171
171
  }
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from "../../base";
2
+ export default class DescribeCommand extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ name: string;
6
+ required: boolean;
7
+ description: string;
8
+ }[];
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,72 @@
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
+ /*
7
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * http://github.com/fonoster
9
+ *
10
+ * This file is part of Routr.
11
+ *
12
+ * Licensed under the MIT License (the "License");
13
+ * you may not use this file except in compliance with
14
+ * the License. You may obtain a copy of the License at
15
+ *
16
+ * https://opensource.org/licenses/MIT
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ /* eslint-disable require-jsdoc */
25
+ const base_1 = require("../../base");
26
+ const errors_1 = require("@oclif/core/lib/errors");
27
+ const prettyjson_1 = require("prettyjson");
28
+ const utils_1 = require("../../utils");
29
+ const sdk_1 = __importDefault(require("@routr/sdk"));
30
+ const moment_1 = __importDefault(require("moment"));
31
+ class DescribeCommand extends base_1.BaseCommand {
32
+ async run() {
33
+ var _a;
34
+ const { args, flags } = await this.parse(DescribeCommand);
35
+ const { endpoint, insecure } = flags;
36
+ const api = new sdk_1.default.Agents({ endpoint, insecure });
37
+ try {
38
+ const agent = await api.getAgent(args.ref);
39
+ const jsonObj = {
40
+ Ref: agent.ref,
41
+ APIVersion: agent.apiVersion,
42
+ Name: agent.name,
43
+ Username: agent.username,
44
+ Domain: ((_a = agent.domain) === null || _a === void 0 ? void 0 : _a.domainUri) || "None",
45
+ Privacy: (0, utils_1.capitalize)(agent.privacy),
46
+ Credentials: agent.credentials
47
+ ? {
48
+ Ref: agent.credentials.ref,
49
+ Username: agent.credentials.username
50
+ }
51
+ : "None",
52
+ Enabled: agent.enabled ? "Yes" : "No",
53
+ Extended: agent.extended,
54
+ Created: (0, moment_1.default)(new Date(agent.createdAt * 1000)).toISOString(),
55
+ Updated: (0, moment_1.default)(new Date(agent.updatedAt * 1000)).toISOString()
56
+ };
57
+ this.log((0, prettyjson_1.render)(jsonObj, { noColor: true }));
58
+ }
59
+ catch (e) {
60
+ throw new errors_1.CLIError(e.message);
61
+ }
62
+ }
63
+ }
64
+ exports.default = DescribeCommand;
65
+ DescribeCommand.description = "shows details of an Agent";
66
+ DescribeCommand.args = [
67
+ {
68
+ name: "ref",
69
+ required: false,
70
+ description: "reference to the Agent"
71
+ }
72
+ ];
@@ -5,6 +5,7 @@ export default class GetAgentsCommand extends BaseCommand {
5
5
  static examples: string[];
6
6
  static flags: {
7
7
  size: import("@oclif/core/lib/interfaces").OptionFlag<number>;
8
+ extended: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
9
  };
9
10
  static args: {
10
11
  name: string;