Comparing version 1.0.37 to 1.0.38
#!/usr/bin/env node | ||
const readline = require("readline"); | ||
const chalk = require("chalk"); | ||
const progress = require('progress'); | ||
const rl = readline.createInterface({ | ||
@@ -10,21 +9,30 @@ input: process.stdin, | ||
const cp = require("child_process"); | ||
if(process.argv[2]){ | ||
if(["-u","-update","--u","--update"].includes(process.argv[2].toLowerCase())){ | ||
var ProgressBar = require('progress'); | ||
var bar = new ProgressBar(`${chalk.redBright(`:current/:total`)} ${chalk.blue("|")} ${chalk.cyan(":elapsed seconds elapsed")} ${chalk.blue("|")} ${chalk.greenBright(`:bar`)}`, { | ||
total: 20, | ||
}); | ||
var timer = setInterval(function () { | ||
bar.tick(); | ||
if (process.argv[2]) { | ||
if ( | ||
["-u", "-update", "--u", "--update"].includes(process.argv[2].toLowerCase()) | ||
) { | ||
var ProgressBar = require("progress"); | ||
if (bar.complete) { | ||
console.log(`${chalk.greenBright(`Updated!`)}`) | ||
clearInterval(timer); | ||
process.exit(process.pid); | ||
} | ||
}, 100); | ||
cp.execSync("npm i -g consel"); | ||
var bar = new ProgressBar( | ||
`${chalk.redBright(`:current/:total`)} ${chalk.blue("|")} ${chalk.cyan( | ||
":elapsed seconds elapsed" | ||
)} ${chalk.blue("|")} ${chalk.greenBright(`:bar`)}`, | ||
{ | ||
total: 20, | ||
complete: '+', | ||
incomplete: '-', | ||
} | ||
); | ||
var timer = setInterval(function () { | ||
bar.tick(); | ||
if (bar.complete) { | ||
console.log(`${chalk.greenBright(`Updated!`)}`); | ||
clearInterval(timer); | ||
process.exit(process.pid); | ||
} | ||
}, 100); | ||
cp.execSync("npm i -g consel"); | ||
} | ||
} | ||
} | ||
console.log( | ||
@@ -51,3 +59,3 @@ chalk.blueBright( | ||
err.message.split(/\n/g).map((c) => newErr.push(c)); | ||
newErr.map(f => { | ||
newErr.map((f) => { | ||
if (["\n", "\u200b", ""].includes(f)) { | ||
@@ -57,3 +65,3 @@ } else { | ||
} | ||
}) | ||
}); | ||
} | ||
@@ -60,0 +68,0 @@ }); |
@@ -1,4 +0,4 @@ | ||
const chalk = require('chalk'); | ||
const chalk = require("chalk"); | ||
console.log(chalk` | ||
{green Thanks for using consel.} | ||
`) | ||
`); |
{ | ||
"name": "consel", | ||
"version": "1.0.37", | ||
"version": "1.0.38", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2612
78