@oclif/core 3.0.0-beta.1 → 3.0.0-beta.11

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.
Files changed (54) hide show
  1. package/README.md +8 -6
  2. package/flush.js +1 -1
  3. package/handle.js +1 -1
  4. package/lib/cli-ux/action/base.js +2 -2
  5. package/lib/cli-ux/action/spinner.js +1 -1
  6. package/lib/cli-ux/config.d.ts +0 -1
  7. package/lib/cli-ux/config.js +6 -10
  8. package/lib/cli-ux/exit.d.ts +1 -1
  9. package/lib/cli-ux/exit.js +1 -1
  10. package/lib/cli-ux/flush.d.ts +1 -0
  11. package/lib/cli-ux/flush.js +28 -0
  12. package/lib/cli-ux/index.d.ts +1 -3
  13. package/lib/cli-ux/index.js +7 -31
  14. package/lib/cli-ux/prompt.js +2 -2
  15. package/lib/command.d.ts +2 -0
  16. package/lib/config/config.d.ts +9 -12
  17. package/lib/config/config.js +88 -135
  18. package/lib/config/index.d.ts +2 -1
  19. package/lib/config/index.js +2 -1
  20. package/lib/config/plugin-loader.d.ts +30 -0
  21. package/lib/config/plugin-loader.js +129 -0
  22. package/lib/config/plugin.d.ts +5 -10
  23. package/lib/config/plugin.js +21 -17
  24. package/lib/config/ts-node.d.ts +3 -2
  25. package/lib/config/ts-node.js +83 -36
  26. package/lib/errors/errors/cli.d.ts +1 -0
  27. package/lib/errors/errors/cli.js +1 -0
  28. package/lib/errors/handle.d.ts +2 -2
  29. package/lib/errors/handle.js +3 -3
  30. package/lib/errors/index.d.ts +1 -0
  31. package/lib/errors/index.js +8 -1
  32. package/lib/errors/logger.js +3 -3
  33. package/lib/execute.d.ts +49 -0
  34. package/lib/execute.js +62 -0
  35. package/lib/flags.js +6 -4
  36. package/lib/help/index.js +2 -2
  37. package/lib/index.d.ts +6 -4
  38. package/lib/index.js +9 -15
  39. package/lib/interfaces/config.d.ts +26 -26
  40. package/lib/interfaces/index.d.ts +14 -14
  41. package/lib/interfaces/parser.d.ts +14 -66
  42. package/lib/interfaces/pjson.d.ts +2 -0
  43. package/lib/interfaces/plugin.d.ts +8 -1
  44. package/lib/interfaces/ts-config.d.ts +9 -0
  45. package/lib/main.d.ts +1 -54
  46. package/lib/main.js +10 -72
  47. package/lib/module-loader.d.ts +1 -2
  48. package/lib/module-loader.js +9 -9
  49. package/lib/parser/parse.js +1 -34
  50. package/lib/performance.d.ts +1 -1
  51. package/lib/performance.js +1 -2
  52. package/package.json +14 -15
  53. package/lib/cli-ux/action/pride-spinner.d.ts +0 -4
  54. 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": "3.0.0-beta.1",
4
+ "version": "3.0.0-beta.11",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -14,7 +14,6 @@
14
14
  "cli-progress": "^3.12.0",
15
15
  "debug": "^4.3.4",
16
16
  "ejs": "^3.1.8",
17
- "fs-extra": "^9.1.0",
18
17
  "get-package-type": "^0.1.0",
19
18
  "globby": "^11.1.0",
20
19
  "hyperlinker": "^1.0.0",
@@ -24,7 +23,6 @@
24
23
  "natural-orderby": "^2.0.3",
25
24
  "object-treeify": "^1.1.33",
26
25
  "password-prompt": "^1.1.2",
27
- "semver": "^7.5.3",
28
26
  "slice-ansi": "^4.0.0",
29
27
  "string-width": "^4.2.3",
30
28
  "strip-ansi": "^6.0.1",
