@routr/ctl 2.0.31 → 2.1.7

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.
package/dist/base.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Command } from "@oclif/core";
2
2
  export declare abstract class BaseCommand extends Command {
3
3
  static globalFlags: {
4
4
  insecure: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
5
+ cacert: import("@oclif/core/lib/interfaces").OptionFlag<string>;
5
6
  endpoint: import("@oclif/core/lib/interfaces").OptionFlag<string>;
6
7
  };
7
8
  }
package/dist/base.js CHANGED
@@ -30,9 +30,13 @@ BaseCommand.globalFlags = {
30
30
  description: "allow insecure connections to the routr server",
31
31
  default: false
32
32
  }),
33
+ cacert: core_1.Flags.string({
34
+ char: "c",
35
+ description: "path to the CA certificate to verify the server"
36
+ }),
33
37
  endpoint: core_1.Flags.string({
34
38
  char: "e",
35
39
  description: "endpoint to connect to the routr server",
36
- default: "localhost:51907"
40
+ default: "localhost:51908"
37
41
  })
38
42
  };
@@ -58,7 +58,7 @@ const inquirer_1 = __importDefault(require("inquirer"));
58
58
  class CreateCommand extends base_1.BaseCommand {
59
59
  async run() {
60
60
  const { flags } = await this.parse(CreateCommand);
61
- const { endpoint, insecure } = flags;
61
+ const { endpoint, insecure, cacert } = flags;
62
62
  try {
63
63
  this.log("This utility will help you create a new ACL");
64
64
  this.log("Press ^C at any time to quit.");
@@ -96,7 +96,7 @@ class CreateCommand extends base_1.BaseCommand {
96
96
  }
97
97
  else {
98
98
  core_1.CliUx.ux.action.start(`Creating ACL ${answers.name}`);
99
- const api = new sdk_1.default.ACL({ endpoint, insecure });
99
+ const api = new sdk_1.default.ACL({ endpoint, insecure, cacert });
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);
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class CreateCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(CreateCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.ACL({ endpoint, insecure }), "deleteACL");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.ACL({ endpoint, insecure, cacert }), "deleteACL");
32
32
  }
33
33
  }
