Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fullUnicode: true
});
screen.title = 'Message Sender';
process.on('uncaughtException', (err) => {
screen.log(`${err.name} ${err.message} ${err.stack}`);
console.error(err);
setTimeout(() => {
process.exit(1);
}, 3000);
});
screen.log('screen root node loaded');
// Create a box perfectly centered horizontally and vertically.
const logBox = blessed.log({
top: 0,
left: 0,
height: '100%-1',
mouse: true,
vi: true,
scrollOnInput: false,
scrollable: true,
alwaysScroll: true,
scrollbar: {
ch: ' ',
track: {
bg: 'cyan'
},
style: {
bg: 'black',
fg: 'blue'
}));
// this._sysInfo = blessed.text(merge({}, defaults.text, {
// parent: this._statusBar,
// content: ''
// }));
this._videoList = blessed.box(merge({}, defaults.box, {
parent: this,
label: 'Video List',
left: 0,
top: 0,
bottom: this._statusBar.height,
width: 50
}));
this._log = blessed.log(merge({}, defaults.box, {
parent: this,
scrollback: 10000,
scrollbar: {
ch: ' ',
inverse: true
},
mouse: true,
label: 'Log',
right: 0,
top: 0,
bottom: this._statusBar.height,
width: this.width - this._videoList.width + 1
}));
this._log.on('scroll', this.render.bind(this));
this._videoListStatus = blessed.text(merge({}, defaults.text, {
var screen = new blessed.screen({
autoPadding: true,
smartCSR: true,
program: new blessed.program({
input: stream,
output: stream
}),
terminal: term || 'ansi'
});
screen.title = 'SSH Chatting as ' + name;
// Disable local echo
screen.program.attr('invisible', true);
var output = stream.output = new blessed.log({
screen: screen,
top: 0,
left: 0,
width: '100%',
bottom: 2,
scrollOnInput: true
})
screen.append(output);
screen.append(new blessed.box({
screen: screen,
height: 1,
bottom: 1,
left: 0,
width: '100%',
type: 'line',
const name = findModuleToInstall()
if (!name) {
console.error(' [--save|--save-dev]')
process.exit(-1)
}
const spawn = require('cross-spawn-async')
const blessed = require('blessed')
const screen = blessed.screen({
smartCSR: true,
dockBorders: true,
ignoreDockContrast: true
})
screen.title = 'wiseli'
const npmOutput = blessed.log({
label: 'NPM output',
left: 0,
top: 0,
border: 'line',
padding: {
top: 1,
bottom: 1
},
style: {
width: '100%',
height: '30%',
fg: 'white',
border: {
fg: '#f0f0f0'
}
}
initLog(){
this.mergedLogs = blessed.log({
...TABLE_BASE_OPTIONS,
label: ' Merged Logs ',
parent: this.screen,
top: '0',
left: WIDTH_LEFT_PANEL + '%',
width: 100 - WIDTH_LEFT_PANEL + '%',
height: '95%-1',
padding: DEFAULT_PADDING,
mouse: true,
style: {
...TABLE_BASE_OPTIONS.style,
selected: {
bold: true,
}
}
})
border: {
type: 'line',
},
scrollable: true,
scrollbar: {},
style: {
scrollbar: {
bg: 'gray',
},
border: {
fg: 'gray',
},
},
});
const frontendLog = blessed.log({
parent: screen,
label: 'frontend',
top: '20%-1',
left: '0',
width: '100%',
height: '36%+1',
border: {
type: 'line',
},
scrollable: true,
scrollbar: {},
style: {
scrollbar: {
bg: 'gray',
},
border: {
function logger() {
const logger = blessed.log({
left: "80%",
height: "100%",
label: "Debug Log",
width: "20%",
tags: true,
border: {
type: "line"
}
});
logger.logObject = obj => logger.log(util.stringify(obj));
return logger;
}
module.exports = function ui(mp) {
const screen = blessed.screen({
title: 'Dizzay',
warnings: true,
fastCSR: true
})
const chatMessages = blessed.log({
width: '30%',
height: '100%-2',
top: 0,
right: 0,
scrollable: true,
scrollback: 512,
alwaysScroll: false,
tags: true,
mouse: true,
keys: true,
style: {
bg: 'purple',
fg: 'white'
}
})
width: "100%",
height: "55%",
left: "0%",
top: "42%",
border: {
type: "line"
},
style: {
fg: -1,
border: {
fg: this.color
}
}
});
this.logText = blessed.log({
parent: this.log,
tags: true,
width: "100%-5",
//height: '90%',
scrollable: true,
input: false,
alwaysScroll: true,
scrollbar: {
ch: " ",
inverse: true
},
keys: false,
vi: false,
mouse: true
});
export function logAdapter(options?: Widgets.LogOptions) {
return blessed.log({ ...options, ...defaultOptions });
}