From 83c5007f6e2110d89cfb05e951f1c75b893bdec6 Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Sun, 13 Feb 2022 19:20:14 +0200 Subject: [PATCH 01/31] Ignoring unneeded files during context --- .dockerignore | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..ed2653d7e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git/**/* +.example/**/* +.github/**/* +.idea/**/* +.vscode/** +dist/**/* +node_modules/**/* +.env +npm-debug.log +package-lock.json +yarn.lock From 60573ea32fa597310a3fb679e1052af11fc704c2 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Wed, 27 Jul 2022 23:46:32 +0800 Subject: [PATCH 02/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20bot=20exit=20tf2=20a?= =?UTF-8?q?nd=20never=20play=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Trades.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/classes/Trades.ts b/src/classes/Trades.ts index fcf393213..bc3b11638 100644 --- a/src/classes/Trades.ts +++ b/src/classes/Trades.ts @@ -1653,11 +1653,6 @@ export default class Trades { offer.itemsToGive.forEach(item => this.bot.inventoryManager.getInventory.removeItem(item.assetid)); } - // Exit all running apps ("TF2Autobot" or custom, and Team Fortress 2) - // Will play again after craft/smelt/sort inventory job - // https://github.com/TF2Autobot/tf2autobot/issues/527 - this.bot.client.gamesPlayed([]); - if ( offer.state === TradeOfferManager.ETradeOfferState['Active'] || offer.state === TradeOfferManager.ETradeOfferState['CreatedNeedsConfirmation'] || @@ -1668,6 +1663,11 @@ export default class Trades { // Offer is active, or countered, or declined countered, no need to fetch // Do nothing } else { + // Exit all running apps ("TF2Autobot" or custom, and Team Fortress 2) + // Will play again after craft/smelt/sort inventory job + // https://github.com/TF2Autobot/tf2autobot/issues/527 + this.bot.client.gamesPlayed([]); + this.offerChangedAcc.push({ offer, oldState, timeTakenToComplete }); log.debug('Accumulated offerChanged: ', this.offerChangedAcc.length); From c3cf9bdd07dde767117e6e28f11bf8eee84f8fb8 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Thu, 28 Jul 2022 00:04:38 +0800 Subject: [PATCH 03/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/tf2-sch?= =?UTF-8?q?ema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1835f7d2f..dda97d4ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", "@tf2autobot/tf2-currencies": "^2.0.1", - "@tf2autobot/tf2-schema": "^4.0.0", + "@tf2autobot/tf2-schema": "^4.1.1", "@tf2autobot/tf2-sku": "^2.0.3", "@tf2autobot/tradeoffer-manager": "^2.14.1", "axios": "^0.27.2", @@ -2097,9 +2097,9 @@ } }, "node_modules/@tf2autobot/tf2-schema": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.0.0.tgz", - "integrity": "sha512-pf8cp6ZWRfpDdt52aGLong8N+g8n4Is9MIHrDwIGwoIkCnGyJ0WgZqXrhru93jtntWlTTfQ+5YwHuOw8hjx66w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.1.1.tgz", + "integrity": "sha512-rntc7zkV2mM+6vrkwV+tUkP3emW6N0A6iM80+F33dvlVuHi+gWbqrc3wW8xC/NrW/kJjEiT9u8KyM7zEQAYu6w==", "dependencies": { "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", @@ -12543,9 +12543,9 @@ } }, "@tf2autobot/tf2-schema": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.0.0.tgz", - "integrity": "sha512-pf8cp6ZWRfpDdt52aGLong8N+g8n4Is9MIHrDwIGwoIkCnGyJ0WgZqXrhru93jtntWlTTfQ+5YwHuOw8hjx66w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.1.1.tgz", + "integrity": "sha512-rntc7zkV2mM+6vrkwV+tUkP3emW6N0A6iM80+F33dvlVuHi+gWbqrc3wW8xC/NrW/kJjEiT9u8KyM7zEQAYu6w==", "requires": { "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", diff --git a/package.json b/package.json index 2eed50050..a4c74eb07 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", "@tf2autobot/tf2-currencies": "^2.0.1", - "@tf2autobot/tf2-schema": "^4.0.0", + "@tf2autobot/tf2-schema": "^4.1.1", "@tf2autobot/tf2-sku": "^2.0.3", "@tf2autobot/tradeoffer-manager": "^2.14.1", "axios": "^0.27.2", From ea51ba7f21505711af32055ee1800a065493bcaf Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Thu, 28 Jul 2022 01:07:25 +0800 Subject: [PATCH 04/31] =?UTF-8?q?=F0=9F=94=A8=20add=20Active=20->=20Declin?= =?UTF-8?q?ed=20to=20ignore=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Trades.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/classes/Trades.ts b/src/classes/Trades.ts index bc3b11638..8c3e7cc42 100644 --- a/src/classes/Trades.ts +++ b/src/classes/Trades.ts @@ -1658,6 +1658,8 @@ export default class Trades { offer.state === TradeOfferManager.ETradeOfferState['CreatedNeedsConfirmation'] || offer.state === TradeOfferManager.ETradeOfferState['Countered'] || (oldState === TradeOfferManager.ETradeOfferState['Countered'] && + offer.state === TradeOfferManager.ETradeOfferState['Declined']) || + (oldState === TradeOfferManager.ETradeOfferState['Active'] && offer.state === TradeOfferManager.ETradeOfferState['Declined']) ) { // Offer is active, or countered, or declined countered, no need to fetch From 8a30e084c09a72b89535e69797487d341d1ccfee Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Thu, 28 Jul 2022 22:12:49 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=F0=9F=94=A8=20again,=20fix=20not=20prope?= =?UTF-8?q?rly=20crash=20the=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/app.ts b/src/app.ts index da8a8ce27..235e2663a 100644 --- a/src/app.ts +++ b/src/app.ts @@ -155,23 +155,36 @@ botManager if (err) { // https://stackoverflow.com/questions/30715367/why-can-i-not-throw-inside-a-promise-catch-handler setTimeout(() => { - if (err instanceof AxiosError) { + /*eslint-disable */ + if (err.response || err.name === 'AxiosError') { // if it's Axios error, filter the error const e = new Error(err.message); - e['status'] = err.response?.status; - if (typeof err.response?.data === 'string' && err.response?.data.includes('')) { - throw e; - } + if (err.response) { + e['status'] = err.response?.status; + + if (typeof err.response?.data === 'string' && err.response?.data.includes('')) { + return throwErr(e); + } - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - e['data'] = err.response?.data; + e['data'] = err.response?.data; + } else { + // No need to get the "config", etc. + e['method'] = err.method; + e['baseURL'] = err.baseURL; + } - throw e; + return throwErr(e); } + /*eslint-enable */ - throw err; - }); + return throwErr(err); + }, 10); } }); + +function throwErr(err): void { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + process.emit('uncaughtException', err); +} From c7a763de8bfb2ce263a9362ee08d460394730c27 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Thu, 28 Jul 2022 22:40:12 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=F0=9F=94=A8=20no=20need=20nullifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 235e2663a..53e5bae99 100644 --- a/src/app.ts +++ b/src/app.ts @@ -162,13 +162,13 @@ botManager const e = new Error(err.message); if (err.response) { - e['status'] = err.response?.status; + e['status'] = err.response.status; - if (typeof err.response?.data === 'string' && err.response?.data.includes('')) { + if (typeof err.response.data === 'string' && err.response.data?.includes('')) { return throwErr(e); } - e['data'] = err.response?.data; + e['data'] = err.response.data; } else { // No need to get the "config", etc. e['method'] = err.method; From 601c58da458ade4fd2b16899dcb816055dae768f Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:40:41 +0800 Subject: [PATCH 07/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20craftToken=20never?= =?UTF-8?q?=20ending=20-=20max=20nothing=20to=20craft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Commands/sub-classes/Crafting.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/classes/Commands/sub-classes/Crafting.ts b/src/classes/Commands/sub-classes/Crafting.ts index 366a83c9d..d40ae735f 100644 --- a/src/classes/Commands/sub-classes/Crafting.ts +++ b/src/classes/Commands/sub-classes/Crafting.ts @@ -118,10 +118,17 @@ export default class CraftingCommands { const capTokenType = capitalize(tokenType); const capSubTokenType = subTokenType === 'pda2' ? 'PDA2' : capitalize(subTokenType); + if (amount === 'max' && amountCanCraft === 0) { + return this.bot.sendMessage( + steamID, + `❌ Unable to craft ${capTokenType} Token - ${capSubTokenType} since I only have of ${capSubTokenType} ${tokenType} items.` + ); + } + if (amount !== 'max' && amount > amountCanCraft) { return this.bot.sendMessage( steamID, - `❌ I can only craft ${amountCanCraft} ${capTokenType} Token - ${capSubTokenType} at the moment, since I only ` + + `❌ I can only craft ${amountCanCraft} ${capTokenType} Token - ${capSubTokenType} at the moment, since I only ` + `have ${availableAmount} of ${capSubTokenType} ${tokenType} items.` ); } From c1bb585e12667c95b67208c27c8cdfce020113ca Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Sat, 30 Jul 2022 01:18:43 +0800 Subject: [PATCH 08/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20unable=20to=20use=20?= =?UTF-8?q?steam-user=20enums?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Bot.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts index c933828f1..56fd5102b 100644 --- a/src/classes/Bot.ts +++ b/src/classes/Bot.ts @@ -1,6 +1,6 @@ import SteamID from 'steamid'; -import SteamUser, { EResult } from 'steam-user'; // { EResult, EPersonaState } gives me crash -import { EPersonaState } from 'steam-user'; +import SteamUser from 'steam-user'; +import { EResult, EPersonaState } from 'steam-user'; import TradeOfferManager, { CustomError } from '@tf2autobot/tradeoffer-manager'; import SteamCommunity from '@tf2autobot/steamcommunity'; import SteamTotp from 'steam-totp'; From 42e0b359e2302a054acb0056a54e70ad2968d171 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Sat, 30 Jul 2022 01:20:00 +0800 Subject: [PATCH 09/31] =?UTF-8?q?=F0=9F=94=A8=20use=20InvalidPassword=20en?= =?UTF-8?q?um?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Bot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts index 56fd5102b..1fb63baac 100644 --- a/src/classes/Bot.ts +++ b/src/classes/Bot.ts @@ -832,7 +832,7 @@ export default class Bot { await this.login(data.loginKey || null) .then(successResponse) .catch(async (err: CustomError) => { - if (!lastLoginFailed && err.eresult === 5) { + if (!lastLoginFailed && err.eresult === EResult.InvalidPassword) { this.handler.onLoginError(err); lastLoginFailed = true; // Try and sign in without login key From dbf7fb2342bc9602402cbaf327a5496b73887fcc Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Sun, 31 Jul 2022 17:02:08 +0800 Subject: [PATCH 10/31] =?UTF-8?q?=E2=9C=B3=20add=20`--omit=3Ddev`=20into?= =?UTF-8?q?=20`npm=20install`=20on=20!updaterepo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Commands/sub-classes/Manager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/Commands/sub-classes/Manager.ts b/src/classes/Commands/sub-classes/Manager.ts index c2049730c..70883fb36 100644 --- a/src/classes/Commands/sub-classes/Manager.ts +++ b/src/classes/Commands/sub-classes/Manager.ts @@ -965,7 +965,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' : '' + } --omit=dev` + ); this.bot.sendMessage(steamID, '⌛ Compiling TypeScript codes into JavaScript...'); await exec('npm run build'); From d2989a4340bd13fac34194345e4054195cc705e7 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Sun, 31 Jul 2022 18:32:48 +0800 Subject: [PATCH 11/31] =?UTF-8?q?=F0=9F=94=84=20filter=20key,=20assetid,?= =?UTF-8?q?=20painted=20sku=20on=20`!pricecheckall`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Commands/sub-classes/Request.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/classes/Commands/sub-classes/Request.ts b/src/classes/Commands/sub-classes/Request.ts index fad77a0a8..eaacdfa52 100644 --- a/src/classes/Commands/sub-classes/Request.ts +++ b/src/classes/Commands/sub-classes/Request.ts @@ -11,6 +11,7 @@ import { fixItem } from '../../../lib/items'; import { testPriceKey } from '../../../lib/tools/export'; import { UnknownDictionary } from '../../../types/common'; import IPricer, { RequestCheckFn, RequestCheckResponse } from '../../IPricer'; +import Pricelist from '../../Pricelist'; export default class RequestCommands { constructor(private readonly bot: Bot, private priceSource: IPricer) { @@ -70,7 +71,9 @@ export default class RequestCommands { } const pricelist = this.bot.pricelist.getPrices; - const skus = Object.keys(pricelist).filter(sku => sku !== '5021;6'); + const skus = Object.keys(pricelist).filter( + sku => sku !== '5021;6' && !Pricelist.isAssetId(sku) && !/;[p][0-9]+/.test(sku) + ); const total = skus.length; const totalTime = total * 2 * 1000; From a4907e61bef92f36c25ea6c5c22f6f1035b6ff08 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 04:16:17 +0800 Subject: [PATCH 12/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/tf2-sch?= =?UTF-8?q?ema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index dda97d4ae..f89cbfbf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", "@tf2autobot/tf2-currencies": "^2.0.1", - "@tf2autobot/tf2-schema": "^4.1.1", + "@tf2autobot/tf2-schema": "^4.2.1", "@tf2autobot/tf2-sku": "^2.0.3", "@tf2autobot/tradeoffer-manager": "^2.14.1", "axios": "^0.27.2", @@ -2097,9 +2097,9 @@ } }, "node_modules/@tf2autobot/tf2-schema": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.1.1.tgz", - "integrity": "sha512-rntc7zkV2mM+6vrkwV+tUkP3emW6N0A6iM80+F33dvlVuHi+gWbqrc3wW8xC/NrW/kJjEiT9u8KyM7zEQAYu6w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.2.1.tgz", + "integrity": "sha512-yxn/yL5wjIeYBxzBHvwrTkDVLLg3TCHOmJPaw1yga//7L/gfMNlBgW6nKSljIeQVa/hNqHMqC6KGUjDioYWdUA==", "dependencies": { "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", @@ -12543,9 +12543,9 @@ } }, "@tf2autobot/tf2-schema": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.1.1.tgz", - "integrity": "sha512-rntc7zkV2mM+6vrkwV+tUkP3emW6N0A6iM80+F33dvlVuHi+gWbqrc3wW8xC/NrW/kJjEiT9u8KyM7zEQAYu6w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@tf2autobot/tf2-schema/-/tf2-schema-4.2.1.tgz", + "integrity": "sha512-yxn/yL5wjIeYBxzBHvwrTkDVLLg3TCHOmJPaw1yga//7L/gfMNlBgW6nKSljIeQVa/hNqHMqC6KGUjDioYWdUA==", "requires": { "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", diff --git a/package.json b/package.json index a4c74eb07..26d3575f7 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", "@tf2autobot/tf2-currencies": "^2.0.1", - "@tf2autobot/tf2-schema": "^4.1.1", + "@tf2autobot/tf2-schema": "^4.2.1", "@tf2autobot/tf2-sku": "^2.0.3", "@tf2autobot/tradeoffer-manager": "^2.14.1", "axios": "^0.27.2", From 53587ebaf504431fbf6f58db871f12294e282fe8 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 04:58:32 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=F0=9F=94=A8=20refactor=20duplicated=20fu?= =?UTF-8?q?nctions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Commands/sub-classes/Misc.ts | 15 +-------------- src/classes/Listings.ts | 16 ++-------------- src/lib/tools/getAttachmentName.ts | 19 +++++++++++++++++++ src/lib/tools/getHighValue.ts | 17 +---------------- 4 files changed, 23 insertions(+), 44 deletions(-) create mode 100644 src/lib/tools/getAttachmentName.ts diff --git a/src/classes/Commands/sub-classes/Misc.ts b/src/classes/Commands/sub-classes/Misc.ts index 23802ae6b..074f87c3d 100644 --- a/src/classes/Commands/sub-classes/Misc.ts +++ b/src/classes/Commands/sub-classes/Misc.ts @@ -8,8 +8,7 @@ import CommandParser from '../../CommandParser'; import Bot from '../../Bot'; import { Discord, Stock } from '../../Options'; import { pure, timeNow, uptime, testPriceKey } from '../../../lib/tools/export'; -import { killstreakersData, sheensData, spellsData } from '../../../lib/data'; -import { Paints, StrangeParts } from '@tf2autobot/tf2-schema'; +import getAttachmentName from '../../../lib/tools/getAttachmentName'; type Misc = 'time' | 'uptime' | 'pure' | 'rate' | 'owner' | 'discord' | 'stock'; type CraftUncraft = 'craftweapon' | 'uncraftweapon'; @@ -374,15 +373,3 @@ export default class MiscCommands { return stock; } } - -function getKeyByValue(object: { [key: string]: any }, value: any): string { - return Object.keys(object).find(key => object[key] === value); -} - -function getAttachmentName(attachment: string, pSku: string, paints: Paints, parts: StrangeParts): string { - if (attachment === 's') return getKeyByValue(spellsData, pSku); - else if (attachment === 'sp') return getKeyByValue(parts, pSku); - else if (attachment === 'ke') return getKeyByValue(killstreakersData, pSku); - else if (attachment === 'ks') return getKeyByValue(sheensData, pSku); - else if (attachment === 'p') return getKeyByValue(paints, parseInt(pSku.replace('p', ''))); -} diff --git a/src/classes/Listings.ts b/src/classes/Listings.ts index d39cda2b9..76e4e440e 100644 --- a/src/classes/Listings.ts +++ b/src/classes/Listings.ts @@ -7,11 +7,11 @@ import Bot from './Bot'; import Pricelist, { Entry, PricesObject } from './Pricelist'; import log from '../lib/logger'; import { exponentialBackoff } from '../lib/helpers'; -import { noiseMakers, spellsData, killstreakersData, sheensData } from '../lib/data'; +import { noiseMakers } from '../lib/data'; import { DictItem } from './Inventory'; import { PaintedNames } from './Options'; -import { Paints, StrangeParts } from '@tf2autobot/tf2-schema'; import ListingManager from '@tf2autobot/bptf-listings'; +import getAttachmentName from '../lib/tools/getAttachmentName'; export default class Listings { private checkingAllListings = false; @@ -717,18 +717,6 @@ export default class Listings { type Attachment = 's' | 'sp' | 'ke' | 'ks' | 'p'; -function getKeyByValue(object: { [key: string]: any }, value: any): string { - return Object.keys(object).find(key => object[key] === value); -} - -function getAttachmentName(attachment: string, pSKU: string, paints: Paints, parts: StrangeParts): string { - if (attachment === 's') return getKeyByValue(spellsData, pSKU); - else if (attachment === 'sp') return getKeyByValue(parts, pSKU); - else if (attachment === 'ke') return getKeyByValue(killstreakersData, pSKU); - else if (attachment === 'ks') return getKeyByValue(sheensData, pSKU); - else if (attachment === 'p') return getKeyByValue(paints, parseInt(pSKU.replace('p', ''))); -} - function boldDetails(str: string, style: number): string { // https://lingojam.com/BoldTextGenerator diff --git a/src/lib/tools/getAttachmentName.ts b/src/lib/tools/getAttachmentName.ts new file mode 100644 index 000000000..a78757334 --- /dev/null +++ b/src/lib/tools/getAttachmentName.ts @@ -0,0 +1,19 @@ +import { spellsData, killstreakersData, sheensData } from '../data'; +import { Paints, StrangeParts } from '@tf2autobot/tf2-schema'; + +function getKeyByValue(object: { [key: string]: any }, value: any): string { + return Object.keys(object).find(key => object[key] === value); +} + +export default function getAttachmentName( + attachment: string, + pSKU: string, + paints: Paints, + parts: StrangeParts +): string { + if (attachment === 's') return getKeyByValue(spellsData, pSKU); + else if (attachment === 'sp') return getKeyByValue(parts, pSKU); + else if (attachment === 'ke') return getKeyByValue(killstreakersData, pSKU); + else if (attachment === 'ks') return getKeyByValue(sheensData, pSKU); + else if (attachment === 'p') return getKeyByValue(paints, parseInt(pSKU.replace('p', ''))); +} diff --git a/src/lib/tools/getHighValue.ts b/src/lib/tools/getHighValue.ts index a59b4f602..6b9aa323f 100644 --- a/src/lib/tools/getHighValue.ts +++ b/src/lib/tools/getHighValue.ts @@ -1,9 +1,8 @@ import SKU from '@tf2autobot/tf2-sku'; import { Items } from '@tf2autobot/tradeoffer-manager'; -import { spellsData, killstreakersData, sheensData } from '../data'; import Bot from '../../classes/Bot'; -import { Paints, StrangeParts } from '@tf2autobot/tf2-schema'; import { testPriceKey } from '../tools/export'; +import getAttachmentName from './getAttachmentName'; interface ItemsWithName { [name: string]: string; @@ -75,17 +74,3 @@ export default function getHighValueItems(items: Items, bot: Bot): ItemsWithName } type Attachment = 's' | 'sp' | 'ke' | 'ks' | 'p'; - -function getAttachmentName(attachment: string, pSKU: string, paints: Paints, parts: StrangeParts): string { - if (attachment === 's') return getKeyByValue(spellsData, pSKU); - else if (attachment === 'sp') return getKeyByValue(parts, pSKU); - else if (attachment === 'ke') return getKeyByValue(killstreakersData, pSKU); - else if (attachment === 'ks') return getKeyByValue(sheensData, pSKU); - else if (attachment === 'p') return getKeyByValue(paints, parseInt(pSKU.replace('p', ''))); -} - -function getKeyByValue(object: { [key: string]: any }, value: any): string { - const keys = Object.keys(object); - const key = keys.find(key => object[key] === value); - return key; -} From 834465b46e84001da08af06ecd0419ab46cc0bfd Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 05:13:16 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=F0=9F=94=A8=20always=20set=20intent=20to?= =?UTF-8?q?=20sell=20if=20using=20assetid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Pricelist.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/classes/Pricelist.ts b/src/classes/Pricelist.ts index f10b0c35b..c50b077b1 100644 --- a/src/classes/Pricelist.ts +++ b/src/classes/Pricelist.ts @@ -77,7 +77,13 @@ export class Entry implements EntryData { this.autoprice = entry.autoprice; this.min = entry.min; this.max = entry.max; - this.intent = entry.intent; + + if (entry.id) { + // Always set to sell if id is defined + this.intent = 1; + } else { + this.intent = entry.intent; + } if (entry.buy && entry.sell) { // Added both buy and sell From 1b854aac86002337668b9cb51919fdc52467beb3 Mon Sep 17 00:00:00 2001 From: Joseph Lawson Date: Sun, 31 Jul 2022 21:37:17 -0400 Subject: [PATCH 15/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20high=20value=20items?= =?UTF-8?q?=20not=20checking=20for=20asset=20id=20price?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/MyHandler/MyHandler.ts | 6 ++++-- src/lib/tools/getHighValue.ts | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/classes/MyHandler/MyHandler.ts b/src/classes/MyHandler/MyHandler.ts index e65ea7462..153fe829a 100644 --- a/src/classes/MyHandler/MyHandler.ts +++ b/src/classes/MyHandler/MyHandler.ts @@ -679,8 +679,9 @@ export default class MyHandler extends Handler { // Get High-value items items[which][sku].forEach(item => { if (item.hv !== undefined) { + const priceKey = this.bot.pricelist.hasPrice({ priceKey: item.id }) ? item.id : sku; // If hv exist, get the high value and assign into items - getHighValue[which].items[sku] = item.hv; + getHighValue[which].items[priceKey] = item.hv; Object.keys(item.hv).forEach(attachment => { if (item.hv[attachment] !== undefined) { @@ -696,7 +697,8 @@ export default class MyHandler extends Handler { } }); } else if (item.isFullUses !== undefined) { - getHighValue[which].items[sku] = { isFull: item.isFullUses }; + const priceKey = this.bot.pricelist.hasPrice({ priceKey: item.id }) ? item.id : sku; + getHighValue[which].items[priceKey] = { isFull: item.isFullUses }; if (which === 'their') { // Only check for their side diff --git a/src/lib/tools/getHighValue.ts b/src/lib/tools/getHighValue.ts index 6b9aa323f..fc36ccdd4 100644 --- a/src/lib/tools/getHighValue.ts +++ b/src/lib/tools/getHighValue.ts @@ -3,6 +3,7 @@ import { Items } from '@tf2autobot/tradeoffer-manager'; import Bot from '../../classes/Bot'; import { testPriceKey } from '../tools/export'; import getAttachmentName from './getAttachmentName'; +import Pricelist from '../../classes/Pricelist'; interface ItemsWithName { [name: string]: string; @@ -67,7 +68,8 @@ export default function getHighValueItems(items: Items, bot: Bot): ItemsWithName } }); - itemsWithName[bot.schema.getName(SKU.fromString(sku.replace(/;p\d+/, '')))] = toString; + const nameSku = Pricelist.isAssetId(sku) ? bot.pricelist.getPrice({ priceKey: sku }).sku : sku; + itemsWithName[bot.schema.getName(SKU.fromString(nameSku.replace(/;p\d+/, '')))] = toString; } return itemsWithName; From 037d5ecf64b9585a2de6a3621a8bceef4213b0fa Mon Sep 17 00:00:00 2001 From: Joseph Lawson Date: Sun, 31 Jul 2022 23:20:15 -0400 Subject: [PATCH 16/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20!find=20not=20using?= =?UTF-8?q?=20pricekey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Commands/sub-classes/PricelistManager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes/Commands/sub-classes/PricelistManager.ts b/src/classes/Commands/sub-classes/PricelistManager.ts index 48c38a99b..0b7ae6472 100644 --- a/src/classes/Commands/sub-classes/PricelistManager.ts +++ b/src/classes/Commands/sub-classes/PricelistManager.ts @@ -2273,14 +2273,15 @@ export default class PricelistManagerCommands { const isPremium = this.bot.handler.getBotInfo.premium; const list = filter.map((entry, i) => { + const priceKey = entry.id ? entry.id : entry.sku; const name = entry.name; const stock = this.bot.inventoryManager.getInventory.getAmount({ - priceKey: entry.sku, + priceKey, includeNonNormalized: false, tradableOnly: true }); - return `${i + 1}. ${entry.sku} - ${name}${name.length > 40 ? '\n' : ' '}(${stock}, ${entry.min}, ${ + return `${i + 1}. ${priceKey} - ${name}${name.length > 40 ? '\n' : ' '}(${stock}, ${entry.min}, ${ entry.max }, ${entry.intent === 2 ? 'bank' : entry.intent === 1 ? 'sell' : 'buy'}, ${ entry.enabled ? '✅' : '❌' From 096b9c172cf390762f9be58782b442298448cf7b Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:02:15 +0800 Subject: [PATCH 17/31] =?UTF-8?q?=F0=9F=94=A8=20Also=20fix=20stock=20show?= =?UTF-8?q?=20as=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Inventory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes/Inventory.ts b/src/classes/Inventory.ts index f3f6f23a7..a4cc57a04 100644 --- a/src/classes/Inventory.ts +++ b/src/classes/Inventory.ts @@ -250,11 +250,12 @@ export default class Inventory { } } - return accAmount - amountToDeduct; + return accAmount === 1 && amountToDeduct === 1 ? 1 : accAmount - amountToDeduct; } // else just return amount - return this.findBySKU(sku, tradableOnly).length - amountToDeduct; + const amount = this.findBySKU(sku, tradableOnly).length; + return amount === 1 && amountToDeduct === 1 ? 1 : amount - amountToDeduct; } getAmountOfGenerics({ From 64062c2c9c0485371a19a4d55dba33a2ac559377 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 18:03:56 +0800 Subject: [PATCH 18/31] =?UTF-8?q?=F0=9F=94=A8=20more=20problem=20solving?= =?UTF-8?q?=20attempt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/Bot.ts | 97 +++++++++++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 40 deletions(-) diff --git a/src/classes/Bot.ts b/src/classes/Bot.ts index 1fb63baac..e9cf1c87f 100644 --- a/src/classes/Bot.ts +++ b/src/classes/Bot.ts @@ -793,7 +793,7 @@ export default class Bot { this.addListener(this.manager, 'receivedOfferChanged', this.trades.onOfferChanged.bind(this.trades), true); this.addListener(this.manager, 'offerList', this.trades.onOfferList.bind(this.trades), true); - const promisesChain = [ + const firstTwoChain = [ async () => { log.debug('Calling onRun'); @@ -817,32 +817,11 @@ export default class Bot { async () => { log.info('Signing in to Steam...'); - let lastLoginFailed = false; - - const successResponse = () => { - log.info('Signed in to Steam!'); - }; - - const failResponse = (err: CustomError) => { - this.handler.onLoginError(err); - log.warn('Failed to sign in to Steam: ', err); - throw err; - }; + return await this.login(data.loginKey || null); + } + ]; - await this.login(data.loginKey || null) - .then(successResponse) - .catch(async (err: CustomError) => { - if (!lastLoginFailed && err.eresult === EResult.InvalidPassword) { - this.handler.onLoginError(err); - lastLoginFailed = true; - // Try and sign in without login key - log.warn('Failed to sign in to Steam, retrying without login key...'); - await this.login(null).then(successResponse).catch(failResponse); - } else { - failResponse(err); - } - }); - }, + const promisesChain = [ async () => { log.debug('Waiting for web session'); cookies = await this.getWebSession(); @@ -1017,6 +996,7 @@ export default class Bot { } ]; + let promiseFirstTwo = Promise.resolve(); let promise = Promise.resolve(); return new Promise((resolve, reject) => { @@ -1024,24 +1004,61 @@ export default class Bot { if (this.botManager.isStopping) return reject(); }; - for (const promiseToChain of promisesChain) { - promise = promise.then(promiseToChain).then(checkIfStopping); + for (const promiseToChainFirstTwo of firstTwoChain) { + promiseFirstTwo = promiseFirstTwo.then(promiseToChainFirstTwo).then(checkIfStopping); } - void promise.then(() => { - if (this.options.discordBotToken) { - this.discordBot.setPresence('online'); - } + let lastLoginFailed = false; - this.manager.pollInterval = 5 * 1000; - this.setReady = true; - this.handler.onReady(); - this.manager.doPoll(); - this.startVersionChecker(); - this.initResetCacheInterval(); + const successResponse = () => { + log.info('Signed in to Steam!'); + }; - resolve(); - }); + const failResponse = (err: CustomError) => { + this.handler.onLoginError(err); + log.warn('Failed to sign in to Steam: ', err); + return reject(err); + }; + + promiseFirstTwo + .then(() => { + successResponse(); + }) + .catch(async (err: CustomError) => { + if (!lastLoginFailed && err.eresult === EResult.InvalidPassword) { + this.handler.onLoginError(err); + lastLoginFailed = true; + // Try and sign in without login key + log.warn('Failed to sign in to Steam, retrying without login key...'); + await this.login(null).then(successResponse).catch(failResponse); + } else { + failResponse(err); + } + }) + .finally(() => { + for (const promiseToChain of promisesChain) { + promise = promise.then(promiseToChain).then(checkIfStopping); + } + + promise + .then(() => { + if (this.options.discordBotToken) { + this.discordBot.setPresence('online'); + } + + this.manager.pollInterval = 5 * 1000; + this.setReady = true; + this.handler.onReady(); + this.manager.doPoll(); + this.startVersionChecker(); + this.initResetCacheInterval(); + + resolve(); + }) + .catch(err => { + return reject(err); + }); + }); }); } From 3ed38e6e239c7329992ffd775789bd0bc295e7c7 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:15:06 +0800 Subject: [PATCH 19/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/bptf-li?= =?UTF-8?q?stings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index f89cbfbf9..2c5559a43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.2.1", "license": "MIT", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.2", + "@tf2autobot/bptf-listings": "^5.6.3", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.3.1", "@tf2autobot/jsonlint": "^1.0.0", @@ -1958,9 +1958,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "node_modules/@tf2autobot/bptf-listings": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.2.tgz", - "integrity": "sha512-xsIievP3qWnJMRQziexgHiumdjfJfx1LQVnQY2KRSunzNONHazBMYnBgSi/iATM4sptf6mBDO5oxMYdrLwk2+g==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.3.tgz", + "integrity": "sha512-vnMGDRfWl59lr4ZrYjYVfG5hNzi+OLFBIoURgqz54KS/KEMB9FfWFt5rELvdJ55Z5jgXq2AgoZJVfEQMcHeo1Q==", "dependencies": { "@tf2autobot/filter-axios-error": "^1.3.1", "@tf2autobot/tf2-currencies": "^2.0.1", @@ -12429,9 +12429,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "@tf2autobot/bptf-listings": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.2.tgz", - "integrity": "sha512-xsIievP3qWnJMRQziexgHiumdjfJfx1LQVnQY2KRSunzNONHazBMYnBgSi/iATM4sptf6mBDO5oxMYdrLwk2+g==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.3.tgz", + "integrity": "sha512-vnMGDRfWl59lr4ZrYjYVfG5hNzi+OLFBIoURgqz54KS/KEMB9FfWFt5rELvdJ55Z5jgXq2AgoZJVfEQMcHeo1Q==", "requires": { "@tf2autobot/filter-axios-error": "^1.3.1", "@tf2autobot/tf2-currencies": "^2.0.1", diff --git a/package.json b/package.json index 26d3575f7..938014759 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "updateMessage": "", "homepage": "https://github.com/TF2Autobot/tf2autobot#readme", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.2", + "@tf2autobot/bptf-listings": "^5.6.3", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.3.1", "@tf2autobot/jsonlint": "^1.0.0", From 41a2c394ded9b77eca730310897006842d1bc67d Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 23:14:40 +0800 Subject: [PATCH 20/31] =?UTF-8?q?=F0=9F=93=91=20a=20little=20bit=20more=20?= =?UTF-8?q?information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 53e5bae99..9cc391b43 100644 --- a/src/app.ts +++ b/src/app.ts @@ -162,7 +162,10 @@ botManager const e = new Error(err.message); if (err.response) { + e['code'] = err.code; e['status'] = err.response.status; + e['method'] = err.config?.method; + e['url'] = err.config?.url?.replace(/\?.+/, ''); // Ignore parameters if (typeof err.response.data === 'string' && err.response.data?.includes('')) { return throwErr(e); @@ -171,8 +174,10 @@ botManager e['data'] = err.response.data; } else { // No need to get the "config", etc. + e['code'] = err.code; + e['status'] = err.status; e['method'] = err.method; - e['baseURL'] = err.baseURL; + e['baseURL'] = err.baseURL?.replace(/\?.+/, ''); // Ignore parameters } return throwErr(e); From 7fe1c9ddf207a1c928cf67a73b96068c8a893b77 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 23:24:09 +0800 Subject: [PATCH 21/31] =?UTF-8?q?=F0=9F=94=84=20refactor=20codes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/app.ts b/src/app.ts index 9cc391b43..180aeec5b 100644 --- a/src/app.ts +++ b/src/app.ts @@ -161,25 +161,17 @@ botManager const e = new Error(err.message); - if (err.response) { - e['code'] = err.code; - e['status'] = err.response.status; - e['method'] = err.config?.method; - e['url'] = err.config?.url?.replace(/\?.+/, ''); // Ignore parameters - - if (typeof err.response.data === 'string' && err.response.data?.includes('')) { - return throwErr(e); - } + e['code'] = err.code; + e['status'] = err.response?.status ?? err.status; + e['method'] = err.config?.method ?? err.method; + e['url'] = err.config?.url?.replace(/\?.+/, '') ?? err.baseURL?.replace(/\?.+/, ''); // Ignore parameters - e['data'] = err.response.data; - } else { - // No need to get the "config", etc. - e['code'] = err.code; - e['status'] = err.status; - e['method'] = err.method; - e['baseURL'] = err.baseURL?.replace(/\?.+/, ''); // Ignore parameters + if (typeof err.response?.data === 'string' && err.response?.data?.includes('')) { + return throwErr(e); } + e['data'] = err.response?.data; + return throwErr(e); } /*eslint-enable */ From e65ee2da23a504aa666b3267216bfb1312654ded Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Mon, 1 Aug 2022 23:29:38 +0800 Subject: [PATCH 22/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/filter-?= =?UTF-8?q?axios-error,=20bptf-listings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 32 ++++++++++++++++---------------- package.json | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c5559a43..a651a8341 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "5.2.1", "license": "MIT", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.3", + "@tf2autobot/bptf-listings": "^5.6.4", "@tf2autobot/bptf-login": "^2.3.4", - "@tf2autobot/filter-axios-error": "^1.3.1", + "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", @@ -1958,11 +1958,11 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "node_modules/@tf2autobot/bptf-listings": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.3.tgz", - "integrity": "sha512-vnMGDRfWl59lr4ZrYjYVfG5hNzi+OLFBIoURgqz54KS/KEMB9FfWFt5rELvdJ55Z5jgXq2AgoZJVfEQMcHeo1Q==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", + "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", "dependencies": { - "@tf2autobot/filter-axios-error": "^1.3.1", + "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", @@ -1983,9 +1983,9 @@ } }, "node_modules/@tf2autobot/filter-axios-error": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@tf2autobot/filter-axios-error/-/filter-axios-error-1.3.1.tgz", - "integrity": "sha512-eBP5qK1usrpRGnY59DQ/VeTzhjuG3s5U7bLuDoTcOhvcMHpCEqmi2wIxxWx0+bf6uAuoO2/ieudsXurMlYmmVg==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@tf2autobot/filter-axios-error/-/filter-axios-error-1.4.0.tgz", + "integrity": "sha512-szr8TrRkrpezAullZpHibO3MjvtMmhbE5Hdahw0YFef6Or8xw3pzgUUqEePpeWx05pAQYjvA7TvVtCoC/diiVg==" }, "node_modules/@tf2autobot/jsonlint": { "version": "1.0.0", @@ -12429,11 +12429,11 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "@tf2autobot/bptf-listings": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.3.tgz", - "integrity": "sha512-vnMGDRfWl59lr4ZrYjYVfG5hNzi+OLFBIoURgqz54KS/KEMB9FfWFt5rELvdJ55Z5jgXq2AgoZJVfEQMcHeo1Q==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", + "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", "requires": { - "@tf2autobot/filter-axios-error": "^1.3.1", + "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", "@tf2autobot/tf2-sku": "^2.0.3", "async": "^3.2.4", @@ -12454,9 +12454,9 @@ } }, "@tf2autobot/filter-axios-error": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@tf2autobot/filter-axios-error/-/filter-axios-error-1.3.1.tgz", - "integrity": "sha512-eBP5qK1usrpRGnY59DQ/VeTzhjuG3s5U7bLuDoTcOhvcMHpCEqmi2wIxxWx0+bf6uAuoO2/ieudsXurMlYmmVg==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@tf2autobot/filter-axios-error/-/filter-axios-error-1.4.0.tgz", + "integrity": "sha512-szr8TrRkrpezAullZpHibO3MjvtMmhbE5Hdahw0YFef6Or8xw3pzgUUqEePpeWx05pAQYjvA7TvVtCoC/diiVg==" }, "@tf2autobot/jsonlint": { "version": "1.0.0", diff --git a/package.json b/package.json index 938014759..cea768233 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "updateMessage": "", "homepage": "https://github.com/TF2Autobot/tf2autobot#readme", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.3", + "@tf2autobot/bptf-listings": "^5.6.4", "@tf2autobot/bptf-login": "^2.3.4", - "@tf2autobot/filter-axios-error": "^1.3.1", + "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", "@tf2autobot/steamcommunity": "^3.45.4", "@tf2autobot/tf2": "^1.2.1", From f89c6610bb0d52aaf284502b0142c8073f115b73 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 02:45:43 +0800 Subject: [PATCH 23/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/bptf-li?= =?UTF-8?q?stings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a651a8341..f0c87de4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.2.1", "license": "MIT", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.4", + "@tf2autobot/bptf-listings": "^5.6.5", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", @@ -1958,9 +1958,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "node_modules/@tf2autobot/bptf-listings": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", - "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.5.tgz", + "integrity": "sha512-ZVExpAp432lxf5bjSCrqbiSPayRRPGHObhbuJnmbMPyRYiG6bCJ0v0U1tiwZA8M+mtwssfWgYUynrcpzxho0Qg==", "dependencies": { "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", @@ -12429,9 +12429,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "@tf2autobot/bptf-listings": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", - "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.5.tgz", + "integrity": "sha512-ZVExpAp432lxf5bjSCrqbiSPayRRPGHObhbuJnmbMPyRYiG6bCJ0v0U1tiwZA8M+mtwssfWgYUynrcpzxho0Qg==", "requires": { "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", diff --git a/package.json b/package.json index cea768233..75632176b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "updateMessage": "", "homepage": "https://github.com/TF2Autobot/tf2autobot#readme", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.4", + "@tf2autobot/bptf-listings": "^5.6.5", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", From f2c1b566787a5a53e5df4406b7c2a7ab37c8f320 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 02:45:43 +0800 Subject: [PATCH 24/31] =?UTF-8?q?=F0=9F=94=84=20bump=20@tf2autobot/bptf-li?= =?UTF-8?q?stings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a651a8341..f0c87de4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.2.1", "license": "MIT", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.4", + "@tf2autobot/bptf-listings": "^5.6.5", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", @@ -1958,9 +1958,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "node_modules/@tf2autobot/bptf-listings": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", - "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.5.tgz", + "integrity": "sha512-ZVExpAp432lxf5bjSCrqbiSPayRRPGHObhbuJnmbMPyRYiG6bCJ0v0U1tiwZA8M+mtwssfWgYUynrcpzxho0Qg==", "dependencies": { "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", @@ -12429,9 +12429,9 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "@tf2autobot/bptf-listings": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.4.tgz", - "integrity": "sha512-HjwQcnSFpYvOcO/2ga7jAGFBtaKKRwZWWxbIjmAemTMvA420eOCC2yAfuGfUBvzaDB/O7YzYmXmLIfstpb2dJA==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/@tf2autobot/bptf-listings/-/bptf-listings-5.6.5.tgz", + "integrity": "sha512-ZVExpAp432lxf5bjSCrqbiSPayRRPGHObhbuJnmbMPyRYiG6bCJ0v0U1tiwZA8M+mtwssfWgYUynrcpzxho0Qg==", "requires": { "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/tf2-currencies": "^2.0.1", diff --git a/package.json b/package.json index cea768233..75632176b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "updateMessage": "", "homepage": "https://github.com/TF2Autobot/tf2autobot#readme", "dependencies": { - "@tf2autobot/bptf-listings": "^5.6.4", + "@tf2autobot/bptf-listings": "^5.6.5", "@tf2autobot/bptf-login": "^2.3.4", "@tf2autobot/filter-axios-error": "^1.4.0", "@tf2autobot/jsonlint": "^1.0.0", From 2e87f7dd91741e3a873585ba90139efba5b26381 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 05:28:27 +0800 Subject: [PATCH 25/31] =?UTF-8?q?=F0=9F=94=A8=20fix=20the=20real=20culprit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/pricer/pricestf/prices-tf-api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/pricer/pricestf/prices-tf-api.ts b/src/lib/pricer/pricestf/prices-tf-api.ts index 0834da348..8815e63ba 100644 --- a/src/lib/pricer/pricestf/prices-tf-api.ts +++ b/src/lib/pricer/pricestf/prices-tf-api.ts @@ -1,5 +1,5 @@ import axios, { AxiosRequestConfig, Method, AxiosError } from 'axios'; -import filterAxiosError from '@tf2autobot/filter-axios-error'; +import filterAxiosError, { ErrorFiltered } from '@tf2autobot/filter-axios-error'; import { PricerOptions } from '../../../classes/IPricer'; import log from '../../logger'; @@ -63,8 +63,8 @@ export default class PricesTfApi { ...headers }); } catch (e) { - const err = e as AxiosError; - if (err.response && err.response.status === 401) { + const err = e as ErrorFiltered; + if (err?.status === 401) { log.debug('Requesting new token from prices.tf due to 401'); await this.setupToken(); return this.authedApiRequest(httpMethod, path, params, data, headers); From 1acbd3ad191f1a5ade23d7227817265fd8e9d150 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 05:32:44 +0800 Subject: [PATCH 26/31] =?UTF-8?q?=E2=86=A9=20partially=20revert=203cbf725?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/pricer/pricestf/prices-tf-api.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/pricer/pricestf/prices-tf-api.ts b/src/lib/pricer/pricestf/prices-tf-api.ts index 8815e63ba..e6391d5be 100644 --- a/src/lib/pricer/pricestf/prices-tf-api.ts +++ b/src/lib/pricer/pricestf/prices-tf-api.ts @@ -123,16 +123,12 @@ export default class PricesTfApi { } async setupToken(): Promise { - return new Promise((resolve, reject) => { - void PricesTfApi.requestAuthAccess() - .then(response => { - this.token = response.accessToken; - resolve(); - }) - .catch(err => { - reject(err); - }); - }); + try { + const r = await PricesTfApi.requestAuthAccess(); + this.token = r.accessToken; + } catch (e) { + log.error(e as Error); + } } async requestCheck(sku: string): Promise { From c3a0dd5b8e41120f3752c3b79266697b08e8762a Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 06:21:03 +0800 Subject: [PATCH 27/31] =?UTF-8?q?=F0=9F=90=9B=20fix=20unhandled=20rejectio?= =?UTF-8?q?n=20error=20that=20crashes=20the=20bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/MyHandler/MyHandler.ts | 38 +++++++++---------- .../MyHandler/utils/craftClassWeapons.ts | 4 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/classes/MyHandler/MyHandler.ts b/src/classes/MyHandler/MyHandler.ts index 153fe829a..41dd56e62 100644 --- a/src/classes/MyHandler/MyHandler.ts +++ b/src/classes/MyHandler/MyHandler.ts @@ -258,13 +258,13 @@ export default class MyHandler extends Handler { keepMetalSupply(this.bot, this.minimumScrap, this.minimumReclaimed, this.combineThreshold); // Craft duplicate weapons - void craftDuplicateWeapons(this.bot); - - // Craft class weapons - this.classWeaponsTimeout = setTimeout(() => { - // called after 5 seconds to craft metals and duplicated weapons first. - void craftClassWeapons(this.bot); - }, 5 * 1000); + craftDuplicateWeapons(this.bot) + .then(() => { + return craftClassWeapons(this.bot); + }) + .catch(err => { + log.warn('Failed to craft duplicated craft/class weapons', err); + }); } if (this.isDeletingUntradableJunk) { @@ -2205,18 +2205,14 @@ export default class MyHandler extends Handler { // Smelt / combine metal keepMetalSupply(this.bot, this.minimumScrap, this.minimumReclaimed, this.combineThreshold); - // Craft duplicated weapons - void craftDuplicateWeapons(this.bot); - - this.classWeaponsTimeout = setTimeout(() => { - // called after 5 second to craft metals and duplicated weapons first. - void craftClassWeapons(this.bot); - }, 5 * 1000); - } - - if (this.isDeletingUntradableJunk) { - // Delete untradable junk - this.deleteUntradableJunk(); + // Craft duplicate weapons + craftDuplicateWeapons(this.bot) + .then(() => { + return craftClassWeapons(this.bot); + }) + .catch(err => { + log.warn('Failed to craft duplicated craft/class weapons', err); + }); } // Sort inventory @@ -2546,7 +2542,9 @@ export default class MyHandler extends Handler { for (const assetid of assetidsToDelete) { log.debug(`Deleting junk item ${assetid}`); - this.bot.tf2gc.deleteItem(assetid); + this.bot.tf2gc.deleteItem(assetid, err => { + log.warn('Error deleting untradable junk', err); + }); } } diff --git a/src/classes/MyHandler/utils/craftClassWeapons.ts b/src/classes/MyHandler/utils/craftClassWeapons.ts index e8a780419..db698947d 100644 --- a/src/classes/MyHandler/utils/craftClassWeapons.ts +++ b/src/classes/MyHandler/utils/craftClassWeapons.ts @@ -17,13 +17,13 @@ export type ClassesForCraftableWeapons = export type SlotsForCraftableWeapons = 'primary' | 'secondary' | 'melee' | 'pda2'; -export default function craftClassWeapons(bot: Bot): Promise { +export default async function craftClassWeapons(bot: Bot): Promise { if (!bot.options.crafting.weapons.enable) { return; } const currencies = bot.inventoryManager.getInventory.getCurrencies(bot.craftWeapons, false); - void Promise.all( + await Promise.all( ['scout', 'soldier', 'pyro', 'demoman', 'heavy', 'engineer', 'medic', 'sniper', 'spy'].map(classChar => craftEachClassWeapons(bot, bot.craftWeaponsByClass[classChar as ClassesForCraftableWeapons], currencies) ) From e124fb26adce030cbe20354d9c68e05e5138f9eb Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 06:34:48 +0800 Subject: [PATCH 28/31] =?UTF-8?q?=F0=9F=94=A8=20small=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/MyHandler/MyHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/MyHandler/MyHandler.ts b/src/classes/MyHandler/MyHandler.ts index 41dd56e62..3d004a7a5 100644 --- a/src/classes/MyHandler/MyHandler.ts +++ b/src/classes/MyHandler/MyHandler.ts @@ -2493,7 +2493,7 @@ export default class MyHandler extends Handler { clearTimeout(this.retryRequest); this.retryRequest = setTimeout(() => { - void this.getBPTFAccountInfo().catch(() => { + this.getBPTFAccountInfo().catch(() => { // ignore error }); }, 5 * 60 * 1000); From b407eeb3c4169908b3874b0cbe268718280867e0 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 06:44:08 +0800 Subject: [PATCH 29/31] =?UTF-8?q?=F0=9F=94=84=20bump=20steam-user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0c87de4f..9d83cb309 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "retry": "^0.13.1", "socket.io-client": "^4.5.1", "steam-totp": "^2.1.2", - "steam-user": "^4.24.5", + "steam-user": "^4.24.6", "steamid": "^2.0.0", "url": "^0.11.0", "valid-url": "^1.0.9", @@ -9931,9 +9931,9 @@ } }, "node_modules/steam-user": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/steam-user/-/steam-user-4.24.5.tgz", - "integrity": "sha512-Qzcvov+bE658AVS+ZDJKuAmXeuJWyUp56HeWTIWwVDGNxD7OJcqNwqkzyH8D0PveE8x+yrWFW+VjjloeUhJxlg==", + "version": "4.24.6", + "resolved": "https://registry.npmjs.org/steam-user/-/steam-user-4.24.6.tgz", + "integrity": "sha512-Xn8w+jdhDEV5VaZjT3tqk6mL2Q+/avwxgtJ7GLjhGXyVC6LKBjs9py/xhmebU19ZdHqolG3bkQDuHqcbeiKonw==", "dependencies": { "@bbob/parser": "^2.2.0", "@doctormckay/stdlib": "^1.11.1", @@ -18487,9 +18487,9 @@ "integrity": "sha512-bTKlc/NoIUQId+my+O556s55DDsNNXfVIPWFDNVu68beql7AJhV0c+GTjFxfwCDYfdc4NkAme+0WrDdnY2D2VA==" }, "steam-user": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/steam-user/-/steam-user-4.24.5.tgz", - "integrity": "sha512-Qzcvov+bE658AVS+ZDJKuAmXeuJWyUp56HeWTIWwVDGNxD7OJcqNwqkzyH8D0PveE8x+yrWFW+VjjloeUhJxlg==", + "version": "4.24.6", + "resolved": "https://registry.npmjs.org/steam-user/-/steam-user-4.24.6.tgz", + "integrity": "sha512-Xn8w+jdhDEV5VaZjT3tqk6mL2Q+/avwxgtJ7GLjhGXyVC6LKBjs9py/xhmebU19ZdHqolG3bkQDuHqcbeiKonw==", "requires": { "@bbob/parser": "^2.2.0", "@doctormckay/stdlib": "^1.11.1", diff --git a/package.json b/package.json index 75632176b..7575eaa35 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "retry": "^0.13.1", "socket.io-client": "^4.5.1", "steam-totp": "^2.1.2", - "steam-user": "^4.24.5", + "steam-user": "^4.24.6", "steamid": "^2.0.0", "url": "^0.11.0", "valid-url": "^1.0.9", From c49b003ed3fc6986111365dda658b34d0895622b Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 07:00:21 +0800 Subject: [PATCH 30/31] =?UTF-8?q?=F0=9F=9A=AE=20remove=20unused=20dependen?= =?UTF-8?q?cy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d83cb309..df135d38b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,6 @@ "steamid": "^2.0.0", "url": "^0.11.0", "valid-url": "^1.0.9", - "websocket-extensions": "^0.1.4", "winston": "^3.8.1", "winston-daily-rotate-file": "^4.7.1", "write-file-atomic": "^4.0.1", diff --git a/package.json b/package.json index 7575eaa35..1e74b6ec1 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,6 @@ "steamid": "^2.0.0", "url": "^0.11.0", "valid-url": "^1.0.9", - "websocket-extensions": "^0.1.4", "winston": "^3.8.1", "winston-daily-rotate-file": "^4.7.1", "write-file-atomic": "^4.0.1", From da1a91b2e1761341a0d6c0ba05830fa4ef98ea58 Mon Sep 17 00:00:00 2001 From: IdiNium <47635037+idinium96@users.noreply.github.com> Date: Tue, 2 Aug 2022 07:09:53 +0800 Subject: [PATCH 31/31] =?UTF-8?q?=F0=9F=94=84=20bump=20dev=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 387 +++++++++++++++++++++++++++++++--------------- package.json | 10 +- 2 files changed, 267 insertions(+), 130 deletions(-) diff --git a/package-lock.json b/package-lock.json index df135d38b..9fdca3321 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "@types/express": "^4.17.13", "@types/graceful-fs": "^4.1.5", "@types/jest": "^28.1.6", - "@types/node": "^18.0.6", + "@types/node": "^18.6.3", "@types/pluralize": "0.0.29", "@types/request": "^2.48.8", "@types/retry": "^0.12.2", @@ -66,11 +66,11 @@ "@types/valid-url": "^1.0.3", "@types/write-file-atomic": "^4.0.0", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.7", - "eslint": "^8.20.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "eslint": "^8.21.0", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-jest": "^26.6.0", + "eslint-plugin-jest": "^26.7.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-tsdoc": "^0.2.16", "jest": "^28.1.3", @@ -779,9 +779,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -792,6 +792,16 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -2308,9 +2318,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz", - "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==" + "version": "18.6.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz", + "integrity": "sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==" }, "node_modules/@types/node-fetch": { "version": "2.6.1", @@ -2457,14 +2467,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", + "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/type-utils": "5.32.0", + "@typescript-eslint/utils": "5.32.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -2490,14 +2500,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", + "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", "debug": "^4.3.4" }, "engines": { @@ -2517,13 +2527,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", + "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2534,12 +2544,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", + "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.32.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -2560,9 +2570,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", + "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2573,13 +2583,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", + "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2600,15 +2610,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", + "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -2624,12 +2634,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", + "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.32.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2653,9 +2663,9 @@ } }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "bin": { "acorn": "bin/acorn" }, @@ -4365,13 +4375,14 @@ } }, "node_modules/eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", + "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4381,14 +4392,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -4429,9 +4443,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", - "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", + "version": "26.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.7.0.tgz", + "integrity": "sha512-/YNitdfG3o3cC6juZziAdkk6nfJt01jXVfj4AgaYVLs7bupHzRDL5K+eipdzhDXtQsiqaX1TzfwSuRlEgeln1A==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.10.0" @@ -4615,6 +4629,22 @@ "node": ">=4.0" } }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4664,6 +4694,21 @@ "node": ">= 0.8.0" } }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -4681,6 +4726,36 @@ "node": ">= 0.8.0" } }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4715,17 +4790,20 @@ } }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -5434,6 +5512,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -11500,9 +11584,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -11510,6 +11594,12 @@ "minimatch": "^3.0.4" } }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -12748,9 +12838,9 @@ "dev": true }, "@types/node": { - "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz", - "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==" + "version": "18.6.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz", + "integrity": "sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==" }, "@types/node-fetch": { "version": "2.6.1", @@ -12895,14 +12985,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", + "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/type-utils": "5.32.0", + "@typescript-eslint/utils": "5.32.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -12912,52 +13002,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", + "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", + "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0" } }, "@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", + "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.32.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", + "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", + "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -12966,26 +13056,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", + "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", + "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.32.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -12999,9 +13089,9 @@ } }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==" + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" }, "acorn-jsx": { "version": "5.3.2", @@ -14329,13 +14419,14 @@ } }, "eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", + "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -14345,14 +14436,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -14427,6 +14521,16 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -14461,6 +14565,15 @@ "type-check": "~0.4.0" } }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -14475,6 +14588,24 @@ "word-wrap": "^1.2.3" } }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -14509,9 +14640,9 @@ "requires": {} }, "eslint-plugin-jest": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", - "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", + "version": "26.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.7.0.tgz", + "integrity": "sha512-/YNitdfG3o3cC6juZziAdkk6nfJt01jXVfj4AgaYVLs7bupHzRDL5K+eipdzhDXtQsiqaX1TzfwSuRlEgeln1A==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.10.0" @@ -14570,12 +14701,12 @@ "dev": true }, "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "requires": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } @@ -15117,6 +15248,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", diff --git a/package.json b/package.json index 1e74b6ec1..1afa12b0b 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@types/express": "^4.17.13", "@types/graceful-fs": "^4.1.5", "@types/jest": "^28.1.6", - "@types/node": "^18.0.6", + "@types/node": "^18.6.3", "@types/pluralize": "0.0.29", "@types/request": "^2.48.8", "@types/retry": "^0.12.2", @@ -83,11 +83,11 @@ "@types/valid-url": "^1.0.3", "@types/write-file-atomic": "^4.0.0", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.7", - "eslint": "^8.20.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "eslint": "^8.21.0", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-jest": "^26.6.0", + "eslint-plugin-jest": "^26.7.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-tsdoc": "^0.2.16", "jest": "^28.1.3",