@oclif/core 2.6.2 → 2.6.4
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 +4 -1
- package/lib/module-loader.js +4 -1
- package/package.json +3 -3
package/lib/config/config.js
CHANGED
|
@@ -15,6 +15,8 @@ const help_1 = require("../help");
|
|
|
15
15
|
const stream_1 = require("../cli-ux/stream");
|
|
16
16
|
const performance_1 = require("../performance");
|
|
17
17
|
const settings_1 = require("../settings");
|
|
18
|
+
const node_os_1 = require("node:os");
|
|
19
|
+
const node_path_1 = require("node:path");
|
|
18
20
|
// eslint-disable-next-line new-cap
|
|
19
21
|
const debug = (0, util_2.Debug)();
|
|
20
22
|
const _pjson = (0, util_3.requireJson)(__dirname, '..', '..', 'package.json');
|
|
@@ -464,7 +466,8 @@ class Config {
|
|
|
464
466
|
}
|
|
465
467
|
_shell() {
|
|
466
468
|
let shellPath;
|
|
467
|
-
const
|
|
469
|
+
const COMSPEC = process.env.COMSPEC;
|
|
470
|
+
const SHELL = process.env.SHELL ?? (0, node_os_1.userInfo)().shell?.split(node_path_1.sep)?.pop();
|
|
468
471
|
if (SHELL) {
|
|
469
472
|
shellPath = SHELL.split('/');
|
|
470
473
|
}
|
package/lib/module-loader.js
CHANGED
|
@@ -123,12 +123,15 @@ class ModuleLoader {
|
|
|
123
123
|
static resolvePath(config, modulePath) {
|
|
124
124
|
let isESM;
|
|
125
125
|
let filePath;
|
|
126
|
+
const isPlugin = (config) => {
|
|
127
|
+
return config.type !== undefined;
|
|
128
|
+
};
|
|
126
129
|
try {
|
|
127
130
|
filePath = require.resolve(modulePath);
|
|
128
131
|
isESM = ModuleLoader.isPathModule(filePath);
|
|
129
132
|
}
|
|
130
133
|
catch {
|
|
131
|
-
filePath = Config.tsPath(config.root, modulePath);
|
|
134
|
+
filePath = isPlugin(config) ? Config.tsPath(config.root, modulePath, config.type) : Config.tsPath(config.root, modulePath);
|
|
132
135
|
let fileExists = false;
|
|
133
136
|
let isDirectory = false;
|
|
134
137
|
if (fs.existsSync(filePath)) {
|
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.6.
|
|
4
|
+
"version": "2.6.4",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@commitlint/config-conventional": "^12.1.4",
|
|
40
40
|
"@oclif/plugin-help": "^5.2.7",
|
|
41
|
-
"@oclif/plugin-plugins": "^2.
|
|
42
|
-
"@oclif/test": "^2.3.
|
|
41
|
+
"@oclif/plugin-plugins": "^2.4.1",
|
|
42
|
+
"@oclif/test": "^2.3.9",
|
|
43
43
|
"@types/ansi-styles": "^3.2.1",
|
|
44
44
|
"@types/chai": "^4.3.4",
|
|
45
45
|
"@types/chai-as-promised": "^7.1.5",
|