@oclif/core 4.0.21 → 4.0.23
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/index.js +18 -0
- package/package.json +6 -5
package/lib/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ux = exports.toStandardizedId = exports.toConfiguredId = exports.settings = exports.Performance = exports.Parser = exports.ModuleLoader = exports.getLogger = exports.Interfaces = exports.loadHelpClass = exports.HelpBase = exports.Help = exports.CommandHelp = exports.flush = exports.Flags = exports.execute = exports.handle = exports.Errors = exports.Plugin = exports.Config = exports.Command = exports.Args = void 0;
|
|
27
|
+
const util_1 = require("./util/util");
|
|
27
28
|
function checkCWD() {
|
|
28
29
|
try {
|
|
29
30
|
process.cwd();
|
|
@@ -34,7 +35,24 @@ function checkCWD() {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
}
|
|
38
|
+
function checkNodeVersion() {
|
|
39
|
+
if (process.env.OCLIF_DISABLE_ENGINE_WARNING && (0, util_1.isTruthy)(process.env.OCLIF_DISABLE_ENGINE_WARNING))
|
|
40
|
+
return;
|
|
41
|
+
try {
|
|
42
|
+
const semver = require('semver');
|
|
43
|
+
const path = require('node:path');
|
|
44
|
+
const root = path.join(__dirname, '..');
|
|
45
|
+
const pjson = require(path.join(root, 'package.json'));
|
|
46
|
+
if (!semver.satisfies(process.versions.node, pjson.engines.node)) {
|
|
47
|
+
process.emitWarning(`Node version must be ${pjson.engines.node} to use this CLI. Current node version: ${process.versions.node}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// ignore
|
|
52
|
+
}
|
|
53
|
+
}
|
|
37
54
|
checkCWD();
|
|
55
|
+
checkNodeVersion();
|
|
38
56
|
exports.Args = __importStar(require("./args"));
|
|
39
57
|
var command_1 = require("./command");
|
|
40
58
|
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return command_1.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.23",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"is-wsl": "^2.2.0",
|
|
18
18
|
"lilconfig": "^3.1.2",
|
|
19
19
|
"minimatch": "^9.0.5",
|
|
20
|
+
"semver": "^7.6.3",
|
|
20
21
|
"string-width": "^4.2.3",
|
|
21
22
|
"supports-color": "^8",
|
|
22
23
|
"widest-line": "^3.1.0",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"@types/debug": "^4.1.10",
|
|
37
38
|
"@types/ejs": "^3.1.5",
|
|
38
39
|
"@types/indent-string": "^4.0.1",
|
|
39
|
-
"@types/mocha": "^10.0.
|
|
40
|
+
"@types/mocha": "^10.0.8",
|
|
40
41
|
"@types/node": "^18",
|
|
41
42
|
"@types/pnpapi": "^0.0.5",
|
|
42
43
|
"@types/sinon": "^17.0.3",
|
|
@@ -50,9 +51,9 @@
|
|
|
50
51
|
"cross-env": "^7.0.3",
|
|
51
52
|
"eslint": "^8.57.0",
|
|
52
53
|
"eslint-config-oclif": "^5.2.1",
|
|
53
|
-
"eslint-config-oclif-typescript": "^3.1.
|
|
54
|
+
"eslint-config-oclif-typescript": "^3.1.11",
|
|
54
55
|
"eslint-config-prettier": "^9.1.0",
|
|
55
|
-
"husky": "^9.1.
|
|
56
|
+
"husky": "^9.1.6",
|
|
56
57
|
"lint-staged": "^15",
|
|
57
58
|
"madge": "^6.1.0",
|
|
58
59
|
"mocha": "^10.7.3",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"shx": "^0.3.4",
|
|
62
63
|
"sinon": "^18",
|
|
63
64
|
"ts-node": "^10.9.2",
|
|
64
|
-
"tsd": "^0.31.
|
|
65
|
+
"tsd": "^0.31.2",
|
|
65
66
|
"typescript": "^5"
|
|
66
67
|
},
|
|
67
68
|
"engines": {
|