UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

30 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BottomBar = void 0; var inquirer_1 = require("inquirer"); var Logging_1 = require("./Logging"); var BottomBar = /** @class */ (function () { function BottomBar() { } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types BottomBar.show = function (msg) { var loader = ['/', '|', '\\', '-']; var i = 4; BottomBar.bar = new inquirer_1.ui.BottomBar({ bottomBar: loader[i % 4] }); BottomBar.interval = setInterval(function () { // eslint-disable-next-line no-plusplus BottomBar.bar.updateBottomBar("".concat(loader[i++ % 4], " ").concat(msg)); }, 100); }; BottomBar.hide = function () { clearInterval(BottomBar.interval); if (BottomBar.bar) { BottomBar.bar.updateBottomBar(''); (0, Logging_1.nl)(); BottomBar.bar.close(); } }; return BottomBar; }()); exports.BottomBar = BottomBar; //# sourceMappingURL=BottomBar.js.map