@oclif/core 4.0.29 → 4.0.31
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.js +13 -8
- package/package.json +3 -3
package/lib/config/config.js
CHANGED
|
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Config = void 0;
|
|
30
30
|
const ejs = __importStar(require("ejs"));
|
|
31
|
+
const is_wsl_1 = __importDefault(require("is-wsl"));
|
|
31
32
|
const node_os_1 = require("node:os");
|
|
32
33
|
const node_path_1 = require("node:path");
|
|
33
34
|
const node_url_1 = require("node:url");
|
|
@@ -40,6 +41,7 @@ const performance_1 = require("../performance");
|
|
|
40
41
|
const settings_1 = require("../settings");
|
|
41
42
|
const determine_priority_1 = require("../util/determine-priority");
|
|
42
43
|
const fs_1 = require("../util/fs");
|
|
44
|
+
const ids_1 = require("../util/ids");
|
|
43
45
|
const os_1 = require("../util/os");
|
|
44
46
|
const util_2 = require("../util/util");
|
|
45
47
|
const ux_1 = require("../ux");
|
|
@@ -292,8 +294,7 @@ class Config {
|
|
|
292
294
|
this.channel = this.options.channel || channelFromVersion(this.version);
|
|
293
295
|
this.valid = this.rootPlugin.valid;
|
|
294
296
|
this.arch = (0, node_os_1.arch)() === 'ia32' ? 'x86' : (0, node_os_1.arch)();
|
|
295
|
-
|
|
296
|
-
this.platform = isWSL ? 'wsl' : (0, os_1.getPlatform)();
|
|
297
|
+
this.platform = is_wsl_1.default ? 'wsl' : (0, os_1.getPlatform)();
|
|
297
298
|
this.windows = this.platform === 'win32';
|
|
298
299
|
this.bin = this.pjson.oclif.bin || this.name;
|
|
299
300
|
this.binAliases = this.pjson.oclif.binAliases;
|
|
@@ -696,22 +697,26 @@ class Config {
|
|
|
696
697
|
this.commandPermutations.add(permutation, command.id);
|
|
697
698
|
}
|
|
698
699
|
const handleAlias = (alias, hidden = false) => {
|
|
699
|
-
|
|
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(
|
|
703
|
+
this._commands.get(aliasWithDefaultTopicSeparator),
|
|
702
704
|
command,
|
|
703
705
|
]);
|
|
704
|
-
this._commands.set(
|
|
706
|
+
this._commands.set(aliasWithDefaultTopicSeparator, {
|
|
707
|
+
...prioritizedCommand,
|
|
708
|
+
id: aliasWithDefaultTopicSeparator,
|
|
709
|
+
});
|
|
705
710
|
}
|
|
706
711
|
else {
|
|
707
|
-
this._commands.set(
|
|
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)(
|
|
714
|
-
: (command.permutations ?? [
|
|
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.
|
|
4
|
+
"version": "4.0.31",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"get-package-type": "^0.1.0",
|
|
15
15
|
"globby": "^11.1.0",
|
|
16
16
|
"indent-string": "^4.0.0",
|
|
17
|
-
"is-wsl": "^
|
|
17
|
+
"is-wsl": "^2.2.0",
|
|
18
18
|
"lilconfig": "^3.1.2",
|
|
19
19
|
"minimatch": "^9.0.5",
|
|
20
20
|
"semver": "^7.6.3",
|
|
@@ -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.
|
|
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",
|