@oclif/core 2.2.1 → 2.3.1

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.
@@ -31,6 +31,7 @@ export declare class Config implements IConfig {
31
31
  valid: boolean;
32
32
  version: string;
33
33
  windows: boolean;
34
+ binAliases?: string[];
34
35
  protected warned: boolean;
35
36
  private commandPermutations;
36
37
  private topicPermutations;
@@ -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 util_4 = require("../help/util");
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, util_4.getHelpFlagAdditions)(this).includes(arg) && arg.startsWith('-')).map(a => a.replace(/-/g, ''));
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: ':' | ' ';
@@ -80,6 +80,7 @@ export declare namespace PJSON {
80
80
  oclif: Plugin['oclif'] & {
81
81
  schema?: number;
82
82
  bin?: string;
83
+ binAliases?: string[];
83
84
  npmRegistry?: string;
84
85
  scope?: string;
85
86
  dirname?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.2.1",
4
+ "version": "2.3.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -11,7 +11,7 @@
11
11
  "cardinal": "^2.1.1",
12
12
  "chalk": "^4.1.2",
13
13
  "clean-stack": "^3.0.1",
14
- "cli-progress": "^3.11.2",
14
+ "cli-progress": "^3.12.0",
15
15
  "debug": "^4.3.4",
16
16
  "ejs": "^3.1.8",
17
17
  "fs-extra": "^9.1.0",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^12.1.4",
39
- "@oclif/plugin-help": "^5.2.4",
39
+ "@oclif/plugin-help": "^5.2.5",
40
40
  "@oclif/plugin-plugins": "^2.3.2",
41
41
  "@oclif/test": "^2.3.6",
42
42
  "@types/ansi-styles": "^3.2.1",