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

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/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @routr/ctl
20
20
  $ rctl COMMAND
21
21
  running command...
22
22
  $ rctl (--version)
23
- @routr/ctl/2.0.8-alpha.25 darwin-x64 node-v16.18.1
23
+ @routr/ctl/2.0.8-alpha.27 darwin-x64 node-v16.18.1
24
24
  $ rctl --help [COMMAND]
25
25
  USAGE
26
26
  $ rctl COMMAND
@@ -51,7 +51,6 @@ const base_1 = require("../../base");
51
51
  const errors_1 = require("@oclif/core/lib/errors");
52
52
  const common_1 = require("@routr/common");
53
53
  const validators_1 = require("../../validators");
54
- const fuzzy_search_1 = __importDefault(require("fuzzy-search"));
55
54
  const sdk_1 = __importDefault(require("@routr/sdk"));
56
55
  // NOTE: Newer versions of inquirer have a bug that causes the following error:
57
56
  // (node:75345) [ERR_REQUIRE_ESM] Error Plugin: @routr/ctl [ERR_REQUIRE_ESM]: require() of ES Module
@@ -86,9 +85,6 @@ class CreateAgentCommand extends base_1.BaseCommand {
86
85
  const credentialsList = credentials.items.map((credential) => {
87
86
  return { name: credential.name, value: credential.ref };
88
87
  });
89
- const searcher = new fuzzy_search_1.default(domainsList, ["name", "value", "description"], {
90
- caseSensitive: false
91
- });
92
88
  this.log("This utility will help you create a new Agent.");
93
89
  this.log("Press ^C at any time to quit.");
94
90
  const answers = await inquirer_1.default.prompt([
@@ -99,11 +95,10 @@ class CreateAgentCommand extends base_1.BaseCommand {
99
95
  validate: validators_1.nameValidator
100
96
  },
101
97
  {
102
- type: "autocomplete",
103
98
  name: "domainRef",
104
99
  message: "Select a Domain",
105
- source: (_, input) => searcher.search(input),
106
- when: () => domains.items.length > 0
100
+ choices: [{ name: "None", value: undefined }, ...domainsList],
101
+ type: "list"
107
102
  },
108
103
  {
109
104
  name: "username",
@@ -26,12 +26,11 @@ const core_1 = require("@oclif/core");
26
26
  const base_1 = require("../../base");
27
27
  const errors_1 = require("@oclif/core/lib/errors");
28
28
  const common_1 = require("@routr/common");
29
- const fuzzy_search_1 = __importDefault(require("fuzzy-search"));
29
+ const validators_1 = require("../../validators");
30
30
  const sdk_1 = __importDefault(require("@routr/sdk"));
31
31
  // NOTE: Newer versions of inquirer have a bug that causes the following error:
32
32
  // (node:75345) [ERR_REQUIRE_ESM] Error Plugin: @routr/ctl [ERR_REQUIRE_ESM]: require() of ES Module
33
33
  const inquirer_1 = __importDefault(require("inquirer"));
34
- const validators_1 = require("../../validators");
35
34
  class UpdateCommand extends base_1.BaseCommand {
36
35
  async run() {
37
36
  var _a, _b;
@@ -59,9 +58,6 @@ class UpdateCommand extends base_1.BaseCommand {
59
58
  const credentialsList = (_b = credentials.items) === null || _b === void 0 ? void 0 : _b.map((credential) => {
60
59
  return { name: credential.name, value: credential.ref };
61
60
  });
62
- const searcher = new fuzzy_search_1.default(domainsList, ["name", "value", "description"], {
63
- caseSensitive: false
64
- });
65
61
  this.log("This utility will help you update an existing Agent.");
66
62
  this.log("Press ^C at any time to quit.");
67
63
  const answers = await inquirer_1.default.prompt([
@@ -73,11 +69,10 @@ class UpdateCommand extends base_1.BaseCommand {
73
69
  validate: validators_1.nameValidator
74
70
  },
75
71
  {
76
- type: "autocomplete",
77
72
  name: "domainRef",
78
73
  message: "Select a Domain",
79
- source: (_, input) => searcher.search(input),
80
- when: () => domains.items.length > 0
74
+ choices: [{ name: "None", value: undefined }, ...domainsList],
75
+ type: "list"
81
76
  },
82
77
  {
83
78
  name: "credentialsRef",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.8-alpha.25",
2
+ "version": "2.0.8-alpha.27",
3
3
  "commands": {
4
4
  "acl:create": {
5
5
  "id": "acl:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/ctl",
3
- "version": "2.0.8-alpha.25",
3
+ "version": "2.0.8-alpha.27",
4
4
  "description": "Routr Command-Line Tool",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "bin": {
@@ -25,8 +25,8 @@
25
25
  "@oclif/plugin-help": "^5",
26
26
  "@oclif/plugin-plugins": "^2.1.12",
27
27
  "@oclif/plugin-warn-if-update-available": "^2.0.19",
28
- "@routr/common": "^2.0.8-alpha.25",
29
- "@routr/sdk": "^2.0.8-alpha.25",
28
+ "@routr/common": "^2.0.8-alpha.27",
29
+ "@routr/sdk": "^2.0.8-alpha.27",
30
30
  "figlet": "^1.5.2",
31
31
  "fuzzy-search": "^3.2.1",
32
32
  "inquirer": "^8.2.5",
@@ -88,5 +88,5 @@
88
88
  "oclif"
89
89
  ],
90
90
  "types": "dist/index.d.ts",
91
- "gitHead": "4824bf6d45009486c1761f05acb530da8c48a997"
91
+ "gitHead": "d6d51363e232a1a581f34236df9408422d6c68ee"
92
92
  }