Skip to content

Commit

Permalink
🔨 add --no-audit tag
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Aug 2, 2023
1 parent a4adb3f commit 2fe89b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,17 +524,17 @@ export default class Bot {
if (process.platform === 'win32') {
messages = [
'\n💻 To update run the following command inside your tf2autobot directory using Command Prompt:\n',
'/code rmdir /s /q node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && node dist/app.js'
'/code rmdir /s /q node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && node dist/app.js'
];
} else if (['win32', 'linux', 'darwin', 'openbsd', 'freebsd'].includes(process.platform)) {
messages = [
'\n💻 To update run the following command inside your tf2autobot directory:\n',
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && pm2 restart ecosystem.json'
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && pm2 restart ecosystem.json'
];
} else {
messages = [
'❌ Failed to find what OS your server is running! Kindly run the following standard command for most users inside your tf2autobot folder:\n',
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && pm2 restart ecosystem.json'
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && pm2 restart ecosystem.json'
];
}

Expand Down
8 changes: 6 additions & 2 deletions src/classes/Commands/sub-classes/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ export default class ManagerCommands {
steamID,
`❌ You're not running the bot with PM2!` +
`\n\nNavigate to your bot folder and run ` +
`[git reset HEAD --hard && git pull && npm install && npm run build] ` +
`[git reset HEAD --hard && git pull && npm install --no-audit && npm run build] ` +
`and then restart your bot.`
);
}
Expand Down Expand Up @@ -969,7 +969,11 @@ export default class ManagerCommands {
);

this.bot.sendMessage(steamID, '⌛ Installing packages...');
await exec(`npm install${process.env.RUN_ON_ANDROID === 'true' ? ' --no-bin-links --force' : ''}`);
await exec(
`npm install${
process.env.RUN_ON_ANDROID === 'true' ? ' --no-bin-links --force' : ''
} --no-audit`
);

this.bot.sendMessage(steamID, '⌛ Compiling TypeScript codes into JavaScript...');
await exec('npm run build');
Expand Down
6 changes: 3 additions & 3 deletions src/classes/Commands/sub-classes/Status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,17 @@ export default class StatusCommands {
if (process.platform === 'win32') {
messages.concat([
'\n💻 To update run the following command inside your tf2autobot directory using Command Prompt:\n',
'/code rmdir /s /q node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && node dist/app.js'
'/code rmdir /s /q node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && node dist/app.js'
]);
} else if (['win32', 'linux', 'darwin', 'openbsd', 'freebsd'].includes(process.platform)) {
messages.concat([
'\n💻 To update run the following command inside your tf2autobot directory:\n',
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && pm2 restart ecosystem.json'
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && pm2 restart ecosystem.json'
]);
} else {
messages.concat([
'❌ Failed to find what OS your server is running! Kindly run the following standard command for most users inside your tf2autobot folder:\n',
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install && npm run build && pm2 restart ecosystem.json'
'/code rm -r node_modules dist && git reset HEAD --hard && git pull --prune && npm install --no-audit && npm run build && pm2 restart ecosystem.json'
]);
}

Expand Down

0 comments on commit 2fe89b7

Please sign in to comment.