@oclif/core 4.0.23 → 4.0.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.
- package/lib/command.js +3 -2
- package/lib/help/index.js +2 -1
- package/package.json +2 -2
package/lib/command.js
CHANGED
|
@@ -237,7 +237,8 @@ class Command {
|
|
|
237
237
|
// Since config.runHook will only run the hook for the root plugin, hookResult.successes will always have a length of 0 or 1
|
|
238
238
|
// But to be extra safe, we find the result that matches the root plugin.
|
|
239
239
|
const argvToParse = hookResult.successes?.length
|
|
240
|
-
? hookResult.successes.find((s) => s.plugin.root === cache_1.default.getInstance().get('rootPlugin')?.root)?.result ??
|
|
240
|
+
? (hookResult.successes.find((s) => s.plugin.root === cache_1.default.getInstance().get('rootPlugin')?.root)?.result ??
|
|
241
|
+
argv)
|
|
241
242
|
: argv;
|
|
242
243
|
this.argv = [...argvToParse];
|
|
243
244
|
const results = await Parser.parse(argvToParse, opts);
|
|
@@ -280,7 +281,7 @@ class Command {
|
|
|
280
281
|
const aliases = (0, util_2.uniq)([...(flagDef?.aliases ?? []), ...(flagDef?.charAliases ?? [])]).map((a) => a.length === 1 ? `-${a}` : `--${a}`);
|
|
281
282
|
if (aliases.length === 0)
|
|
282
283
|
return;
|
|
283
|
-
const foundAliases = aliases.filter((alias) => this.argv.
|
|
284
|
+
const foundAliases = aliases.filter((alias) => this.argv.includes(alias));
|
|
284
285
|
for (const alias of foundAliases) {
|
|
285
286
|
let preferredUsage = `--${flagDef?.name}`;
|
|
286
287
|
if (flagDef?.char) {
|
package/lib/help/index.js
CHANGED
|
@@ -163,7 +163,8 @@ class Help extends HelpBase {
|
|
|
163
163
|
}
|
|
164
164
|
if (command.deprecateAliases && command.aliases.includes(name)) {
|
|
165
165
|
const actualCmd = this.config.commands.find((c) => c.aliases.includes(name));
|
|
166
|
-
const
|
|
166
|
+
const actualCmdName = actualCmd ? (0, ids_1.toConfiguredId)(actualCmd.id, this.config) : '';
|
|
167
|
+
const opts = { ...command.deprecationOptions, ...(actualCmd ? { to: actualCmdName } : {}) };
|
|
167
168
|
this.log(`${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), opts)}\n`);
|
|
168
169
|
}
|
|
169
170
|
const summary = this.summary(command);
|
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": "4.0.
|
|
4
|
+
"version": "4.0.25",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"chai-as-promised": "^7.1.2",
|
|
50
50
|
"commitlint": "^19",
|
|
51
51
|
"cross-env": "^7.0.3",
|
|
52
|
-
"eslint": "^8.57.
|
|
52
|
+
"eslint": "^8.57.1",
|
|
53
53
|
"eslint-config-oclif": "^5.2.1",
|
|
54
54
|
"eslint-config-oclif-typescript": "^3.1.11",
|
|
55
55
|
"eslint-config-prettier": "^9.1.0",
|