1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.NoopLoader = void 0;
|
7 | exports.getLoader = getLoader;
|
8 | function _ora() {
|
9 | const data = _interopRequireDefault(require("ora"));
|
10 | _ora = function () {
|
11 | return data;
|
12 | };
|
13 | return data;
|
14 | }
|
15 | var _logger = _interopRequireDefault(require("./logger"));
|
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17 | class OraNoop {
|
18 | spinner = {
|
19 | interval: 1,
|
20 | frames: []
|
21 | };
|
22 | indent = 0;
|
23 | isSpinning = false;
|
24 | text = '';
|
25 | prefixText = '';
|
26 | color = 'blue';
|
27 | succeed(_text) {
|
28 | return this;
|
29 | }
|
30 | fail(_text) {
|
31 | return this;
|
32 | }
|
33 | start(_text) {
|
34 | return this;
|
35 | }
|
36 | stop() {
|
37 | return this;
|
38 | }
|
39 | warn(_text) {
|
40 | return this;
|
41 | }
|
42 | info(_text) {
|
43 | return this;
|
44 | }
|
45 | stopAndPersist() {
|
46 | return this;
|
47 | }
|
48 | clear() {
|
49 | return this;
|
50 | }
|
51 | render() {
|
52 | return this;
|
53 | }
|
54 | frame() {
|
55 | return this.text;
|
56 | }
|
57 | }
|
58 | function getLoader(options) {
|
59 | return _logger.default.isVerbose() ? new OraNoop() : (0, _ora().default)(options);
|
60 | }
|
61 | const NoopLoader = OraNoop;
|
62 | exports.NoopLoader = NoopLoader;
|
63 |
|
64 |
|
\ | No newline at end of file |