@oclif/core 2.14.0 → 3.0.0-beta.10
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/README.md +8 -6
- package/flush.js +1 -1
- package/handle.js +1 -1
- package/lib/cli-ux/action/base.js +2 -2
- package/lib/cli-ux/config.d.ts +0 -1
- package/lib/cli-ux/config.js +1 -4
- package/lib/cli-ux/exit.d.ts +1 -1
- package/lib/cli-ux/exit.js +1 -1
- package/lib/cli-ux/flush.d.ts +1 -0
- package/lib/cli-ux/flush.js +28 -0
- package/lib/cli-ux/index.d.ts +1 -3
- package/lib/cli-ux/index.js +7 -31
- package/lib/cli-ux/styled/json.js +1 -1
- package/lib/command.d.ts +2 -0
- package/lib/config/config.d.ts +8 -12
- package/lib/config/config.js +73 -162
- package/lib/config/index.d.ts +2 -1
- package/lib/config/index.js +2 -1
- package/lib/config/plugin-loader.d.ts +30 -0
- package/lib/config/plugin-loader.js +129 -0
- package/lib/config/plugin.d.ts +5 -10
- package/lib/config/plugin.js +21 -17
- package/lib/config/ts-node.d.ts +3 -2
- package/lib/config/ts-node.js +83 -36
- package/lib/errors/errors/cli.d.ts +1 -0
- package/lib/errors/errors/cli.js +1 -0
- package/lib/errors/handle.d.ts +2 -2
- package/lib/errors/handle.js +3 -3
- package/lib/errors/index.d.ts +1 -0
- package/lib/errors/index.js +8 -1
- package/lib/execute.d.ts +49 -0
- package/lib/execute.js +62 -0
- package/lib/flags.js +4 -3
- package/lib/help/index.js +2 -2
- package/lib/index.d.ts +6 -4
- package/lib/index.js +9 -6
- package/lib/interfaces/config.d.ts +25 -26
- package/lib/interfaces/index.d.ts +14 -14
- package/lib/interfaces/parser.d.ts +14 -66
- package/lib/interfaces/pjson.d.ts +2 -0
- package/lib/interfaces/plugin.d.ts +8 -3
- package/lib/interfaces/ts-config.d.ts +9 -0
- package/lib/main.d.ts +1 -54
- package/lib/main.js +10 -72
- package/lib/module-loader.d.ts +1 -2
- package/lib/module-loader.js +5 -5
- package/lib/parser/parse.js +1 -34
- package/lib/performance.d.ts +1 -1
- package/lib/performance.js +1 -2
- package/package.json +14 -13
- package/lib/cli-ux/action/pride-spinner.d.ts +0 -4
- package/lib/cli-ux/action/pride-spinner.js +0 -30
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
|
+
"version": "3.0.0-beta.10",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"natural-orderby": "^2.0.3",
|
|
24
24
|
"object-treeify": "^1.1.33",
|
|
25
25
|
"password-prompt": "^1.1.2",
|
|
26
|
-
"semver": "^7.5.4",
|
|
27
26
|
"slice-ansi": "^4.0.0",
|
|
28
27
|
"string-width": "^4.2.3",
|
|
29
28
|
"strip-ansi": "^6.0.1",
|
|
@@ -38,14 +37,15 @@
|
|
|
38
37
|
"devDependencies": {
|
|
39
38
|
"@commitlint/config-conventional": "^12.1.4",
|
|
40
39
|
"@oclif/plugin-help": "^5.2.8",
|
|
41
|
-
"@oclif/plugin-plugins": "^
|
|
42
|
-
"@oclif/test": "^2.
|
|
40
|
+
"@oclif/plugin-plugins": "^3.3.0",
|
|
41
|
+
"@oclif/test": "^2.4.7",
|
|
43
42
|
"@types/ansi-styles": "^3.2.1",
|
|
44
43
|
"@types/benchmark": "^2.1.2",
|
|
45
44
|
"@types/chai": "^4.3.4",
|
|
46
45
|
"@types/chai-as-promised": "^7.1.5",
|
|
47
46
|
"@types/clean-stack": "^2.1.1",
|
|
48
47
|
"@types/ejs": "^3.1.2",
|
|
48
|
+
"@types/glob": "^8.1.0",
|
|
49
49
|
"@types/indent-string": "^4.0.1",
|
|
50
50
|
"@types/js-yaml": "^3.12.7",
|
|
51
51
|
"@types/mocha": "^8.2.3",
|
|
@@ -53,8 +53,7 @@
|
|
|
53
53
|
"@types/node": "^16",
|
|
54
54
|
"@types/node-notifier": "^8.0.2",
|
|
55
55
|
"@types/proxyquire": "^1.3.28",
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/shelljs": "^0.8.11",
|
|
56
|
+
"@types/shelljs": "^0.8.12",
|
|
58
57
|
"@types/slice-ansi": "^4.0.0",
|
|
59
58
|
"@types/strip-ansi": "^5.2.1",
|
|
60
59
|
"@types/supports-color": "^8.1.1",
|
|
@@ -64,13 +63,14 @@
|
|
|
64
63
|
"chai": "^4.3.7",
|
|
65
64
|
"chai-as-promised": "^7.1.1",
|
|
66
65
|
"commitlint": "^12.1.4",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
67
|
"eslint": "^7.32.0",
|
|
68
68
|
"eslint-config-oclif": "^4.0.0",
|
|
69
69
|
"eslint-config-oclif-typescript": "^1.0.3",
|
|
70
70
|
"fancy-test": "^2.0.16",
|
|
71
71
|
"globby": "^11.1.0",
|
|
72
72
|
"husky": "6",
|
|
73
|
-
"mocha": "^
|
|
73
|
+
"mocha": "^10.2.0",
|
|
74
74
|
"nock": "^13.3.0",
|
|
75
75
|
"proxyquire": "^2.1.3",
|
|
76
76
|
"shelljs": "^0.8.5",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"typescript": "^4.9.5"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
|
-
"node": ">=
|
|
83
|
+
"node": ">=16.0.0"
|
|
84
84
|
},
|
|
85
85
|
"files": [
|
|
86
86
|
"/lib",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"oclif"
|
|
94
94
|
],
|
|
95
95
|
"license": "MIT",
|
|
96
|
-
"main": "lib/index.js",
|
|
96
|
+
"main": "./lib/index.js",
|
|
97
97
|
"repository": "oclif/core",
|
|
98
98
|
"oclif": {
|
|
99
99
|
"bin": "oclif",
|
|
@@ -108,14 +108,15 @@
|
|
|
108
108
|
"scripts": {
|
|
109
109
|
"build": "shx rm -rf lib && tsc",
|
|
110
110
|
"commitlint": "commitlint",
|
|
111
|
+
"compile": "tsc",
|
|
111
112
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
112
113
|
"posttest": "yarn lint",
|
|
113
|
-
"compile": "tsc",
|
|
114
114
|
"prepack": "yarn run build",
|
|
115
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
116
|
-
"test:e2e": "mocha --forbid-only \"test/**/*.e2e.ts\" --timeout 1200000",
|
|
117
115
|
"pretest": "yarn build --noEmit && tsc -p test --noEmit --skipLibCheck",
|
|
118
|
-
"test:
|
|
116
|
+
"test:e2e": "mocha --forbid-only \"test/**/*.e2e.ts\" --parallel --timeout 1200000",
|
|
117
|
+
"test:esm-cjs": "cross-env DEBUG=e2e:* ts-node test/integration/esm-cjs.ts",
|
|
118
|
+
"test:perf": "ts-node test/perf/parser.perf.ts",
|
|
119
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\""
|
|
119
120
|
},
|
|
120
121
|
"types": "lib/index.d.ts"
|
|
121
122
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const chalk = require("chalk");
|
|
4
|
-
const supportsColor = require("supports-color");
|
|
5
|
-
const spinner_1 = require("./spinner");
|
|
6
|
-
function color(s, frameIndex) {
|
|
7
|
-
const prideColors = [
|
|
8
|
-
chalk.keyword('pink'),
|
|
9
|
-
chalk.red,
|
|
10
|
-
chalk.keyword('orange'),
|
|
11
|
-
chalk.yellow,
|
|
12
|
-
chalk.green,
|
|
13
|
-
chalk.cyan,
|
|
14
|
-
chalk.blue,
|
|
15
|
-
chalk.magenta,
|
|
16
|
-
];
|
|
17
|
-
if (!supportsColor)
|
|
18
|
-
return s;
|
|
19
|
-
const has256 = supportsColor.stdout ? supportsColor.stdout.has256 : (process.env.TERM || '').includes('256');
|
|
20
|
-
const prideColor = prideColors[frameIndex] || prideColors[0];
|
|
21
|
-
return has256 ? prideColor(s) : chalk.magenta(s);
|
|
22
|
-
}
|
|
23
|
-
class PrideSpinnerAction extends spinner_1.default {
|
|
24
|
-
_frame() {
|
|
25
|
-
const frame = this.frames[this.frameIndex];
|
|
26
|
-
this.frameIndex = ++this.frameIndex % this.frames.length;
|
|
27
|
-
return color(frame, this.frameIndex);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.default = PrideSpinnerAction;
|