From 6741e9f61e4c82a2898fa27485688a7b2c4a3aed Mon Sep 17 00:00:00 2001 From: dev-737 <73829355+dev-737@users.noreply.github.com> Date: Sat, 18 May 2024 12:10:02 +0530 Subject: [PATCH] fix: get and post data from and to connection cache wherever possible --- locales | 2 +- package.json | 16 +- src/api/routes/dbl.ts | 10 +- src/commands/context-menu/blacklist.ts | 6 +- src/commands/context-menu/messageInfo.ts | 10 +- src/commands/slash/Main/blacklist/server.ts | 3 +- src/commands/slash/Main/connection.ts | 43 +- src/commands/slash/Main/hub/browse.ts | 21 +- src/commands/slash/Main/hub/join.ts | 21 +- src/commands/slash/Main/hub/leave.ts | 3 +- src/core/Client.ts | 32 +- src/managers/EventManager.ts | 16 +- src/scripts/hub/manage.ts | 3 +- src/scripts/network/storeMessageData.ts | 6 +- src/utils/ConnectedList.ts | 58 +++ src/utils/Utils.ts | 16 +- yarn.lock | 442 +++++++++++--------- 17 files changed, 405 insertions(+), 303 deletions(-) create mode 100644 src/utils/ConnectedList.ts diff --git a/locales b/locales index 72ceb917..c8aff1f6 160000 --- a/locales +++ b/locales @@ -1 +1 @@ -Subproject commit 72ceb917485d2cff5342bad953b9055136dda54f +Subproject commit c8aff1f64d4e658ceaf9aa38787ef1e93d463180 diff --git a/package.json b/package.json index ab19aaa3..a5ec0d8c 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ }, "type": "module", "dependencies": { - "@prisma/client": "^5.13.0", - "@sentry/node": "^7.114.0", + "@prisma/client": "^5.14.0", + "@sentry/node": "7", "@tensorflow/tfjs-node": "^4.19.0", "@top-gg/sdk": "^3.1.6", "common-tags": "^1.8.2", @@ -37,7 +37,7 @@ "lz-string": "^1.5.0", "nsfwjs": "3.0.0", "parse-duration": "^1.1.0", - "sharp": "^0.33.3", + "sharp": "^0.33.4", "source-map-support": "^0.5.21", "winston": "^3.13.0" }, @@ -46,18 +46,18 @@ "@types/common-tags": "^1.8.4", "@types/express": "^4.17.21", "@types/js-yaml": "^4.0.9", - "@types/lodash": "^4.17.1", - "@types/node": "^20.12.11", + "@types/lodash": "^4.17.4", + "@types/node": "^20.12.12", "@types/source-map-support": "^0.5.10", "cz-conventional-changelog": "^3.3.0", - "eslint": "9.2.0", + "eslint": "9.3.0", "lint-staged": "^15.2.2", "prettier": "^3.2.5", - "prisma": "^5.13.0", + "prisma": "^5.14.0", "standard-version": "^9.5.0", "tsc-watch": "^6.2.0", "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0" + "typescript-eslint": "^7.9.0" }, "config": { "commitizen": { diff --git a/src/api/routes/dbl.ts b/src/api/routes/dbl.ts index 23f07928..c70edea3 100644 --- a/src/api/routes/dbl.ts +++ b/src/api/routes/dbl.ts @@ -6,14 +6,14 @@ import 'dotenv/config'; // NOTE: testing this against top.gg only works in the production server // to test locally use postman or something similar to send a POST request to http://localhost:443/dbl const TopggWebhook = new Webhook(process.env.TOPGG_AUTH); +const router = Router(); export default (voteManager: VoteManager) => { - Router().post( + router.post( '/dbl', - TopggWebhook.listener((vote) => { - // emit the vote event to use in other files - voteManager?.emit('vote', vote); + TopggWebhook.listener((payload) => { + voteManager.emit('vote', payload); }), ); - return Router(); + return router; }; diff --git a/src/commands/context-menu/blacklist.ts b/src/commands/context-menu/blacklist.ts index 8ece2972..56c227e0 100644 --- a/src/commands/context-menu/blacklist.ts +++ b/src/commands/context-menu/blacklist.ts @@ -23,6 +23,7 @@ import { RegisterInteractionHandler } from '../../decorators/Interaction.js'; import { simpleEmbed } from '../../utils/Utils.js'; import { stripIndents } from 'common-tags'; import { logBlacklist } from '../../utils/HubLogger/ModLogs.js'; +import { deleteConnections } from '../../utils/ConnectedList.js'; export default class Blacklist extends BaseCommand { readonly data: RESTPostAPIApplicationCommandsJSONBody = { @@ -265,8 +266,9 @@ export default class Blacklist extends BaseCommand { ); } - await db.connectedList.deleteMany({ - where: { serverId: originalMsg.serverId, hubId: originalMsg.hubId }, + await deleteConnections({ + serverId: originalMsg.serverId, + hubId: originalMsg.hubId, }); if (server) { diff --git a/src/commands/context-menu/messageInfo.ts b/src/commands/context-menu/messageInfo.ts index f1680bc9..07246704 100644 --- a/src/commands/context-menu/messageInfo.ts +++ b/src/commands/context-menu/messageInfo.ts @@ -76,9 +76,9 @@ export default class MessageInfo extends BaseCommand { const components = MessageInfo.buildButtons(target.id, interaction.user.locale); - const guildConnected = await db.connectedList.findFirst({ - where: { serverId: originalMsg.serverId, hubId: originalMsg.hub?.id }, - }); + const guildConnected = interaction.client.connectionCache.find( + (c) => c.serverId === originalMsg.serverId && c.hubId === originalMsg.hub?.id, + ); if (guildConnected?.invite) { components[1].addComponents( @@ -124,7 +124,9 @@ export default class MessageInfo extends BaseCommand { const author = await interaction.client.users.fetch(originalMsg.authorId); const server = await interaction.client.fetchGuild(originalMsg.serverId); - const guildConnected = await db.connectedList.findFirst({ where: { serverId: server?.id } }); + const guildConnected = interaction.client.connectionCache.find( + (c) => c.serverId === server?.id, + ); if (interaction.isButton()) { // component builders taken from the original message diff --git a/src/commands/slash/Main/blacklist/server.ts b/src/commands/slash/Main/blacklist/server.ts index 529e41af..072d85f7 100644 --- a/src/commands/slash/Main/blacklist/server.ts +++ b/src/commands/slash/Main/blacklist/server.ts @@ -9,6 +9,7 @@ import parse from 'parse-duration'; import Logger from '../../../../utils/Logger.js'; import { t } from '../../../../utils/Locale.js'; import { logBlacklist, logUnblacklist } from '../../../../utils/HubLogger/ModLogs.js'; +import { deleteConnections } from '../../../../utils/ConnectedList.js'; export default class UserBlacklist extends BlacklistCommand { async execute(interaction: ChatInputCommandInteraction) { @@ -135,7 +136,7 @@ export default class UserBlacklist extends BlacklistCommand { .catch(() => null); // delete all connections from db so they can't reconnect to the hub - await db.connectedList.deleteMany({ where: { serverId: server.id, hubId: hubInDb.id } }); + await deleteConnections({ serverId: server.id, hubId: hubInDb.id }); // send log to hub's log channel await logBlacklist(hubInDb.id, { diff --git a/src/commands/slash/Main/connection.ts b/src/commands/slash/Main/connection.ts index 7e916bb3..96b72ab5 100644 --- a/src/commands/slash/Main/connection.ts +++ b/src/commands/slash/Main/connection.ts @@ -34,6 +34,7 @@ import { } from '../../../utils/Utils.js'; import { t } from '../../../utils/Locale.js'; import { connectedList } from '@prisma/client'; +import { modifyConnection } from '../../../utils/ConnectedList.js'; export default class Connection extends BaseCommand { readonly data: RESTPostAPIApplicationCommandsJSONBody = { @@ -116,10 +117,7 @@ export default class Connection extends BaseCommand { const channelExists = await interaction.guild?.channels.fetch(channelId).catch(() => null); if (!channelExists) { - await db.connectedList.update({ - where: { channelId: channelId }, - data: { connected: !isInDb.connected }, - }); + await modifyConnection({ channelId }, { connected: !isInDb.connected }); await interaction.followUp({ content: t( { phrase: 'connection.channelNotFound', locale: interaction.user.locale }, @@ -198,10 +196,7 @@ export default class Connection extends BaseCommand { // button interactions if (interaction.isButton() && customId.suffix === 'toggle') { - const toggleRes = await db.connectedList.update({ - where: { channelId }, - data: { connected: !isInDb.connected }, - }); + const toggleRes = await modifyConnection({ channelId }, { connected: !isInDb.connected }); await interaction.update({ embeds: [await buildEmbed(interaction, channelId)], @@ -211,7 +206,6 @@ export default class Connection extends BaseCommand { ], }); } - else if (interaction.isStringSelectMenu()) { Connection.executeStringSelects(interaction, channelId, isInDb); } @@ -230,7 +224,7 @@ export default class Connection extends BaseCommand { const channelId = customId.args[0]; if (!invite) { - await db.connectedList.update({ where: { channelId }, data: { invite: { unset: true } } }); + await modifyConnection({ channelId }, { invite: { unset: true } }); await interaction.followUp({ content: t( { phrase: 'connection.inviteRemoved', locale: interaction.user.locale }, @@ -254,7 +248,7 @@ export default class Connection extends BaseCommand { return; } - await db.connectedList.update({ where: { channelId }, data: { invite } }); + await modifyConnection({ channelId }, { invite }); await interaction.followUp({ content: t( @@ -279,10 +273,10 @@ export default class Connection extends BaseCommand { return; } - await db.connectedList.update({ - where: { channelId: customId.args[0] }, - data: { embedColor: embedColor ? embedColor : { unset: true } }, - }); + await modifyConnection( + { channelId: customId.args[0] }, + { embedColor: embedColor ? embedColor : { unset: true } }, + ); await interaction.reply({ content: t( @@ -305,17 +299,11 @@ export default class Connection extends BaseCommand { ) { switch (interaction.values[0]) { case 'compact': - await db.connectedList.update({ - where: { channelId }, - data: { compact: !connection.compact }, - }); + await modifyConnection({ channelId }, { compact: !connection.compact }); break; case 'profanity': - await db.connectedList.update({ - where: { channelId }, - data: { profFilter: !connection.profFilter }, - }); + await modifyConnection({ channelId }, { profFilter: !connection.profFilter }); break; case 'invite': { @@ -402,7 +390,6 @@ export default class Connection extends BaseCommand { : await interaction.update({ embeds: [newEmbeds] }); } - static async executeChannelSelects( interaction: ChannelSelectMenuInteraction, channelId: string, @@ -442,10 +429,10 @@ export default class Connection extends BaseCommand { } const newWebhook = await getOrCreateWebhook(newChannel as TextChannel | ThreadChannel); - await db.connectedList.update({ - where: { channelId }, - data: { channelId: newChannel?.id, webhookURL: newWebhook?.url }, - }); + await modifyConnection( + { channelId }, + { channelId: newChannel?.id, webhookURL: newWebhook?.url }, + ); await interaction.editReply({ content: t( diff --git a/src/commands/slash/Main/hub/browse.ts b/src/commands/slash/Main/hub/browse.ts index 19f1d5f5..63d44e29 100644 --- a/src/commands/slash/Main/hub/browse.ts +++ b/src/commands/slash/Main/hub/browse.ts @@ -35,6 +35,7 @@ import { stripIndents } from 'common-tags'; import BlacklistManager from '../../../../managers/BlacklistManager.js'; import { t } from '../../../../utils/Locale.js'; import { logServerJoin } from '../../../../utils/HubLogger/JoinLeave.js'; +import { connectChannel } from '../../../../utils/ConnectedList.js'; export default class Browse extends Hub { async execute(interaction: ChatInputCommandInteraction): Promise { @@ -374,17 +375,15 @@ export default class Browse extends Hub { if (!webhook) return; // finally make the connection - await db.connectedList.create({ - data: { - serverId: channel.guildId, - channelId: channel.id, - parentId: channel.isThread() ? channel.parentId : undefined, - webhookURL: webhook.url, - hub: { connect: { id: hubDetails.id } }, - connected: true, - compact: false, - profFilter: true, - }, + await connectChannel({ + serverId: channel.guildId, + channelId: channel.id, + parentId: channel.isThread() ? channel.parentId : undefined, + webhookURL: webhook.url, + hub: { connect: { id: hubDetails.id } }, + connected: true, + compact: false, + profFilter: true, }); await interaction.editReply({ diff --git a/src/commands/slash/Main/hub/join.ts b/src/commands/slash/Main/hub/join.ts index 4c7dcf40..cd7a0a40 100644 --- a/src/commands/slash/Main/hub/join.ts +++ b/src/commands/slash/Main/hub/join.ts @@ -9,6 +9,7 @@ import { showOnboarding } from '../../../../scripts/network/onboarding.js'; import { stripIndents } from 'common-tags'; import { t } from '../../../../utils/Locale.js'; import { logServerJoin } from '../../../../utils/HubLogger/JoinLeave.js'; +import { connectChannel } from '../../../../utils/ConnectedList.js'; export default class JoinSubCommand extends Hub { async execute(interaction: ChatInputCommandInteraction): Promise { @@ -157,17 +158,15 @@ export default class JoinSubCommand extends Hub { } // finally make the connection - await db.connectedList.create({ - data: { - serverId: channel.guildId, - channelId: channel.id, - parentId: channel.isThread() ? channel.parentId : undefined, - webhookURL: webhook.url, - hub: { connect: { id: hub.id } }, - connected: true, - compact: false, - profFilter: true, - }, + await connectChannel({ + serverId: channel.guildId, + channelId: channel.id, + parentId: channel.isThread() ? channel.parentId : undefined, + webhookURL: webhook.url, + hub: { connect: { id: hub.id } }, + connected: true, + compact: false, + profFilter: true, }); await interaction.editReply({ diff --git a/src/commands/slash/Main/hub/leave.ts b/src/commands/slash/Main/hub/leave.ts index 8f221863..d5cacf8f 100644 --- a/src/commands/slash/Main/hub/leave.ts +++ b/src/commands/slash/Main/hub/leave.ts @@ -15,6 +15,7 @@ import { emojis } from '../../../../utils/Constants.js'; import { simpleEmbed, setComponentExpiry } from '../../../../utils/Utils.js'; import { t } from '../../../../utils/Locale.js'; import { logServerLeave } from '../../../../utils/HubLogger/JoinLeave.js'; +import { deleteConnection } from '../../../../utils/ConnectedList.js'; export default class Leave extends Hub { async execute(interaction: ChatInputCommandInteraction) { @@ -103,7 +104,7 @@ export default class Leave extends Hub { return; } - await db.connectedList.delete({ where: { channelId } }); + await deleteConnection({ channelId }); await interaction.update({ content: t( { phrase: 'hub.leave.success', locale }, diff --git a/src/core/Client.ts b/src/core/Client.ts index 13fa098e..f80e9254 100644 --- a/src/core/Client.ts +++ b/src/core/Client.ts @@ -11,7 +11,7 @@ import { import { ClusterClient, getInfo } from 'discord-hybrid-sharding'; import { commandsMap, interactionsMap } from './BaseCommand.js'; import db from '../utils/Db.js'; -import Sentry, { captureException } from '@sentry/node'; +import Sentry from '@sentry/node'; import Scheduler from '../services/SchedulerService.js'; import CooldownService from '../services/CooldownService.js'; import BlacklistManager from '../managers/BlacklistManager.js'; @@ -20,16 +20,14 @@ import { isDevBuild } from '../utils/Constants.js'; import { ActivityType } from 'discord.js'; import 'dotenv/config'; import { loadLocales, supportedLocaleCodes } from '../utils/Locale.js'; -import { connectedList } from '@prisma/client'; -import Logger from '../utils/Logger.js'; import loadCommandFiles from '../utils/LoadCommands.js'; +import { connectionCache as _connectionCache, syncConnectionCache } from '../utils/ConnectedList.js'; export default class SuperClient extends Client { // A static instance of the SuperClient class to be used globally. public static instance: SuperClient; - private _connectionCache: Collection = new Collection(); - private _cachePopulated = false; + private _connectionCachePopulated = false; private readonly scheduler = new Scheduler(); readonly description = 'The only cross-server chatting bot you\'ll ever need.'; @@ -108,31 +106,19 @@ export default class SuperClient extends Client // load commands await loadCommandFiles(); - await this.populateConnectionCache(); - this.getScheduler().addRecurringTask('populateConnectionCache', 60_000 * 5, async () => { - await this.populateConnectionCache().catch(captureException); - }); + await syncConnectionCache(); + this._connectionCachePopulated = true; - await this.login(process.env.TOKEN); - } + this.getScheduler().addRecurringTask('populateConnectionCache', 60_000 * 5, syncConnectionCache); - protected async populateConnectionCache() { - Logger.debug('[InterChat]: Populating connection cache.'); - const connections = await db.connectedList.findMany({ where: { connected: true } }); - - // populate all at once without time delay - this._connectionCache = new Collection(connections.map((c) => [c.channelId, c])); - this._cachePopulated = true; - Logger.debug( - `[InterChat]: Connection cache populated with ${this._connectionCache.size} entries.`, - ); + await this.login(process.env.TOKEN); } public get connectionCache() { - return this._connectionCache; + return _connectionCache; } public get cachePopulated() { - return this._cachePopulated; + return this._connectionCachePopulated; } static resolveEval = (value: T[]) => diff --git a/src/managers/EventManager.ts b/src/managers/EventManager.ts index 6d567eca..9f489629 100644 --- a/src/managers/EventManager.ts +++ b/src/managers/EventManager.ts @@ -35,6 +35,7 @@ import { CustomID } from '../utils/CustomID.js'; import SuperClient from '../core/Client.js'; import sendBroadcast from '../scripts/network/sendBroadcast.js'; import { logServerLeave } from '../utils/HubLogger/JoinLeave.js'; +import { deleteConnections, modifyConnection } from '../utils/ConnectedList.js'; export default abstract class EventManager { @GatewayEvent('ready') @@ -128,10 +129,7 @@ export default abstract class EventManager { // only continue if webhook was deleted if (!webhook) { // disconnect the channel - await db.connectedList.update({ - where: { id: connection.id }, - data: { connected: false }, - }); + await modifyConnection({ id: connection.id }, { connected: false }); const client = SuperClient.instance; @@ -225,7 +223,7 @@ export default abstract class EventManager { // find all connections that belong to this guild const connections = await db.connectedList.findMany({ where: { serverId: guild.id } }); // delete them from the database - await db.connectedList.deleteMany({ where: { serverId: guild.id } }); + await deleteConnections({ serverId: guild.id }); // send server leave log to hubs connections.forEach((connection) => logServerLeave(connection.hubId, guild)); @@ -329,8 +327,12 @@ export default abstract class EventManager { } const command = commands.get(interaction.commandName); - if (!interaction.isAutocomplete()) {await command?.execute(interaction);} // normal slashie/context menu - else if (command?.autocomplete) {await command.autocomplete(interaction);} // autocomplete options + if (!interaction.isAutocomplete()) { + await command?.execute(interaction); + } // normal slashie/context menu + else if (command?.autocomplete) { + await command.autocomplete(interaction); + } // autocomplete options } catch (e) { handleError(e, interaction); diff --git a/src/scripts/hub/manage.ts b/src/scripts/hub/manage.ts index 03e21cea..fb00d361 100644 --- a/src/scripts/hub/manage.ts +++ b/src/scripts/hub/manage.ts @@ -63,7 +63,7 @@ export const hubEmbed = async (hub: hubs & { connections: connectedList[] }) => .setDescription( stripIndents` ${hub.description} - - __**Public:**__ ${hub.private ? emojis.no : emojis.yes} + __**Public:**__ ${hub.private ? emojis.no : emojis.yes} `, ) .setThumbnail(hub.iconUrl) @@ -72,6 +72,7 @@ export const hubEmbed = async (hub: hubs & { connections: connectedList[] }) => { name: 'Blacklists', value: stripIndents` + - Total: ${hubBlacklistedUsers + hubBlacklistedServers} - Users: ${hubBlacklistedUsers} - Servers: ${hubBlacklistedServers} `, diff --git a/src/scripts/network/storeMessageData.ts b/src/scripts/network/storeMessageData.ts index eca4a96e..cfcf40ba 100644 --- a/src/scripts/network/storeMessageData.ts +++ b/src/scripts/network/storeMessageData.ts @@ -2,6 +2,7 @@ import { originalMessages } from '@prisma/client'; import { APIMessage, Message } from 'discord.js'; import { parseTimestampFromId } from '../../utils/Utils.js'; import db from '../../utils/Db.js'; +import { modifyConnections } from '../../utils/ConnectedList.js'; export interface NetworkWebhookSendResult { messageOrError: APIMessage | string; @@ -56,9 +57,6 @@ export default async ( // disconnect network if, webhook does not exist/bot cannot access webhook if (invalidWebhookURLs.length > 0) { - await db.connectedList.updateMany({ - where: { webhookURL: { in: invalidWebhookURLs } }, - data: { connected: false }, - }); + await modifyConnections({ webhookURL: { in: invalidWebhookURLs } }, { connected: false }); } }; diff --git a/src/utils/ConnectedList.ts b/src/utils/ConnectedList.ts new file mode 100644 index 00000000..42047170 --- /dev/null +++ b/src/utils/ConnectedList.ts @@ -0,0 +1,58 @@ +import { Prisma, connectedList } from '@prisma/client'; +import db from './Db.js'; +import { Collection } from 'discord.js'; +import Logger from './Logger.js'; + +export const connectionCache = new Collection(); + +export const syncConnectionCache = async () => { + Logger.debug('[InterChat]: Populating connection cache.'); + const connections = await db.connectedList.findMany({ where: { connected: true } }); + + // populate all at once without time delay + connections.forEach((c) => connectionCache.set(c.channelId, c)); + Logger.debug(`[InterChat]: Connection cache populated with ${connectionCache.size} entries.`); +}; + +export const deleteConnection = async (where: Prisma.connectedListWhereUniqueInput) => { + const del = await db.connectedList.delete({ where }); + connectionCache.delete(del.channelId); +}; + +export const deleteConnections = async (where: Prisma.connectedListWhereInput) => { + await db.connectedList.deleteMany({ where }); + + syncConnectionCache() + .then(void 0) + .catch(void 0); +}; + +export const connectChannel = async (data: Prisma.connectedListCreateInput) => { + const connection = await db.connectedList.create({ data }); + + connectionCache.set(connection.channelId, connection); + return connection; +}; + +export const modifyConnection = async ( + where: Prisma.connectedListWhereUniqueInput, + data: Prisma.connectedListUpdateInput, +) => { + const connection = await db.connectedList.update({ where, data }); + + connectionCache.set(connection.channelId, connection); + return connection; +}; + +export const modifyConnections = async ( + where: Prisma.connectedListWhereInput, + data: Prisma.connectedListUpdateInput, +) => { + const connections = await db.connectedList.updateMany({ where, data }); + + syncConnectionCache() + .then(void 0) + .catch(void 0); + + return connections; +}; diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 2aacc4b3..b9cccb68 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -3,6 +3,7 @@ import Logger from './Logger.js'; import toLower from 'lodash/toLower.js'; import Scheduler from '../services/SchedulerService.js'; import startCase from 'lodash/startCase.js'; +import SuperClient from '../core/Client.js'; import { ActionRow, ButtonStyle, @@ -38,8 +39,8 @@ import { supportedLocaleCodes, t } from './Locale.js'; import 'dotenv/config'; import { captureException } from '@sentry/node'; import { CustomID } from './CustomID.js'; -import SuperClient from '../core/Client.js'; import { ClusterManager } from 'discord-hybrid-sharding'; +import { deleteConnections } from './ConnectedList.js'; /** Convert milliseconds to a human readable time (eg: 1d 2h 3m 4s) */ export const msToReadable = (milliseconds: number) => { @@ -208,7 +209,7 @@ export const deleteMsgsFromDb = async (broadcastMsgs: string[]) => { export const deleteHubs = async (ids: string[]) => { // delete all relations first and then delete the hub - await db.connectedList.deleteMany({ where: { hubId: { in: ids } } }); + await deleteConnections({ hubId: { in: ids } }); await db.hubInvites.deleteMany({ where: { hubId: { in: ids } } }); await db.originalMessages .findMany({ where: { hubId: { in: ids } }, include: { broadcastMsgs: true } }) @@ -434,8 +435,15 @@ export const sendToHub = async (hubId: string, message: string | WebhookMessageC const payload = typeof message === 'string' ? { content: message, threadId } : { ...message, threadId }; - const webhook = new WebhookClient({ url: connection.webhookURL }); - return await webhook.send(payload).catch(() => null); + try { + const webhook = new WebhookClient({ url: connection.webhookURL }); + return await webhook.send(payload); + } + catch (e) { + e.message = `For Connection: ${connection.channelId} ${e.message}`; + Logger.error(e); + captureException(e); + } }); return await Promise.all(res); diff --git a/yarn.lock b/yarn.lock index 7d430f76..501251d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -196,7 +196,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.1.0": +"@emnapi/runtime@npm:^1.1.1": version: 1.1.1 resolution: "@emnapi/runtime@npm:1.1.1" dependencies: @@ -223,9 +223,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^3.0.2": - version: 3.0.2 - resolution: "@eslint/eslintrc@npm:3.0.2" +"@eslint/eslintrc@npm:^3.1.0": + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -236,14 +236,14 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10c0/d8c92f06bdf8e2be9fcc0eeac4a9351745174adfcc72571ef3d179101cb55e19f15f6385c2a4f4945a3ba9245802d3371208e2e1e4f00f6bcf6b8711656af85a + checksum: 10c0/5b7332ed781edcfc98caa8dedbbb843abfb9bda2e86538529c843473f580e40c69eb894410eddc6702f487e9ee8f8cfa8df83213d43a8fdb549f23ce06699167 languageName: node linkType: hard -"@eslint/js@npm:9.2.0": - version: 9.2.0 - resolution: "@eslint/js@npm:9.2.0" - checksum: 10c0/89632466d329d9dd68c6ec24290e407f0950ca8c4b7f3750b82457daa7f6233799ccbc956cd84231f9544efbefddd69833ee82658883ca673cfca9e4b8e0713a +"@eslint/js@npm:9.3.0": + version: 9.3.0 + resolution: "@eslint/js@npm:9.3.0" + checksum: 10c0/1550c68922eb17c3ce541d9ffbb687e656bc0d4e2fff2d9cb0a75101a9cdb6184b7af7378ccf46c6ca750b280d25d45cc5e7374a83a4ee89d404d3717502fd9d languageName: node linkType: hard @@ -279,10 +279,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/retry@npm:^0.2.3": - version: 0.2.3 - resolution: "@humanwhocodes/retry@npm:0.2.3" - checksum: 10c0/0913d89bb5cb1f0a049a6c068dee312d30920d5cce5a07588cd91fcb5453af52f2a9826d07d465066b92ad7bc0545e9f59384c414abe27745c79141c78a25099 +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.0 + resolution: "@humanwhocodes/retry@npm:0.3.0" + checksum: 10c0/7111ec4e098b1a428459b4e3be5a5d2a13b02905f805a2468f4fa628d072f0de2da26a27d04f65ea2846f73ba51f4204661709f05bfccff645e3cedef8781bb6 languageName: node linkType: hard @@ -293,9 +293,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-arm64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-darwin-arm64@npm:0.33.3" +"@img/sharp-darwin-arm64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-darwin-arm64@npm:0.33.4" dependencies: "@img/sharp-libvips-darwin-arm64": "npm:1.0.2" dependenciesMeta: @@ -305,9 +305,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-x64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-darwin-x64@npm:0.33.3" +"@img/sharp-darwin-x64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-darwin-x64@npm:0.33.4" dependencies: "@img/sharp-libvips-darwin-x64": "npm:1.0.2" dependenciesMeta: @@ -373,9 +373,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-arm64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linux-arm64@npm:0.33.3" +"@img/sharp-linux-arm64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linux-arm64@npm:0.33.4" dependencies: "@img/sharp-libvips-linux-arm64": "npm:1.0.2" dependenciesMeta: @@ -385,9 +385,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-arm@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linux-arm@npm:0.33.3" +"@img/sharp-linux-arm@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linux-arm@npm:0.33.4" dependencies: "@img/sharp-libvips-linux-arm": "npm:1.0.2" dependenciesMeta: @@ -397,9 +397,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-s390x@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linux-s390x@npm:0.33.3" +"@img/sharp-linux-s390x@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linux-s390x@npm:0.33.4" dependencies: "@img/sharp-libvips-linux-s390x": "npm:1.0.2" dependenciesMeta: @@ -409,9 +409,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-x64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linux-x64@npm:0.33.3" +"@img/sharp-linux-x64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linux-x64@npm:0.33.4" dependencies: "@img/sharp-libvips-linux-x64": "npm:1.0.2" dependenciesMeta: @@ -421,9 +421,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-arm64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linuxmusl-arm64@npm:0.33.3" +"@img/sharp-linuxmusl-arm64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linuxmusl-arm64@npm:0.33.4" dependencies: "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.2" dependenciesMeta: @@ -433,9 +433,9 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-x64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-linuxmusl-x64@npm:0.33.3" +"@img/sharp-linuxmusl-x64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-linuxmusl-x64@npm:0.33.4" dependencies: "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.2" dependenciesMeta: @@ -445,25 +445,25 @@ __metadata: languageName: node linkType: hard -"@img/sharp-wasm32@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-wasm32@npm:0.33.3" +"@img/sharp-wasm32@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-wasm32@npm:0.33.4" dependencies: - "@emnapi/runtime": "npm:^1.1.0" + "@emnapi/runtime": "npm:^1.1.1" conditions: cpu=wasm32 languageName: node linkType: hard -"@img/sharp-win32-ia32@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-win32-ia32@npm:0.33.3" +"@img/sharp-win32-ia32@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-win32-ia32@npm:0.33.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@img/sharp-win32-x64@npm:0.33.3": - version: 0.33.3 - resolution: "@img/sharp-win32-x64@npm:0.33.3" +"@img/sharp-win32-x64@npm:0.33.4": + version: 0.33.4 + resolution: "@img/sharp-win32-x64@npm:0.33.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -514,61 +514,61 @@ __metadata: languageName: node linkType: hard -"@prisma/client@npm:^5.13.0": - version: 5.13.0 - resolution: "@prisma/client@npm:5.13.0" +"@prisma/client@npm:^5.14.0": + version: 5.14.0 + resolution: "@prisma/client@npm:5.14.0" peerDependencies: prisma: "*" peerDependenciesMeta: prisma: optional: true - checksum: 10c0/19a0d08237fd7bae6009417476dc3588df77102131e3c8df01a024e5dee78417a8079d5a3dbbb3ffee7b4117067a9c10912f5084a3a40884de8fde5314fb1227 + checksum: 10c0/b213117401670ea131c044edb25637f6e8eca438163a7433b9f640f86847d53665d84655bc664cfafbdc32745c91cde595cb0390d77fb55941ab52bd925b8efb languageName: node linkType: hard -"@prisma/debug@npm:5.13.0": - version: 5.13.0 - resolution: "@prisma/debug@npm:5.13.0" - checksum: 10c0/9e3a84e473a77ae16adeeae3de27ec9f8431bffdd563fd7441f42596c6f6a7a766832c3c17a84a8d89e4133028b361dd274b48291425f388b4fb4575093cf3ed +"@prisma/debug@npm:5.14.0": + version: 5.14.0 + resolution: "@prisma/debug@npm:5.14.0" + checksum: 10c0/a84cfc4132371f58667aeaa74fe25723dfafe06bb15ea110b3803d4cf17d80eac2599cd803a515b9d8b0bf500015ea6cc321a660f915597e6725feb66486ea5b languageName: node linkType: hard -"@prisma/engines-version@npm:5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b": - version: 5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b - resolution: "@prisma/engines-version@npm:5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b" - checksum: 10c0/459f991a8f05da8c3b69cb36148537658b8fbaa3d83de32fd35e293dbc978a2fd49d2a140921967dfd76dd942197f08af1ba89d218c09e46db96b917eef02f92 +"@prisma/engines-version@npm:5.14.0-25.e9771e62de70f79a5e1c604a2d7c8e2a0a874b48": + version: 5.14.0-25.e9771e62de70f79a5e1c604a2d7c8e2a0a874b48 + resolution: "@prisma/engines-version@npm:5.14.0-25.e9771e62de70f79a5e1c604a2d7c8e2a0a874b48" + checksum: 10c0/4700c69171b9a51e628496665c44810304bf3de210ad16443b3c5faddd82d92b26f50e0b559035b6f3bc2a4a064a19778808268301e500760f171d8aa4067ae6 languageName: node linkType: hard -"@prisma/engines@npm:5.13.0": - version: 5.13.0 - resolution: "@prisma/engines@npm:5.13.0" +"@prisma/engines@npm:5.14.0": + version: 5.14.0 + resolution: "@prisma/engines@npm:5.14.0" dependencies: - "@prisma/debug": "npm:5.13.0" - "@prisma/engines-version": "npm:5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b" - "@prisma/fetch-engine": "npm:5.13.0" - "@prisma/get-platform": "npm:5.13.0" - checksum: 10c0/533772a7ed24daf515b74fc96123a3eec028a66a2cdee60e9509dc0308f572f91185746e90050a8b3ff4366465a5ef82bf7c015b6f600090add3d672f7bdaf1d + "@prisma/debug": "npm:5.14.0" + "@prisma/engines-version": "npm:5.14.0-25.e9771e62de70f79a5e1c604a2d7c8e2a0a874b48" + "@prisma/fetch-engine": "npm:5.14.0" + "@prisma/get-platform": "npm:5.14.0" + checksum: 10c0/5b62912c473f98a4208f843710bf4d1b59aad391a6c85123dd46804a7b7e8c850f3fae4acb647b4c9658e437c09c3c3b670b9d2d467942fc1ee1a3d737c1d298 languageName: node linkType: hard -"@prisma/fetch-engine@npm:5.13.0": - version: 5.13.0 - resolution: "@prisma/fetch-engine@npm:5.13.0" +"@prisma/fetch-engine@npm:5.14.0": + version: 5.14.0 + resolution: "@prisma/fetch-engine@npm:5.14.0" dependencies: - "@prisma/debug": "npm:5.13.0" - "@prisma/engines-version": "npm:5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b" - "@prisma/get-platform": "npm:5.13.0" - checksum: 10c0/44bd142d11a826b98974b6187d43490653a0bf47e63ce4db1f1dfda3cf254721102c796e7984e18ecfbec709be30d9b2e77f8dcb685d9a47670ac7c6f833778a + "@prisma/debug": "npm:5.14.0" + "@prisma/engines-version": "npm:5.14.0-25.e9771e62de70f79a5e1c604a2d7c8e2a0a874b48" + "@prisma/get-platform": "npm:5.14.0" + checksum: 10c0/732b9c19ffe6ea4ed19e67fbcae0dff2f624595c725aa6d1deeadb0ac3054be0808af6a480b2e6620b3b20f6429661cb31e3feb195e78969792d2924d45e01df languageName: node linkType: hard -"@prisma/get-platform@npm:5.13.0": - version: 5.13.0 - resolution: "@prisma/get-platform@npm:5.13.0" +"@prisma/get-platform@npm:5.14.0": + version: 5.14.0 + resolution: "@prisma/get-platform@npm:5.14.0" dependencies: - "@prisma/debug": "npm:5.13.0" - checksum: 10c0/c90cf7738fe886f096cd4563938b2f05d3ebd94b1391ade81ae9b9d863f6ab34082d12be97e7ae6b649f37278dc0b1c65c3c0aa113d1276a942798a2c8ac469b + "@prisma/debug": "npm:5.14.0" + checksum: 10c0/2763157532cb4a0e2aac030509a7289900d349b19c35403a4c1a97dcef2a932737edcaa013756a26fb222597519d356ede50f48832122e99cf8fe4e530cbfca1 languageName: node linkType: hard @@ -596,65 +596,65 @@ __metadata: languageName: node linkType: hard -"@sentry-internal/tracing@npm:7.114.0": - version: 7.114.0 - resolution: "@sentry-internal/tracing@npm:7.114.0" +"@sentry-internal/tracing@npm:7.116.0": + version: 7.116.0 + resolution: "@sentry-internal/tracing@npm:7.116.0" dependencies: - "@sentry/core": "npm:7.114.0" - "@sentry/types": "npm:7.114.0" - "@sentry/utils": "npm:7.114.0" - checksum: 10c0/0701700140ceaa1a5912efb67d4b0d955eb495dd327459f60f4662d25c37cc1cee05b67154740ccd815338b4caa93687313cfd4b68e1f145832ac88604e3a378 + "@sentry/core": "npm:7.116.0" + "@sentry/types": "npm:7.116.0" + "@sentry/utils": "npm:7.116.0" + checksum: 10c0/fe7d8f43642236d6c832c48d411d3a1fd2bf7c509967bdc7d1c5d25149f70882a614061b652c9c4d443887d660ddc1552ffe72bef5fa8fbb2cea1676a7d5c742 languageName: node linkType: hard -"@sentry/core@npm:7.114.0": - version: 7.114.0 - resolution: "@sentry/core@npm:7.114.0" +"@sentry/core@npm:7.116.0": + version: 7.116.0 + resolution: "@sentry/core@npm:7.116.0" dependencies: - "@sentry/types": "npm:7.114.0" - "@sentry/utils": "npm:7.114.0" - checksum: 10c0/9ef9cd6e536180a53fdd11dfb30f19a1bf51115b6a828aae4f9dacb92233ced238e3100065429cdb50a654609519722b6cf99721cac21f09dd5d57f123aa4f3c + "@sentry/types": "npm:7.116.0" + "@sentry/utils": "npm:7.116.0" + checksum: 10c0/572593d4d86f8239bc53362c9273ea3dfddc44a438e0227297491167b78450f939d11ecb6708438583d2dc0897cb702aaf795cf18d2ef9c9773c55428666b228 languageName: node linkType: hard -"@sentry/integrations@npm:7.114.0": - version: 7.114.0 - resolution: "@sentry/integrations@npm:7.114.0" +"@sentry/integrations@npm:7.116.0": + version: 7.116.0 + resolution: "@sentry/integrations@npm:7.116.0" dependencies: - "@sentry/core": "npm:7.114.0" - "@sentry/types": "npm:7.114.0" - "@sentry/utils": "npm:7.114.0" + "@sentry/core": "npm:7.116.0" + "@sentry/types": "npm:7.116.0" + "@sentry/utils": "npm:7.116.0" localforage: "npm:^1.8.1" - checksum: 10c0/180fedbd474d1141d90882446de023da38df906489e9abeee4d659b9e5498922b66271c6e85b154c0c393a9157329b3e36c4fa98ba88d1741644797dbeedec1d + checksum: 10c0/dc3321fae83c9ba8c8ce5a26e315f87c1490d7a1b549053287fef3049e65025f2f7c1dc61c10dd62a133c2912e8c1564fd0192a4680833af8e84e56fcbb843cd languageName: node linkType: hard -"@sentry/node@npm:^7.114.0": - version: 7.114.0 - resolution: "@sentry/node@npm:7.114.0" +"@sentry/node@npm:7": + version: 7.116.0 + resolution: "@sentry/node@npm:7.116.0" dependencies: - "@sentry-internal/tracing": "npm:7.114.0" - "@sentry/core": "npm:7.114.0" - "@sentry/integrations": "npm:7.114.0" - "@sentry/types": "npm:7.114.0" - "@sentry/utils": "npm:7.114.0" - checksum: 10c0/72e7471e5aaa46529729492f12fd29a4edc4e38fdff76d866f5006ed3ab06697928b356bac845c5a5aa72d82954d20e3e6cdb75794c4511dd786e6a8a7759df8 + "@sentry-internal/tracing": "npm:7.116.0" + "@sentry/core": "npm:7.116.0" + "@sentry/integrations": "npm:7.116.0" + "@sentry/types": "npm:7.116.0" + "@sentry/utils": "npm:7.116.0" + checksum: 10c0/93e6ea95c09cddcca9d5d4cc662a5f116575932189e5651e6549ef7e62d9b93df941fcce9d866dbc5533029930ddf78c213d4d75617368dc68d76529dce02ec3 languageName: node linkType: hard -"@sentry/types@npm:7.114.0": - version: 7.114.0 - resolution: "@sentry/types@npm:7.114.0" - checksum: 10c0/25564ee09beb2362f43a4f96270acdb4e1c9d999ab4fd37b6e340717433b3e685301dc0c55a7e8883226f2f20023b99055cea04f68eaaf22f4d5f9c5d6976b43 +"@sentry/types@npm:7.116.0": + version: 7.116.0 + resolution: "@sentry/types@npm:7.116.0" + checksum: 10c0/fd44cb44221bb87678cee8ecb89eeddd2e76563367944d0645d1240b30702b45a64ae09b818199ce9178c316a7c181f19f3eb757886f8955dcc205473e644985 languageName: node linkType: hard -"@sentry/utils@npm:7.114.0": - version: 7.114.0 - resolution: "@sentry/utils@npm:7.114.0" +"@sentry/utils@npm:7.116.0": + version: 7.116.0 + resolution: "@sentry/utils@npm:7.116.0" dependencies: - "@sentry/types": "npm:7.114.0" - checksum: 10c0/b20283d62df7ea3c71988e9fc2a6b7d3d04dd4a92a3599605413e2da3ff3cb408b84d65ee7c8e0bd8f99a92dd6e364c37485023e8d2c7cbcbd3f31dfb2d15383 + "@sentry/types": "npm:7.116.0" + checksum: 10c0/a74094c162f1a34b8448cbb828840fa41100a579db588cb00deaa078ac7ad671bab1932bbbd1c3706e8c9cc3a53382f12bc29474bb81cdc1c9e8ea4095bea191 languageName: node linkType: hard @@ -943,10 +943,10 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.17.1": - version: 4.17.1 - resolution: "@types/lodash@npm:4.17.1" - checksum: 10c0/af2ad8a3c8d7deb170a7ec6e18afc5ae8980576e5f7fe798d8a95a1df7222c15bdf967a25a35879f575a3b64743de00145710ee461a0051e055e94e4fe253f45 +"@types/lodash@npm:^4.17.4": + version: 4.17.4 + resolution: "@types/lodash@npm:4.17.4" + checksum: 10c0/0124c64cb9fe7a0f78b6777955abd05ef0d97844d49118652eae45f8fa57bfb7f5a7a9bccc0b5a84c0a6dc09631042e4590cb665acb9d58dfd5e6543c75341ec languageName: node linkType: hard @@ -997,12 +997,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.12.11": - version: 20.12.11 - resolution: "@types/node@npm:20.12.11" +"@types/node@npm:^20.12.12": + version: 20.12.12 + resolution: "@types/node@npm:20.12.12" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/efaa7b08c50ba6e6982ac7d531ba08d5935539ba76e954807df1ff9382a319ead7e003ccaca5ad7cf33ecf53f212507f7c1f2794bd2ff52df6365fef21f6e1fb + checksum: 10c0/f374b763c744e8f16e4f38cf6e2c0eef31781ec9228c9e43a6f267880fea420fab0a238b59f10a7cb3444e49547c5e3785787e371fc242307310995b21988812 languageName: node linkType: hard @@ -1101,20 +1101,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.8.0": - version: 7.8.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.8.0" +"@typescript-eslint/eslint-plugin@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.9.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.8.0" - "@typescript-eslint/type-utils": "npm:7.8.0" - "@typescript-eslint/utils": "npm:7.8.0" - "@typescript-eslint/visitor-keys": "npm:7.8.0" - debug: "npm:^4.3.4" + "@typescript-eslint/scope-manager": "npm:7.9.0" + "@typescript-eslint/type-utils": "npm:7.9.0" + "@typescript-eslint/utils": "npm:7.9.0" + "@typescript-eslint/visitor-keys": "npm:7.9.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" - semver: "npm:^7.6.0" ts-api-utils: "npm:^1.3.0" peerDependencies: "@typescript-eslint/parser": ^7.0.0 @@ -1122,25 +1120,25 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/37ca22620d1834ff0baa28fa4b8fd92039a3903cb95748353de32d56bae2a81ce50d1bbaed27487eebc884e0a0f9387fcb0f1647593e4e6df5111ef674afa9f0 + checksum: 10c0/5c0ded9cb2210c141d236075f01a86447bf497a5061773c3c64a90756264776b4c4df100f7588e36d34f727eca55afd52fe6696a3cbe2d1f131250934254603a languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.8.0": - version: 7.8.0 - resolution: "@typescript-eslint/parser@npm:7.8.0" +"@typescript-eslint/parser@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/parser@npm:7.9.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.8.0" - "@typescript-eslint/types": "npm:7.8.0" - "@typescript-eslint/typescript-estree": "npm:7.8.0" - "@typescript-eslint/visitor-keys": "npm:7.8.0" + "@typescript-eslint/scope-manager": "npm:7.9.0" + "@typescript-eslint/types": "npm:7.9.0" + "@typescript-eslint/typescript-estree": "npm:7.9.0" + "@typescript-eslint/visitor-keys": "npm:7.9.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/0dd994c1b31b810c25e1b755b8d352debb7bf21a31f9a91acaec34acf4e471320bcceaa67cf64c110c0b8f5fac10a037dbabac6ec423e17adf037e59a7bce9c1 + checksum: 10c0/16ca04645429436d9b7986cddda979ef4d088f4223f4a69e04a369e0fd4852dd5ff3d4b99da2e43cddaa2b421b24ff42f275d87bd110ae2356bdd0e81c2534e7 languageName: node linkType: hard @@ -1154,12 +1152,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.8.0": - version: 7.8.0 - resolution: "@typescript-eslint/type-utils@npm:7.8.0" +"@typescript-eslint/scope-manager@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/scope-manager@npm:7.9.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.8.0" - "@typescript-eslint/utils": "npm:7.8.0" + "@typescript-eslint/types": "npm:7.9.0" + "@typescript-eslint/visitor-keys": "npm:7.9.0" + checksum: 10c0/1ba6fc559a42a9b54e38c3ac2b6669efcff1a30292fb4e5fc8739c890a6c0f37d1a6aee1d115198f57c88e4f1776e95c1d7143de5cb5b970d5eb3023e97789dd + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/type-utils@npm:7.9.0" + dependencies: + "@typescript-eslint/typescript-estree": "npm:7.9.0" + "@typescript-eslint/utils": "npm:7.9.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -1167,7 +1175,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/00f6315626b64f7dbc1f7fba6f365321bb8d34141ed77545b2a07970e59a81dbdf768c1e024225ea00953750d74409ddd8a16782fc4a39261e507c04192dacab + checksum: 10c0/775280fb179268f8bacd60e684d9d5a1c6a379646b082c7244bf2dfb7dd693053bd9efa473b71e10a86db69322b0a2cecf5598d019684930df50000bf3d70af0 languageName: node linkType: hard @@ -1178,6 +1186,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/types@npm:7.9.0" + checksum: 10c0/d5f4a547dba4865ee2391bf06f2b3f8e8592a561976d2be35bb61ce340c7d1b7b4b25ac6ab5b9941813b465b9420bebb7b2179b1d71f6a83069feeb000b3558d + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:7.8.0": version: 7.8.0 resolution: "@typescript-eslint/typescript-estree@npm:7.8.0" @@ -1197,7 +1212,40 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.8.0, @typescript-eslint/utils@npm:^7.8.0": +"@typescript-eslint/typescript-estree@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.9.0" + dependencies: + "@typescript-eslint/types": "npm:7.9.0" + "@typescript-eslint/visitor-keys": "npm:7.9.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/cfc3d2b7a5433c9a2989c7289bc72b49786993782801ad8ca5a07c651df457a67fbce13b120c86c34c03d56570a90e5cf4f3b8806349f103a3658f2366ec28ea + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/utils@npm:7.9.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@typescript-eslint/scope-manager": "npm:7.9.0" + "@typescript-eslint/types": "npm:7.9.0" + "@typescript-eslint/typescript-estree": "npm:7.9.0" + peerDependencies: + eslint: ^8.56.0 + checksum: 10c0/cb99d6a950e7da0319bc7b923a82c52c0798a14e837afee51b2295cfbde02e0a2ac8e0b5904cd7bd01d1b376c7a6ad3739101b486feaf2517c8640024deb88c7 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:^7.8.0": version: 7.8.0 resolution: "@typescript-eslint/utils@npm:7.8.0" dependencies: @@ -1224,6 +1272,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:7.9.0": + version: 7.9.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.9.0" + dependencies: + "@typescript-eslint/types": "npm:7.9.0" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10c0/19181d8b9d2d7bc43d5c8884661cd9a86ac316392b8e590187cc507442093a1ba2bef0cc22181b8298d5dc9f455abb73cffa4663451bdf32b1b7fe12160c5c99 + languageName: node + linkType: hard + "@vladfrangu/async_event_emitter@npm:^2.2.4": version: 2.2.4 resolution: "@vladfrangu/async_event_emitter@npm:2.2.4" @@ -2586,17 +2644,17 @@ __metadata: languageName: node linkType: hard -"eslint@npm:9.2.0": - version: 9.2.0 - resolution: "eslint@npm:9.2.0" +"eslint@npm:9.3.0": + version: 9.3.0 + resolution: "eslint@npm:9.3.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^3.0.2" - "@eslint/js": "npm:9.2.0" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:9.3.0" "@humanwhocodes/config-array": "npm:^0.13.0" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.2.3" + "@humanwhocodes/retry": "npm:^0.3.0" "@nodelib/fs.walk": "npm:^1.2.8" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" @@ -2626,7 +2684,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10c0/eab3265100a359a486e40e1d9d4d3ecff936d2f4d952f4ab107d404e0684fffbe186ecd0fb41791af5bcb13570a27032ddf9a2e628927ed33473f64255b0037b + checksum: 10c0/d0cf1923408ce720f2fa0dde39094dbee6b03a71d5e6466402bbeb29c08a618713f7a1e8cfc4b4d50dbe3750ce68adf614a0e973dea6fa36ddc428dfb89d4cac languageName: node linkType: hard @@ -3542,23 +3600,23 @@ __metadata: version: 0.0.0-use.local resolution: "interchat@workspace:." dependencies: - "@prisma/client": "npm:^5.13.0" - "@sentry/node": "npm:^7.114.0" + "@prisma/client": "npm:^5.14.0" + "@sentry/node": "npm:7" "@stylistic/eslint-plugin": "npm:^2.1.0" "@tensorflow/tfjs-node": "npm:^4.19.0" "@top-gg/sdk": "npm:^3.1.6" "@types/common-tags": "npm:^1.8.4" "@types/express": "npm:^4.17.21" "@types/js-yaml": "npm:^4.0.9" - "@types/lodash": "npm:^4.17.1" - "@types/node": "npm:^20.12.11" + "@types/lodash": "npm:^4.17.4" + "@types/node": "npm:^20.12.12" "@types/source-map-support": "npm:^0.5.10" common-tags: "npm:^1.8.2" cz-conventional-changelog: "npm:^3.3.0" discord-hybrid-sharding: "npm:^2.2.0" discord.js: "npm:^14.15.2" dotenv: "npm:^16.4.5" - eslint: "npm:9.2.0" + eslint: "npm:9.3.0" express: "npm:^4.19.2" google-translate-api-x: "npm:^10.6.8" husky: "npm:^9.0.11" @@ -3570,13 +3628,13 @@ __metadata: nsfwjs: "npm:3.0.0" parse-duration: "npm:^1.1.0" prettier: "npm:^3.2.5" - prisma: "npm:^5.13.0" - sharp: "npm:^0.33.3" + prisma: "npm:^5.14.0" + sharp: "npm:^0.33.4" source-map-support: "npm:^0.5.21" standard-version: "npm:^9.5.0" tsc-watch: "npm:^6.2.0" typescript: "npm:^5.4.5" - typescript-eslint: "npm:^7.8.0" + typescript-eslint: "npm:^7.9.0" winston: "npm:^3.13.0" languageName: unknown linkType: soft @@ -4891,14 +4949,14 @@ __metadata: languageName: node linkType: hard -"prisma@npm:^5.13.0": - version: 5.13.0 - resolution: "prisma@npm:5.13.0" +"prisma@npm:^5.14.0": + version: 5.14.0 + resolution: "prisma@npm:5.14.0" dependencies: - "@prisma/engines": "npm:5.13.0" + "@prisma/engines": "npm:5.14.0" bin: prisma: build/index.js - checksum: 10c0/226e03b9d3bded1b0b186f40702f971dc34745d67ef4518897380d5a8ba5ce0c438190b3b1d807db7cca3d06b02d89a344e3fc064626c8b448823d7adce07044 + checksum: 10c0/2791e6445079e8301f7715b050ae4f6b064cc3ac4fe05abad42590ece12558e4676d90e58c9fe3e1c7c62fecaef9c87ce706ecdbd0f9ca4fdc0e2853a05b2080 languageName: node linkType: hard @@ -5350,12 +5408,12 @@ __metadata: languageName: node linkType: hard -"sharp@npm:^0.33.3": - version: 0.33.3 - resolution: "sharp@npm:0.33.3" +"sharp@npm:^0.33.4": + version: 0.33.4 + resolution: "sharp@npm:0.33.4" dependencies: - "@img/sharp-darwin-arm64": "npm:0.33.3" - "@img/sharp-darwin-x64": "npm:0.33.3" + "@img/sharp-darwin-arm64": "npm:0.33.4" + "@img/sharp-darwin-x64": "npm:0.33.4" "@img/sharp-libvips-darwin-arm64": "npm:1.0.2" "@img/sharp-libvips-darwin-x64": "npm:1.0.2" "@img/sharp-libvips-linux-arm": "npm:1.0.2" @@ -5364,15 +5422,15 @@ __metadata: "@img/sharp-libvips-linux-x64": "npm:1.0.2" "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.2" "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.2" - "@img/sharp-linux-arm": "npm:0.33.3" - "@img/sharp-linux-arm64": "npm:0.33.3" - "@img/sharp-linux-s390x": "npm:0.33.3" - "@img/sharp-linux-x64": "npm:0.33.3" - "@img/sharp-linuxmusl-arm64": "npm:0.33.3" - "@img/sharp-linuxmusl-x64": "npm:0.33.3" - "@img/sharp-wasm32": "npm:0.33.3" - "@img/sharp-win32-ia32": "npm:0.33.3" - "@img/sharp-win32-x64": "npm:0.33.3" + "@img/sharp-linux-arm": "npm:0.33.4" + "@img/sharp-linux-arm64": "npm:0.33.4" + "@img/sharp-linux-s390x": "npm:0.33.4" + "@img/sharp-linux-x64": "npm:0.33.4" + "@img/sharp-linuxmusl-arm64": "npm:0.33.4" + "@img/sharp-linuxmusl-x64": "npm:0.33.4" + "@img/sharp-wasm32": "npm:0.33.4" + "@img/sharp-win32-ia32": "npm:0.33.4" + "@img/sharp-win32-x64": "npm:0.33.4" color: "npm:^4.2.3" detect-libc: "npm:^2.0.3" semver: "npm:^7.6.0" @@ -5415,7 +5473,7 @@ __metadata: optional: true "@img/sharp-win32-x64": optional: true - checksum: 10c0/12f5203426595b4e64c807162a6d52358b591d25fbb414a51fe38861584759fba38485be951ed98d15be3dfe21f2def5336f78ca35bf8bbd22d88cc78ca03f2a + checksum: 10c0/428c5c6a84ff8968effe50c2de931002f5f30b9f263e1c026d0384e581673c13088a49322f7748114d3d9be4ae9476a74bf003a3af34743e97ef2f880d1cfe45 languageName: node linkType: hard @@ -5985,19 +6043,19 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^7.8.0": - version: 7.8.0 - resolution: "typescript-eslint@npm:7.8.0" +"typescript-eslint@npm:^7.9.0": + version: 7.9.0 + resolution: "typescript-eslint@npm:7.9.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:7.8.0" - "@typescript-eslint/parser": "npm:7.8.0" - "@typescript-eslint/utils": "npm:7.8.0" + "@typescript-eslint/eslint-plugin": "npm:7.9.0" + "@typescript-eslint/parser": "npm:7.9.0" + "@typescript-eslint/utils": "npm:7.9.0" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/ce18a3dad7e2168cb6f2f29f7e77f3cf22bef72de6663ac8138d66b72e8aeb90875dbb6ad59526afd40543f5f0068f2ad9cd85003f78f9086aafd4b9fc3a9e85 + checksum: 10c0/dacdd8b278d519eea1d980c71dd301a0b68fe1100aa8eaa9e3b80acd7089765ef50bdf369b7c11ddc5f4be6ac6d90cc9283db549003c3df8cfabbe4f44a36b53 languageName: node linkType: hard