@oclif/core 4.0.0-beta.6 → 4.0.0-beta.8
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/args.d.ts +4 -4
- package/lib/cache.d.ts +3 -3
- package/lib/command.d.ts +17 -17
- package/lib/command.js +5 -5
- package/lib/config/config.d.ts +10 -10
- package/lib/config/config.js +15 -11
- package/lib/config/plugin-loader.d.ts +6 -6
- package/lib/config/plugin.d.ts +3 -3
- package/lib/config/plugin.js +2 -5
- package/lib/config/ts-path.d.ts +1 -1
- package/lib/config/ts-path.js +5 -5
- package/lib/errors/errors/cli.d.ts +5 -5
- package/lib/errors/errors/pretty-print.d.ts +2 -2
- package/lib/errors/warn.d.ts +2 -8
- package/lib/errors/warn.js +9 -8
- package/lib/flags.d.ts +4 -4
- package/lib/flush.js +2 -2
- package/lib/help/formatter.d.ts +3 -3
- package/lib/help/index.d.ts +1 -0
- package/lib/help/index.js +19 -10
- package/lib/index.d.ts +4 -5
- package/lib/index.js +1 -1
- package/lib/interfaces/config.d.ts +9 -9
- package/lib/interfaces/errors.d.ts +5 -5
- package/lib/interfaces/index.d.ts +1 -1
- package/lib/interfaces/parser.d.ts +6 -6
- package/lib/interfaces/pjson.d.ts +216 -151
- package/lib/interfaces/plugin.d.ts +25 -25
- package/lib/interfaces/topic.d.ts +2 -2
- package/lib/main.js +2 -2
- package/lib/parser/errors.d.ts +1 -1
- package/lib/settings.d.ts +5 -5
- package/lib/util/ids.d.ts +1 -1
- package/lib/util/read-pjson.d.ts +1 -1
- package/lib/util/read-tsconfig.js +2 -4
- package/lib/ux/colorize-json.d.ts +2 -2
- package/lib/ux/index.d.ts +7 -2
- package/lib/ux/index.js +15 -3
- package/package.json +22 -6
- package/flush.d.ts +0 -3
- package/flush.js +0 -1
- package/handle.js +0 -1
|
@@ -43,13 +43,11 @@ async function readTSConfig(root, tsconfigName = 'tsconfig.json') {
|
|
|
43
43
|
catch { }
|
|
44
44
|
}
|
|
45
45
|
if (!typescript) {
|
|
46
|
-
(0, warn_1.
|
|
46
|
+
(0, warn_1.memoizedWarn)('Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.');
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const read = async (path) => {
|
|
50
|
-
const localRoot = await upUntil(path, async (p) =>
|
|
51
|
-
// eslint-disable-next-line unicorn/no-await-expression-member
|
|
52
|
-
(await (0, promises_1.readdir)(p)).includes('package.json'));
|
|
50
|
+
const localRoot = await upUntil(path, async (p) => (await (0, promises_1.readdir)(p)).includes('package.json'));
|
|
53
51
|
if (!localRoot)
|
|
54
52
|
return;
|
|
55
53
|
try {
|
package/lib/ux/index.d.ts
CHANGED
|
@@ -5,7 +5,13 @@ import Simple from './action/simple';
|
|
|
5
5
|
import Spinner from './action/spinner';
|
|
6
6
|
import colorizeJson from './colorize-json';
|
|
7
7
|
import { colorize } from './theme';
|
|
8
|
-
export
|
|
8
|
+
export { error } from '../errors/error';
|
|
9
|
+
export { exit } from '../errors/exit';
|
|
10
|
+
export { warn } from '../errors/warn';
|
|
11
|
+
export { default as colorizeJson } from './colorize-json';
|
|
12
|
+
export { colorize } from './theme';
|
|
13
|
+
export { stderr, stdout } from './write';
|
|
14
|
+
export declare const ux: {
|
|
9
15
|
action: Simple | Spinner;
|
|
10
16
|
/**
|
|
11
17
|
* Add color to text.
|
|
@@ -61,4 +67,3 @@ export declare const methods: {
|
|
|
61
67
|
*/
|
|
62
68
|
warn: typeof warn;
|
|
63
69
|
};
|
|
64
|
-
export default methods;
|
package/lib/ux/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ux = exports.stdout = exports.stderr = exports.colorize = exports.colorizeJson = exports.warn = exports.exit = exports.error = void 0;
|
|
7
7
|
const error_1 = require("../errors/error");
|
|
8
8
|
const exit_1 = require("../errors/exit");
|
|
9
9
|
const warn_1 = require("../errors/warn");
|
|
@@ -12,12 +12,25 @@ const spinner_1 = __importDefault(require("./action/spinner"));
|
|
|
12
12
|
const colorize_json_1 = __importDefault(require("./colorize-json"));
|
|
13
13
|
const theme_1 = require("./theme");
|
|
14
14
|
const write_1 = require("./write");
|
|
15
|
+
var error_2 = require("../errors/error");
|
|
16
|
+
Object.defineProperty(exports, "error", { enumerable: true, get: function () { return error_2.error; } });
|
|
17
|
+
var exit_2 = require("../errors/exit");
|
|
18
|
+
Object.defineProperty(exports, "exit", { enumerable: true, get: function () { return exit_2.exit; } });
|
|
19
|
+
var warn_2 = require("../errors/warn");
|
|
20
|
+
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return warn_2.warn; } });
|
|
21
|
+
var colorize_json_2 = require("./colorize-json");
|
|
22
|
+
Object.defineProperty(exports, "colorizeJson", { enumerable: true, get: function () { return __importDefault(colorize_json_2).default; } });
|
|
23
|
+
var theme_2 = require("./theme");
|
|
24
|
+
Object.defineProperty(exports, "colorize", { enumerable: true, get: function () { return theme_2.colorize; } });
|
|
25
|
+
var write_2 = require("./write");
|
|
26
|
+
Object.defineProperty(exports, "stderr", { enumerable: true, get: function () { return write_2.stderr; } });
|
|
27
|
+
Object.defineProperty(exports, "stdout", { enumerable: true, get: function () { return write_2.stdout; } });
|
|
15
28
|
const ACTION_TYPE = (Boolean(process.stderr.isTTY) &&
|
|
16
29
|
!process.env.CI &&
|
|
17
30
|
!['dumb', 'emacs-color'].includes(process.env.TERM) &&
|
|
18
31
|
'spinner') ||
|
|
19
32
|
'simple';
|
|
20
|
-
exports.
|
|
33
|
+
exports.ux = {
|
|
21
34
|
action: ACTION_TYPE === 'spinner' ? new spinner_1.default() : new simple_1.default(),
|
|
22
35
|
/**
|
|
23
36
|
* Add color to text.
|
|
@@ -73,4 +86,3 @@ exports.methods = {
|
|
|
73
86
|
*/
|
|
74
87
|
warn: warn_1.warn,
|
|
75
88
|
};
|
|
76
|
-
exports.default = exports.methods;
|
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.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.8",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -66,10 +66,7 @@
|
|
|
66
66
|
"node": ">=18.0.0"
|
|
67
67
|
},
|
|
68
68
|
"files": [
|
|
69
|
-
"/lib"
|
|
70
|
-
"/flush.js",
|
|
71
|
-
"/flush.d.ts",
|
|
72
|
-
"/handle.js"
|
|
69
|
+
"/lib"
|
|
73
70
|
],
|
|
74
71
|
"homepage": "https://github.com/oclif/core",
|
|
75
72
|
"keywords": [
|
|
@@ -82,7 +79,26 @@
|
|
|
82
79
|
"argv"
|
|
83
80
|
],
|
|
84
81
|
"license": "MIT",
|
|
85
|
-
"
|
|
82
|
+
"exports": {
|
|
83
|
+
".": "./lib/index.js",
|
|
84
|
+
"./args": "./lib/args.js",
|
|
85
|
+
"./command": "./lib/command.js",
|
|
86
|
+
"./config": "./lib/config/index.js",
|
|
87
|
+
"./errors": "./lib/errors/index.js",
|
|
88
|
+
"./execute": "./lib/execute.js",
|
|
89
|
+
"./flags": "./lib/flags.js",
|
|
90
|
+
"./flush": "./lib/flush.js",
|
|
91
|
+
"./handle": "./lib/errors/handle.js",
|
|
92
|
+
"./help": "./lib/help/index.js",
|
|
93
|
+
"./hooks": "./lib/interfaces/hooks.js",
|
|
94
|
+
"./interfaces": "./lib/interfaces/index.js",
|
|
95
|
+
"./logger": "./lib/logger.js",
|
|
96
|
+
"./performance": "./lib/performance.js",
|
|
97
|
+
"./run": "./lib/main.js",
|
|
98
|
+
"./settings": "./lib/settings.js",
|
|
99
|
+
"./util/ids": "./lib/util/ids.js",
|
|
100
|
+
"./ux": "./lib/ux/index.js"
|
|
101
|
+
},
|
|
86
102
|
"repository": "oclif/core",
|
|
87
103
|
"oclif": {
|
|
88
104
|
"bin": "oclif",
|
package/flush.d.ts
DELETED
package/flush.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./lib/cli-ux/flush').flush
|
package/handle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = async error => require('./lib/errors/handle').handle(error)
|