@oclif/core 4.1.0 → 4.1.1
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/ux/index.d.ts +1 -0
- package/lib/ux/index.js +3 -2
- package/package.json +1 -1
package/lib/ux/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { warn } from '../errors/warn';
|
|
|
11
11
|
export { default as colorizeJson } from './colorize-json';
|
|
12
12
|
export { colorize } from './theme';
|
|
13
13
|
export { stderr, stdout } from './write';
|
|
14
|
+
export declare const action: Simple | Spinner;
|
|
14
15
|
export declare const ux: {
|
|
15
16
|
action: Simple | Spinner;
|
|
16
17
|
/**
|
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.ux = exports.stdout = exports.stderr = exports.colorize = exports.colorizeJson = exports.warn = exports.exit = exports.error = void 0;
|
|
6
|
+
exports.ux = exports.action = 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");
|
|
@@ -30,8 +30,9 @@ const ACTION_TYPE = (Boolean(process.stderr.isTTY) &&
|
|
|
30
30
|
!['dumb', 'emacs-color'].includes(process.env.TERM) &&
|
|
31
31
|
'spinner') ||
|
|
32
32
|
'simple';
|
|
33
|
+
exports.action = ACTION_TYPE === 'spinner' ? new spinner_1.default() : new simple_1.default();
|
|
33
34
|
exports.ux = {
|
|
34
|
-
action:
|
|
35
|
+
action: exports.action,
|
|
35
36
|
/**
|
|
36
37
|
* Add color to text.
|
|
37
38
|
* @param color color to use. Can be hex code (e.g. `#ff0000`), rgb (e.g. `rgb(255, 255, 255)`) or a standard ansi color (e.g. `red`)
|