@oclif/core 2.2.1 → 2.3.0
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/lib/config/config.d.ts
CHANGED
package/lib/config/config.js
CHANGED
|
@@ -11,7 +11,7 @@ const Plugin = require("./plugin");
|
|
|
11
11
|
const util_2 = require("./util");
|
|
12
12
|
const util_3 = require("../util");
|
|
13
13
|
const module_loader_1 = require("../module-loader");
|
|
14
|
-
const
|
|
14
|
+
const help_1 = require("../help");
|
|
15
15
|
const stream_1 = require("../cli-ux/stream");
|
|
16
16
|
// eslint-disable-next-line new-cap
|
|
17
17
|
const debug = (0, util_2.Debug)();
|
|
@@ -94,6 +94,7 @@ class Config {
|
|
|
94
94
|
this.platform = WSL ? 'wsl' : os.platform();
|
|
95
95
|
this.windows = this.platform === 'win32';
|
|
96
96
|
this.bin = this.pjson.oclif.bin || this.name;
|
|
97
|
+
this.binAliases = this.pjson.oclif.binAliases;
|
|
97
98
|
this.dirname = this.pjson.oclif.dirname || this.name;
|
|
98
99
|
this.flexibleTaxonomy = this.pjson.oclif.flexibleTaxonomy || false;
|
|
99
100
|
// currently, only colons or spaces are valid separators
|
|
@@ -345,7 +346,7 @@ class Config {
|
|
|
345
346
|
* @returns string[]
|
|
346
347
|
*/
|
|
347
348
|
findMatches(partialCmdId, argv) {
|
|
348
|
-
const flags = argv.filter(arg => !(0,
|
|
349
|
+
const flags = argv.filter(arg => !(0, help_1.getHelpFlagAdditions)(this).includes(arg) && arg.startsWith('-')).map(a => a.replace(/-/g, ''));
|
|
349
350
|
const possibleMatches = [...this.commandPermutations.get(partialCmdId)].map(k => this._commands.get(k));
|
|
350
351
|
const matches = possibleMatches.filter(command => {
|
|
351
352
|
const cmdFlags = Object.entries(command.flags).flatMap(([flag, def]) => {
|
|
@@ -85,6 +85,10 @@ export interface Config {
|
|
|
85
85
|
userPJSON?: PJSON.User;
|
|
86
86
|
plugins: Plugin[];
|
|
87
87
|
binPath?: string;
|
|
88
|
+
/**
|
|
89
|
+
* name of any bin aliases that will execute the cli
|
|
90
|
+
*/
|
|
91
|
+
binAliases?: string[];
|
|
88
92
|
valid: boolean;
|
|
89
93
|
flexibleTaxonomy?: boolean;
|
|
90
94
|
topicSeparator: ':' | ' ';
|