@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
@@ -60,110 +60,119 @@ class CreateCommand extends base_1.BaseCommand {
60
60
  var _a, _b;
61
61
  const { flags } = await this.parse(CreateCommand);
62
62
  const { endpoint, insecure } = flags;
63
- this.log("This utility will help you create a new Peer.");
64
- this.log("Press ^C at any time to quit.");
65
- // TODO: Fix hardcoded pageSize
66
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
67
- pageSize: 25,
68
- pageToken: ""
69
- });
70
- // TODO: Fix hardcoded pageSize
71
- const credentials = await new sdk_1.default.Credentials({
72
- endpoint,
73
- insecure
74
- }).listCredentials({
75
- pageSize: 25,
76
- pageToken: ""
77
- });
78
- const aclList = ((_a = acls.items) === null || _a === void 0 ? void 0 : _a.map((acl) => {
79
- return { name: acl.name, value: acl.ref };
80
- })) || [];
81
- const credentialsList = ((_b = credentials.items) === null || _b === void 0 ? void 0 : _b.map((credential) => {
82
- return { name: credential.name, value: credential.ref };
83
- })) || [];
84
- const answers = await inquirer_1.default.prompt([
85
- {
86
- name: "name",
87
- message: "Friendly Name",
88
- type: "input",
89
- validate: validators_1.nameValidator
90
- },
91
- {
92
- name: "username",
93
- message: "Username",
94
- type: "input",
95
- validate: validators_1.usernameValidator
96
- },
97
- {
98
- name: "aor",
99
- message: "Adress of Record",
100
- type: "input",
101
- validate: validators_1.aorValidator
102
- },
103
- {
104
- name: "contactAddr",
105
- message: "Contact Address",
106
- type: "input",
107
- validate: validators_1.contactAddrValidator
108
- },
109
- {
110
- name: "accessControlListRef",
111
- message: "IP Access Control List",
112
- choices: [{ name: "None", value: undefined }, ...aclList],
113
- type: "list"
114
- },
115
- {
116
- name: "credentialsRef",
117
- message: "Credentials Name",
118
- choices: [{ name: "None", value: undefined }, ...credentialsList],
119
- type: "list"
120
- },
121
- {
122
- name: "withSessionAffinity",
123
- message: "Enable Session Affinity?",
124
- type: "confirm",
125
- default: false,
126
- when: (answers) => answers.aor.startsWith("backend:")
127
- },
128
- {
129
- name: "balancingAlgorithm",
130
- message: "Balancing Algorithm",
131
- choices: [
132
- { name: "Round Robin", value: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN },
133
- {
134
- name: "Least Sessions",
135
- value: common_1.CommonTypes.LoadBalancingAlgorithm.LEAST_SESSIONS
136
- }
137
- ],
138
- type: "list",
139
- default: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN,
140
- when: (answers) => answers.aor.startsWith("backend:")
141
- },
142
- {
143
- name: "confirm",
144
- message: "Ready?",
145
- type: "confirm"
63
+ try {
64
+ // TODO: Fix hardcoded pageSize
65
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
66
+ pageSize: 25,
67
+ pageToken: ""
68
+ });
69
+ // TODO: Fix hardcoded pageSize
70
+ const credentials = await new sdk_1.default.Credentials({
71
+ endpoint,
72
+ insecure
73
+ }).listCredentials({
74
+ pageSize: 25,
75
+ pageToken: ""
76
+ });
77
+ const aclList = ((_a = acls.items) === null || _a === void 0 ? void 0 : _a.map((acl) => {
78
+ return { name: acl.name, value: acl.ref };
79
+ })) || [];
80
+ const credentialsList = ((_b = credentials.items) === null || _b === void 0 ? void 0 : _b.map((credential) => {
81
+ return { name: credential.name, value: credential.ref };
82
+ })) || [];
83
+ this.log("This utility will help you create a new Peer.");
84
+ this.log("Press ^C at any time to quit.");
85
+ const answers = await inquirer_1.default.prompt([
86
+ {
87
+ name: "name",
88
+ message: "Friendly Name",
89
+ type: "input",
90
+ validate: validators_1.nameValidator
91
+ },
92
+ {
93
+ name: "username",
94
+ message: "Username",
95
+ type: "input",
96
+ validate: validators_1.usernameValidator
97
+ },
98
+ {
99
+ name: "aor",
100
+ message: "Adress of Record",
101
+ type: "input",
102
+ validate: validators_1.aorValidator
103
+ },
104
+ {
105
+ name: "contactAddr",
106
+ message: "Contact Address",
107
+ type: "input",
108
+ validate: validators_1.contactAddrValidator
109
+ },
110
+ {
111
+ name: "accessControlListRef",
112
+ message: "IP Access Control List",
113
+ choices: [{ name: "None", value: undefined }, ...aclList],
114
+ type: "list"
115
+ },
116
+ {
117
+ name: "credentialsRef",
118
+ message: "Credentials Name",
119
+ choices: [{ name: "None", value: undefined }, ...credentialsList],
120
+ type: "list"
121
+ },
122
+ {
123
+ name: "withSessionAffinity",
124
+ message: "Enable Session Affinity?",
125
+ type: "confirm",
126
+ default: false,
127
+ when: (answers) => answers.aor.startsWith("backend:")
128
+ },
129
+ {
130
+ name: "balancingAlgorithm",
131
+ message: "Balancing Algorithm",
132
+ choices: [
133
+ {
134
+ name: "Round Robin",
135
+ value: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN
136
+ },
137
+ {
138
+ name: "Least Sessions",
139
+ value: common_1.CommonTypes.LoadBalancingAlgorithm.LEAST_SESSIONS
140
+ }
141
+ ],
142
+ type: "list",
143
+ default: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN,
144
+ when: (answers) => answers.aor.startsWith("backend:")
145
+ },
146
+ {
147
+ name: "enabled",
148
+ message: "Enabled?",
149
+ type: "confirm",
150
+ default: true
151
+ },
152
+ {
153
+ name: "confirm",
154
+ message: "Ready?",
155
+ type: "confirm"
156
+ }
157
+ ]);
158
+ if (!answers.confirm) {
159
+ this.warn("Aborted");
146
160
  }
147
- ]);
148
- if (!answers.confirm) {
149
- this.warn("Aborted");
150
- }
151
- else {
152
- try {
161
+ else {
153
162
  core_1.CliUx.ux.action.start(`Creating Peer ${answers.name}`);
154
163
  const api = new sdk_1.default.Peers({ endpoint, insecure });
155
164
  const peer = await api.createPeer(answers);
156
165
  await core_1.CliUx.ux.wait(1000);
157
166
  core_1.CliUx.ux.action.stop(peer.ref);
158
167
  }
159
- catch (e) {
160
- core_1.CliUx.ux.action.stop();
161
- if (e.code === grpc.status.ALREADY_EXISTS) {
162
- throw new errors_1.CLIError("This Peer already exist");
163
- }
164
- else {
165
- throw new errors_1.CLIError(e.message);
166
- }
168
+ }
169
+ catch (e) {
170
+ core_1.CliUx.ux.action.stop();
171
+ if (e.code === grpc.status.ALREADY_EXISTS) {
172
+ throw new errors_1.CLIError("This Peer already exist");
173
+ }
174
+ else {
175
+ throw new errors_1.CLIError(e.message);
167
176
  }
168
177
  }
169
178
  }
@@ -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,80 @@
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.Peers({ endpoint, insecure });
35
+ try {
36
+ const peer = await api.getPeer(args.ref);
37
+ const jsonObj = {
38
+ Ref: peer.ref,
39
+ APIVersion: peer.apiVersion,
40
+ Name: peer.name,
41
+ Username: peer.username,
42
+ AOR: peer.aor,
43
+ "Balancing Algorithm": peer.balancingAlgorithm,
44
+ "Session Affinity?": peer.withSessionAffinity ? "Yes" : "No",
45
+ "Contact Address": peer.contactAddr,
46
+ Enabled: peer.enabled ? "Yes" : "No",
47
+ "Access Control List": peer.accessControlList
48
+ ? {
49
+ Ref: peer.accessControlList.ref,
50
+ Name: peer.accessControlList.name,
51
+ Deny: peer.accessControlList.deny.join(","),
52
+ Allow: peer.accessControlList.allow.join(",")
53
+ }
54
+ : "None",
55
+ Credentials: peer.credentials
56
+ ? {
57
+ Ref: peer.credentials.ref,
58
+ Username: peer.credentials.username
59
+ }
60
+ : "None",
61
+ Extended: peer.extended,
62
+ Created: (0, moment_1.default)(new Date(peer.createdAt * 1000)).toISOString(),
63
+ Updated: (0, moment_1.default)(new Date(peer.updatedAt * 1000)).toISOString()
64
+ };
65
+ this.log((0, prettyjson_1.render)(jsonObj, { noColor: true }));
66
+ }
67
+ catch (e) {
68
+ throw new errors_1.CLIError(e.message);
69
+ }
70
+ }
71
+ }
72
+ exports.default = DescribeCommand;
73
+ DescribeCommand.description = "shows details for a Peer";
74
+ DescribeCommand.args = [
75
+ {
76
+ name: "ref",
77
+ required: false,
78
+ description: "reference to the Peer"
79
+ }
80
+ ];
@@ -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);
@@ -67,50 +67,9 @@ class GetCommand extends base_1.BaseCommand {
67
67
  aor: {
68
68
  header: "AOR"
69
69
  },
70
- balancingAlgorithm: {
71
- header: "Balancing Algorithm"
72
- },
73
- withSessionAffinity: {
74
- header: "Session Affinity",
75
- get: (row) => row.withSessionAffinity ? "Yes" : "No"
76
- },
77
- contactAddr: {
78
- header: "Contact Address",
79
- extended: true
80
- },
81
70
  enabled: {
82
71
  header: "Enabled",
83
- get: (row) => (row.enabled ? "Yes" : "No"),
84
- extended: true
85
- },
86
- accessControlList: {
87
- header: "IP Access Control List",
88
- get: (row) => { var _a; return ((_a = row.accessControlList) === null || _a === void 0 ? void 0 : _a.name) || "None"; },
89
- extended: true
90
- },
91
- credentials: {
92
- header: "Credentials Name",
93
- get: (row) => { var _a; return ((_a = row.credentials) === null || _a === void 0 ? void 0 : _a.name) || "None"; },
94
- extended: true
95
- },
96
- createdAt: {
97
- header: "Created",
98
- get: (row) => new Date(row.createdAt * 1000),
99
- extended: true
100
- },
101
- updatedAt: {
102
- header: "Updated",
103
- get: (row) => new Date(row.updatedAt * 1000),
104
- extended: true
105
- },
106
- extended: {
107
- header: "Extended",
108
- get: (row) => row.extended || {},
109
- extended: true
110
- },
111
- apiVersion: {
112
- header: "API",
113
- extended: true
72
+ get: (row) => (row.enabled ? "Yes" : "No")
114
73
  }
115
74
  }, {
116
75
  "no-header": !showHeader,
@@ -148,6 +107,10 @@ GetCommand.flags = {
148
107
  char: "s",
149
108
  description: "the number of items to return",
150
109
  default: 50
110
+ }),
111
+ extended: core_1.Flags.boolean({
112
+ char: "x",
113
+ description: "extended output format"
151
114
  })
