Comparing version 1.0.0 to 1.0.1
#!/usr/bin/env node | ||
const readline = require("readline"); | ||
const chalk = require('chalk'); | ||
const chalk = require("chalk"); | ||
const rl = readline.createInterface({ | ||
@@ -8,28 +8,33 @@ input: process.stdin, | ||
}); | ||
console.log(chalk.blueBright(`Welcome to ${chalk.underline(chalk.bold(chalk.green(`consel`)))}`)); | ||
const cp = require('child_process'); | ||
rl.on('line',async(line) => { | ||
try{ | ||
console.clear(); | ||
console.log(`${chalk.gray(line)} ${chalk.blue(Date.now())}`); | ||
let executed = cp.execSync(line).toString(); | ||
let newA = []; | ||
executed.split(/\n/g).map(c => { | ||
newA.push(c); | ||
}) | ||
newA.pop(); | ||
newA.map(f => { | ||
if(["\n","\u200b",""].includes(f)){ | ||
}else{ | ||
return console.log(`${chalk.bgRedBright(`RESULT!`)} ${f}`) | ||
}; | ||
}) | ||
} catch(err) { | ||
console.error(`${chalk.bgRedBright(`ERROR!`)} ${err}`) | ||
} | ||
}) | ||
rl.on('close',() => { | ||
console.log(chalk.blueBright(`Thank you for using ${chalk.underline(chalk.bold(chalk.green(`consel`)))}.`)) | ||
}) | ||
console.log( | ||
chalk.blueBright( | ||
`Welcome to ${chalk.underline(chalk.bold(chalk.green(`consel`)))}` | ||
) | ||
); | ||
const cp = require("child_process"); | ||
cp.execSync(`npm i -g consel@latest`) | ||
rl.on("line", async (line) => { | ||
console.log("NEW LINE") | ||
try { | ||
console.log(`${chalk.gray(line)} ${chalk.blue(Date.now())}`); | ||
let executed = cp.execSync(line).toString(); | ||
let newA = []; | ||
executed.split(/\n/g).map((c) => newA.push(c)); | ||
newA.pop(); | ||
newA.map((f) => { | ||
if (["\n", "\u200b", ""].includes(f)) { | ||
} else { | ||
return console.log(`${chalk.bgRedBright(`RESULT!`)} ${f}`); | ||
} | ||
}); | ||
} catch (err) {} | ||
}); | ||
rl.on("close", () => { | ||
console.log( | ||
chalk.blueBright( | ||
`Thank you for using ${chalk.underline( | ||
chalk.bold(chalk.green(`consel`)) | ||
)}.` | ||
) | ||
); | ||
}); |
@@ -1,2 +0,2 @@ | ||
console.log("hi") | ||
console.log("Hello") | ||
console.log("hi"); | ||
console.log("Hello"); |
{ | ||
"name": "consel", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
A modified child_process client for you to use! Once installed (make sure to use the global tag) just say consel and run your commands like usual! | ||
Install: ```npm i -g consel``` | ||
Install: `npm i -g consel` |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
41
3
1529