Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

salien-script-js

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

salien-script-js - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

5

package.json
{
"name": "salien-script-js",
"version": "0.0.5",
"version": "0.0.6",
"description": "Scripting the Steam Salien Sale minigame, the proper way.",

@@ -53,3 +53,4 @@ "keywords": [

"fetch-retry": "^1.2.1",
"meow": "^5.0.0"
"meow": "^5.0.0",
"update-check": "^1.5.2"
},

@@ -56,0 +57,0 @@ "devDependencies": {

1

README.md

@@ -18,2 +18,3 @@ # salien-script-js

* Easy to install, run and update 🎉
* Update checker and log notifications ✉️
* Same logic as the [PHP version](https://github.com/SteamDatabase/SalienCheat) (we almost have parity) 👽

@@ -20,0 +21,0 @@ * Pick your own steam group 👌

@@ -29,4 +29,5 @@ /**

const fetch = require('fetch-retry');
const checkForUpdate = require('update-check');
const { version: pkgVersion } = require('../package.json');
const pkg = require('../package.json');

@@ -89,2 +90,22 @@ const logger = (name, ...messages) => {

const updateCheck = async (name, pauseLog) => {
let hasUpdate = null;
try {
hasUpdate = await checkForUpdate(pkg);
this.isUpdateChecked = true;
} catch (err) {
logger(name, ` ${chalk.bgRed(' UpdateCheck ')}`, chalk.red(`Failed to check for updates: ${err}`));
}
if (hasUpdate) {
logger(name, ` ${chalk.bgMagenta(' UpdateCheck ')}`, `The latest version is ${hasUpdate.latest}. Please update.`);
}
if (pauseLog) {
// pause for 3 seconds after update check
await delay(3000);
}
};
class SalienScriptException {

@@ -117,2 +138,3 @@ constructor(message) {

this.hasJoinedClan = false;
this.isUpdateChecked = false;

@@ -284,3 +306,3 @@ this.currentPlanetId = null;

if (clanCheckInfo.clan_info) {
logger(this.name, ` ${chalk.bgCyan(`Joined group: ${clanCheckInfo.clan_info.name}`)}`);
logger(this.name, ` ${chalk.bgCyan(` Joined group: ${clanCheckInfo.clan_info.name} `)}`);
logger(

@@ -596,2 +618,4 @@ this.name,

await updateCheck(this.name);
// Scan planets every 10 minutes

@@ -614,3 +638,3 @@ if (new Date().getTime() - this.startTime > 600000) {

const { hardZones, mediumZones, planetCaptured, planetPlayers } = zone;
const { hardZones, mediumZones, easyZones, planetCaptured, planetPlayers } = zone;

@@ -654,2 +678,3 @@ if (!hardZones) {

planetLogMsg += ` - Hard: ${chalk.yellow(hardZones)} - Medium: ${chalk.yellow(mediumZones)}`;
planetLogMsg += ` - Easy: ${chalk.yellow(easyZones)}`;
planetLogMsg += ` - Players: ${chalk.yellow(planetPlayers.toLocaleString())} (${chalk.green(planetName)})`;

@@ -674,3 +699,3 @@

logger(this.name, ` ${chalk.bgMagenta(`Waiting ${this.waitTime} seconds for round to finish...`)}`);
logger(this.name, ` ${chalk.bgMagenta(` Waiting ${this.waitTime} seconds for round to finish... `)}`);

@@ -687,3 +712,3 @@ await delay(this.waitTime * 1000);

currentLevelMsg += ` (${chalk.yellow(report.old_score.toLocaleString())} XP`;
currentLevelMsg += `=> ${chalk.green(report.new_score.toLocaleString())} XP)`;
currentLevelMsg += ` => ${chalk.green(report.new_score.toLocaleString())} XP)`;
currentLevelMsg += ` - Current Level: ${chalk.green(report.new_level)} (${nextLevelPercent}% to next)`;

@@ -702,3 +727,3 @@

let nextLevelMsg = `>> Next Level: ${chalk.yellow(report.next_level_score.toLocaleString())} XP`;
nextLevelMsg += `- Remaining: ${chalk.yellow(remainingXp.toLocaleString())} XP - ETA: ${chalk.green(levelEta)}`;
nextLevelMsg += ` - Remaining: ${chalk.yellow(remainingXp.toLocaleString())} XP - ETA: ${chalk.green(levelEta)}`;

@@ -730,3 +755,7 @@ logger(this.name, nextLevelMsg);

try {
logger(this.name, ` ${chalk.bgGreen(` Started SalienScript | Version: ${pkgVersion} `)}`);
logger(this.name, ` ${chalk.bgGreen(` Started SalienScript | Version: ${pkg.version} `)}`);
logger(
this.name,
` ${chalk.bgCyan(` If you appreciate the script, please remember to leave a ⭐ star ⭐ on the project! `)}`,
);

@@ -746,3 +775,3 @@ await this.setupGame();

logger(this.name, ` ${chalk.bgMagenta(`Script will restart in ${this.defaultDelaySec} seconds...`)}\n\n`);
logger(this.name, ` ${chalk.bgMagenta(` Script will restart in ${this.defaultDelaySec} seconds... `)}\n\n`);

@@ -749,0 +778,0 @@ await delay(this.defaultDelayMs);

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