34
34
  exports.default = CreateCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.ACL({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.ACL({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const acl = await api.getACL(args.ref);
37
37
  const jsonObj = {
@@ -34,8 +34,8 @@ const inquirer_1 = __importDefault(require("inquirer"));
34
34
  class UpdateCommand extends base_1.BaseCommand {
35
35
  async run() {
36
36
  const { args, flags } = await this.parse(UpdateCommand);
37
- const { endpoint, insecure } = flags;
38
- const api = new sdk_1.default.ACL({ endpoint, insecure });
37
+ const { endpoint, insecure, cacert } = flags;
38
+ const api = new sdk_1.default.ACL({ endpoint, insecure, cacert });
39
39
  try {
40
40
  const aclFromDB = await api.getACL(args.ref);
41
41
  this.log("This utility will help you update an existing ACL.");
@@ -60,17 +60,22 @@ inquirer_1.default.registerPrompt("autocomplete", inquirer_autocomplete_prompt_1
60
60
  class CreateAgentCommand extends base_1.BaseCommand {
61
61
  async run() {
62
62
  const { flags } = await this.parse(CreateAgentCommand);
63
- const { endpoint, insecure } = flags;
63
+ const { endpoint, insecure, cacert } = flags;
64
64
  try {
65
65
  // TODO: Fix hardcoded pageSize
66
- const domains = await new sdk_1.default.Domains({ endpoint, insecure }).listDomains({
66
+ const domains = await new sdk_1.default.Domains({
67
+ endpoint,
68
+ insecure,
69
+ cacert
70
+ }).listDomains({
67
71
  pageSize: 25,
68
72
  pageToken: ""
69
73
  });
70
74
  // TODO: Fix hardcoded pageSize
71
75
  const credentials = await new sdk_1.default.Credentials({
72
76
  endpoint,
73
- insecure
77
+ insecure,
78
+ cacert
74
79
  }).listCredentials({
75
80
  pageSize: 25,
76
81
  pageToken: ""
@@ -148,7 +153,7 @@ class CreateAgentCommand extends base_1.BaseCommand {
148
153
  }
149
154
  else {
150
155
  core_1.CliUx.ux.action.start(`Creating Agent ${answers.name}`);
151
- const api = new sdk_1.default.Agents({ endpoint, insecure });
156
+ const api = new sdk_1.default.Agents({ endpoint, insecure, cacert });
152
157
  const agent = await api.createAgent(answers);
153
158
  await core_1.CliUx.ux.wait(1000);
154
159
  core_1.CliUx.ux.action.stop(agent.ref);
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeleteAgentCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeleteAgentCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Agents({ endpoint, insecure }), "deleteAgent");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Agents({ endpoint, insecure, cacert }), "deleteAgent");
32
32
  }
33
33
  }
34
34
  exports.default = DeleteAgentCommand;
@@ -32,8 +32,8 @@ class DescribeCommand extends base_1.BaseCommand {
32
32
  async run() {
33
33
  var _a;
34
34
  const { args, flags } = await this.parse(DescribeCommand);
35
- const { endpoint, insecure } = flags;
36
- const api = new sdk_1.default.Agents({ endpoint, insecure });
35
+ const { endpoint, insecure, cacert } = flags;
36
+ const api = new sdk_1.default.Agents({ endpoint, insecure, cacert });
37
37
  try {
38
38
  const agent = await api.getAgent(args.ref);
39
39
  const jsonObj = {
@@ -35,19 +35,24 @@ class UpdateCommand extends base_1.BaseCommand {
35
35
  async run() {
36
36
  var _a, _b;
37
37
  const { args, flags } = await this.parse(UpdateCommand);
38
- const { endpoint, insecure } = flags;
38
+ const { endpoint, insecure, cacert } = flags;
39
39
  try {
40
- const api = new sdk_1.default.Agents({ endpoint, insecure });
40
+ const api = new sdk_1.default.Agents({ endpoint, insecure, cacert });
41
41
  const agentFromDB = await api.getAgent(args.ref);
42
42
  // TODO: Fix hardcoded pageSize
43
- const domains = await new sdk_1.default.Domains({ endpoint, insecure }).listDomains({
43
+ const domains = await new sdk_1.default.Domains({
44
+ endpoint,
45
+ insecure,
46
+ cacert
47
+ }).listDomains({
44
48
  pageSize: 25,
45
49
  pageToken: ""
46
50
  });
47
51
  // TODO: Fix hardcoded pageSize
48
52
  const credentials = await new sdk_1.default.Credentials({
49
53
  endpoint,
50
- insecure
54
+ insecure,
55
+ cacert
51
56
  }).listCredentials({
52
57
  pageSize: 25,
53
58
  pageToken: ""
@@ -57,7 +57,7 @@ const validators_1 = require("../../validators");
57
57
  class CreateCommand extends base_1.BaseCommand {
58
58
  async run() {
59
59
  const { flags } = await this.parse(CreateCommand);
60
- const { endpoint, insecure } = flags;
60
+ const { endpoint, insecure, cacert } = flags;
61
61
  this.log("This utility will help you create a new set of Credentials.");
62
62
  this.log("Press ^C at any time to quit.");
63
63
  const answers = await inquirer_1.default.prompt([
@@ -96,7 +96,7 @@ class CreateCommand extends base_1.BaseCommand {
96
96
  else {
97
97
  try {
98
98
  core_1.CliUx.ux.action.start(`Creating Credentials ${answers.name}`);
99
- const api = new sdk_1.default.Credentials({ endpoint, insecure });
99
+ const api = new sdk_1.default.Credentials({ endpoint, insecure, cacert });
100
100
  const credentials = await api.createCredentials(answers);
101
101
  await core_1.CliUx.ux.wait(1000);
102
102
  core_1.CliUx.ux.action.stop(credentials.ref);
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeleteCrendentialsCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeleteCrendentialsCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Credentials({ endpoint, insecure }), "deleteCredentials");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Credentials({ endpoint, insecure, cacert }), "deleteCredentials");
32
32
  }
33
33
  }
34
34
  exports.default = DeleteCrendentialsCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.Credentials({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.Credentials({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const credentials = await api.getCredentials(args.ref);
37
37
  const jsonObj = {
@@ -33,9 +33,9 @@ const validators_1 = require("../../validators");
33
33
  class UpdateCommand extends base_1.BaseCommand {
34
34
  async run() {
35
35
  const { args, flags } = await this.parse(UpdateCommand);
36
- const { endpoint, insecure } = flags;
36
+ const { endpoint, insecure, cacert } = flags;
37
37
  try {
38
- const api = new sdk_1.default.Credentials({ endpoint, insecure });
38
+ const api = new sdk_1.default.Credentials({ endpoint, insecure, cacert });
39
39
  const credentialsFromDB = await api.getCredentials(args.ref);
40
40
  this.log("This utility will help you update an existing set of Credentials.");
41
41
  this.log("Press ^C at any time to quit.");
@@ -57,10 +57,10 @@ const inquirer_1 = __importDefault(require("inquirer"));
57
57
  class CreateCommand extends base_1.BaseCommand {
58
58
  async run() {
59
59
  const { flags } = await this.parse(CreateCommand);
60
- const { endpoint, insecure } = flags;
60
+ const { endpoint, insecure, cacert } = flags;
61
61
  try {
62
62
  // TODO: Fix hardcoded pageSize
63
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
63
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure, cacert }).listACLs({
64
64
  pageSize: 25,
65
65
  pageToken: ""
66
66
  });
@@ -71,7 +71,11 @@ class CreateCommand extends base_1.BaseCommand {
71
71
  };
72
72
  });
73
73
  // TODO: Fix hardcoded pageSize
74
- const numbers = await new sdk_1.default.Numbers({ endpoint, insecure }).listNumbers({
74
+ const numbers = await new sdk_1.default.Numbers({
75
+ endpoint,
76
+ insecure,
77
+ cacert
78
+ }).listNumbers({
75
79
  pageSize: 25,
76
80
  pageToken: ""
77
81
  });
@@ -158,7 +162,7 @@ class CreateCommand extends base_1.BaseCommand {
158
162
  }
159
163
  else {
160
164
  core_1.CliUx.ux.action.start(`Creating Domain ${group1.name}`);
161
- const api = new sdk_1.default.Domains({ endpoint, insecure });
165
+ const api = new sdk_1.default.Domains({ endpoint, insecure, cacert });
162
166
  const domains = await api.createDomain({
163
167
  ...group1,
164
168
  egressPolicies
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeleteDomainCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeleteDomainCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Domains({ endpoint, insecure }), "deleteDomain");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Domains({ endpoint, insecure, cacert }), "deleteDomain");
32
32
  }
33
33
  }
34
34
  exports.default = DeleteDomainCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.Domains({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.Domains({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const domain = await api.getDomain(args.ref);
37
37
  const jsonObj = {
@@ -33,12 +33,12 @@ const inquirer_1 = __importDefault(require("inquirer"));
33
33
  class UpdateCommand extends base_1.BaseCommand {
34
34
  async run() {
35
35
  const { args, flags } = await this.parse(UpdateCommand);
36
- const { endpoint, insecure } = flags;
36
+ const { endpoint, insecure, cacert } = flags;
37
37
  try {
38
- const api = new sdk_1.default.Domains({ endpoint, insecure });
38
+ const api = new sdk_1.default.Domains({ endpoint, insecure, cacert });
39
39
  const domainFromDB = await api.getDomain(args.ref);
40
40
  // TODO: Fix hardcoded pageSize
41
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
41
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure, cacert }).listACLs({
42
42
  pageSize: 25,
43
43
  pageToken: ""
44
44
  });
@@ -49,7 +49,11 @@ class UpdateCommand extends base_1.BaseCommand {
49
49
  };
50
50
  });
51
51
  // TODO: Fix hardcoded pageSize
52
- const numbers = await new sdk_1.default.Numbers({ endpoint, insecure }).listNumbers({
52
+ const numbers = await new sdk_1.default.Numbers({
53
+ endpoint,
54
+ insecure,
55
+ cacert
56
+ }).listNumbers({
53
57
  pageSize: 25,
54
58
  pageToken: ""
55
59
  });
@@ -60,12 +60,16 @@ const inquirer_1 = __importDefault(require("inquirer"));
60
60
  class CreateNumberCommand extends base_1.BaseCommand {
61
61
  async run() {
62
62
  const { flags } = await this.parse(CreateNumberCommand);
63
- const { endpoint, insecure } = flags;
63
+ const { endpoint, insecure, cacert } = flags;
64
64
  try {
65
65
  const searcher = new fuzzy_search_1.default(countries_1.countries, ["name"], {
66
66
  caseSensitive: false
67
67
  });
68
- const trunks = await new sdk_1.default.Trunks({ endpoint, insecure }).listTrunks({
68
+ const trunks = await new sdk_1.default.Trunks({
69
+ endpoint,
70
+ insecure,
71
+ cacert
72
+ }).listTrunks({
69
73
  pageSize: 25,
70
74
  pageToken: ""
71
75
  });
@@ -145,7 +149,7 @@ class CreateNumberCommand extends base_1.BaseCommand {
145
149
  }
146
150
  else {
147
151
  core_1.CliUx.ux.action.start(`Creating Number ${answers.name}`);
148
- const api = new sdk_1.default.Numbers({ endpoint, insecure });
152
+ const api = new sdk_1.default.Numbers({ endpoint, insecure, cacert });
149
153
  const number = await api.createNumber(answers);
150
154
  await core_1.CliUx.ux.wait(1000);
151
155
  core_1.CliUx.ux.action.stop(number.ref);
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeleteNumberCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeleteNumberCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Numbers({ endpoint, insecure }), "deleteNumber");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Numbers({ endpoint, insecure, cacert }), "deleteNumber");
32
32
  }
33
33
  }
34
34
  exports.default = DeleteNumberCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.Numbers({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.Numbers({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const number = await api.getNumber(args.ref);
37
37
  const jsonObj = {
@@ -35,11 +35,15 @@ class UpdateCommand extends base_1.BaseCommand {
35
35
  async run() {
36
36
  var _a;
37
37
  const { args, flags } = await this.parse(UpdateCommand);
38
- const { endpoint, insecure } = flags;
38
+ const { endpoint, insecure, cacert } = flags;
39
39
  try {
40
- const api = new sdk_1.default.Numbers({ endpoint, insecure });
40
+ const api = new sdk_1.default.Numbers({ endpoint, insecure, cacert });
41
41
  const numberFromDB = await api.getNumber(args.ref);
42
- const trunks = await new sdk_1.default.Trunks({ endpoint, insecure }).listTrunks({
42
+ const trunks = await new sdk_1.default.Trunks({
43
+ endpoint,
44
+ insecure,
45
+ cacert
46
+ }).listTrunks({
43
47
  pageSize: 25,
44
48
  pageToken: ""
45
49
  });
@@ -59,17 +59,22 @@ class CreateCommand extends base_1.BaseCommand {
59
59
  async run() {
60
60
  var _a, _b;
61
61
  const { flags } = await this.parse(CreateCommand);
62
- const { endpoint, insecure } = flags;
62
+ const { endpoint, insecure, cacert } = flags;
63
63
  try {
64
64
  // TODO: Fix hardcoded pageSize
65
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
65
+ const acls = await new sdk_1.default.ACL({
66
+ endpoint,
67
+ insecure,
68
+ cacert
69
+ }).listACLs({
66
70
  pageSize: 25,
67
71
  pageToken: ""
68
72
  });
69
73
  // TODO: Fix hardcoded pageSize
70
74
  const credentials = await new sdk_1.default.Credentials({
71
75
  endpoint,
72
- insecure
76
+ insecure,
77
+ cacert
73
78
  }).listCredentials({
74
79
  pageSize: 25,
75
80
  pageToken: ""
@@ -97,7 +102,7 @@ class CreateCommand extends base_1.BaseCommand {
97
102
  },
98
103
  {
99
104
  name: "aor",
100
- message: "Adress of Record",
105
+ message: "Address of Record",
101
106
  type: "input",
102
107
  validate: validators_1.aorValidator
103
108
  },
@@ -160,7 +165,7 @@ class CreateCommand extends base_1.BaseCommand {
160
165
  }
161
166
  else {
162
167
  core_1.CliUx.ux.action.start(`Creating Peer ${answers.name}`);
163
- const api = new sdk_1.default.Peers({ endpoint, insecure });
168
+ const api = new sdk_1.default.Peers({ endpoint, insecure, cacert });
164
169
  const peer = await api.createPeer(answers);
165
170
  await core_1.CliUx.ux.wait(1000);
166
171
  core_1.CliUx.ux.action.stop(peer.ref);
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeletePeerCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeletePeerCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Peers({ endpoint, insecure }), "deletePeer");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Peers({ endpoint, insecure, cacert }), "deletePeer");
32
32
  }
33
33
  }
34
34
  exports.default = DeletePeerCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.Peers({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.Peers({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const peer = await api.getPeer(args.ref);
37
37
  const jsonObj = {
@@ -35,19 +35,20 @@ class UpdatePeerCommand extends base_1.BaseCommand {
35
35
  async run() {
36
36
  var _a, _b;
37
37
  const { args, flags } = await this.parse(UpdatePeerCommand);
38
- const { endpoint, insecure } = flags;
39
- const api = new sdk_1.default.Peers({ endpoint, insecure });
38
+ const { endpoint, insecure, cacert } = flags;
39
+ const api = new sdk_1.default.Peers({ endpoint, insecure, cacert });
40
40
  try {
41
41
  const peerFromDB = await api.getPeer(args.ref);
42
42
  // TODO: Fix hardcoded pageSize
43
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
43
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure, cacert }).listACLs({
44
44
  pageSize: 25,
45
45
  pageToken: ""
46
46
  });
47
47
  // TODO: Fix hardcoded pageSize
48
48
  const credentials = await new sdk_1.default.Credentials({
49
49
  endpoint,
50
- insecure
50
+ insecure,
51
+ cacert
51
52
  }).listCredentials({
52
53
  pageSize: 25,
53
54
  pageToken: ""
@@ -70,7 +71,7 @@ class UpdatePeerCommand extends base_1.BaseCommand {
70
71
  },
71
72
  {
72
73
  name: "aor",
73
- message: "Adress of Record",
74
+ message: "Address of Record",
74
75
  type: "input",
75
76
  default: peerFromDB.aor,
76
77
  validate: validators_1.aorValidator
@@ -58,10 +58,10 @@ const inquirer_1 = __importDefault(require("inquirer"));
58
58
  class CreateTrunkCommand extends base_1.BaseCommand {
59
59
  async run() {
60
60
  const { flags } = await this.parse(CreateTrunkCommand);
61
- const { endpoint, insecure } = flags;
61
+ const { endpoint, insecure, cacert } = flags;
62
62
  try {
63
63
  // TODO: Add support for pagination
64
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
64
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure, cacert }).listACLs({
65
65
  pageSize: 25,
66
66
  pageToken: ""
67
67
  });
@@ -73,7 +73,8 @@ class CreateTrunkCommand extends base_1.BaseCommand {
73
73
  });
74
74
  const credentials = await new sdk_1.default.Credentials({
75
75
  endpoint,
76
- insecure
76
+ insecure,
77
+ cacert
77
78
  }).listCredentials({
78
79
  pageSize: 25,
79
80
  pageToken: ""
@@ -206,7 +207,7 @@ class CreateTrunkCommand extends base_1.BaseCommand {
206
207
  }
207
208
  else {
208
209
  core_1.CliUx.ux.action.start(`Creating Trunk ${group1.name}`);
209
- const api = new sdk_1.default.Trunks({ endpoint, insecure });
210
+ const api = new sdk_1.default.Trunks({ endpoint, insecure, cacert });
210
211
  const trunk = await api.createTrunk({
211
212
  ...group1,
212
213
  uris
@@ -27,8 +27,8 @@ const sdk_1 = __importDefault(require("@routr/sdk"));
27
27
  class DeleteTrunkCommand extends delete_1.default {
28
28
  async run() {
29
29
  const { flags } = await this.parse(DeleteTrunkCommand);
30
- const { endpoint, insecure } = flags;
31
- await super.deleteResource(new sdk_1.default.Trunks({ endpoint, insecure }), "deleteTrunk");
30
+ const { endpoint, insecure, cacert } = flags;
31
+ await super.deleteResource(new sdk_1.default.Trunks({ endpoint, insecure, cacert }), "deleteTrunk");
32
32
  }
33
33
  }
34
34
  exports.default = DeleteTrunkCommand;
@@ -30,8 +30,8 @@ const moment_1 = __importDefault(require("moment"));
30
30
  class DescribeCommand extends base_1.BaseCommand {
31
31
  async run() {
32
32
  const { args, flags } = await this.parse(DescribeCommand);
33
- const { endpoint, insecure } = flags;
34
- const api = new sdk_1.default.Trunks({ endpoint, insecure });
33
+ const { endpoint, insecure, cacert } = flags;
34
+ const api = new sdk_1.default.Trunks({ endpoint, insecure, cacert });
35
35
  try {
36
36
  const trunk = await api.getTrunk(args.ref);
37
37
  const jsonObj = {
@@ -34,12 +34,12 @@ const inquirer_1 = __importDefault(require("inquirer"));
34
34
  class UpdateCommand extends base_1.BaseCommand {
35
35
  async run() {
36
36
  const { args, flags } = await this.parse(UpdateCommand);
37
- const { endpoint, insecure } = flags;
38
- const api = new sdk_1.default.Trunks({ endpoint, insecure });
37
+ const { endpoint, insecure, cacert } = flags;
38
+ const api = new sdk_1.default.Trunks({ endpoint, insecure, cacert });
39
39
  try {
40
40
  const trunkFromDB = await api.getTrunk(args.ref);
41
41
  // TODO: Add support for pagination
42
- const acls = await new sdk_1.default.ACL({ endpoint, insecure }).listACLs({
42
+ const acls = await new sdk_1.default.ACL({ endpoint, insecure, cacert }).listACLs({
43
43
  pageSize: 25,
44
44
  pageToken: ""
45
45
  });
@@ -51,7 +51,8 @@ class UpdateCommand extends base_1.BaseCommand {
51
51
  });
52
52
  const credentials = await new sdk_1.default.Credentials({
53
53
  endpoint,
54
- insecure
54
+ insecure,
55
+ cacert
55
56
  }).listCredentials({
56
57
  pageSize: 25,
57
58
  pageToken: ""
package/dist/utils.js CHANGED
@@ -39,7 +39,8 @@ async function showPaginatedList(request) {
39
39
  const { showTable, args, flags, kind, self } = request;
40
40
  const api = new sdk_1.default[getFunctionMapping(kind).api]({
41
41
  endpoint: flags.endpoint,
42
- insecure: flags.insecure
42
+ insecure: flags.insecure,
43
+ cacert: flags.cacert
43
44
  });
44
45
  // Show single item
45
46
  if (args.ref) {