From e9876570d2c8e972785844123c1a75cf07cf7e39 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2024 18:13:48 +0100 Subject: [PATCH 01/31] Update dependency ts-jest to v29.1.4 (#255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-jest](https://kulshekhar.github.io/ts-jest) ([source](https://github.com/kulshekhar/ts-jest)) | dependencies | patch | [`29.1.3` -> `29.1.4`](https://renovatebot.com/diffs/npm/ts-jest/29.1.3/29.1.4) | --- ### Release Notes
kulshekhar/ts-jest (ts-jest) ### [`v29.1.4`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2914-2024-05-28) [Compare Source](https://github.com/kulshekhar/ts-jest/compare/v29.1.3...v29.1.4) ##### Bug Fixes - fix(transformer): allow transforming of .cts/.mts extensions. ([#​3996](https://github.com/kulshekhar/ts-jest/issues/3996)) ([b8f6eaa](https://github.com/kulshekhar/ts-jest/commit/b8f6eaa)), closes [#​3996](https://github.com/kulshekhar/ts-jest/issues/3996) ##### Features - feat: make cli generate esm config based on `type: "module"` ([#​4210](https://github.com/kulshekhar/ts-jest/issues/4210)) ([81a5f64](https://github.com/kulshekhar/ts-jest/commit/81a5f64)), closes [#​4210](https://github.com/kulshekhar/ts-jest/issues/4210) [#​4012](https://github.com/kulshekhar/ts-jest/issues/4012)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/255 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83153ed..9f29aa0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10919,9 +10919,9 @@ } }, "node_modules/ts-jest": { - "version": "29.1.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.3.tgz", - "integrity": "sha512-6L9qz3ginTd1NKhOxmkP0qU3FyKjj5CPoY+anszfVn6Pmv/RIKzhiMCsH7Yb7UvJR9I2A64rm4zQl531s2F1iw==", + "version": "29.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz", + "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==", "license": "MIT", "dependencies": { "bs-logger": "0.x", From 6561a1c99818a8aa79d0acc70cfc31b5a62de867 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2024 18:17:04 +0100 Subject: [PATCH 02/31] Update dependency @types/node to v20.14.0 (#256) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | minor | [`20.12.12` -> `20.14.0`](https://renovatebot.com/diffs/npm/@types%2fnode/20.12.12/20.14.0) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/256 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f29aa0..77824c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1939,9 +1939,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", - "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "version": "20.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.0.tgz", + "integrity": "sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA==", "license": "MIT", "dependencies": { "undici-types": "~5.26.4" From 7385a1bdb4a88d5671df79b57afeaf88f1c4b81f Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sun, 9 Jun 2024 10:39:41 +0100 Subject: [PATCH 03/31] Update discord.js to v14.15.3 (#264) # Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. #243 ## Type of change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration. # Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/264 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 12287fd..d36086d 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "body-parser": "^1.20.2", "clone-deep": "^4.0.1", "cron": "^3.1.7", - "discord.js": "^14.3.0", + "discord.js": "^14.15.3", "dotenv": "^16.0.0", "express": "^4.18.2", "glob": "^10.3.10", diff --git a/yarn.lock b/yarn.lock index 19462e4..533dc59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2101,7 +2101,7 @@ discord-api-types@0.37.83: resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.37.83.tgz#a22a799729ceded8176ea747157837ddf4708b1f" integrity sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA== -discord.js@^14.3.0: +discord.js@^14.15.3: version "14.15.3" resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.15.3.tgz#b2a67a1a4ef192be498fb8b6784224a42906f1be" integrity sha512-/UJDQO10VuU6wQPglA4kz2bw2ngeeSbogiIPx/TsnctfzV/tNf+q+i1HlgtX1OGpeOBpJH9erZQNO5oRM2uAtQ== From 9e366eab5dccdb954dc2fdd8f68fce855ea6bf4f Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 15 Jun 2024 20:56:43 +0100 Subject: [PATCH 04/31] Create timer to automatically purge expired claims (#268) # Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - Create a timer which will purge expired claims automatically - Update claiming so it can only be done within 5 minutes of being dropped #215 ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How Has This Been Tested? Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration. # Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/268 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/buttonEvents/Claim.ts | 8 ++++++++ src/client/client.ts | 7 +++++-- src/contracts/AppBaseEntity.ts | 6 ++++++ src/timers/PurgeClaims.ts | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/timers/PurgeClaims.ts diff --git a/src/buttonEvents/Claim.ts b/src/buttonEvents/Claim.ts index 4f7f5ae..04c7f7f 100644 --- a/src/buttonEvents/Claim.ts +++ b/src/buttonEvents/Claim.ts @@ -20,6 +20,14 @@ export default class Claim extends ButtonEvent { const droppedBy = interaction.customId.split(" ")[3]; const userId = interaction.user.id; + const whenDropped = interaction.message.createdAt; + const lastClaimableDate = new Date(Date.now() - (1000 * 60 * 5)); // 5 minutes ago + + if (whenDropped < lastClaimableDate) { + await interaction.channel.send(`${interaction.user}, Cards can only be claimed within 5 minutes of it being dropped!`); + return; + } + AppLogger.LogSilly("Button/Claim", `Parameters: cardNumber=${cardNumber}, claimId=${claimId}, droppedBy=${droppedBy}, userId=${userId}`); const user = await User.FetchOneById(User, userId) || new User(userId, CardConstants.StartingCurrency); diff --git a/src/client/client.ts b/src/client/client.ts index 384843d..117bdb9 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -16,6 +16,7 @@ import { SeriesMetadata } from "../contracts/SeriesMetadata"; import AppLogger from "./appLogger"; import TimerHelper from "../helpers/TimerHelper"; import GiveCurrency from "../timers/GiveCurrency"; +import PurgeClaims from "../timers/PurgeClaims"; export class CoreClient extends Client { private static _commandItems: ICommandItem[]; @@ -79,8 +80,10 @@ export class CoreClient extends Client { .then(() => { AppLogger.LogInfo("Client", "App Data Source Initialised"); - const timerId = this._timerHelper.AddTimer("*/20 * * * *", "Europe/London", GiveCurrency, false); - this._timerHelper.StartTimer(timerId); + this._timerHelper.AddTimer("*/20 * * * *", "Europe/London", GiveCurrency, false); + this._timerHelper.AddTimer("0 0 * * *", "Europe/London", PurgeClaims, false); + + this._timerHelper.StartAllTimers(); }) .catch(err => { AppLogger.LogError("Client", "App Data Source Initialisation Failed"); diff --git a/src/contracts/AppBaseEntity.ts b/src/contracts/AppBaseEntity.ts index 3eb9684..43bed74 100644 --- a/src/contracts/AppBaseEntity.ts +++ b/src/contracts/AppBaseEntity.ts @@ -39,6 +39,12 @@ export default class AppBaseEntity { await repository.remove(entity); } + public static async RemoveMany(target: EntityTarget, entity: T[]): Promise { + const repository = AppDataSource.getRepository(target); + + await repository.remove(entity); + } + public static async FetchAll(target: EntityTarget, relations?: string[]): Promise { const repository = AppDataSource.getRepository(target); diff --git a/src/timers/PurgeClaims.ts b/src/timers/PurgeClaims.ts new file mode 100644 index 0000000..a0ed9d0 --- /dev/null +++ b/src/timers/PurgeClaims.ts @@ -0,0 +1,14 @@ +import AppLogger from "../client/appLogger"; +import Claim from "../database/entities/app/Claim"; + +export default async function PurgeClaims() { + const claims = await Claim.FetchAll(Claim); + + const whenLastClaimable = new Date(Date.now() - (1000 * 60 * 5)); // 5 minutes ago + + const expiredClaims = claims.filter(x => x.WhenCreated < whenLastClaimable); + + await Claim.RemoveMany(Claim, expiredClaims); + + AppLogger.LogInfo("Timers/PurgeClaims", `Purged ${expiredClaims.length} claims from the database`); +} \ No newline at end of file From 599328a3c198fe10900b7968bcd36bb4e813baf0 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 22 Jun 2024 10:16:17 +0100 Subject: [PATCH 05/31] Add to logger the ability to log to a discord webhook (#270) # Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - Add to the logger a discord webhook transport - Add to the deployment script the ability to setup the webhook #235 ## Type of change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration. # Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/270 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- .env.example | 4 + .forgejo/workflows/production.yml | 6 +- .forgejo/workflows/stage.yml | 6 +- package.json | 3 +- src/client/appLogger.ts | 15 +++- yarn.lock | 134 +++++++++++++++++++++++++++++- 6 files changed, 160 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index d660884..0b0bb2d 100644 --- a/.env.example +++ b/.env.example @@ -14,6 +14,10 @@ BOT_CLIENTID=682942374040961060 BOT_ENV=4 BOT_ADMINS=147392775707426816,887272961504071690 BOT_LOGLEVEL=info +BOT_LOG_DISCORD_ENABLE=false +BOT_LOG_DISCORD_LEVEL=warn +BOT_LOG_DISCORD_WEBHOOK= +BOT_LOG_DISCORD_SERVICE= ABOUT_FUNDING= ABOUT_REPO= diff --git a/.forgejo/workflows/production.yml b/.forgejo/workflows/production.yml index 19ce662..1bbf28f 100644 --- a/.forgejo/workflows/production.yml +++ b/.forgejo/workflows/production.yml @@ -55,12 +55,16 @@ jobs: GDRIVESYNC_AUTO: ${{ vars.PROD_GDRIVESYNC_AUTO }} EXPRESS_PORT: ${{ secrets.PROD_EXPRESS_PORT }} BOT_LOGLEVEL: ${{ vars.PROD_BOT_LOGLEVEL }} + BOT_LOG_DISCORD_ENABLE: ${{ vars.PROD_BOT_LOG_DISCORD_ENABLE }} + BOT_LOG_DISCORD_LEVEL: ${{ vars.PROD_BOT_LOG_DISCORD_LEVEL }} + BOT_LOG_DISCORD_WEBHOOK: ${{ secrets.PROD_BOT_LOG_DISCORD_WEBHOOK }} + BOT_LOG_DISCORD_SERVICE: ${{ vars.PROD_BOT_LOG_DISCORD_SERVICE }} with: host: ${{ secrets.PROD_SSH_HOST }} username: ${{ secrets.PROD_SSH_USER }} key: ${{ secrets.PROD_SSH_KEY }} port: ${{ secrets.PROD_SSH_PORT }} - envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,BOT_ENV,BOT_ADMINS,DATA_DIR,GDRIVESYNC_AUTO,SERVER_PATH,EXPRESS_PORT,BOT_LOGLEVEL + envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,BOT_ENV,BOT_ADMINS,DATA_DIR,GDRIVESYNC_AUTO,SERVER_PATH,EXPRESS_PORT,BOT_LOGLEVEL,BOT_LOG_DISCORD_ENABLE,BOT_LOG_DISCORD_LEVEL,BOT_LOG_DISCORD_WEBHOOK,BOT_LOG_DISCORD_SERVICE script: | source .sshrc \ && cd /home/vylpes/apps/card-drop/card-drop_prod \ diff --git a/.forgejo/workflows/stage.yml b/.forgejo/workflows/stage.yml index 37ff5ea..b245d95 100644 --- a/.forgejo/workflows/stage.yml +++ b/.forgejo/workflows/stage.yml @@ -55,12 +55,16 @@ jobs: GDRIVESYNC_AUTO: ${{ vars.STAGE_GDRIVESYNC_AUTO }} EXPRESS_PORT: ${{ secrets.STAGE_EXPRESS_PORT }} BOT_LOGLEVEL: ${{ vars.STAGE_BOT_LOGLEVEL }} + BOT_LOG_DISCORD_ENABLE: ${{ vars.STAGE_BOT_LOG_DISCORD_ENABLE }} + BOT_LOG_DISCORD_LEVEL: ${{ vars.STAGE_BOT_LOG_DISCORD_LEVEL }} + BOT_LOG_DISCORD_WEBHOOK: ${{ secrets.STAGE_BOT_LOG_DISCORD_WEBHOOK }} + BOT_LOG_DISCORD_SERVICE: ${{ vars.STAGE_BOT_LOG_DISCORD_SERVICE }} with: host: ${{ secrets.STAGE_SSH_HOST }} username: ${{ secrets.STAGE_SSH_USER }} key: ${{ secrets.STAGE_SSH_KEY }} port: ${{ secrets.STAGE_SSH_PORT }} - envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,BOT_ENV,BOT_ADMINS,DATA_DIR,GDRIVESYNC_AUTO,SERVER_PATH,EXPRESS_PORT,BOT_LOGLEVEL + envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,BOT_ENV,BOT_ADMINS,DATA_DIR,GDRIVESYNC_AUTO,SERVER_PATH,EXPRESS_PORT,BOT_LOGLEVEL,BOT_LOG_DISCORD_ENABLE,BOT_LOG_DISCORD_LEVEL,BOT_LOG_DISCORD_WEBHOOK,BOT_LOG_DISCORD_SERVICE script: | source .sshrc \ && cd /home/vylpes/apps/card-drop/card-drop_stage \ diff --git a/package.json b/package.json index a08fd37..ab816be 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "mysql": "^2.18.1", "ts-jest": "^29.0.0", "typeorm": "0.3.20", - "winston": "^3.11.0" + "winston": "^3.11.0", + "winston-discord-transport": "^1.3.0" }, "overrides": { "undici": "^5.28.3" diff --git a/src/client/appLogger.ts b/src/client/appLogger.ts index c5d022b..428559c 100644 --- a/src/client/appLogger.ts +++ b/src/client/appLogger.ts @@ -1,4 +1,5 @@ import { Logger, createLogger, format, transports } from "winston"; +import DiscordTransport from "winston-discord-transport"; export default class AppLogger { public static Logger: Logger; @@ -20,7 +21,7 @@ export default class AppLogger { ), defaultMeta: { service: "bot" }, transports: [ - new transports.File({ filename: "error.log", level: "error" }), + new transports.File({ filename: "priority.log", level: "warn" }), new transports.File({ filename: "combined.log" }), ], }); @@ -34,6 +35,18 @@ export default class AppLogger { )})); } + if (process.env.BOT_LOG_DISCORD_ENABLE == "true") { + if (process.env.BOT_LOG_DISCORD_WEBHOOK) { + logger.add(new DiscordTransport({ + webhook: process.env.BOT_LOG_DISCORD_WEBHOOK.toString(), + defaultMeta: { service: process.env.BOT_LOG_DISCORD_SERVICE }, + level: process.env.BOT_LOG_DISCORD_LEVEL, + })); + } else { + throw "BOT_LOG_DISCORD_WEBHOOK is required to enable discord logger support."; + } + } + AppLogger.Logger = logger; AppLogger.LogInfo("AppLogger", `Log Level: ${logLevel}`); diff --git a/yarn.lock b/yarn.lock index 533dc59..198c565 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1327,6 +1327,11 @@ async@^3.2.3: resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -1836,6 +1841,11 @@ color@^3.1.3: color-convert "^1.9.3" color-string "^1.6.0" +colors@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + colorspace@1.1.x: version "1.1.4" resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.4.tgz#8d442d1186152f60453bf8070cd66eb364e59243" @@ -1844,6 +1854,13 @@ colorspace@1.1.x: color "^3.1.3" text-hex "1.0.x" +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + commander-version@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/commander-version/-/commander-version-1.1.0.tgz#fbfaea4632921a42f8f855f96bcaa3d9920a6296" @@ -1857,6 +1874,11 @@ commander@^6.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +component-emitter@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17" + integrity sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1908,6 +1930,11 @@ cookie@0.6.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +cookiejar@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b" + integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw== + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -2069,6 +2096,11 @@ del@^7.1.0: rimraf "^3.0.2" slash "^4.0.0" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -2489,6 +2521,11 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-safe-stringify@^2.0.4, fast-safe-stringify@^2.0.7: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -2503,6 +2540,11 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fecha@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd" + integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg== + fecha@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" @@ -2610,6 +2652,20 @@ form-data-encoder@^2.1.2: resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +formidable@^1.2.1: + version "1.2.6" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.6.tgz#d2a51d60162bbc9b4a055d8457a7c75315d1a168" + integrity sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ== + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -3981,6 +4037,17 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" +logform@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.1.2.tgz#957155ebeb67a13164069825ce67ddb5bb2dd360" + integrity sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ== + dependencies: + colors "^1.2.1" + fast-safe-stringify "^2.0.4" + fecha "^2.3.3" + ms "^2.1.1" + triple-beam "^1.3.0" + logform@^2.3.2, logform@^2.4.0: version "2.6.0" resolved "https://registry.yarnpkg.com/logform/-/logform-2.6.0.tgz#8c82a983f05d6eaeb2d75e3decae7a768b2bf9b5" @@ -4069,7 +4136,7 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@~1.1.2: +methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== @@ -4087,7 +4154,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -4099,6 +4166,11 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mime@^2.4.4: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -4771,6 +4843,13 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" +qs@^6.9.1: + version "6.12.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" + integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + dependencies: + side-channel "^1.0.6" + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -4857,6 +4936,19 @@ readable-stream@2.3.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" @@ -5128,7 +5220,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: +side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== @@ -5374,6 +5466,23 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +superagent@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-5.2.2.tgz#6ff726c5642795b2c27009e92687c8e69a6bb07d" + integrity sha512-pMWBUnIllK4ZTw7p/UaobiQPwAO5w/1NRRTDpV0FTVNmECztsxKspj3ZWEordVEaqpZtmOQJJna4yTLyC/q7PQ== + dependencies: + component-emitter "^1.3.0" + cookiejar "^2.1.2" + debug "^4.1.1" + fast-safe-stringify "^2.0.7" + form-data "^3.0.0" + formidable "^1.2.1" + methods "^1.1.2" + mime "^2.4.4" + qs "^6.9.1" + readable-stream "^3.4.0" + semver "^6.3.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -5503,7 +5612,7 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -triple-beam@^1.3.0: +triple-beam@^1.2.0, triple-beam@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== @@ -5792,6 +5901,23 @@ widest-line@^4.0.1: dependencies: string-width "^5.0.1" +winston-discord-transport@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/winston-discord-transport/-/winston-discord-transport-1.3.0.tgz#5fcef49a1a4838183921a44d6df029af55a5c8d0" + integrity sha512-oyns2ea9cQie+qBTTgfZq17pTRie41tEIE38s4ZR5ifSp4E0n8hAD7XBoLXxV0xJwLjm8IPBKzETtG8L9AvVfg== + dependencies: + logform "2.1.2" + superagent "5.2.2" + winston-transport "4.3.0" + +winston-transport@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.3.0.tgz#df68c0c202482c448d9b47313c07304c2d7c2c66" + integrity sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A== + dependencies: + readable-stream "^2.3.6" + triple-beam "^1.2.0" + winston-transport@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.0.tgz#e302e6889e6ccb7f383b926df6936a5b781bd1f0" From 146f0dbf5a1a95c07a63d34d12a418b16a42092b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 25 Jun 2024 17:46:26 +0100 Subject: [PATCH 06/31] Update dependency @types/node to v20.14.8 (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | patch | [`20.14.0` -> `20.14.8`](https://renovatebot.com/diffs/npm/@types%2fnode/20.14.0/20.14.8) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/266 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 198c565..df248ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -970,9 +970,9 @@ integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== "@types/node@*", "@types/node@^20.0.0": - version "20.14.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.0.tgz#49ceec7b34f8621470cff44677fa9d461a477f17" - integrity sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA== + version "20.14.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" + integrity sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA== dependencies: undici-types "~5.26.4" From 1841b49da6a628dd8878fb958a4e057abbd8ca3b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 25 Jun 2024 17:47:51 +0100 Subject: [PATCH 07/31] Update dependency @typescript-eslint/eslint-plugin to v7 (#267) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://github.com/typescript-eslint/typescript-eslint)) | devDependencies | major | [`^6.16.0` -> `^7.0.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/6.21.0/7.13.1) | --- ### Release Notes
typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin) ### [`v7.13.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7131-2024-06-17) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.13.0...v7.13.1) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-readonly] refine report locations - **eslint-plugin:** \[return-await] support explicit resource management - **eslint-plugin:** \[no-unsafe-member-access] differentiate a types-error any from a true any ##### ❤️ Thank You - Kirk Waiblinger - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7130-2024-06-10) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.12.0...v7.13.0) ##### 🚀 Features - **typescript-estree:** require `import = require()` argument to be a string literal - **typescript-estree:** forbid `.body`, `.async`, `.generator` on `declare function` - **eslint-plugin:** \[no-dynamic-delete] allow all string literals as index ##### 🩹 Fixes - **ast-spec:** function-call-like callee should be Expression not LeftHandSideExpression - **scope-manager:** handle index signature in class - **eslint-plugin:** \[init-declarations] refine report locations - **eslint-plugin:** \[no-base-to-string] make error message more nuanced - **eslint-plugin:** \[no-unsafe-assignment] be more specific about error types - **eslint-plugin:** \[no-magic-numbers] fix implementation of the `ignore` option ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.12.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7120-2024-06-03) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.11.0...v7.12.0) ##### 🚀 Features - **eslint-plugin:** \[no-useless-template-literals] rename to `no-useless-template-expression` (deprecate `no-useless-template-literals`) - **rule-tester:** check for parsing errors in suggestion fixes - **rule-tester:** port `checkDuplicateTestCases` from ESLint - **eslint-plugin:** \[no-floating-promises] add option 'allowForKnownSafePromises' ##### 🩹 Fixes - no-useless-template-expression -> no-unnecessary-template-expression - **eslint-plugin:** \[no-unnecessary-type-assertion] combine template literal check with `const` variable check - **eslint-plugin:** \[dot-notation] fix false positive when accessing private/protected property with optional chaining - **eslint-plugin:** \[explicit-member-accessibility] refine report locations - **eslint-plugin:** \[no-unnecessary-type-assertion] declares are always defined, so always check `declare`s - **eslint-plugin:** \[prefer-literal-enum-member] allow using member it self on allowBitwiseExpressions - **eslint-plugin:** \[return-await] clean up in-try-catch detection and make autofixes safe - **eslint-plugin:** \[member-ordering] also TSMethodSignature can be get/set ##### ❤️ Thank You - Abraham Guo - Han Yeong-woo - Joshua Chen - Kim Sang Du - Kirk Waiblinger - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.11.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7110-2024-05-27) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.10.0...v7.11.0) ##### 🚀 Features - **eslint-plugin:** deprecate prefer-ts-expect-error in favor of ban-ts-comment ##### 🩹 Fixes - **eslint-plugin:** \[consistent-type-assertions] prevent syntax errors on arrow functions ##### ❤️ Thank You - Abraham Guo - auvred - Dom Armstrong - Kirk Waiblinger You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.10.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7100-2024-05-20) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.9.0...v7.10.0) ##### 🚀 Features - **eslint-plugin:** \[sort-type-constituents] support case sensitive sorting ##### 🩹 Fixes - **eslint-plugin:** \[prefer-regexp-exec] fix heuristic to check whether regex may contain global flag ##### ❤️ Thank You - auvred - Emanuel Hoogeveen - jsfm01 - Kirk Waiblinger You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.9.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#790-2024-05-13) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.8.0...v7.9.0) ##### 🩹 Fixes - **eslint-plugin:** \[explicit-function-return-types] fix false positive on default parameters ##### ❤️ Thank You - Kirk Waiblinger - Sheetal Nandi - Vinccool96 You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.8.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#780-2024-04-29) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.7.1...v7.8.0) ##### 🩹 Fixes - **eslint-plugin:** \[no-unsafe-argument] handle tagged templates - **eslint-plugin:** \[prefer-optional-chain] suggests optional chaining during strict null equality check - **eslint-plugin:** \[consistent-type-assertions] handle tagged templates - **eslint-plugin:** \[no-unsafe-return] handle union types - **eslint-plugin:** \[no-unused-vars] clear error report range ##### ❤️ Thank You - auvred - Josh Goldberg ✨ - jsfm01 - Kim Sang Du - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.7.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#771-2024-04-22) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.7.0...v7.7.1) ##### 🩹 Fixes - **eslint-plugin:** \[no-unsafe-assignment] handle shorthand property assignment - **eslint-plugin:** \[explicit-function-return-type] fix checking wrong ancestor's return type - **eslint-plugin:** \[prefer-optional-chain] only look at left operand for `requireNullish` - **eslint-plugin:** \[no-for-in-array] refine report location - **eslint-plugin:** \[no-unnecessary-type-assertion] allow non-null assertion for void type ##### ❤️ Thank You - Abraham Guo - Kirk Waiblinger - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.7.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#770-2024-04-15) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.6.0...v7.7.0) ##### 🚀 Features - **eslint-plugin:** replace `no-new-symbol` with `no-new-native-nonconstructor` ##### ❤️ Thank You - Dave - Josh Goldberg ✨ You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.6.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#760-2024-04-08) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.5.0...v7.6.0) ##### 🚀 Features - bump npm dependency ranges ##### ❤️ Thank You - Abraham Guo - auvred - Brad Zacher You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.5.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#750-2024-04-01) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.4.0...v7.5.0) ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] handle TaggedTemplateExpression - **eslint-plugin:** \[no-unnecessary-type-assertion] handle exactOptionalPropertyTypes compiler option ##### ❤️ Thank You - Brad Zacher - Kim Sang Du - Mark de Dios - Naru - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.4.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#740-2024-03-25) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.3.1...v7.4.0) ##### 🚀 Features - **eslint-plugin:** \[consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata - **eslint-plugin:** \[no-unnecessary-type-arguments] handle tagged templates - **eslint-plugin:** deprecate no-throw-literal and add a renamed only-throw-error ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chain] address multipart nullish checks false positive - **eslint-plugin:** \[prefer-optional-chain] properly disambiguate between `boolean` and `false` - **eslint-plugin:** \[no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside ##### ❤️ Thank You - Abraham Guo - Brad Zacher - Josh Goldberg ✨ - Kim Sang Du - Kirk Waiblinger - Marco Pasqualetti - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.3.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#731-2024-03-18) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.3.0...v7.3.1) ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] revert disable of ignoreVoid in strict config ##### ❤️ Thank You - Josh Goldberg ✨ You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.3.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#730-2024-03-18) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.2.0...v7.3.0) ##### 🚀 Features - **eslint-plugin:** \[restrict-template-expressions] add `allowArray` option - **eslint-plugin:** add meta.docs.recommended setting for strict config options - **eslint-plugin:** add rule `use-unknown-in-catch-callback-variables` - **eslint-plugin:** \[prefer-reduce-type-parameter] supports tuple, union, intersection ##### 🩹 Fixes - correct `engines.node` constraints in `package.json` - **eslint-plugin:** \[unbound-method] check method definition in object literal using longhand form - **eslint-plugin:** \[consistent-type-imports] handle imports without specifiers - **eslint-plugin:** \[no-redundant-type-constituents] incorrectly marks & string as redundant - **eslint-plugin:** \[no-unnecessary-qualifier] handle merge namespace with enum - **eslint-plugin:** \[no-unused-expressions] false negatives when using assertions - **eslint-plugin:** \[ban-ts-comment] more accurate handling of multiline comments - **eslint-plugin:** \[explicit-function-return-type, explicit-module-boundary-types] improved checking for allowHigherOrderFunctions option - **eslint-plugin:** \[class-literal-property-style] ignore property assigned in constructor - **eslint-plugin:** \[no-unnecessary-type-assertion] fix false negative for const variable declarations ##### ❤️ Thank You - Abraham Guo - Alexu - Arka Pratim Chaudhuri - auvred - Derrick Isaacson - fnx - Josh Goldberg ✨ - Kirk Waiblinger - Marta Cardoso - Michaël De Boey - Tristan Rasmussen - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.2.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#720-2024-03-11) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.1.1...v7.2.0) ##### 🚀 Features - support TS 5.4 - **eslint-plugin:** \[prefer-string-starts-ends-with] add allowSingleElementEquality option ##### 🩹 Fixes - **eslint-plugin:** expose \*-type-checked-only configs for extension - **eslint-plugin:** \[member-ordering] report alphabetical sorting for all groups instead of just the first failing group - **eslint-plugin:** \[no-var-requires, no-require-imports] support template literal - **eslint-plugin:** \[no-useless-template-literals] detect TemplateLiteral - **eslint-plugin:** \[no-unnecessary-condition] handle union array and tuple type - **eslint-plugin:** \[prefer-find] support ternary branches in prefer-find ##### ❤️ Thank You - Arka Pratim Chaudhuri - auvred - Chris Plummer - Fotis Papadogeorgopoulos - Josh Goldberg ✨ - Kirk Waiblinger - Wayne Zhang - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.1.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#711-2024-03-04) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.1.0...v7.1.1) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.1.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#710-2024-02-26) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.0.2...v7.1.0) ##### 🚀 Features - **eslint-plugin:** add \*-type-checked-only configs - **eslint-plugin:** \[naming-convention] support the auto-accessor syntax - **eslint-plugin:** \[consistent-return] add new rule ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chan] allow typeof for avoiding reference error - **eslint-plugin:** \[no-misused-promises] improve check union types - **eslint-plugin:** \[no-use-before-define] fix false positive type reference in as, satisfies ##### ❤️ Thank You - Arka Pratim Chaudhuri - Josh Goldberg ✨ - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.0.2`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#702-2024-02-19) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.0.1...v7.0.2) ##### 🩹 Fixes - fix tsconfig-less check errors, fix `@types/eslint` incompatibilities, add tests ##### ❤️ Thank You - Brad Zacher - Gareth Jones You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.0.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#701-2024-02-12) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.0.0...v7.0.1) ##### 🩹 Fixes - **eslint-plugin:** update peer dep for parser ##### ❤️ Thank You - Tim Dorr You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.0.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#700-2024-02-12) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v6.21.0...v7.0.0) ##### 🚀 Features - ⚠️ bump ESLint, NodeJS, and TS minimum version requirements - add support for flat configs ##### 🩹 Fixes - **eslint-plugin:** \[prefer-find] stop throwing type errors when converting symbols to numbers ##### ⚠️ Breaking Changes - ⚠️ bump ESLint, NodeJS, and TS minimum version requirements ##### ❤️ Thank You - Brad Zacher - Kirk Waiblinger - StyleShit - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.21.0 (2024-02-05) ##### 🚀 Features - export plugin metadata - allow `parserOptions.project: false` - **eslint-plugin:** add rule prefer-find ##### 🩹 Fixes - **eslint-plugin:** \[no-unused-vars] don't report on types referenced in export assignment expression - **eslint-plugin:** \[switch-exhaustiveness-check] better support for intersections, infinite types, non-union values - **eslint-plugin:** \[consistent-type-imports] dont report on types used in export assignment expressions - **eslint-plugin:** \[no-unnecessary-condition] handle left-hand optional with exactOptionalPropertyTypes option - **eslint-plugin:** \[class-literal-property-style] allow getter when same key setter exists - **eslint-plugin:** \[no-unnecessary-type-assertion] provide valid fixes for assertions with extra tokens before `as` keyword ##### ❤️ Thank You - auvred - Brad Zacher - Kirk Waiblinger - Pete Gonzalez - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.20.0 (2024-01-29) ##### 🚀 Features - **eslint-plugin:** \[member-ordering] allow easy reuse of the default ordering ##### 🩹 Fixes - **eslint-plugin:** \[no-useless-template-literals] incorrect bigint autofix result - **eslint-plugin:** \[prefer-nullish-coalescing] treat any/unknown as non-nullable - **eslint-plugin:** \[no-useless-template-literals] report Infinity & NaN - **eslint-plugin:** \[prefer-readonly] disable checking accessors ##### ❤️ Thank You - Alex Parloti - auvred - James Browning - StyleShit - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.19.1 (2024-01-22) ##### 🩹 Fixes - **type-utils:** preventing isUnsafeAssignment infinite recursive calls - **eslint-plugin:** \[no-unnecessary-condition] fix false positive for type variable ##### ❤️ Thank You - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.19.0 (2024-01-15) ##### 🚀 Features - **eslint-plugin:** \[prefer-promise-reject-errors] add rule - **eslint-plugin:** \[no-array-delete] add new rule - **eslint-plugin:** \[no-useless-template-literals] add fix suggestions ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression - **eslint-plugin:** \[no-unnecesary-type-assertion] treat unknown/any as nullable ##### ❤️ Thank You - auvred - Brad Zacher - Josh Goldberg ✨ - Joshua Chen - LJX - Steven - StyleShit You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.18.1 (2024-01-08) ##### 🩹 Fixes - **eslint-plugin:** \[no-non-null-assertion] provide valid fix when member access is on next line - **eslint-plugin:** \[no-unnecessary-condition] improve checking optional callee - **eslint-plugin:** \[prefer-readonly] support modifiers of unions and intersections - **eslint-plugin:** \[switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option ##### ❤️ Thank You - auvred - James - Josh Goldberg ✨ - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. #### 6.18.0 (2024-01-06) ##### 🚀 Features - **typescript-estree:** throw on invalid update expressions - **eslint-plugin:** \[no-var-requires, no-require-imports] allow option ##### ❤️ Thank You - auvred - Joshua Chen You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/267 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- yarn.lock | 108 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 65 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index ab816be..b57da6a 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@types/node": "^20.0.0", - "@typescript-eslint/eslint-plugin": "^6.16.0", + "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^6.16.0", "eslint": "^8.56.0", "np": "^9.0.0", diff --git a/yarn.lock b/yarn.lock index df248ea..3bb454c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -392,7 +392,7 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": version "4.10.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== @@ -947,11 +947,6 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@^7.0.12": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - "@types/keyv@^3.1.4": version "3.1.4" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" @@ -998,11 +993,6 @@ dependencies: "@types/node" "*" -"@types/semver@^7.5.0": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/send@*": version "0.17.4" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" @@ -1054,22 +1044,20 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^6.16.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" - integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== +"@typescript-eslint/eslint-plugin@^7.0.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.12.0.tgz#f87a32e8972b8a60024f2f8f12205e7c8108bc41" + integrity sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q== dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/type-utils" "6.21.0" - "@typescript-eslint/utils" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.12.0" + "@typescript-eslint/type-utils" "7.12.0" + "@typescript-eslint/utils" "7.12.0" + "@typescript-eslint/visitor-keys" "7.12.0" graphemer "^1.4.0" - ignore "^5.2.4" + ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" "@typescript-eslint/parser@^6.16.0": version "6.21.0" @@ -1090,21 +1078,34 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/type-utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" - integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== +"@typescript-eslint/scope-manager@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.12.0.tgz#259c014362de72dd34f995efe6bd8dda486adf58" + integrity sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg== dependencies: - "@typescript-eslint/typescript-estree" "6.21.0" - "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/types" "7.12.0" + "@typescript-eslint/visitor-keys" "7.12.0" + +"@typescript-eslint/type-utils@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.12.0.tgz#9dfaaa1972952f395ec5be4f5bbfc4d3cdc63908" + integrity sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA== + dependencies: + "@typescript-eslint/typescript-estree" "7.12.0" + "@typescript-eslint/utils" "7.12.0" debug "^4.3.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" "@typescript-eslint/types@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== +"@typescript-eslint/types@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.12.0.tgz#bf208f971a8da1e7524a5d9ae2b5f15192a37981" + integrity sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg== + "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" @@ -1119,18 +1120,29 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" - integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== +"@typescript-eslint/typescript-estree@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.12.0.tgz#e6c1074f248b3db6573ab6a7c47a39c4cd498ff9" + integrity sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ== + dependencies: + "@typescript-eslint/types" "7.12.0" + "@typescript-eslint/visitor-keys" "7.12.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.12.0.tgz#c6e58fd7f724cdccc848f71e388ad80cbdb95dd0" + integrity sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - semver "^7.5.4" + "@typescript-eslint/scope-manager" "7.12.0" + "@typescript-eslint/types" "7.12.0" + "@typescript-eslint/typescript-estree" "7.12.0" "@typescript-eslint/visitor-keys@6.21.0": version "6.21.0" @@ -1140,6 +1152,14 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.12.0.tgz#c053b55a996679528beeedd8e565710ce1ae1ad3" + integrity sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ== + dependencies: + "@typescript-eslint/types" "7.12.0" + eslint-visitor-keys "^3.4.3" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -3010,7 +3030,7 @@ ignore-walk@^6.0.3: dependencies: minimatch "^9.0.0" -ignore@^5.2.0, ignore@^5.2.4: +ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -5142,7 +5162,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -5617,7 +5637,7 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== -ts-api-utils@^1.0.1: +ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== From d7b56a72b93c35c631cf151ee8d44c3df09f998d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 25 Jun 2024 17:48:35 +0100 Subject: [PATCH 08/31] Update dependency glob to v10.4.2 (#274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [glob](https://github.com/isaacs/node-glob) | dependencies | patch | [`10.4.1` -> `10.4.2`](https://renovatebot.com/diffs/npm/glob/10.4.1/10.4.2) | --- ### Release Notes
isaacs/node-glob (glob) ### [`v10.4.2`](https://github.com/isaacs/node-glob/compare/v10.4.1...v10.4.2) [Compare Source](https://github.com/isaacs/node-glob/compare/v10.4.1...v10.4.2)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/274 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3bb454c..b30f7f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2660,9 +2660,9 @@ fn.name@1.x.x: integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.2.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" + integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -2774,14 +2774,15 @@ glob-parent@^6.0.2: is-glob "^4.0.3" glob@^10.3.10: - version "10.4.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" - integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== + version "10.4.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5" + integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" minimatch "^9.0.4" minipass "^7.1.2" + package-json-from-dist "^1.0.0" path-scurry "^1.11.1" glob@^7.1.3, glob@^7.1.4: @@ -3457,9 +3458,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jackspeak@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.1.2.tgz#eada67ea949c6b71de50f1b09c92a961897b90ab" - integrity sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ== + version "3.4.0" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" + integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -4632,6 +4633,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + package-json@^8.1.0: version "8.1.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" From 9ce4d49b6a3aea605ca2ed3452915dc6ff1a2dd7 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 28 Jun 2024 18:37:58 +0100 Subject: [PATCH 09/31] Add image grid to inventory command (#277) # Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. #79 ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How Has This Been Tested? Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration. # Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/277 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- package.json | 1 + src/buttonEvents/Inventory.ts | 3 +- src/commands/drop.ts | 2 +- src/commands/inventory.ts | 3 +- src/helpers/InventoryHelper.ts | 58 ++++++- yarn.lock | 269 +++++++++++++++++++++++++++++++-- 6 files changed, 315 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index b57da6a..4f1b4a8 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@types/jest": "^29.0.0", "@types/uuid": "^9.0.0", "body-parser": "^1.20.2", + "canvas": "^2.11.2", "clone-deep": "^4.0.1", "cron": "^3.1.7", "discord.js": "^14.15.3", diff --git a/src/buttonEvents/Inventory.ts b/src/buttonEvents/Inventory.ts index 7dfb305..3ce9751 100644 --- a/src/buttonEvents/Inventory.ts +++ b/src/buttonEvents/Inventory.ts @@ -25,6 +25,7 @@ export default class Inventory extends ButtonEvent { const embed = await InventoryHelper.GenerateInventoryPage(member.user.username, member.user.id, Number(page)); await interaction.update({ + files: [ embed.image ], embeds: [ embed.embed ], components: [ embed.row ], }); @@ -34,4 +35,4 @@ export default class Inventory extends ButtonEvent { await interaction.reply("No page for user found."); } } -} \ No newline at end of file +} diff --git a/src/commands/drop.ts b/src/commands/drop.ts index ab6c339..dc66ad8 100644 --- a/src/commands/drop.ts +++ b/src/commands/drop.ts @@ -88,4 +88,4 @@ export default class Drop extends Command { } } -} \ No newline at end of file +} diff --git a/src/commands/inventory.ts b/src/commands/inventory.ts index 217cb63..167c3d9 100644 --- a/src/commands/inventory.ts +++ b/src/commands/inventory.ts @@ -38,6 +38,7 @@ export default class Inventory extends Command { const embed = await InventoryHelper.GenerateInventoryPage(user.username, user.id, pageNumber); await interaction.reply({ + files: [ embed.image ], embeds: [ embed.embed ], components: [ embed.row ], }); @@ -47,4 +48,4 @@ export default class Inventory extends Command { await interaction.reply("No page for user found."); } } -} \ No newline at end of file +} diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index 8792ea6..287bfe9 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -1,10 +1,12 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js"; +import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js"; import Inventory from "../database/entities/app/Inventory"; import { CoreClient } from "../client/client"; import EmbedColours from "../constants/EmbedColours"; import { CardRarity, CardRarityToString } from "../constants/CardRarity"; import cloneDeep from "clone-deep"; import AppLogger from "../client/appLogger"; +import { createCanvas, loadImage } from "canvas"; +import path from "path"; interface InventoryPage { id: number, @@ -18,10 +20,18 @@ interface InventoryPageCards { name: string, type: CardRarity, quantity: number, + path: string, } +interface ReturnedInventoryPage { + embed: EmbedBuilder, + row: ActionRowBuilder, + image: AttachmentBuilder, +} + + export default class InventoryHelper { - public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder }> { + public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise { AppLogger.LogSilly("Helpers/InventoryHelper", `Parameters: username=${username}, userid=${userid}, page=${page}`); const cardsPerPage = 15; @@ -62,6 +72,7 @@ export default class InventoryHelper { name: card.name, type: card.type, quantity: item.Quantity, + path: card.path, }); } @@ -85,7 +96,8 @@ export default class InventoryHelper { .setTitle(username) .setDescription(`**${currentPage.name} (${currentPage.seriesSubpage + 1})**\n${currentPage.cards.map(x => `[${x.id}] ${x.name} (${CardRarityToString(x.type)}) x${x.quantity}`).join("\n")}`) .setFooter({ text: `Page ${page + 1} of ${pages.length}` }) - .setColor(EmbedColours.Ok); + .setColor(EmbedColours.Ok) + .setImage("attachment://page.png"); const row = new ActionRowBuilder() .addComponents( @@ -100,6 +112,42 @@ export default class InventoryHelper { .setStyle(ButtonStyle.Primary) .setDisabled(page + 1 == pages.length)); - return { embed, row }; + const buffer = await this.GenerateInventoryImage(currentPage); + const image = new AttachmentBuilder(buffer, { name: "page.png" }); + + return { embed, row, image }; } -} \ No newline at end of file + + private static async GenerateInventoryImage(page: InventoryPage): Promise { + const gridSize = 3; + const imageWidth = 526; + const imageHeight = 712; + + const canvasWidth = imageWidth * gridSize; + const canvasHeight = imageHeight * Math.floor((gridSize ** 2) / gridSize); + + const canvas = createCanvas(canvasWidth, canvasHeight); + const ctx = canvas.getContext("2d"); + + for (let i = 0; i < page.cards.length; i++) { + const card = page.cards[i]; + + const image = await loadImage(path.join(process.env.DATA_DIR!, "cards", card.path)); + + if (!image) { + AppLogger.LogError("InventoryHelper/GenerateInventoryImage", `Failed to load image for card ${card.id}`); + continue; + } + + const x = i % gridSize; + const y = Math.floor(i / gridSize); + + const imageX = imageWidth * x; + const imageY = imageHeight * y; + + ctx.drawImage(image, imageX, imageY); + } + + return canvas.toBuffer(); + } +} diff --git a/yarn.lock b/yarn.lock index b30f7f1..0f94b06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -700,6 +700,21 @@ dependencies: call-bind "^1.0.7" +"@mapbox/node-pre-gyp@^1.0.0": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" + integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== + dependencies: + detect-libc "^2.0.0" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.7" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1170,6 +1185,11 @@ resolved "https://registry.yarnpkg.com/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz#d3537432c6db6444680a596271dff8ea407343b3" integrity sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -1188,6 +1208,13 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + aggregate-error@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-4.0.1.tgz#25091fe1573b9e0be892aeda15c7c66a545f758e" @@ -1320,6 +1347,19 @@ app-root-path@^3.1.0: resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1641,6 +1681,15 @@ caniuse-lite@^1.0.30001587: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz#8071c42d468e06ed2fb2c545efe79a663fd326ab" integrity sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw== +canvas@^2.11.2: + version "2.11.2" + resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.11.2.tgz#553d87b1e0228c7ac0fc72887c3adbac4abbd860" + integrity sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw== + dependencies: + "@mapbox/node-pre-gyp" "^1.0.0" + nan "^2.17.0" + simple-get "^3.0.3" + chalk-template@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/chalk-template/-/chalk-template-1.1.0.tgz#ffc55db6dd745e9394b85327c8ac8466edb7a7b1" @@ -1691,6 +1740,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + ci-info@^3.2.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" @@ -1853,6 +1907,11 @@ color-string@^1.6.0: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^3.1.3: version "3.2.1" resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" @@ -1923,6 +1982,11 @@ configstore@^6.0.0: write-file-atomic "^3.0.3" xdg-basedir "^5.0.1" +console-control-strings@^1.0.0, console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== + content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -2024,13 +2088,20 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== dependencies: ms "2.1.2" +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" @@ -2121,6 +2192,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -2131,6 +2207,11 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-libc@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2696,6 +2777,13 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2711,6 +2799,21 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -2936,6 +3039,11 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + has-yarn@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" @@ -2997,6 +3105,14 @@ http2-wrapper@^2.1.10: quick-lru "^5.1.1" resolve-alpn "^1.2.0" +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -4113,6 +4229,13 @@ magic-bytes.js@^1.10.0: resolved "https://registry.yarnpkg.com/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz#c41cf4bc2f802992b05e64962411c9dd44fdef92" integrity sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ== +make-dir@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -4217,6 +4340,11 @@ mimic-response@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -4253,11 +4381,36 @@ minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mkdirp@^2.1.3: version "2.1.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" @@ -4312,6 +4465,11 @@ mz@^2.4.0: object-assign "^4.0.1" thenify-all "^1.0.0" +nan@^2.17.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" + integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4329,6 +4487,13 @@ new-github-release-url@^2.0.0: dependencies: type-fest "^2.5.1" +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4339,6 +4504,13 @@ node-releases@^2.0.14: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-package-data@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.1.tgz#fa69e9452210f0fabf4d79ee08d0c2870c51ed88" @@ -4438,12 +4610,22 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -5163,7 +5345,7 @@ semver-diff@^4.0.0: dependencies: semver "^7.3.5" -semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -5202,6 +5384,11 @@ serve-static@1.15.0: parseurl "~1.3.3" send "0.18.0" +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -5256,7 +5443,7 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -5266,6 +5453,20 @@ signal-exit@^4.0.1, signal-exit@^4.1.0: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" + integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + simple-swizzle@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" @@ -5385,15 +5586,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5402,6 +5595,14 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -5558,6 +5759,18 @@ symbol-observable@^4.0.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== +tar@^6.1.11: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terminal-link@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-3.0.0.tgz#91c82a66b52fc1684123297ce384429faf72ac5c" @@ -5638,6 +5851,11 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + triple-beam@^1.2.0, triple-beam@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" @@ -5913,6 +6131,19 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -5920,6 +6151,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + widest-line@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" @@ -6062,6 +6300,11 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" From a0a864ef444602f8ac4a3e1b348590e305cb61b1 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 28 Jun 2024 18:47:41 +0100 Subject: [PATCH 10/31] Update inventory helper to generate image height dynamically based on card amount --- src/helpers/InventoryHelper.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index 287bfe9..d464c39 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -119,12 +119,14 @@ export default class InventoryHelper { } private static async GenerateInventoryImage(page: InventoryPage): Promise { - const gridSize = 3; + const gridWidth = 3; + const gridHeight = Math.ceil(page.cards.length / gridWidth); + const imageWidth = 526; const imageHeight = 712; - const canvasWidth = imageWidth * gridSize; - const canvasHeight = imageHeight * Math.floor((gridSize ** 2) / gridSize); + const canvasWidth = imageWidth * gridWidth; + const canvasHeight = imageHeight * gridHeight; const canvas = createCanvas(canvasWidth, canvasHeight); const ctx = canvas.getContext("2d"); @@ -139,8 +141,8 @@ export default class InventoryHelper { continue; } - const x = i % gridSize; - const y = Math.floor(i / gridSize); + const x = i % gridWidth; + const y = Math.floor(i / gridWidth); const imageX = imageWidth * x; const imageY = imageHeight * y; From 5d44c4622257072ee706f1127d40f6161f85569a Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 28 Jun 2024 18:53:15 +0100 Subject: [PATCH 11/31] Defer reply on inventory --- src/buttonEvents/Inventory.ts | 4 +++- src/commands/inventory.ts | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/buttonEvents/Inventory.ts b/src/buttonEvents/Inventory.ts index 3ce9751..84d8e14 100644 --- a/src/buttonEvents/Inventory.ts +++ b/src/buttonEvents/Inventory.ts @@ -11,6 +11,8 @@ export default class Inventory extends ButtonEvent { const page = interaction.customId.split(" ")[2]; AppLogger.LogSilly("Button/Inventory", `Parameters: userid=${userid}, page=${page}`); + + await interaction.deferUpdate(); const member = interaction.guild.members.cache.find(x => x.id == userid) || await interaction.guild.members.fetch(userid); @@ -24,7 +26,7 @@ export default class Inventory extends ButtonEvent { const embed = await InventoryHelper.GenerateInventoryPage(member.user.username, member.user.id, Number(page)); - await interaction.update({ + await interaction.followUp({ files: [ embed.image ], embeds: [ embed.embed ], components: [ embed.row ], diff --git a/src/commands/inventory.ts b/src/commands/inventory.ts index 167c3d9..0b48e2d 100644 --- a/src/commands/inventory.ts +++ b/src/commands/inventory.ts @@ -26,6 +26,8 @@ export default class Inventory extends Command { const user = userOption ? userOption.user! : interaction.user; + await interaction.deferReply(); + AppLogger.LogSilly("Commands/Inventory", `Parameters: page=${page?.value}, user=${user.id}`); try { @@ -37,7 +39,7 @@ export default class Inventory extends Command { const embed = await InventoryHelper.GenerateInventoryPage(user.username, user.id, pageNumber); - await interaction.reply({ + await interaction.followUp({ files: [ embed.image ], embeds: [ embed.embed ], components: [ embed.row ], @@ -45,7 +47,7 @@ export default class Inventory extends Command { } catch (e) { AppLogger.LogError("Commands/Inventory", e as string); - await interaction.reply("No page for user found."); + await interaction.followUp("No page for user found."); } } } From 1a4993b091da27384786457908bc6edc3c1e31d3 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 28 Jun 2024 18:55:27 +0100 Subject: [PATCH 12/31] Update inventory to 12 per page --- src/helpers/InventoryHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index d464c39..cdb17fa 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -34,7 +34,7 @@ export default class InventoryHelper { public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise { AppLogger.LogSilly("Helpers/InventoryHelper", `Parameters: username=${username}, userid=${userid}, page=${page}`); - const cardsPerPage = 15; + const cardsPerPage = 12; const inventory = await Inventory.FetchAllByUserId(userid); From 57516940185f3e0ce630e6f67b38d03d57cbd932 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 29 Jun 2024 18:28:28 +0100 Subject: [PATCH 13/31] Add rotating log files (#280) - Adding rotating log files to the app. - This uses the `winston-daily-rotate-file` package to rotate the log files before they get too big. - The log files will also now be saved into the `$DATA_DIR/logs` folder #247 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/280 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- package.json | 1 + src/client/appLogger.ts | 21 ++++++++++++++++----- yarn.lock | 29 ++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4f1b4a8..f53fe36 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "ts-jest": "^29.0.0", "typeorm": "0.3.20", "winston": "^3.11.0", + "winston-daily-rotate-file": "^5.0.0", "winston-discord-transport": "^1.3.0" }, "overrides": { diff --git a/src/client/appLogger.ts b/src/client/appLogger.ts index 428559c..f1ba1dc 100644 --- a/src/client/appLogger.ts +++ b/src/client/appLogger.ts @@ -1,4 +1,6 @@ +import path from "path"; import { Logger, createLogger, format, transports } from "winston"; +import DailyRotateFile from "winston-daily-rotate-file"; import DiscordTransport from "winston-discord-transport"; export default class AppLogger { @@ -20,12 +22,21 @@ export default class AppLogger { customFormat, ), defaultMeta: { service: "bot" }, - transports: [ - new transports.File({ filename: "priority.log", level: "warn" }), - new transports.File({ filename: "combined.log" }), - ], + transports: [], }); + if (process.env.DATA_DIR) { + const logDir = path.join(process.env.DATA_DIR, "logs"); + + logger.add(new DailyRotateFile({ + filename: "bot-%DATE%.log", + dirname: logDir, + datePattern: "YYYY-MM-DD-HH", + maxSize: "20m", + maxFiles: "14d", + })); + } + if (outputToConsole) { logger.add(new transports.Console({ format: format.combine( @@ -75,4 +86,4 @@ export default class AppLogger { public static LogSilly(label: string, message: string) { AppLogger.Logger.silly({ label, message }); } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 0f94b06..af257e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2680,6 +2680,13 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-stream-rotator@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" + integrity sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ== + dependencies: + moment "^2.29.1" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -4416,6 +4423,11 @@ mkdirp@^2.1.3: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== +moment@^2.29.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4630,6 +4642,11 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + object-inspect@^1.13.1: version "1.13.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" @@ -5856,7 +5873,7 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -triple-beam@^1.2.0, triple-beam@^1.3.0: +triple-beam@^1.2.0, triple-beam@^1.3.0, triple-beam@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== @@ -6165,6 +6182,16 @@ widest-line@^4.0.1: dependencies: string-width "^5.0.1" +winston-daily-rotate-file@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-5.0.0.tgz#8cd94800025490e47c00ec892b655a5821f4266d" + integrity sha512-JDjiXXkM5qvwY06733vf09I2wnMXpZEhxEVOSPenZMii+g7pcDcTBt2MRugnoi8BwVSuCT2jfRXBUy+n1Zz/Yw== + dependencies: + file-stream-rotator "^0.6.1" + object-hash "^3.0.0" + triple-beam "^1.4.1" + winston-transport "^4.7.0" + winston-discord-transport@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/winston-discord-transport/-/winston-discord-transport-1.3.0.tgz#5fcef49a1a4838183921a44d6df029af55a5c8d0" From 2945638b16c321bfa4538dcceaf1769383abdcaf Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sun, 30 Jun 2024 15:22:41 +0100 Subject: [PATCH 14/31] Update inventory to have 9 cards per page --- src/helpers/InventoryHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index cdb17fa..99724cd 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -34,7 +34,7 @@ export default class InventoryHelper { public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise { AppLogger.LogSilly("Helpers/InventoryHelper", `Parameters: username=${username}, userid=${userid}, page=${page}`); - const cardsPerPage = 12; + const cardsPerPage = 9; const inventory = await Inventory.FetchAllByUserId(userid); From f888f9dd37d0171b6a28c0501447e2413a35b5dd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 1 Jul 2024 15:09:27 +0100 Subject: [PATCH 15/31] Update dependency ts-jest to v29.1.5 (#275) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-jest](https://kulshekhar.github.io/ts-jest) ([source](https://github.com/kulshekhar/ts-jest)) | dependencies | patch | [`29.1.4` -> `29.1.5`](https://renovatebot.com/diffs/npm/ts-jest/29.1.4/29.1.5) | --- ### Release Notes
kulshekhar/ts-jest (ts-jest) ### [`v29.1.5`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2915-2024-06-16) [Compare Source](https://github.com/kulshekhar/ts-jest/compare/v29.1.4...v29.1.5) ##### Bug Fixes - build(deps-dev): bump braces ([5560334](https://github.com/kulshekhar/ts-jest/commit/5560334)), ([59026b4](https://github.com/kulshekhar/ts-jest/commit/59026b4)), ([0d9e359](https://github.com/kulshekhar/ts-jest/commit/0d9e359))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/275 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index af257e9..387c4ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -979,7 +979,14 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== -"@types/node@*", "@types/node@^20.0.0": +"@types/node@*": + version "20.14.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.9.tgz#12e8e765ab27f8c421a1820c99f5f313a933b420" + integrity sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg== + dependencies: + undici-types "~5.26.4" + +"@types/node@^20.0.0": version "20.14.8" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" integrity sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA== @@ -5889,9 +5896,9 @@ ts-essentials@^10.0.0: integrity sha512-77FHNJEyysF9+1s4G6eejuA1lxw7uMchT3ZPy3CIbh7GIunffpshtM8pTe5G6N5dpOzNevqRHew859ceLWVBfw== ts-jest@^29.0.0: - version "29.1.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.4.tgz#26f8a55ce31e4d2ef7a1fd47dc7fa127e92793ef" - integrity sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q== + version "29.1.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.5.tgz#d6c0471cc78bffa2cb4664a0a6741ef36cfe8f69" + integrity sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" From edf6c99bad8878d157425bf0a1c4f8b334c785f5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 1 Jul 2024 15:11:42 +0100 Subject: [PATCH 16/31] Update dependency minimatch to v9.0.5 (#283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [minimatch](https://github.com/isaacs/minimatch) | dependencies | patch | [`9.0.4` -> `9.0.5`](https://renovatebot.com/diffs/npm/minimatch/9.0.4/9.0.5) | --- ### Release Notes
isaacs/minimatch (minimatch) ### [`v9.0.5`](https://github.com/isaacs/minimatch/compare/v9.0.4...v9.0.5) [Compare Source](https://github.com/isaacs/minimatch/compare/v9.0.4...v9.0.5)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/283 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- yarn.lock | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f53fe36..b424e15 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "glob": "^10.3.10", "jest": "^29.0.0", "jest-mock-extended": "^3.0.0", - "minimatch": "9.0.4", + "minimatch": "9.0.5", "mysql": "^2.18.1", "ts-jest": "^29.0.0", "typeorm": "0.3.20", diff --git a/yarn.lock b/yarn.lock index 387c4ae..c0f6eb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4376,10 +4376,10 @@ minimatch@9.0.3: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.4, minimatch@^9.0.0, minimatch@^9.0.4: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== +minimatch@9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" @@ -4390,6 +4390,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.0, minimatch@^9.0.4: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" From 6a18f3494992118a4dfe8f937e7d6ea22ae148b3 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 6 Jul 2024 19:12:22 +0100 Subject: [PATCH 17/31] Update inventory command so it errors gracefully if no page is found for the user (#286) #251 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/286 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/buttonEvents/Inventory.ts | 7 ++++++- src/commands/inventory.ts | 7 ++++++- src/helpers/InventoryHelper.ts | 7 ++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/buttonEvents/Inventory.ts b/src/buttonEvents/Inventory.ts index 84d8e14..b501fdb 100644 --- a/src/buttonEvents/Inventory.ts +++ b/src/buttonEvents/Inventory.ts @@ -26,6 +26,11 @@ export default class Inventory extends ButtonEvent { const embed = await InventoryHelper.GenerateInventoryPage(member.user.username, member.user.id, Number(page)); + if (!embed) { + await interaction.followUp("No page for user found."); + return; + } + await interaction.followUp({ files: [ embed.image ], embeds: [ embed.embed ], @@ -34,7 +39,7 @@ export default class Inventory extends ButtonEvent { } catch (e) { AppLogger.LogError("Button/Inventory", `Error generating inventory page for ${member.user.username} with id ${member.user.id}: ${e}`); - await interaction.reply("No page for user found."); + await interaction.followUp("An error has occurred running this command."); } } } diff --git a/src/commands/inventory.ts b/src/commands/inventory.ts index 0b48e2d..8d2ef2c 100644 --- a/src/commands/inventory.ts +++ b/src/commands/inventory.ts @@ -39,6 +39,11 @@ export default class Inventory extends Command { const embed = await InventoryHelper.GenerateInventoryPage(user.username, user.id, pageNumber); + if (!embed) { + await interaction.followUp("No page for user found."); + return; + } + await interaction.followUp({ files: [ embed.image ], embeds: [ embed.embed ], @@ -47,7 +52,7 @@ export default class Inventory extends Command { } catch (e) { AppLogger.LogError("Commands/Inventory", e as string); - await interaction.followUp("No page for user found."); + await interaction.followUp("An error has occurred running this command."); } } } diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index 99724cd..0218ef8 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -31,13 +31,15 @@ interface ReturnedInventoryPage { export default class InventoryHelper { - public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise { + public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise { AppLogger.LogSilly("Helpers/InventoryHelper", `Parameters: username=${username}, userid=${userid}, page=${page}`); const cardsPerPage = 9; const inventory = await Inventory.FetchAllByUserId(userid); + if (!inventory || inventory.length == 0) return undefined; + const clientCards = cloneDeep(CoreClient.Cards); const allSeriesClaimed = clientCards @@ -88,8 +90,7 @@ export default class InventoryHelper { const currentPage = pages[page]; if (!currentPage) { - AppLogger.LogError("Helpers/InventoryHelper", "Unable to find page"); - return Promise.reject("Unable to find page"); + return undefined; } const embed = new EmbedBuilder() From 5c317be4d5eacad73cdb8f06263dca8234525f85 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 6 Jul 2024 19:14:16 +0100 Subject: [PATCH 18/31] Add how much currency the user will lose if they claim a card (#287) #252 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/287 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/CardDropHelperMetadata.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/CardDropHelperMetadata.ts b/src/helpers/CardDropHelperMetadata.ts index 26a7731..b0e03aa 100644 --- a/src/helpers/CardDropHelperMetadata.ts +++ b/src/helpers/CardDropHelperMetadata.ts @@ -4,6 +4,7 @@ import CardRarityChances from "../constants/CardRarityChances"; import { DropResult } from "../contracts/SeriesMetadata"; import { CoreClient } from "../client/client"; import AppLogger from "../client/appLogger"; +import CardConstants from "../constants/CardConstants"; export default class CardDropHelperMetadata { public static GetRandomCard(): DropResult | undefined { @@ -105,7 +106,7 @@ export default class CardDropHelperMetadata { .addComponents( new ButtonBuilder() .setCustomId(`claim ${drop.card.id} ${claimId} ${userId}`) - .setLabel("Claim") + .setLabel(`Claim (${CardConstants.ClaimCost} 🪙)`) .setStyle(ButtonStyle.Primary) .setDisabled(disabled), new ButtonBuilder() @@ -113,4 +114,4 @@ export default class CardDropHelperMetadata { .setLabel("Reroll") .setStyle(ButtonStyle.Secondary)); } -} \ No newline at end of file +} From b06fe1187103d1649cdb522384456461008f8a14 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 6 Jul 2024 19:16:16 +0100 Subject: [PATCH 19/31] Add the amount of currency a user has to the drop command (#288) - Updated the card embed generator to use fields instead of just dumping everything in the description - Add the currency a user has to the embed as a field #253 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/288 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/buttonEvents/Claim.ts | 4 +-- src/buttonEvents/Reroll.ts | 4 +-- src/commands/drop.ts | 2 +- src/helpers/CardDropHelperMetadata.ts | 40 +++++++++++++++++++-------- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/buttonEvents/Claim.ts b/src/buttonEvents/Claim.ts index e12c674..4d5d97a 100644 --- a/src/buttonEvents/Claim.ts +++ b/src/buttonEvents/Claim.ts @@ -76,7 +76,7 @@ export default class Claim extends ButtonEvent { const imageFileName = card.card.path.split("/").pop()!; - const embed = CardDropHelperMetadata.GenerateDropEmbed(card, inventory.Quantity, imageFileName, interaction.user.username); + const embed = CardDropHelperMetadata.GenerateDropEmbed(card, inventory.Quantity, imageFileName, interaction.user.username, user.Currency); const row = CardDropHelperMetadata.GenerateDropButtons(card, claimId, interaction.user.id, true); await interaction.editReply({ @@ -84,4 +84,4 @@ export default class Claim extends ButtonEvent { components: [ row ], }); } -} \ No newline at end of file +} diff --git a/src/buttonEvents/Reroll.ts b/src/buttonEvents/Reroll.ts index c55aedf..12578db 100644 --- a/src/buttonEvents/Reroll.ts +++ b/src/buttonEvents/Reroll.ts @@ -59,7 +59,7 @@ export default class Reroll extends ButtonEvent { const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id); const quantityClaimed = inventory ? inventory.Quantity : 0; - const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName); + const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName, undefined, user.Currency); const claimId = v4(); @@ -78,4 +78,4 @@ export default class Reroll extends ButtonEvent { await interaction.editReply(`Unable to send next drop. Please try again, and report this if it keeps happening. (${randomCard.card.id})`); } } -} \ No newline at end of file +} diff --git a/src/commands/drop.ts b/src/commands/drop.ts index dc66ad8..6f74d3a 100644 --- a/src/commands/drop.ts +++ b/src/commands/drop.ts @@ -67,7 +67,7 @@ export default class Drop extends Command { const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id); const quantityClaimed = inventory ? inventory.Quantity : 0; - const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName); + const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName, undefined, user.Currency); const claimId = v4(); diff --git a/src/helpers/CardDropHelperMetadata.ts b/src/helpers/CardDropHelperMetadata.ts index b0e03aa..8ed0087 100644 --- a/src/helpers/CardDropHelperMetadata.ts +++ b/src/helpers/CardDropHelperMetadata.ts @@ -78,25 +78,41 @@ export default class CardDropHelperMetadata { return { card, series }; } - public static GenerateDropEmbed(drop: DropResult, quantityClaimed: number, imageFileName: string, claimedBy?: string): EmbedBuilder { + public static GenerateDropEmbed(drop: DropResult, quantityClaimed: number, imageFileName: string, claimedBy?: string, currency?: number): EmbedBuilder { AppLogger.LogSilly("CardDropHelperMetadata/GenerateDropEmbed", `Parameters: drop=${drop.card.id}, quantityClaimed=${quantityClaimed}, imageFileName=${imageFileName}`); - let description = ""; - description += `Series: ${drop.series.name}\n`; - description += `Claimed: ${quantityClaimed}\n`; + const description = drop.series.name; - if (claimedBy != null) { - description += `Claimed by: ${claimedBy}\n`; - } else { - description += "Claimed by: (UNCLAIMED)\n"; - } - - return new EmbedBuilder() + const embed = new EmbedBuilder() .setTitle(drop.card.name) .setDescription(description) .setFooter({ text: `${CardRarityToString(drop.card.type)} · ${drop.card.id}` }) .setColor(CardRarityToColour(drop.card.type)) - .setImage(`attachment://${imageFileName}`); + .setImage(`attachment://${imageFileName}`) + .addFields([ + { + name: "Claimed", + value: `${quantityClaimed}`, + inline: true, + }, + { + name: "Claimed by", + value: claimedBy ?? "(UNCLAIMED)", + inline: true, + } + ]); + + if (currency != null) { + embed.addFields([ + { + name: "Currency", + value: `${currency}`, + inline: true, + } + ]); + } + + return embed; } public static GenerateDropButtons(drop: DropResult, claimId: string, userId: string, disabled: boolean = false): ActionRowBuilder { From bab48a11b94825ac5f5668a69922d0d99c617f53 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 8 Jul 2024 17:20:30 +0100 Subject: [PATCH 20/31] Update dependency @types/node to v20.14.10 (#282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | patch | [`20.14.8` -> `20.14.10`](https://renovatebot.com/diffs/npm/@types%2fnode/20.14.8/20.14.10) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/282 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c0f6eb3..9b11e3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -987,9 +987,9 @@ undici-types "~5.26.4" "@types/node@^20.0.0": - version "20.14.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" - integrity sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA== + version "20.14.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" + integrity sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ== dependencies: undici-types "~5.26.4" From eda11f74ae0123a77b87be90b00f8f4b72f5c199 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 8 Jul 2024 17:21:37 +0100 Subject: [PATCH 21/31] Update dependency glob to v10.4.3 (#290) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [glob](https://github.com/isaacs/node-glob) | dependencies | patch | [`10.4.2` -> `10.4.3`](https://renovatebot.com/diffs/npm/glob/10.4.2/10.4.3) | --- ### Release Notes
isaacs/node-glob (glob) ### [`v10.4.3`](https://github.com/isaacs/node-glob/compare/v10.4.2...v10.4.3) [Compare Source](https://github.com/isaacs/node-glob/compare/v10.4.2...v10.4.3)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/290 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9b11e3d..2ebc23f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2891,9 +2891,9 @@ glob-parent@^6.0.2: is-glob "^4.0.3" glob@^10.3.10: - version "10.4.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5" - integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w== + version "10.4.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.3.tgz#e0ba2253dd21b3d0acdfb5d507c59a29f513fc7a" + integrity sha512-Q38SGlYRpVtDBPSWEylRyctn7uDeTp4NQERTLiCT1FqA9JXPYWqAVmQU6qh4r/zMM5ehxTcbaO8EjhWnvEhmyg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" @@ -3588,9 +3588,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jackspeak@^3.1.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" - integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== + version "3.4.1" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.1.tgz#145422416740568e9fc357bf60c844b3c1585f09" + integrity sha512-U23pQPDnmYybVkYjObcuYMk43VRlMLLqLI+RdZy8s8WV8WsxO9SnqSroKaluuvcNOdCAlauKszDwd+umbot5Mg== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -4221,11 +4221,16 @@ lowercase-keys@^3.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== -lru-cache@^10.0.1, lru-cache@^10.2.0: +lru-cache@^10.0.1: version "10.2.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== +lru-cache@^10.2.0: + version "10.3.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.3.1.tgz#a37050586f84ccfdb570148a253bf1632a29ef44" + integrity sha512-9/8QXrtbGeMB6LxwQd4x1tIMnsmUxMvIH/qWGsccz6bt9Uln3S+sgAaqfQNhbGA8ufzs2fHuP/yqapGgP9Hh2g== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4376,7 +4381,7 @@ minimatch@9.0.3: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.5: +minimatch@9.0.5, minimatch@^9.0.4: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -4390,7 +4395,7 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.0, minimatch@^9.0.4: +minimatch@^9.0.0: version "9.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== From eb3b04f51cf2f5942c360360deee51a9c0f96188 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 8 Jul 2024 17:22:25 +0100 Subject: [PATCH 22/31] Update dependency @typescript-eslint/eslint-plugin to v7.15.0 (#291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://github.com/typescript-eslint/typescript-eslint)) | devDependencies | minor | [`7.12.0` -> `7.15.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.12.0/7.15.0) | --- ### Release Notes
typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin) ### [`v7.15.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7150-2024-07-01) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.14.1...v7.15.0) ##### 🚀 Features - **eslint-plugin:** \[array-type] detect `Readonly` case - **eslint-plugin:** back-port new rules around empty object types from v8 ##### 🩹 Fixes - disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config - **eslint-plugin:** \[no-unsafe-return] differentiate a types-error any from a true any - **eslint-plugin:** \[no-unsafe-call] differentiate a types-error any from a true any ##### ❤️ Thank You - auvred - Kim Sang Du - rgehbt - Vinccool96 You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7141-2024-06-24) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.14.0...v7.14.1) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-nullish-coalescing] treat enums and literals as their underlying primitive types - **eslint-plugin:** \[prefer-nullish-coalescing] ensure ternary fix does not remove parens ##### ❤️ Thank You - Jake Bailey You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7140-2024-06-24) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.13.1...v7.14.0) ##### 🚀 Features - support TypeScript 5.5 ##### 🩹 Fixes - **eslint-plugin:** \[no-extraneous-class] handle abstract members - **eslint-plugin:** \[prefer-nullish-coalescing] handle intersected primitive types - **eslint-plugin:** \[no-invalid-this] support AccessorProperty ##### ❤️ Thank You - Brad Zacher - cm-ayf - Jake Bailey - James Zhan - Joshua Chen - yoshi2no You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7131-2024-06-17) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.13.0...v7.13.1) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-readonly] refine report locations - **eslint-plugin:** \[return-await] support explicit resource management - **eslint-plugin:** \[no-unsafe-member-access] differentiate a types-error any from a true any ##### ❤️ Thank You - Kirk Waiblinger - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7130-2024-06-10) [Compare Source](https://github.com/typescript-eslint/typescript-eslint/compare/v7.12.0...v7.13.0) ##### 🚀 Features - **typescript-estree:** require `import = require()` argument to be a string literal - **typescript-estree:** forbid `.body`, `.async`, `.generator` on `declare function` - **eslint-plugin:** \[no-dynamic-delete] allow all string literals as index ##### 🩹 Fixes - **ast-spec:** function-call-like callee should be Expression not LeftHandSideExpression - **scope-manager:** handle index signature in class - **eslint-plugin:** \[init-declarations] refine report locations - **eslint-plugin:** \[no-base-to-string] make error message more nuanced - **eslint-plugin:** \[no-unsafe-assignment] be more specific about error types - **eslint-plugin:** \[no-magic-numbers] fix implementation of the `ignore` option ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/291 Reviewed-by: Vylpes Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- yarn.lock | 89 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2ebc23f..74daf49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -392,7 +392,12 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + +"@eslint-community/regexpp@^4.6.1": version "4.10.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== @@ -1067,15 +1072,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^7.0.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.12.0.tgz#f87a32e8972b8a60024f2f8f12205e7c8108bc41" - integrity sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz#8eaf396ac2992d2b8f874b68eb3fcd6b179cb7f3" + integrity sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.12.0" - "@typescript-eslint/type-utils" "7.12.0" - "@typescript-eslint/utils" "7.12.0" - "@typescript-eslint/visitor-keys" "7.12.0" + "@typescript-eslint/scope-manager" "7.15.0" + "@typescript-eslint/type-utils" "7.15.0" + "@typescript-eslint/utils" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" @@ -1100,21 +1105,21 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.12.0.tgz#259c014362de72dd34f995efe6bd8dda486adf58" - integrity sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg== +"@typescript-eslint/scope-manager@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz#201b34b0720be8b1447df17b963941bf044999b2" + integrity sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw== dependencies: - "@typescript-eslint/types" "7.12.0" - "@typescript-eslint/visitor-keys" "7.12.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" -"@typescript-eslint/type-utils@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.12.0.tgz#9dfaaa1972952f395ec5be4f5bbfc4d3cdc63908" - integrity sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA== +"@typescript-eslint/type-utils@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz#5b83c904c6de91802fb399305a50a56d10472c39" + integrity sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg== dependencies: - "@typescript-eslint/typescript-estree" "7.12.0" - "@typescript-eslint/utils" "7.12.0" + "@typescript-eslint/typescript-estree" "7.15.0" + "@typescript-eslint/utils" "7.15.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -1123,10 +1128,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.12.0.tgz#bf208f971a8da1e7524a5d9ae2b5f15192a37981" - integrity sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg== +"@typescript-eslint/types@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.15.0.tgz#fb894373a6e3882cbb37671ffddce44f934f62fc" + integrity sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw== "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" @@ -1142,13 +1147,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.12.0.tgz#e6c1074f248b3db6573ab6a7c47a39c4cd498ff9" - integrity sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ== +"@typescript-eslint/typescript-estree@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz#e323bfa3966e1485b638ce751f219fc1f31eba37" + integrity sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ== dependencies: - "@typescript-eslint/types" "7.12.0" - "@typescript-eslint/visitor-keys" "7.12.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -1156,15 +1161,15 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.12.0.tgz#c6e58fd7f724cdccc848f71e388ad80cbdb95dd0" - integrity sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ== +"@typescript-eslint/utils@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.15.0.tgz#9e6253c4599b6e7da2fb64ba3f549c73eb8c1960" + integrity sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.12.0" - "@typescript-eslint/types" "7.12.0" - "@typescript-eslint/typescript-estree" "7.12.0" + "@typescript-eslint/scope-manager" "7.15.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/typescript-estree" "7.15.0" "@typescript-eslint/visitor-keys@6.21.0": version "6.21.0" @@ -1174,12 +1179,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.12.0.tgz#c053b55a996679528beeedd8e565710ce1ae1ad3" - integrity sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ== +"@typescript-eslint/visitor-keys@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz#1da0726201a859343fe6a05742a7c1792fff5b66" + integrity sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw== dependencies: - "@typescript-eslint/types" "7.12.0" + "@typescript-eslint/types" "7.15.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": From 1360452ffdb6344aa795b5c7a3281b05c0696a37 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 8 Jul 2024 17:55:12 +0100 Subject: [PATCH 23/31] Fix the view command having the claimed by field when it doesn't need it (#292) - Remove the "claimed by" field from the card embed generator if its not supplied - This does affect the drop command, now the drop command only shows the field upon claim, but I think that looks better #276 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/292 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/CardDropHelperMetadata.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/helpers/CardDropHelperMetadata.ts b/src/helpers/CardDropHelperMetadata.ts index 8ed0087..982661e 100644 --- a/src/helpers/CardDropHelperMetadata.ts +++ b/src/helpers/CardDropHelperMetadata.ts @@ -94,13 +94,18 @@ export default class CardDropHelperMetadata { name: "Claimed", value: `${quantityClaimed}`, inline: true, - }, + } + ]); + + if (claimedBy != null) { + embed.addFields([ { name: "Claimed by", - value: claimedBy ?? "(UNCLAIMED)", + value: claimedBy, inline: true, } ]); + } if (currency != null) { embed.addFields([ From 1b9857dfe5cede3697931d6660b6244e17c5066a Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 8 Jul 2024 17:55:55 +0100 Subject: [PATCH 24/31] Add card count onto the series list command (#293) - Add the card count to the series list command - Fixed the series view command showing the card count excluding the current page, due to the splicing logic #289 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/293 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/SeriesHelper.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/helpers/SeriesHelper.ts b/src/helpers/SeriesHelper.ts index 32b1405..d818f1a 100644 --- a/src/helpers/SeriesHelper.ts +++ b/src/helpers/SeriesHelper.ts @@ -20,6 +20,7 @@ export default class SeriesHelper { } const totalPages = Math.ceil(series.cards.length / itemsPerPage); + const totalCards = series.cards.length; if (page > totalPages) { AppLogger.LogVerbose("Helpers/SeriesHelper", `Trying to find page greater than what exists for this series. Page: ${page} but there are only ${totalPages} pages`); @@ -36,7 +37,7 @@ export default class SeriesHelper { .setTitle(series.name) .setColor(EmbedColours.Ok) .setDescription(description) - .setFooter({ text: `${series.id} · ${series.cards.length} cards · Page ${page + 1} of ${totalPages}` }); + .setFooter({ text: `${series.id} · ${totalCards} cards · Page ${page + 1} of ${totalPages}` }); const row = new ActionRowBuilder() .addComponents( @@ -72,7 +73,7 @@ export default class SeriesHelper { const seriesOnPage = series.splice(page * itemsPerPage, itemsPerPage); const description = seriesOnPage - .map(x => `[${x.id}] ${x.name}`) + .map(x => `[${x.id}] ${x.name} (x${x.cards.length})`) .join("\n"); const embed = new EmbedBuilder() @@ -96,4 +97,4 @@ export default class SeriesHelper { return { embed, row }; } -} \ No newline at end of file +} From acfdcb17f27d24a7a75e1ba43f879f22999f609f Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 9 Jul 2024 17:45:50 +0100 Subject: [PATCH 25/31] Add image grid to the series view command (#294) - Add the image grid to the series view command - Moved the image generation logic to its own class so we can have common logic between them - Fixed a bug where paginated commands that deferred (series view, inventory) were creating new messages, rather than updating #279 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/294 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/buttonEvents/Inventory.ts | 2 +- src/buttonEvents/Series.ts | 9 ++++--- src/commands/series.ts | 14 +++++++---- src/helpers/ImageHelper.ts | 43 ++++++++++++++++++++++++++++++++++ src/helpers/InventoryHelper.ts | 40 ++----------------------------- src/helpers/SeriesHelper.ts | 15 ++++++++---- 6 files changed, 72 insertions(+), 51 deletions(-) create mode 100644 src/helpers/ImageHelper.ts diff --git a/src/buttonEvents/Inventory.ts b/src/buttonEvents/Inventory.ts index b501fdb..8356305 100644 --- a/src/buttonEvents/Inventory.ts +++ b/src/buttonEvents/Inventory.ts @@ -31,7 +31,7 @@ export default class Inventory extends ButtonEvent { return; } - await interaction.followUp({ + await interaction.editReply({ files: [ embed.image ], embeds: [ embed.embed ], components: [ embed.row ], diff --git a/src/buttonEvents/Series.ts b/src/buttonEvents/Series.ts index 0d98bfb..05bb426 100644 --- a/src/buttonEvents/Series.ts +++ b/src/buttonEvents/Series.ts @@ -24,11 +24,14 @@ export default class Series extends ButtonEvent { const seriesid = interaction.customId.split(" ")[2]; const page = interaction.customId.split(" ")[3]; - const embed = SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page)); + await interaction.deferUpdate(); - await interaction.update({ + const embed = await SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page)); + + await interaction.editReply({ embeds: [ embed!.embed ], components: [ embed!.row ], + files: [ embed!.image ], }); } @@ -42,4 +45,4 @@ export default class Series extends ButtonEvent { components: [ embed!.row ], }); } -} \ No newline at end of file +} diff --git a/src/commands/series.ts b/src/commands/series.ts index 2122355..94053a6 100644 --- a/src/commands/series.ts +++ b/src/commands/series.ts @@ -47,6 +47,8 @@ export default class Series extends Command { AppLogger.LogSilly("Commands/Series/View", `Parameters: id=${id?.value}`); + await interaction.deferReply(); + if (!id) return; const series = CoreClient.Cards.find(x => x.id == id.value); @@ -54,13 +56,17 @@ export default class Series extends Command { if (!series) { AppLogger.LogVerbose("Commands/Series/View", "Series not found."); - await interaction.reply("Series not found."); + await interaction.followUp("Series not found."); return; } - const embed = SeriesHelper.GenerateSeriesViewPage(series.id, 0); + const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0); - await interaction.reply({ embeds: [ embed!.embed ], components: [ embed!.row ]}); + await interaction.followUp({ + embeds: [ embed!.embed ], + components: [ embed!.row ], + files: [ embed!.image ], + }); } private async ListSeries(interaction: CommandInteraction) { @@ -68,4 +74,4 @@ export default class Series extends Command { await interaction.reply({ embeds: [ embed!.embed ], components: [ embed!.row ]}); } -} \ No newline at end of file +} diff --git a/src/helpers/ImageHelper.ts b/src/helpers/ImageHelper.ts new file mode 100644 index 0000000..39b07bf --- /dev/null +++ b/src/helpers/ImageHelper.ts @@ -0,0 +1,43 @@ +import {createCanvas, loadImage} from "canvas"; +import path from "path"; +import AppLogger from "../client/appLogger"; +import {existsSync} from "fs"; + +export default class ImageHelper { + public static async GenerateCardImageGrid(paths: string[]): Promise { + const gridWidth = 3; + const gridHeight = Math.ceil(paths.length / gridWidth); + + const imageWidth = 526; + const imageHeight = 712; + + const canvasWidth = imageWidth * gridWidth; + const canvasHeight = imageHeight * gridHeight; + + const canvas = createCanvas(canvasWidth, canvasHeight); + const ctx = canvas.getContext("2d"); + + for (let i = 0; i < paths.length; i++) { + const filePath = path.join(process.env.DATA_DIR!, "cards", paths[i]); + + const exists = existsSync(filePath); + + if (!exists) { + AppLogger.LogError("ImageHelper/GenerateCardImageGrid", `Failed to load image from path ${paths[i]}`); + continue; + } + + const image = await loadImage(filePath); + + const x = i % gridWidth; + const y = Math.floor(i / gridWidth); + + const imageX = imageWidth * x; + const imageY = imageHeight * y; + + ctx.drawImage(image, imageX, imageY); + } + + return canvas.toBuffer(); + } +} diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index 0218ef8..4aab75e 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -5,8 +5,7 @@ import EmbedColours from "../constants/EmbedColours"; import { CardRarity, CardRarityToString } from "../constants/CardRarity"; import cloneDeep from "clone-deep"; import AppLogger from "../client/appLogger"; -import { createCanvas, loadImage } from "canvas"; -import path from "path"; +import ImageHelper from "./ImageHelper"; interface InventoryPage { id: number, @@ -113,44 +112,9 @@ export default class InventoryHelper { .setStyle(ButtonStyle.Primary) .setDisabled(page + 1 == pages.length)); - const buffer = await this.GenerateInventoryImage(currentPage); + const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => x.path)); const image = new AttachmentBuilder(buffer, { name: "page.png" }); return { embed, row, image }; } - - private static async GenerateInventoryImage(page: InventoryPage): Promise { - const gridWidth = 3; - const gridHeight = Math.ceil(page.cards.length / gridWidth); - - const imageWidth = 526; - const imageHeight = 712; - - const canvasWidth = imageWidth * gridWidth; - const canvasHeight = imageHeight * gridHeight; - - const canvas = createCanvas(canvasWidth, canvasHeight); - const ctx = canvas.getContext("2d"); - - for (let i = 0; i < page.cards.length; i++) { - const card = page.cards[i]; - - const image = await loadImage(path.join(process.env.DATA_DIR!, "cards", card.path)); - - if (!image) { - AppLogger.LogError("InventoryHelper/GenerateInventoryImage", `Failed to load image for card ${card.id}`); - continue; - } - - const x = i % gridWidth; - const y = Math.floor(i / gridWidth); - - const imageX = imageWidth * x; - const imageY = imageHeight * y; - - ctx.drawImage(image, imageX, imageY); - } - - return canvas.toBuffer(); - } } diff --git a/src/helpers/SeriesHelper.ts b/src/helpers/SeriesHelper.ts index d818f1a..9bb94a2 100644 --- a/src/helpers/SeriesHelper.ts +++ b/src/helpers/SeriesHelper.ts @@ -1,15 +1,16 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js"; +import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js"; import AppLogger from "../client/appLogger"; import cloneDeep from "clone-deep"; import { CoreClient } from "../client/client"; import EmbedColours from "../constants/EmbedColours"; import { CardRarityToString } from "../constants/CardRarity"; +import ImageHelper from "./ImageHelper"; export default class SeriesHelper { - public static GenerateSeriesViewPage(seriesId: number, page: number): { embed: EmbedBuilder, row: ActionRowBuilder } | null { + public static async GenerateSeriesViewPage(seriesId: number, page: number): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder, image: AttachmentBuilder } | null> { AppLogger.LogSilly("Helpers/SeriesHelper", `Parameters: seriesId=${seriesId}, page=${page}`); - const itemsPerPage = 15; + const itemsPerPage = 9; const series = cloneDeep(CoreClient.Cards) .find(x => x.id == seriesId); @@ -37,7 +38,8 @@ export default class SeriesHelper { .setTitle(series.name) .setColor(EmbedColours.Ok) .setDescription(description) - .setFooter({ text: `${series.id} · ${totalCards} cards · Page ${page + 1} of ${totalPages}` }); + .setFooter({ text: `${series.id} · ${totalCards} cards · Page ${page + 1} of ${totalPages}` }) + .setImage("attachment://page.png"); const row = new ActionRowBuilder() .addComponents( @@ -52,7 +54,10 @@ export default class SeriesHelper { .setStyle(ButtonStyle.Primary) .setDisabled(page + 1 > totalPages)); - return { embed, row }; + const buffer = await ImageHelper.GenerateCardImageGrid(cardsOnPage.map(x => x.path)); + const image = new AttachmentBuilder(buffer, { name: "page.png" }); + + return { embed, row, image }; } public static GenerateSeriesListPage(page: number): { embed: EmbedBuilder, row: ActionRowBuilder } | null { From 29bb22a819840432e6ca24ed51145fbd4d89fbd1 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 12 Jul 2024 16:09:26 +0100 Subject: [PATCH 26/31] Update the series list command to say cards instead of x (#296) - Update the /series list command so that it says "cards" instead if "x", for example `39 cards` #289 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/296 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/SeriesHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/SeriesHelper.ts b/src/helpers/SeriesHelper.ts index 9bb94a2..ee4133b 100644 --- a/src/helpers/SeriesHelper.ts +++ b/src/helpers/SeriesHelper.ts @@ -78,7 +78,7 @@ export default class SeriesHelper { const seriesOnPage = series.splice(page * itemsPerPage, itemsPerPage); const description = seriesOnPage - .map(x => `[${x.id}] ${x.name} (x${x.cards.length})`) + .map(x => `[${x.id}] ${x.name} (${x.cards.length} cards)`) .join("\n"); const embed = new EmbedBuilder() From b6f814f895d13155403b16d07a27010d58b2fded Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 12 Jul 2024 17:35:12 +0100 Subject: [PATCH 27/31] Update the series view command to be in greyscale if the user has not claimed the card (#297) - Install `Jimp` package so we can manipulate images - Update the `ImageHelper` class to accept the user id so we can check if a user has claimed the card - Update the `/series view` command to pass the user id into the ImageHelper #279 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/297 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- package.json | 1 + src/buttonEvents/Series.ts | 2 +- src/commands/series.ts | 2 +- src/database/entities/app/Inventory.ts | 2 +- src/helpers/ImageHelper.ts | 31 +- src/helpers/InventoryHelper.ts | 2 +- src/helpers/SeriesHelper.ts | 4 +- yarn.lock | 546 ++++++++++++++++++++++++- 8 files changed, 575 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index b424e15..98d77f3 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "glob": "^10.3.10", "jest": "^29.0.0", "jest-mock-extended": "^3.0.0", + "jimp": "^0.22.12", "minimatch": "9.0.5", "mysql": "^2.18.1", "ts-jest": "^29.0.0", diff --git a/src/buttonEvents/Series.ts b/src/buttonEvents/Series.ts index 05bb426..80e03cd 100644 --- a/src/buttonEvents/Series.ts +++ b/src/buttonEvents/Series.ts @@ -26,7 +26,7 @@ export default class Series extends ButtonEvent { await interaction.deferUpdate(); - const embed = await SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page)); + const embed = await SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page), interaction.user.id); await interaction.editReply({ embeds: [ embed!.embed ], diff --git a/src/commands/series.ts b/src/commands/series.ts index 94053a6..e268db9 100644 --- a/src/commands/series.ts +++ b/src/commands/series.ts @@ -60,7 +60,7 @@ export default class Series extends Command { return; } - const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0); + const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0, interaction.user.id); await interaction.followUp({ embeds: [ embed!.embed ], diff --git a/src/database/entities/app/Inventory.ts b/src/database/entities/app/Inventory.ts index a5d0026..7d659fe 100644 --- a/src/database/entities/app/Inventory.ts +++ b/src/database/entities/app/Inventory.ts @@ -54,4 +54,4 @@ export default class Inventory extends AppBaseEntity { return all; } -} \ No newline at end of file +} diff --git a/src/helpers/ImageHelper.ts b/src/helpers/ImageHelper.ts index 39b07bf..3b64dd5 100644 --- a/src/helpers/ImageHelper.ts +++ b/src/helpers/ImageHelper.ts @@ -2,11 +2,18 @@ import {createCanvas, loadImage} from "canvas"; import path from "path"; import AppLogger from "../client/appLogger"; import {existsSync} from "fs"; +import Inventory from "../database/entities/app/Inventory"; +import Jimp from "jimp"; + +interface CardInput { + id: string; + path: string; +} export default class ImageHelper { - public static async GenerateCardImageGrid(paths: string[]): Promise { + public static async GenerateCardImageGrid(cards: CardInput[], userId?: string): Promise { const gridWidth = 3; - const gridHeight = Math.ceil(paths.length / gridWidth); + const gridHeight = Math.ceil(cards.length / gridWidth); const imageWidth = 526; const imageHeight = 712; @@ -17,17 +24,29 @@ export default class ImageHelper { const canvas = createCanvas(canvasWidth, canvasHeight); const ctx = canvas.getContext("2d"); - for (let i = 0; i < paths.length; i++) { - const filePath = path.join(process.env.DATA_DIR!, "cards", paths[i]); + for (let i = 0; i < cards.length; i++) { + const card = cards[i]; + + const filePath = path.join(process.env.DATA_DIR!, "cards", card.path); const exists = existsSync(filePath); if (!exists) { - AppLogger.LogError("ImageHelper/GenerateCardImageGrid", `Failed to load image from path ${paths[i]}`); + AppLogger.LogError("ImageHelper/GenerateCardImageGrid", `Failed to load image from path ${card.path}`); continue; } - const image = await loadImage(filePath); + const imageData = await Jimp.read(filePath); + + if (userId != null) { + const claimed = await Inventory.FetchOneByCardNumberAndUserId(userId, card.id); + + if (!claimed || claimed.Quantity == 0) { + imageData.greyscale(); + } + } + + const image = await loadImage(await imageData.getBufferAsync("image/jpeg")); const x = i % gridWidth; const y = Math.floor(i / gridWidth); diff --git a/src/helpers/InventoryHelper.ts b/src/helpers/InventoryHelper.ts index 4aab75e..8b8ffa1 100644 --- a/src/helpers/InventoryHelper.ts +++ b/src/helpers/InventoryHelper.ts @@ -112,7 +112,7 @@ export default class InventoryHelper { .setStyle(ButtonStyle.Primary) .setDisabled(page + 1 == pages.length)); - const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => x.path)); + const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => ({ id: x.id, path: x.path }))); const image = new AttachmentBuilder(buffer, { name: "page.png" }); return { embed, row, image }; diff --git a/src/helpers/SeriesHelper.ts b/src/helpers/SeriesHelper.ts index ee4133b..a26fedd 100644 --- a/src/helpers/SeriesHelper.ts +++ b/src/helpers/SeriesHelper.ts @@ -7,7 +7,7 @@ import { CardRarityToString } from "../constants/CardRarity"; import ImageHelper from "./ImageHelper"; export default class SeriesHelper { - public static async GenerateSeriesViewPage(seriesId: number, page: number): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder, image: AttachmentBuilder } | null> { + public static async GenerateSeriesViewPage(seriesId: number, page: number, userId: string): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder, image: AttachmentBuilder } | null> { AppLogger.LogSilly("Helpers/SeriesHelper", `Parameters: seriesId=${seriesId}, page=${page}`); const itemsPerPage = 9; @@ -54,7 +54,7 @@ export default class SeriesHelper { .setStyle(ButtonStyle.Primary) .setDisabled(page + 1 > totalPages)); - const buffer = await ImageHelper.GenerateCardImageGrid(cardsOnPage.map(x => x.path)); + const buffer = await ImageHelper.GenerateCardImageGrid(cardsOnPage.map(x => ({id: x.id, path: x.path})), userId); const image = new AttachmentBuilder(buffer, { name: "page.png" }); return { embed, row, image }; diff --git a/yarn.lock b/yarn.lock index 74daf49..04ff1b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -666,6 +666,263 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jimp/bmp@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/bmp/-/bmp-0.22.12.tgz#0316044dc7b1a90274aef266d50349347fb864d4" + integrity sha512-aeI64HD0npropd+AR76MCcvvRaa+Qck6loCOS03CkkxGHN5/r336qTM5HPUdHKMDOGzqknuVPA8+kK1t03z12g== + dependencies: + "@jimp/utils" "^0.22.12" + bmp-js "^0.1.0" + +"@jimp/core@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/core/-/core-0.22.12.tgz#70785ea7d10b138fb65bcfe9f712826f00a10e1d" + integrity sha512-l0RR0dOPyzMKfjUW1uebzueFEDtCOj9fN6pyTYWWOM/VS4BciXQ1VVrJs8pO3kycGYZxncRKhCoygbNr8eEZQA== + dependencies: + "@jimp/utils" "^0.22.12" + any-base "^1.1.0" + buffer "^5.2.0" + exif-parser "^0.1.12" + file-type "^16.5.4" + isomorphic-fetch "^3.0.0" + pixelmatch "^4.0.2" + tinycolor2 "^1.6.0" + +"@jimp/custom@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/custom/-/custom-0.22.12.tgz#236f2a3f016b533c50869ff22ad1ac00dd0c36be" + integrity sha512-xcmww1O/JFP2MrlGUMd3Q78S3Qu6W3mYTXYuIqFq33EorgYHV/HqymHfXy9GjiCJ7OI+7lWx6nYFOzU7M4rd1Q== + dependencies: + "@jimp/core" "^0.22.12" + +"@jimp/gif@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/gif/-/gif-0.22.12.tgz#6caccb45df497fb971b7a88690345596e22163c0" + integrity sha512-y6BFTJgch9mbor2H234VSjd9iwAhaNf/t3US5qpYIs0TSbAvM02Fbc28IaDETj9+4YB4676sz4RcN/zwhfu1pg== + dependencies: + "@jimp/utils" "^0.22.12" + gifwrap "^0.10.1" + omggif "^1.0.9" + +"@jimp/jpeg@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/jpeg/-/jpeg-0.22.12.tgz#b5c74a5aac9826245311370dda8c71a1fcca05ed" + integrity sha512-Rq26XC/uQWaQKyb/5lksCTCxXhtY01NJeBN+dQv5yNYedN0i7iYu+fXEoRsfaJ8xZzjoANH8sns7rVP4GE7d/Q== + dependencies: + "@jimp/utils" "^0.22.12" + jpeg-js "^0.4.4" + +"@jimp/plugin-blit@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-blit/-/plugin-blit-0.22.12.tgz#0fa8320767fda77434b4408798655ff7c7e415d4" + integrity sha512-xslz2ZoFZOPLY8EZ4dC29m168BtDx95D6K80TzgUi8gqT7LY6CsajWO0FAxDwHz6h0eomHMfyGX0stspBrTKnQ== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-blur@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-blur/-/plugin-blur-0.22.12.tgz#0c37b2ff4e588b45f4307b4f13d3d0eef813920d" + integrity sha512-S0vJADTuh1Q9F+cXAwFPlrKWzDj2F9t/9JAbUvaaDuivpyWuImEKXVz5PUZw2NbpuSHjwssbTpOZ8F13iJX4uw== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-circle@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-circle/-/plugin-circle-0.22.12.tgz#9fffda83d3fc5bad8c1e1492b15b1433cb42e16e" + integrity sha512-SWVXx1yiuj5jZtMijqUfvVOJBwOifFn0918ou4ftoHgegc5aHWW5dZbYPjvC9fLpvz7oSlptNl2Sxr1zwofjTg== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-color@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-color/-/plugin-color-0.22.12.tgz#1e49f2e7387186507e917b0686599767c15be336" + integrity sha512-xImhTE5BpS8xa+mAN6j4sMRWaUgUDLoaGHhJhpC+r7SKKErYDR0WQV4yCE4gP+N0gozD0F3Ka1LUSaMXrn7ZIA== + dependencies: + "@jimp/utils" "^0.22.12" + tinycolor2 "^1.6.0" + +"@jimp/plugin-contain@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-contain/-/plugin-contain-0.22.12.tgz#ed5ed9af3d4afd02a7568ff8d60603cff340e3f3" + integrity sha512-Eo3DmfixJw3N79lWk8q/0SDYbqmKt1xSTJ69yy8XLYQj9svoBbyRpSnHR+n9hOw5pKXytHwUW6nU4u1wegHNoQ== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-cover@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-cover/-/plugin-cover-0.22.12.tgz#4abbfabe4c78c71d8d46e707c35a65dc55f08afd" + integrity sha512-z0w/1xH/v/knZkpTNx+E8a7fnasQ2wHG5ze6y5oL2dhH1UufNua8gLQXlv8/W56+4nJ1brhSd233HBJCo01BXA== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-crop@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-crop/-/plugin-crop-0.22.12.tgz#e28329a9f285071442998560b040048d2ef5c32e" + integrity sha512-FNuUN0OVzRCozx8XSgP9MyLGMxNHHJMFt+LJuFjn1mu3k0VQxrzqbN06yIl46TVejhyAhcq5gLzqmSCHvlcBVw== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-displace@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-displace/-/plugin-displace-0.22.12.tgz#2e4b2b989a23da6687c49f2f628e1e6d686ec9b6" + integrity sha512-qpRM8JRicxfK6aPPqKZA6+GzBwUIitiHaZw0QrJ64Ygd3+AsTc7BXr+37k2x7QcyCvmKXY4haUrSIsBug4S3CA== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-dither@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-dither/-/plugin-dither-0.22.12.tgz#3cc5f3a58dbf85653c4e532d31a756a4fc8cabf7" + integrity sha512-jYgGdSdSKl1UUEanX8A85v4+QUm+PE8vHFwlamaKk89s+PXQe7eVE3eNeSZX4inCq63EHL7cX580dMqkoC3ZLw== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-fisheye@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-fisheye/-/plugin-fisheye-0.22.12.tgz#77aef2f3ec59c0bafbd2dbc94b89eab60ce05a3e" + integrity sha512-LGuUTsFg+fOp6KBKrmLkX4LfyCy8IIsROwoUvsUPKzutSqMJnsm3JGDW2eOmWIS/jJpPaeaishjlxvczjgII+Q== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-flip@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-flip/-/plugin-flip-0.22.12.tgz#7e2154592da01afcf165a3f9d1d25032aa8d8c57" + integrity sha512-m251Rop7GN8W0Yo/rF9LWk6kNclngyjIJs/VXHToGQ6EGveOSTSQaX2Isi9f9lCDLxt+inBIb7nlaLLxnvHX8Q== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-gaussian@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-gaussian/-/plugin-gaussian-0.22.12.tgz#49a40950cedbbea6c84b3a6bccc45365fe78d6b7" + integrity sha512-sBfbzoOmJ6FczfG2PquiK84NtVGeScw97JsCC3rpQv1PHVWyW+uqWFF53+n3c8Y0P2HWlUjflEla2h/vWShvhg== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-invert@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-invert/-/plugin-invert-0.22.12.tgz#c569e85c1f59911a9a33ef36a51c9cf26065078e" + integrity sha512-N+6rwxdB+7OCR6PYijaA/iizXXodpxOGvT/smd/lxeXsZ/empHmFFFJ/FaXcYh19Tm04dGDaXcNF/dN5nm6+xQ== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-mask@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-mask/-/plugin-mask-0.22.12.tgz#0ac0d9c282f403255b126556521f90fb8e2997f0" + integrity sha512-4AWZg+DomtpUA099jRV8IEZUfn1wLv6+nem4NRJC7L/82vxzLCgXKTxvNvBcNmJjT9yS1LAAmiJGdWKXG63/NA== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-normalize@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-normalize/-/plugin-normalize-0.22.12.tgz#6c44d216f2489cf9b0e0f1e03aa5dfb97f198c53" + integrity sha512-0So0rexQivnWgnhacX4cfkM2223YdExnJTTy6d06WbkfZk5alHUx8MM3yEzwoCN0ErO7oyqEWRnEkGC+As1FtA== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-print@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-print/-/plugin-print-0.22.12.tgz#6a49020947a9bf21a5a28324425670a25587ca65" + integrity sha512-c7TnhHlxm87DJeSnwr/XOLjJU/whoiKYY7r21SbuJ5nuH+7a78EW1teOaj5gEr2wYEd7QtkFqGlmyGXY/YclyQ== + dependencies: + "@jimp/utils" "^0.22.12" + load-bmfont "^1.4.1" + +"@jimp/plugin-resize@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-resize/-/plugin-resize-0.22.12.tgz#f92acbf73beb97dd1fe93b166ef367a323b81e81" + integrity sha512-3NyTPlPbTnGKDIbaBgQ3HbE6wXbAlFfxHVERmrbqAi8R3r6fQPxpCauA8UVDnieg5eo04D0T8nnnNIX//i/sXg== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-rotate@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-rotate/-/plugin-rotate-0.22.12.tgz#2235d45aeb4914ff70d99e95750a6d9de45a0d9f" + integrity sha512-9YNEt7BPAFfTls2FGfKBVgwwLUuKqy+E8bDGGEsOqHtbuhbshVGxN2WMZaD4gh5IDWvR+emmmPPWGgaYNYt1gA== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-scale@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-scale/-/plugin-scale-0.22.12.tgz#91f1ec3d114ff44092b946a16e66b14d918e32ed" + integrity sha512-dghs92qM6MhHj0HrV2qAwKPMklQtjNpoYgAB94ysYpsXslhRTiPisueSIELRwZGEr0J0VUxpUY7HgJwlSIgGZw== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-shadow@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-shadow/-/plugin-shadow-0.22.12.tgz#52e3a1d55f61ddfcfb3265544f8d23b887a667b8" + integrity sha512-FX8mTJuCt7/3zXVoeD/qHlm4YH2bVqBuWQHXSuBK054e7wFRnRnbSLPUqAwSeYP3lWqpuQzJtgiiBxV3+WWwTg== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugin-threshold@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugin-threshold/-/plugin-threshold-0.22.12.tgz#1efe20e154bf3a1fc4a5cc016092dbacaa60c958" + integrity sha512-4x5GrQr1a/9L0paBC/MZZJjjgjxLYrqSmWd+e+QfAEPvmRxdRoQ5uKEuNgXnm9/weHQBTnQBQsOY2iFja+XGAw== + dependencies: + "@jimp/utils" "^0.22.12" + +"@jimp/plugins@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/plugins/-/plugins-0.22.12.tgz#45a3b96d2d24cec21d4f8b79d1cfcec6fcb2f1d4" + integrity sha512-yBJ8vQrDkBbTgQZLty9k4+KtUQdRjsIDJSPjuI21YdVeqZxYywifHl4/XWILoTZsjTUASQcGoH0TuC0N7xm3ww== + dependencies: + "@jimp/plugin-blit" "^0.22.12" + "@jimp/plugin-blur" "^0.22.12" + "@jimp/plugin-circle" "^0.22.12" + "@jimp/plugin-color" "^0.22.12" + "@jimp/plugin-contain" "^0.22.12" + "@jimp/plugin-cover" "^0.22.12" + "@jimp/plugin-crop" "^0.22.12" + "@jimp/plugin-displace" "^0.22.12" + "@jimp/plugin-dither" "^0.22.12" + "@jimp/plugin-fisheye" "^0.22.12" + "@jimp/plugin-flip" "^0.22.12" + "@jimp/plugin-gaussian" "^0.22.12" + "@jimp/plugin-invert" "^0.22.12" + "@jimp/plugin-mask" "^0.22.12" + "@jimp/plugin-normalize" "^0.22.12" + "@jimp/plugin-print" "^0.22.12" + "@jimp/plugin-resize" "^0.22.12" + "@jimp/plugin-rotate" "^0.22.12" + "@jimp/plugin-scale" "^0.22.12" + "@jimp/plugin-shadow" "^0.22.12" + "@jimp/plugin-threshold" "^0.22.12" + timm "^1.6.1" + +"@jimp/png@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/png/-/png-0.22.12.tgz#e033586caf38d9c9d33808e92eb87c4d7f0aa1eb" + integrity sha512-Mrp6dr3UTn+aLK8ty/dSKELz+Otdz1v4aAXzV5q53UDD2rbB5joKVJ/ChY310B+eRzNxIovbUF1KVrUsYdE8Hg== + dependencies: + "@jimp/utils" "^0.22.12" + pngjs "^6.0.0" + +"@jimp/tiff@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/tiff/-/tiff-0.22.12.tgz#67cac3f2ded6fde3ef631fbf74bea0fa53800123" + integrity sha512-E1LtMh4RyJsoCAfAkBRVSYyZDTtLq9p9LUiiYP0vPtXyxX4BiYBUYihTLSBlCQg5nF2e4OpQg7SPrLdJ66u7jg== + dependencies: + utif2 "^4.0.1" + +"@jimp/types@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/types/-/types-0.22.12.tgz#6f83761ba171cb8cd5998fa66a5cbfb0b22d3d8c" + integrity sha512-wwKYzRdElE1MBXFREvCto5s699izFHNVvALUv79GXNbsOVqlwlOxlWJ8DuyOGIXoLP4JW/m30YyuTtfUJgMRMA== + dependencies: + "@jimp/bmp" "^0.22.12" + "@jimp/gif" "^0.22.12" + "@jimp/jpeg" "^0.22.12" + "@jimp/png" "^0.22.12" + "@jimp/tiff" "^0.22.12" + timm "^1.6.1" + +"@jimp/utils@^0.22.12": + version "0.22.12" + resolved "https://registry.yarnpkg.com/@jimp/utils/-/utils-0.22.12.tgz#8ffaed8f2dc2962539ccaf14727ac60793c7a537" + integrity sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q== + dependencies: + regenerator-runtime "^0.13.3" + "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" @@ -840,6 +1097,11 @@ dependencies: defer-to-connect "^2.0.1" +"@tokenizer/token@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" + integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== + "@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -991,6 +1253,11 @@ dependencies: undici-types "~5.26.4" +"@types/node@16.9.1": + version "16.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" + integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== + "@types/node@^20.0.0": version "20.14.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" @@ -1336,6 +1603,11 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +any-base@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/any-base/-/any-base-1.1.0.tgz#ae101a62bc08a597b4c9ab5b7089d456630549fe" + integrity sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg== + any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" @@ -1493,6 +1765,11 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +bmp-js@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233" + integrity sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw== + body-parser@1.20.2, body-parser@^1.20.2: version "1.20.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" @@ -1578,12 +1855,17 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-equal@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" + integrity sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0: +buffer@^5.2.0, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -1702,6 +1984,13 @@ canvas@^2.11.2: nan "^2.17.0" simple-get "^3.0.3" +centra@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/centra/-/centra-2.7.0.tgz#4c8312a58436e8a718302011561db7e6a2b0ec18" + integrity sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg== + dependencies: + follow-redirects "^1.15.6" + chalk-template@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/chalk-template/-/chalk-template-1.1.0.tgz#ffc55db6dd745e9394b85327c8ac8466edb7a7b1" @@ -2271,6 +2560,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + dot-prop@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" @@ -2541,6 +2835,11 @@ execa@^8.0.1: signal-exit "^4.1.0" strip-final-newline "^3.0.0" +exif-parser@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/exif-parser/-/exif-parser-0.1.12.tgz#58a9d2d72c02c1f6f02a0ef4a9166272b7760922" + integrity sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw== + exit-hook@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-4.0.0.tgz#c1e16ebd03d3166f837b1502dac755bb5c460d58" @@ -2699,6 +2998,15 @@ file-stream-rotator@^0.6.1: dependencies: moment "^2.29.1" +file-type@^16.5.4: + version "16.5.4" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-16.5.4.tgz#474fb4f704bee427681f98dd390058a172a6c2fd" + integrity sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw== + dependencies: + readable-web-to-node-stream "^3.0.0" + strtok3 "^6.2.4" + token-types "^4.1.1" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -2759,6 +3067,11 @@ fn.name@1.x.x: resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + foreground-child@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" @@ -2876,6 +3189,14 @@ get-stream@^8.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== +gifwrap@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/gifwrap/-/gifwrap-0.10.1.tgz#9ed46a5d51913b482d4221ce9c727080260b681e" + integrity sha512-2760b1vpJHNmLzZ/ubTtNnEx5WApN/PYWJvXvgS+tL1egTTthayFYIQQNi136FLEDcN/IyEY2EcGpIITD6eYUw== + dependencies: + image-q "^4.0.0" + omggif "^1.0.10" + github-url-from-git@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" @@ -2933,6 +3254,14 @@ global-dirs@^3.0.0: dependencies: ini "2.0.0" +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3171,6 +3500,13 @@ ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +image-q@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/image-q/-/image-q-4.0.0.tgz#31e075be7bae3c1f42a85c469b4732c358981776" + integrity sha512-PfJGVgIfKQJuq3s0tTDOKtztksibuUEbJQIYT3by6wctQo+Rdlh7ef4evJ5NCdxY4CfMbvFkocEwbl4BF8RlJw== + dependencies: + "@types/node" "16.9.1" + import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -3362,6 +3698,11 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" @@ -3534,6 +3875,14 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" + integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== + dependencies: + node-fetch "^2.6.1" + whatwg-fetch "^3.4.1" + issue-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/issue-regex/-/issue-regex-4.1.0.tgz#e2039123748a48e6711eed7a9eb392f2c17c9341" @@ -3966,6 +4315,21 @@ jest@^29.0.0: import-local "^3.0.2" jest-cli "^29.7.0" +jimp@^0.22.12: + version "0.22.12" + resolved "https://registry.yarnpkg.com/jimp/-/jimp-0.22.12.tgz#f99d1f3ec0d9d930cb7bd8f5b479859ee3a15694" + integrity sha512-R5jZaYDnfkxKJy1dwLpj/7cvyjxiclxU3F4TrI/J4j2rS0niq6YDUMoPn5hs8GDpO+OZGo7Ky057CRtWesyhfg== + dependencies: + "@jimp/custom" "^0.22.12" + "@jimp/plugins" "^0.22.12" + "@jimp/types" "^0.22.12" + regenerator-runtime "^0.13.3" + +jpeg-js@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa" + integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4117,6 +4481,20 @@ listr@^0.14.3: p-map "^2.0.0" rxjs "^6.3.3" +load-bmfont@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.2.tgz#e0f4516064fa5be8439f9c3696c01423a64e8717" + integrity sha512-qElWkmjW9Oq1F9EI5Gt7aD9zcdHb9spJCW1L/dmPf7KzCCEJxq8nhHz5eCgI9aMf7vrG/wyaCqdsI+Iy9ZTlog== + dependencies: + buffer-equal "0.0.1" + mime "^1.3.4" + parse-bmfont-ascii "^1.0.3" + parse-bmfont-binary "^1.0.5" + parse-bmfont-xml "^1.1.4" + phin "^3.7.1" + xhr "^2.0.1" + xtend "^4.0.0" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -4329,7 +4707,7 @@ mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: dependencies: mime-db "1.52.0" -mime@1.6.0: +mime@1.6.0, mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -4379,6 +4757,13 @@ mimic-response@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== + dependencies: + dom-walk "^0.1.0" + minimatch@9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" @@ -4523,7 +4908,7 @@ new-github-release-url@^2.0.0: dependencies: type-fest "^2.5.1" -node-fetch@^2.6.7: +node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -4676,6 +5061,11 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== +omggif@^1.0.10, omggif@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" + integrity sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw== + on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -4876,6 +5266,11 @@ package-name-conflict@^1.0.3: resolved "https://registry.yarnpkg.com/package-name-conflict/-/package-name-conflict-1.0.3.tgz#5147d35e8ae7f93401f1b3f9f3763c070463f25c" integrity sha512-DPBNWSUWC0wPofXeNThao0uP4a93J7r90UyhagmJS0QcacTTkorZwXYsOop70phn1hKdcf/2e9lJIhazS8bx5A== +pako@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -4883,6 +5278,29 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-bmfont-ascii@^1.0.3: + version "1.0.6" + resolved "https://registry.yarnpkg.com/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz#11ac3c3ff58f7c2020ab22769079108d4dfa0285" + integrity sha512-U4RrVsUFCleIOBsIGYOMKjn9PavsGOXxbvYGtMOEfnId0SVNsgehXh1DxUdVPLoxd5mvcEtvmKs2Mmf0Mpa1ZA== + +parse-bmfont-binary@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz#d038b476d3e9dd9db1e11a0b0e53a22792b69006" + integrity sha512-GxmsRea0wdGdYthjuUeWTMWPqm2+FAd4GI8vCvhgJsFnoGhTrLhXDDupwTo7rXVAgaLIGoVHDZS9p/5XbSqeWA== + +parse-bmfont-xml@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/parse-bmfont-xml/-/parse-bmfont-xml-1.1.6.tgz#016b655da7aebe6da38c906aca16bf0415773767" + integrity sha512-0cEliVMZEhrFDwMh4SxIyVJpqYoOWDJ9P895tFuS+XuNzI5UBmBk5U5O4KuJdTnZpSBI4LFA2+ZiJaiwfSwlMA== + dependencies: + xml-parse-from-string "^1.0.0" + xml2js "^0.5.0" + +parse-headers@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== + parse-json-object@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/parse-json-object/-/parse-json-object-1.1.0.tgz#eef60211cec368259723d8586ecec7252f8fcdb2" @@ -4986,6 +5404,18 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +peek-readable@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-4.1.0.tgz#4ece1111bf5c2ad8867c314c81356847e8a62e72" + integrity sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg== + +phin@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/phin/-/phin-3.7.1.tgz#bf841da75ee91286691b10e41522a662aa628fd6" + integrity sha512-GEazpTWwTZaEQ9RhL7Nyz0WwqilbqgLahDM3D0hxWwmVDI52nXEybHqiN6/elwpkJBhcuj+WbBu+QfT0uhPGfQ== + dependencies: + centra "^2.7.0" + picocolors@^1.0.0, picocolors@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" @@ -5001,6 +5431,13 @@ pirates@^4.0.4: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +pixelmatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" + integrity sha512-J8B6xqiO37sU/gkcMglv6h5Jbd9xNER7aHzpfRdNmV4IbQBzBpe4l9XmbG+xPF/znacgu2jfEw+wHffaq/YkXA== + dependencies: + pngjs "^3.0.0" + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -5015,6 +5452,16 @@ pkg-dir@^8.0.0: dependencies: find-up-simple "^1.0.0" +pngjs@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== + +pngjs@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821" + integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -5034,6 +5481,11 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -5207,11 +5659,23 @@ readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-web-to-node-stream@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb" + integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw== + dependencies: + readable-stream "^3.6.0" + reflect-metadata@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz#400c845b6cba87a21f2c65c4aeb158f4fa4d9c5b" integrity sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== +regenerator-runtime@^0.13.3: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + registry-auth-token@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.2.tgz#f02d49c3668884612ca031419491a13539e21fac" @@ -5374,6 +5838,11 @@ safe-stable-stringify@^2.3.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sax@>=0.6.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + scoped-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-3.0.0.tgz#cd7ede7d942f2ae90da53272102ff2d73129c46f" @@ -5734,6 +6203,14 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +strtok3@^6.2.4: + version "6.3.0" + resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-6.3.0.tgz#358b80ffe6d5d5620e19a073aa78ce947a90f9a0" + integrity sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw== + dependencies: + "@tokenizer/token" "^0.3.0" + peek-readable "^4.1.0" + superagent@5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/superagent/-/superagent-5.2.2.tgz#6ff726c5642795b2c27009e92687c8e69a6bb07d" @@ -5858,6 +6335,16 @@ through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== +timm@^1.6.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/timm/-/timm-1.7.1.tgz#96bab60c7d45b5a10a8a4d0f0117c6b7e5aff76f" + integrity sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw== + +tinycolor2@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" + integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + titleize@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" @@ -5892,6 +6379,14 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +token-types@^4.1.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/token-types/-/token-types-4.2.1.tgz#0f897f03665846982806e138977dbe72d44df753" + integrity sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ== + dependencies: + "@tokenizer/token" "^0.3.0" + ieee754 "^1.2.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -6109,6 +6604,13 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +utif2@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/utif2/-/utif2-4.1.0.tgz#e768d37bd619b995d56d9780b5d2b4611a3d932b" + integrity sha512-+oknB9FHrJ7oW7A2WZYajOcv4FcDR4CfoGB0dPNfxbi4GO05RRnFmt5oa23+9w32EanrYcSJWspUiJkLMs+37w== + dependencies: + pako "^1.0.11" + util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6177,6 +6679,11 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +whatwg-fetch@^3.4.1: + version "3.6.20" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" + integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -6341,6 +6848,39 @@ xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" integrity sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ== +xhr@^2.0.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xml-parse-from-string@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz#a9029e929d3dbcded169f3c6e28238d95a5d5a28" + integrity sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g== + +xml2js@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" + integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" From 42e7bda1ce901fe0e0ab61ae385b5c6ebca98e16 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 13 Jul 2024 15:16:10 +0100 Subject: [PATCH 28/31] Fix there being a black background on the image grid (#299) - Fix there being a black background on the card image grid - This was being caused me loading the images as a jpeg by mistake #279 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/299 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/ImageHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/ImageHelper.ts b/src/helpers/ImageHelper.ts index 3b64dd5..be3d083 100644 --- a/src/helpers/ImageHelper.ts +++ b/src/helpers/ImageHelper.ts @@ -46,7 +46,7 @@ export default class ImageHelper { } } - const image = await loadImage(await imageData.getBufferAsync("image/jpeg")); + const image = await loadImage(await imageData.getBufferAsync("image/png")); const x = i % gridWidth; const y = Math.floor(i / gridWidth); From c0bc71c30490b76e6f6b068aff39ceb4cbc53398 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 13 Jul 2024 15:17:04 +0100 Subject: [PATCH 29/31] Fix the series view next button not disabling when on the last page (#300) - Fix the button disable logic on the `/series view` command not disabling the next button on the last page #298 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/300 Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/SeriesHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/SeriesHelper.ts b/src/helpers/SeriesHelper.ts index a26fedd..c3a22d6 100644 --- a/src/helpers/SeriesHelper.ts +++ b/src/helpers/SeriesHelper.ts @@ -52,7 +52,7 @@ export default class SeriesHelper { .setCustomId(`series view ${seriesId} ${page + 1}`) .setLabel("Next") .setStyle(ButtonStyle.Primary) - .setDisabled(page + 1 > totalPages)); + .setDisabled(page + 1 == totalPages)); const buffer = await ImageHelper.GenerateCardImageGrid(cardsOnPage.map(x => ({id: x.id, path: x.path})), userId); const image = new AttachmentBuilder(buffer, { name: "page.png" }); @@ -98,7 +98,7 @@ export default class SeriesHelper { .setCustomId(`series list ${page + 1}`) .setLabel("Next") .setStyle(ButtonStyle.Primary) - .setDisabled(page + 1 > totalPages)); + .setDisabled(page + 1 == totalPages)); return { embed, row }; } From a1879839d992287028e09c75d0f0ba0e47f2a06d Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 13 Jul 2024 17:38:24 +0100 Subject: [PATCH 30/31] 0.7.0 --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 0b0bb2d..009d99c 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ # any secret values. BOT_TOKEN= -BOT_VER=0.6.4 +BOT_VER=0.7.0 BOT_AUTHOR=Vylpes BOT_OWNERID=147392775707426816 BOT_CLIENTID=682942374040961060 @@ -37,4 +37,4 @@ DB_CARD_FILE=:memory: EXPRESS_PORT=3302 -GDRIVESYNC_AUTO=true \ No newline at end of file +GDRIVESYNC_AUTO=true From 9ea3bbe29d752199789ebff01baf323616c47a10 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 13 Jul 2024 17:38:34 +0100 Subject: [PATCH 31/31] v0.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98d77f3..f37eae6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "card-drop", - "version": "0.6.4", + "version": "0.7.0", "main": "./dist/bot.js", "typings": "./dist", "scripts": {