@@ -39,15 +37,15 @@
39
37
  "devDependencies": {
40
38
  "@commitlint/config-conventional": "^12.1.4",
41
39
  "@oclif/plugin-help": "^5.2.8",
42
- "@oclif/plugin-plugins": "^2.4.7",
43
- "@oclif/test": "^2.3.15",
40
+ "@oclif/plugin-plugins": "^3.3.0",
41
+ "@oclif/test": "^2.4.7",
44
42
  "@types/ansi-styles": "^3.2.1",
45
43
  "@types/benchmark": "^2.1.2",
46
44
  "@types/chai": "^4.3.4",
47
45
  "@types/chai-as-promised": "^7.1.5",
48
46
  "@types/clean-stack": "^2.1.1",
49
47
  "@types/ejs": "^3.1.2",
50
- "@types/fs-extra": "^9.0.13",
48
+ "@types/glob": "^8.1.0",
51
49
  "@types/indent-string": "^4.0.1",
52
50
  "@types/js-yaml": "^3.12.7",
53
51
  "@types/mocha": "^8.2.3",
@@ -55,8 +53,7 @@
55
53
  "@types/node": "^16",
56
54
  "@types/node-notifier": "^8.0.2",
57
55
  "@types/proxyquire": "^1.3.28",
58
- "@types/semver": "^7.5.0",
59
- "@types/shelljs": "^0.8.11",
56
+ "@types/shelljs": "^0.8.12",
60
57
  "@types/slice-ansi": "^4.0.0",
61
58
  "@types/strip-ansi": "^5.2.1",
62
59
  "@types/supports-color": "^8.1.1",
@@ -66,13 +63,14 @@
66
63
  "chai": "^4.3.7",
67
64
  "chai-as-promised": "^7.1.1",
68
65
  "commitlint": "^12.1.4",
66
+ "cross-env": "^7.0.3",
69
67
  "eslint": "^7.32.0",
70
68
  "eslint-config-oclif": "^4.0.0",
71
69
  "eslint-config-oclif-typescript": "^1.0.3",
72
70
  "fancy-test": "^2.0.16",
73
71
  "globby": "^11.1.0",
74
72
  "husky": "6",
75
- "mocha": "^8.4.0",
73
+ "mocha": "^10.2.0",
76
74
  "nock": "^13.3.0",
77
75
  "proxyquire": "^2.1.3",
78
76
  "shelljs": "^0.8.5",
@@ -82,7 +80,7 @@
82
80
  "typescript": "^4.9.5"
83
81
  },
84
82
  "engines": {
85
- "node": ">=14.0.0"
83
+ "node": ">=16.0.0"
86
84
  },
87
85
  "files": [
88
86
  "/lib",
@@ -95,7 +93,7 @@
95
93
  "oclif"
96
94
  ],
97
95
  "license": "MIT",
98
- "main": "lib/index.js",
96
+ "main": "./lib/index.js",
99
97
  "repository": "oclif/core",
100
98
  "oclif": {
101
99
  "bin": "oclif",
@@ -110,14 +108,15 @@
110
108
  "scripts": {
111
109
  "build": "shx rm -rf lib && tsc",
112
110
  "commitlint": "commitlint",
111
+ "compile": "tsc",
113
112
  "lint": "eslint . --ext .ts --config .eslintrc",
114
113
  "posttest": "yarn lint",
115
- "compile": "tsc",
116
114
  "prepack": "yarn run build",
117
- "test": "mocha --forbid-only \"test/**/*.test.ts\"",
118
- "test:e2e": "mocha --forbid-only \"test/**/*.e2e.ts\" --timeout 1200000",
119
115
  "pretest": "yarn build --noEmit && tsc -p test --noEmit --skipLibCheck",
120
- "test:perf": "ts-node test/perf/parser.perf.ts"
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\""
121
120
  },
122
121
  "types": "lib/index.d.ts"
123
122
  }
@@ -1,4 +0,0 @@
1
- import SpinnerAction from './spinner';
2
- export default class PrideSpinnerAction extends SpinnerAction {
3
- protected _frame(): string;
4
- }
@@ -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;