152
115
  };
153
116
  GetCommand.args = [
@@ -37,106 +37,115 @@ class UpdatePeerCommand extends base_1.BaseCommand {
37
37
  const { args, flags } = await this.parse(UpdatePeerCommand);
38
38
  const { endpoint, insecure } = flags;
39
39
  const api = new sdk_1.default.Peers({ endpoint, insecure });
40
- this.log("This utility will help you update an existing Peer.");
41
- this.log("Press ^C at any time to quit.");
42
- const peerFromDB = await api.getPeer(args.ref);
43
- // TODO: Fix hardcoded pageSize
44
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
45
- pageSize: 25,
46
- pageToken: ""
47
- });
48
- // TODO: Fix hardcoded pageSize
49
- const credentials = await new sdk_1.default.Credentials({
50
- endpoint,
51
- insecure
52
- }).listCredentials({
53
- pageSize: 25,
54
- pageToken: ""
55
- });
56
- const aclList = ((_a = acls.items) === null || _a === void 0 ? void 0 : _a.map((acl) => {
57
- return { name: acl.name, value: acl.ref };
58
- })) || [];
59
- const credentialsList = ((_b = credentials.items) === null || _b === void 0 ? void 0 : _b.map((credential) => {
60
- return { name: credential.name, value: credential.ref };
61
- })) || [];
62
- const answers = await inquirer_1.default.prompt([
63
- {
64
- name: "name",
65
- message: "Friendly Name",
66
- type: "input",
67
- default: peerFromDB.name,
68
- validate: validators_1.nameValidator
69
- },
70
- {
71
- name: "aor",
72
- message: "Adress of Record",
73
- type: "input",
74
- default: peerFromDB.aor,
75
- validate: validators_1.aorValidator
76
- },
77
- {
78
- name: "contactAddr",
79
- message: "Contact Address",
80
- type: "input",
81
- default: peerFromDB.contactAddr || undefined,
82
- validate: validators_1.contactAddrValidator
83
- },
84
- {
85
- name: "accessControlListRef",
86
- message: "IP Access Control List",
87
- choices: [{ name: "None", value: undefined }, ...aclList],
88
- type: "list",
89
- default: peerFromDB.accessControlListRef
90
- },
91
- {
92
- name: "credentialsRef",
93
- message: "Credentials Name",
94
- choices: [{ name: "None", value: undefined }, ...credentialsList],
95
- type: "list",
96
- default: peerFromDB.credentialsRef
97
- },
98
- {
99
- name: "withSessionAffinity",
100
- message: "Enable Session Affinity?",
101
- type: "confirm",
102
- default: peerFromDB.withSessionAffinity,
103
- when: (answers) => answers.aor.startsWith("backend:")
104
- },
105
- {
106
- name: "balancingAlgorithm",
107
- message: "Balancing Algorithm",
108
- choices: [
109
- { name: "Round Robin", value: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN },
110
- {
111
- name: "Least Sessions",
112
- value: common_1.CommonTypes.LoadBalancingAlgorithm.LEAST_SESSIONS
113
- }
114
- ],
115
- type: "list",
116
- default: peerFromDB.balancingAlgorithm,
117
- when: (answers) => answers.aor.startsWith("backend:")
118
- },
119
- {
120
- name: "confirm",
121
- message: "Ready?",
122
- type: "confirm"
40
+ try {
41
+ const peerFromDB = await api.getPeer(args.ref);
42
+ // TODO: Fix hardcoded pageSize
43
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
44
+ pageSize: 25,
45
+ pageToken: ""
46
+ });
47
+ // TODO: Fix hardcoded pageSize
48
+ const credentials = await new sdk_1.default.Credentials({
49
+ endpoint,
50
+ insecure
51
+ }).listCredentials({
52
+ pageSize: 25,
53
+ pageToken: ""
54
+ });
55
+ const aclList = ((_a = acls.items) === null || _a === void 0 ? void 0 : _a.map((acl) => {
56
+ return { name: acl.name, value: acl.ref };
57
+ })) || [];
58
+ const credentialsList = ((_b = credentials.items) === null || _b === void 0 ? void 0 : _b.map((credential) => {
59
+ return { name: credential.name, value: credential.ref };
60
+ })) || [];
61
+ this.log("This utility will help you update an existing Peer.");
62
+ this.log("Press ^C at any time to quit.");
63
+ const answers = await inquirer_1.default.prompt([
64
+ {
65
+ name: "name",
66
+ message: "Friendly Name",
67
+ type: "input",
68
+ default: peerFromDB.name,
69
+ validate: validators_1.nameValidator
70
+ },
71
+ {
72
+ name: "aor",
73
+ message: "Adress of Record",
74
+ type: "input",
75
+ default: peerFromDB.aor,
76
+ validate: validators_1.aorValidator
77
+ },
78
+ {
79
+ name: "contactAddr",
80
+ message: "Contact Address",
81
+ type: "input",
82
+ default: peerFromDB.contactAddr || undefined,
83
+ validate: validators_1.contactAddrValidator
84
+ },
85
+ {
86
+ name: "accessControlListRef",
87
+ message: "IP Access Control List",
88
+ choices: [{ name: "None", value: undefined }, ...aclList],
89
+ type: "list",
90
+ default: peerFromDB.accessControlListRef
91
+ },
92
+ {
93
+ name: "credentialsRef",
94
+ message: "Credentials Name",
95
+ choices: [{ name: "None", value: undefined }, ...credentialsList],
96
+ type: "list",
97
+ default: peerFromDB.credentialsRef
98
+ },
99
+ {
100
+ name: "withSessionAffinity",
101
+ message: "Enable Session Affinity?",
102
+ type: "confirm",
103
+ default: peerFromDB.withSessionAffinity,
104
+ when: (answers) => answers.aor.startsWith("backend:")
105
+ },
106
+ {
107
+ name: "balancingAlgorithm",
108
+ message: "Balancing Algorithm",
109
+ choices: [
110
+ {
111
+ name: "Round Robin",
112
+ value: common_1.CommonTypes.LoadBalancingAlgorithm.ROUND_ROBIN
113
+ },
114
+ {
115
+ name: "Least Sessions",
116
+ value: common_1.CommonTypes.LoadBalancingAlgorithm.LEAST_SESSIONS
117
+ }
118
+ ],
119
+ type: "list",
120
+ default: peerFromDB.balancingAlgorithm,
121
+ when: (answers) => answers.aor.startsWith("backend:")
122
+ },
123
+ {
124
+ name: "enabled",
125
+ message: "Enabled?",
126
+ type: "confirm",
127
+ default: peerFromDB.enabled
128
+ },
129
+ {
130
+ name: "confirm",
131
+ message: "Ready?",
132
+ type: "confirm"
133
+ }
134
+ ]);
135
+ answers.ref = args.ref;
136
+ if (!answers.confirm) {
137
+ this.warn("Aborted");
123
138
  }
124
- ]);
125
- answers.ref = args.ref;
126
- if (!answers.confirm) {
127
- this.warn("Aborted");
128
- }
129
- else {
130
- try {
139
+ else {
131
140
  core_1.CliUx.ux.action.start(`Updating Peer ${answers.name}`);
132
141
  const acl = await api.updatePeer(answers);
133
142
  await core_1.CliUx.ux.wait(1000);
134
143
  core_1.CliUx.ux.action.stop(acl.ref);
135
144
  }
136
- catch (e) {
137
- core_1.CliUx.ux.action.stop();
138
- throw new errors_1.CLIError(e.message);
139
- }
145
+ }
146
+ catch (e) {
147
+ core_1.CliUx.ux.action.stop();
148
+ throw new errors_1.CLIError(e.message);
140
149
  }
141
150
  }
142
151
  }