0a5ab058a6
- Angular 12 application with PrimeNG components - 5 existing Cypress e2e test suites - SCSS styling with BEM naming convention - i18n support (10 languages) - Leaflet map integration - Complete component hierarchy and routing structure This baseline will be used for Angular → React migration.
36 lines
617 B
JavaScript
36 lines
617 B
JavaScript
'use strict';
|
|
const restoreCursor = require('restore-cursor');
|
|
|
|
let isHidden = false;
|
|
|
|
exports.show = (writableStream = process.stderr) => {
|
|
if (!writableStream.isTTY) {
|
|
return;
|
|
}
|
|
|
|
isHidden = false;
|
|
writableStream.write('\u001B[?25h');
|
|
};
|
|
|
|
exports.hide = (writableStream = process.stderr) => {
|
|
if (!writableStream.isTTY) {
|
|
return;
|
|
}
|
|
|
|
restoreCursor();
|
|
isHidden = true;
|
|
writableStream.write('\u001B[?25l');
|
|
};
|
|
|
|
exports.toggle = (force, writableStream) => {
|
|
if (force !== undefined) {
|
|
isHidden = force;
|
|
}
|
|
|
|
if (isHidden) {
|
|
exports.show(writableStream);
|
|
} else {
|
|
exports.hide(writableStream);
|
|
}
|
|
};
|