2020-04-24 21:40:03 +01:00
|
|
|
const chalk = require('chalk');
|
|
|
|
const clear = require('clear');
|
|
|
|
const figlet = require('figlet');
|
|
|
|
|
2020-04-24 22:55:00 +01:00
|
|
|
|
2020-04-24 21:40:03 +01:00
|
|
|
module.exports = {
|
2020-04-24 22:55:00 +01:00
|
|
|
storeIp: (value) => {
|
|
|
|
let miWatchIpaddress = value
|
|
|
|
},
|
|
|
|
header: (page) => {
|
2020-04-24 21:40:03 +01:00
|
|
|
clear();
|
|
|
|
console.log(
|
|
|
|
chalk.red(
|
|
|
|
figlet.textSync('MiWatch Kleaner', {
|
|
|
|
horizontalLayout: 'full'
|
|
|
|
})
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
console.log(chalk.red(' 2.0.0'));
|
|
|
|
|
|
|
|
console.log(
|
|
|
|
chalk.red(
|
|
|
|
'-------------------------------------------------------------------------------------------------------'
|
|
|
|
)
|
|
|
|
)
|
2020-04-24 22:55:00 +01:00
|
|
|
|
|
|
|
console.log(chalk.blue(page))
|
|
|
|
module.exports.ipCheck()
|
|
|
|
console.log(chalk.red('----------'))
|
2020-04-24 22:20:41 +01:00
|
|
|
},
|
|
|
|
pause: async (time) => {
|
|
|
|
await new Promise(resolve => setTimeout(resolve, time));
|
2020-04-24 22:55:00 +01:00
|
|
|
},
|
|
|
|
ipCheck: async () => {
|
|
|
|
if (module.exports.storeIp.miWatchIpaddress === undefined) {
|
|
|
|
console.log(chalk.white('Connected IP: ') + chalk.red('Not Connected'))
|
|
|
|
} else {
|
|
|
|
console.log(chalk.white('Connected IP: ' + chalk.green(module.defaults.storeIp.miWatchIpaddress)))
|
|
|
|
}
|
2020-04-24 21:40:03 +01:00
|
|
|
}
|
|
|
|
}
|