UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

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