@oclif/core 4.0.29 → 4.0.30

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.
@@ -40,6 +40,7 @@ const performance_1 = require("../performance");
40
40
  const settings_1 = require("../settings");
41
41
  const determine_priority_1 = require("../util/determine-priority");
42
42
  const fs_1 = require("../util/fs");
43
+ const ids_1 = require("../util/ids");
43
44
  const os_1 = require("../util/os");
44
45
  const util_2 = require("../util/util");
45
46
  const ux_1 = require("../ux");
@@ -696,22 +697,26 @@ class Config {
696
697
  this.commandPermutations.add(permutation, command.id);
697
698
  }
698
699
  const handleAlias = (alias, hidden = false) => {
699
- if (this._commands.has(alias)) {
700
+ const aliasWithDefaultTopicSeparator = (0, ids_1.toStandardizedId)(alias, this);
701
+ if (this._commands.has(aliasWithDefaultTopicSeparator)) {
700
702
  const prioritizedCommand = (0, determine_priority_1.determinePriority)(this.pjson.oclif.plugins ?? [], [
701
- this._commands.get(alias),
703
+ this._commands.get(aliasWithDefaultTopicSeparator),
702
704
  command,
703
705
  ]);
704
- this._commands.set(alias, { ...prioritizedCommand, id: alias });
706
+ this._commands.set(aliasWithDefaultTopicSeparator, {
707
+ ...prioritizedCommand,
708
+ id: aliasWithDefaultTopicSeparator,
709
+ });
705
710
  }
706
711
  else {
707
- this._commands.set(alias, { ...command, hidden, id: alias });
712
+ this._commands.set(aliasWithDefaultTopicSeparator, { ...command, hidden, id: aliasWithDefaultTopicSeparator });
708
713
  }
709
714
  // set every permutation of the aliases
710
715
  // v3 moved command alias permutations to the manifest, but some plugins may not have
711
716
  // the new manifest yet. For those, we need to calculate the permutations here.
712
717
  const aliasPermutations = this.flexibleTaxonomy && command.aliasPermutations === undefined
713
- ? (0, util_3.getCommandIdPermutations)(alias)
714
- : (command.permutations ?? [alias]);
718
+ ? (0, util_3.getCommandIdPermutations)(aliasWithDefaultTopicSeparator)
719
+ : (command.permutations ?? [aliasWithDefaultTopicSeparator]);
715
720
  // set every permutation
716
721
  for (const permutation of aliasPermutations) {
717
722
  this.commandPermutations.add(permutation, command.id);
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.29",
4
+ "version": "4.0.30",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -51,7 +51,7 @@
51
51
  "cross-env": "^7.0.3",
52
52
  "eslint": "^8.57.1",
53
53
  "eslint-config-oclif": "^5.2.1",
54
- "eslint-config-oclif-typescript": "^3.1.11",
54
+ "eslint-config-oclif-typescript": "^3.1.12",
55
55
  "eslint-config-prettier": "^9.1.0",
56
56
  "husky": "^9.1.6",
57
57
  "lint-staged": "^15",