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.2.6 to 1.2.7

40

lib/index.js

@@ -6,12 +6,12 @@ "use strict";

const tycoonServers = [
'server.tycoon.community:30130',
'server.tycoon.community:30122',
'server.tycoon.community:30123',
'server.tycoon.community:30124',
'server.tycoon.community:30125',
'na.tycoon.community:30120',
'na.tycoon.community:30122',
'na.tycoon.community:30123',
'na.tycoon.community:30124',
'na.tycoon.community:30125',
'tycoon-w8r4q4.users.cfx.re',
'tycoon-2epova.users.cfx.re',
'tycoon-2epovd.users.cfx.re',
'tycoon-wdrypd.users.cfx.re',
'tycoon-njyvop.users.cfx.re',
'tycoon-2r4588.users.cfx.re',
'tycoon-npl5oy.users.cfx.re',
'tycoon-2vzlde.users.cfx.re',
'tycoon-wmapod.users.cfx.re',
'tycoon-wxjpge.users.cfx.re',
];

@@ -52,3 +52,3 @@ const statNames = [

this.tycoon = axios_1.default.create({
baseURL: `http://${tycoonServers[0]}/status`,
baseURL: `https://${tycoonServers[0]}/status`,
timeout

@@ -80,3 +80,3 @@ });

if (((error === null || error === void 0 ? void 0 : error.code) === 'ECONNABORTED' || (error === null || error === void 0 ? void 0 : error.code) === 'ECONNRESET') && (error === null || error === void 0 ? void 0 : error.config)) {
if ((error === null || error === void 0 ? void 0 : error.code) === 'ECONNRESET' && ((_f = (_e = error === null || error === void 0 ? void 0 : error.config) === null || _e === void 0 ? void 0 : _e.url) === null || _f === void 0 ? void 0 : _f.includes('http://')))
if ((error === null || error === void 0 ? void 0 : error.code) === 'ECONNRESET' && ((_f = (_e = error === null || error === void 0 ? void 0 : error.config) === null || _e === void 0 ? void 0 : _e.url) === null || _f === void 0 ? void 0 : _f.includes('https://')))
return Promise.reject(error);

@@ -86,3 +86,3 @@ this.settings.serverIndex++;

this.settings.serverIndex = 0;
this.tycoon.defaults.baseURL = `http://${tycoonServers[this.settings.serverIndex]}/status`;
this.tycoon.defaults.baseURL = `https://${tycoonServers[this.settings.serverIndex]}/status`;
this.settings.curRetries++;

@@ -127,3 +127,3 @@ if (this.settings.curRetries > this.settings.maxRetries) {

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/weather.json`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/weather.json`);
return Promise.resolve(res.data);

@@ -139,3 +139,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/airline.json`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/airline.json`);
return Promise.resolve(res.data);

@@ -151,3 +151,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/map/positions.json`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/map/positions.json`);
return Promise.resolve(res.data);

@@ -163,3 +163,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/players.json`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/players.json`);
return Promise.resolve(res.data);

@@ -175,3 +175,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/widget/players.json`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/widget/players.json`);
return Promise.resolve(res.data);

@@ -338,3 +338,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/status/advanced/`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/status/advanced/`);
return Promise.resolve(res.data);

@@ -350,3 +350,3 @@ }

try {
const res = await this.tycoon.get(`http://${tycoonServers[server]}/webadmin/`);
const res = await this.tycoon.get(`https://${tycoonServers[server]}/webadmin/`);
return Promise.resolve(res.data);

@@ -353,0 +353,0 @@ }

{
"name": "transporttycoon",
"version": "1.2.6",
"version": "1.2.7",
"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