UNPKG

1.17 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.NoopLoader = void 0;
7exports.getLoader = getLoader;
8function _ora() {
9 const data = _interopRequireDefault(require("ora"));
10 _ora = function () {
11 return data;
12 };
13 return data;
14}
15var _logger = _interopRequireDefault(require("./logger"));
16function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17class 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}
58function getLoader(options) {
59 return _logger.default.isVerbose() ? new OraNoop() : (0, _ora().default)(options);
60}
61const NoopLoader = OraNoop;
62exports.NoopLoader = NoopLoader;
63
64//# sourceMappingURL=loader.ts.map
\No newline at end of file