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

transporttycoon

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transporttycoon - npm Package Compare versions

Comparing version 1.1.8 to 1.2.0

44

lib/index.js

@@ -53,3 +53,7 @@ "use strict";

this.tycoon.defaults.headers['X-Tycoon-Key'] = apiToken;
this.tycoon.interceptors.response.use(undefined, async (error) => {
this.tycoon.interceptors.response.use((response) => {
if (this.charges.checking && response.headers['x-tycoon-charges'])
this.charges.count = parseInt(response.headers['x-tycoon-charges'], 10);
return Promise.resolve(response);
}, async (error) => {
var _a, _b, _c, _d, _e, _f;

@@ -109,4 +113,2 @@ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 402) {

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/weather.json`);

@@ -123,4 +125,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/airline.json`);

@@ -137,4 +137,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/map/positions.json`);

@@ -151,4 +149,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/players.json`);

@@ -174,4 +170,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/snowflake2user/${discordId}`);

@@ -188,4 +182,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/inventory/${userId}`);

@@ -202,4 +194,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/skills/${userId}`);

@@ -216,4 +206,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/getuserbiz/${userId}`);

@@ -230,4 +218,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/ownedvehicles/${userId}`);

@@ -244,4 +230,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/getuserfaq/${userId}`);

@@ -256,4 +240,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get('/faction/size.json');

@@ -268,4 +250,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get('/faction/members.json');

@@ -280,4 +260,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get('/faction/perks.json');

@@ -292,4 +270,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get('/faction/balance.json');

@@ -304,4 +280,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get('/faction/info.json');

@@ -318,4 +292,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/data/${userId}`);

@@ -332,4 +304,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/dataadv/${userId}`);

@@ -346,4 +316,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/top10/${statName}`);

@@ -412,4 +380,2 @@ return Promise.resolve(res.data);

try {
if (this.charges.checking && this.charges.count > 0)
this.charges.count--;
const res = await this.tycoon.get(`/chestadv/${searchId}`);

@@ -416,0 +382,0 @@ return Promise.resolve(res.data);

2

package.json
{
"name": "transporttycoon",
"version": "1.1.8",
"version": "1.2.0",
"description": "Wrapper for the Transport Tycoon FiveM server API",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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