Socket
Socket
Sign inDemoInstall

consel

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consel - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

61

bin/cli.js
#!/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`
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc