From ca07b5bf825d20a3baad29fe7bd915d3db51244d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:09:39 +0000 Subject: [PATCH 01/26] chore(deps): update dependency @types/node to v18.19.13 (#132) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 48cb2ff..d1e1de6 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@nhcarrigan/typescript-config": "1.0.1", "@types/chai": "4.3.11", "@types/mocha": "10.0.6", - "@types/node": "18.19.12", + "@types/node": "18.19.13", "@types/node-fetch": "2", "@types/node-schedule": "2.1.5", "chai": "4.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a784e29..b9cf1f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,8 +44,8 @@ devDependencies: specifier: 10.0.6 version: 10.0.6 '@types/node': - specifier: 18.19.12 - version: 18.19.12 + specifier: 18.19.13 + version: 18.19.13 '@types/node-fetch': specifier: '2' version: 2.6.4 @@ -391,18 +391,18 @@ packages: /@types/node-fetch@2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.19.12 + '@types/node': 18.19.13 form-data: 3.0.1 dev: true /@types/node-schedule@2.1.5: resolution: {integrity: sha512-bN0MiplDBUxNMmlEi4iykjLYD7+Ze3DEevzliCn8WYuDwYSPj/5XFh8wZw+YXPLpLxiNWlIONYiQ67g/vowSMA==} dependencies: - '@types/node': 18.19.12 + '@types/node': 18.19.13 dev: true - /@types/node@18.19.12: - resolution: {integrity: sha512-uLcpWEAvatBEubmgCMzWforZbAu1dT9syweWnU3/DNwbeUBq2miP5nG8Y4JL9MDMKWt+7Yv1CSvA8xELdEl54w==} + /@types/node@18.19.13: + resolution: {integrity: sha512-kgnbRDj8ioDyGxoiaXsiu1Ybm/K14ajCgMOkwiqpHrnF7d7QiYRoRqHIpglMMs3DwXinlK4qJ8TZGlj4hfleJg==} dependencies: undici-types: 5.26.5 @@ -417,7 +417,7 @@ packages: /@types/ws@8.5.9: resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} dependencies: - '@types/node': 18.19.12 + '@types/node': 18.19.13 dev: false /@typescript-eslint/eslint-plugin@5.59.5(@typescript-eslint/parser@5.59.5)(eslint@8.56.0)(typescript@5.3.3): From 31ceb23019ac0cb997eb4a502a073b3a6c548ec4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:55:05 +0000 Subject: [PATCH 02/26] chore(deps): update dependency @types/node to v18.19.14 (#133) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d1e1de6..5611e9e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@nhcarrigan/typescript-config": "1.0.1", "@types/chai": "4.3.11", "@types/mocha": "10.0.6", - "@types/node": "18.19.13", + "@types/node": "18.19.14", "@types/node-fetch": "2", "@types/node-schedule": "2.1.5", "chai": "4.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9cf1f1..8d52df3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,8 +44,8 @@ devDependencies: specifier: 10.0.6 version: 10.0.6 '@types/node': - specifier: 18.19.13 - version: 18.19.13 + specifier: 18.19.14 + version: 18.19.14 '@types/node-fetch': specifier: '2' version: 2.6.4 @@ -391,18 +391,18 @@ packages: /@types/node-fetch@2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.19.13 + '@types/node': 18.19.14 form-data: 3.0.1 dev: true /@types/node-schedule@2.1.5: resolution: {integrity: sha512-bN0MiplDBUxNMmlEi4iykjLYD7+Ze3DEevzliCn8WYuDwYSPj/5XFh8wZw+YXPLpLxiNWlIONYiQ67g/vowSMA==} dependencies: - '@types/node': 18.19.13 + '@types/node': 18.19.14 dev: true - /@types/node@18.19.13: - resolution: {integrity: sha512-kgnbRDj8ioDyGxoiaXsiu1Ybm/K14ajCgMOkwiqpHrnF7d7QiYRoRqHIpglMMs3DwXinlK4qJ8TZGlj4hfleJg==} + /@types/node@18.19.14: + resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==} dependencies: undici-types: 5.26.5 @@ -417,7 +417,7 @@ packages: /@types/ws@8.5.9: resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} dependencies: - '@types/node': 18.19.13 + '@types/node': 18.19.14 dev: false /@typescript-eslint/eslint-plugin@5.59.5(@typescript-eslint/parser@5.59.5)(eslint@8.56.0)(typescript@5.3.3): From 19c5bfce96efdee18f7b8d5595018b9ca3424962 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:06:48 +0000 Subject: [PATCH 03/26] chore(deps): update github actions (#134) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/code-ql.yml | 4 ++-- .github/workflows/fly-cd.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-ql.yml b/.github/workflows/code-ql.yml index 9ddecea..2f6d63d 100644 --- a/.github/workflows/code-ql.yml +++ b/.github/workflows/code-ql.yml @@ -30,8 +30,8 @@ jobs: - name: Build files run: pnpm run build - name: Setup CodeQL - uses: github/codeql-action/init@2f93e4319b2f04a2efc38fa7f78bd681bc3f7b2f # v2 + uses: github/codeql-action/init@dc021d495cb77b369e4d9d04a501700fd83b8c51 # v2 with: languages: ${{ matrix.language }} - name: Perform Analysis - uses: github/codeql-action/analyze@2f93e4319b2f04a2efc38fa7f78bd681bc3f7b2f # v2 + uses: github/codeql-action/analyze@dc021d495cb77b369e4d9d04a501700fd83b8c51 # v2 diff --git a/.github/workflows/fly-cd.yml b/.github/workflows/fly-cd.yml index 44dd439..aef0b2b 100644 --- a/.github/workflows/fly-cd.yml +++ b/.github/workflows/fly-cd.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Install Fly - uses: superfly/flyctl-actions/setup-flyctl@dfdfedc86b296f5e5384f755a18bf400409a15d0 # v1.4 + uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # 1.5 - name: Deploy to Fly.io run: flyctl deploy --remote-only From 8f3634b911785361233138e5356559d1d545e3d5 Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 3 Feb 2024 09:12:48 -0800 Subject: [PATCH 04/26] feat: split up aggregation posts (#135) This will prevent errors where there are too many posts to send at once. --- .../threads/aggregateUnansweredThreads.ts | 12 ++++++++--- src/modules/threads/aggregateWeeklyThreads.ts | 20 +++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/modules/threads/aggregateUnansweredThreads.ts b/src/modules/threads/aggregateUnansweredThreads.ts index 3e75298..f7c7abf 100644 --- a/src/modules/threads/aggregateUnansweredThreads.ts +++ b/src/modules/threads/aggregateUnansweredThreads.ts @@ -18,14 +18,20 @@ export const aggregateUnansweredThreads = async (bot: ExtendedClient) => { ); const mapped = unanswered .map((e) => e) - .sort((a, b) => (a.createdTimestamp ?? 0) - (b.createdTimestamp ?? 0)); + .sort((a, b) => (a.createdTimestamp ?? 0) - (b.createdTimestamp ?? 0)) + .map((t) => `- [${t.name}](<${t.url}>)`); await bot.cache.modChannel.send({ content: `Please take a look at these threads which are waiting for an answer.\n${mapped - .map((t) => `- [${t.name}](<${t.url}>)`) + .splice(0, 5) .join("\n")}`, }); + while (mapped.length > 0) { + await bot.cache.modChannel.send({ + content: mapped.splice(0, 5).join("\n"), + }); + } } catch (err) { - await errorHandler(bot, "aggregate daily unanswered threads", err); + await errorHandler(bot, "aggregate all unanswered threads", err); } }; diff --git a/src/modules/threads/aggregateWeeklyThreads.ts b/src/modules/threads/aggregateWeeklyThreads.ts index 997019d..c60c3b2 100644 --- a/src/modules/threads/aggregateWeeklyThreads.ts +++ b/src/modules/threads/aggregateWeeklyThreads.ts @@ -37,15 +37,23 @@ export const aggregateWeeklyThreads = async (bot: ExtendedClient) => { oldest = answered.slice(-1)[0]; } + const filtered = answered + .filter( + (t) => (t.createdTimestamp ?? 0) >= Date.now() - 1000 * 60 * 60 * 24 * 7 + ) + .map((t) => `- [${t.name}](<${t.url}>)`); + await bot.cache.modChannel.send({ - content: `Here's a recap of the threads that have been answered this week.\n${answered - .filter( - (t) => - (t.createdTimestamp ?? 0) >= Date.now() - 1000 * 60 * 60 * 24 * 7 - ) - .map((t) => `- [${t.name}](<${t.url}>)`) + content: `Here's a recap of the threads that have been answered this week.\n${filtered + .splice(0, 5) .join("\n")}`, }); + + while (filtered.length > 0) { + await bot.cache.modChannel.send({ + content: filtered.splice(0, 5).join("\n"), + }); + } } catch (err) { await errorHandler(bot, "aggregate daily unanswered threads", err); } From 5e678c8d7f2776421749427e2bbbcf48fd82e9ab Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 3 Feb 2024 09:50:26 -0800 Subject: [PATCH 05/26] feat: autorespond to threads after 7 days, inactive after 14 (#136) --- src/index.ts | 5 ++ src/interfaces/ExtendedClient.ts | 1 + src/modules/threads/aggregateWeeklyThreads.ts | 2 +- src/modules/threads/autorespondToThreads.ts | 70 +++++++++++++++++++ src/utils/loadChannels.ts | 7 ++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 src/modules/threads/autorespondToThreads.ts diff --git a/src/index.ts b/src/index.ts index b3316e3..a13372b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ import { sendStickyMessage } from "./modules/sendStickyMessage"; import { aggregateDailyUnansweredThreads } from "./modules/threads/aggregateDailyUnansweredThreads"; import { aggregateUnansweredThreads } from "./modules/threads/aggregateUnansweredThreads"; import { aggregateWeeklyThreads } from "./modules/threads/aggregateWeeklyThreads"; +import { autorespondToThreads } from "./modules/threads/autorespondToThreads"; import { errorHandler } from "./utils/errorHandler"; import { healthCheck } from "./utils/healthCheck"; import { loadChannels } from "./utils/loadChannels"; @@ -42,6 +43,10 @@ import { validateEnv } from "./utils/validateEnv"; bot.env.stickyFrequency * 1000 * 60 ); + scheduleJob("0 8 * * *", async () => { + await autorespondToThreads(bot); + }); + scheduleJob("0 9 * * *", async () => { await aggregateDailyUnansweredThreads(bot); }); diff --git a/src/interfaces/ExtendedClient.ts b/src/interfaces/ExtendedClient.ts index a4832b8..47a9788 100644 --- a/src/interfaces/ExtendedClient.ts +++ b/src/interfaces/ExtendedClient.ts @@ -26,6 +26,7 @@ export interface ExtendedClient extends Client { modChannel: GuildTextBasedChannel; questionTag: string; answerTag: string; + inactiveTag: string; lastSticky: string; }; contexts: Context[]; diff --git a/src/modules/threads/aggregateWeeklyThreads.ts b/src/modules/threads/aggregateWeeklyThreads.ts index c60c3b2..dc73c90 100644 --- a/src/modules/threads/aggregateWeeklyThreads.ts +++ b/src/modules/threads/aggregateWeeklyThreads.ts @@ -55,6 +55,6 @@ export const aggregateWeeklyThreads = async (bot: ExtendedClient) => { }); } } catch (err) { - await errorHandler(bot, "aggregate daily unanswered threads", err); + await errorHandler(bot, "aggregate weekly unanswered threads", err); } }; diff --git a/src/modules/threads/autorespondToThreads.ts b/src/modules/threads/autorespondToThreads.ts new file mode 100644 index 0000000..6fcc2fd --- /dev/null +++ b/src/modules/threads/autorespondToThreads.ts @@ -0,0 +1,70 @@ +import { ExtendedClient } from "../../interfaces/ExtendedClient"; +import { errorHandler } from "../../utils/errorHandler"; + +/** + * Fetches the threads from the help channel, finds unanswered threads, posts a response to + * threads that have not received a message in 7 days, or in 14 days. + * + * @param {ExtendedClient} bot The bot's Discord instance. + */ +export const autorespondToThreads = async (bot: ExtendedClient) => { + try { + const archived = (await bot.cache.helpChannel.threads.fetchArchived()) + .threads; + const active = (await bot.cache.helpChannel.threads.fetchActive()).threads; + const threads = [...archived.map((e) => e), ...active.map((e) => e)]; + const unanswered = threads + .filter((thread) => !thread.appliedTags.includes(bot.cache.answerTag)) + .map((e) => e) + .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); + let oldest = unanswered.slice(-1)[0]; + + while ( + oldest.createdTimestamp && + oldest.createdTimestamp > Date.now() - 1000 * 60 * 60 * 24 * 30 + ) { + const archived = ( + await bot.cache.helpChannel.threads.fetchArchived({ before: oldest.id }) + ).threads; + unanswered.push( + ...archived + .map((e) => e) + .filter((thread) => thread.appliedTags.includes(bot.cache.answerTag)) + ); + unanswered.sort( + (a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0) + ); + oldest = unanswered.slice(-1)[0]; + } + + for (const thread of unanswered) { + const lastMessage = (await thread.messages.fetch({ limit: 1 })).first(); + const owner = await thread.fetchOwner(); + if (!lastMessage || !owner) { + continue; + } + if (lastMessage.author.id === owner.id) { + continue; + } + if ( + lastMessage.createdTimestamp > Date.now() - 1000 * 60 * 60 * 24 * 8 && + lastMessage.createdTimestamp < Date.now() - 1000 * 60 * 60 * 24 * 7 + ) { + await thread.send({ + content: `Hey there <@!${owner.id}>~! Did you forget about this thread? Let us know if you still need help!`, + }); + } + if ( + lastMessage.createdTimestamp > Date.now() - 1000 * 60 * 60 * 24 * 15 && + lastMessage.createdTimestamp < Date.now() - 1000 * 60 * 60 * 24 * 14 + ) { + await thread.setAppliedTags([ + ...thread.appliedTags, + bot.cache.inactiveTag, + ]); + } + } + } catch (err) { + await errorHandler(bot, "autorespond to threads", err); + } +}; diff --git a/src/utils/loadChannels.ts b/src/utils/loadChannels.ts index be0dc3b..d75c74b 100644 --- a/src/utils/loadChannels.ts +++ b/src/utils/loadChannels.ts @@ -41,12 +41,18 @@ export const loadChannels = async (bot: ExtendedClient) => { const answerTag = helpChannel.availableTags.find( (t) => t.name === "Answered" ); + const inactiveTag = helpChannel.availableTags.find( + (t) => t.name === "Inactive" + ); if (!questionTag) { throw new Error("Could not find `Question` tag."); } if (!answerTag) { throw new Error("Could not find `Answer` tag."); } + if (!inactiveTag) { + throw new Error("Could not find `Inactive` tag."); + } const generalChannel = homeGuild.channels.cache.get(bot.env.generalChannel) || @@ -75,6 +81,7 @@ export const loadChannels = async (bot: ExtendedClient) => { modChannel, questionTag: questionTag.id, answerTag: answerTag.id, + inactiveTag: inactiveTag.id, lastSticky: "", }; } From 05434b04aa76973eb5e2bf2d21dd2218b4cac46f Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 3 Feb 2024 10:40:35 -0800 Subject: [PATCH 06/26] feat: add command to generate stats (#137) --- src/commands/stats.ts | 91 ++++++++++++++++++++++++++++++++ src/index.ts | 2 + src/interfaces/Command.ts | 11 ++++ src/interfaces/ExtendedClient.ts | 2 + src/utils/loadCommands.ts | 34 ++++++++++++ src/utils/registerCommands.ts | 3 +- 6 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 src/commands/stats.ts create mode 100644 src/interfaces/Command.ts create mode 100644 src/utils/loadCommands.ts diff --git a/src/commands/stats.ts b/src/commands/stats.ts new file mode 100644 index 0000000..83c4d62 --- /dev/null +++ b/src/commands/stats.ts @@ -0,0 +1,91 @@ +import { + GuildMember, + PermissionFlagsBits, + SlashCommandBuilder, +} from "discord.js"; + +import { Command } from "../interfaces/Command"; +import { errorHandler } from "../utils/errorHandler"; + +export const stats: Command = { + data: new SlashCommandBuilder() + .setName("stats") + .setDescription("Generate a report on help threads.") + .setDMPermission(false), + run: async (bot, interaction) => { + try { + await interaction.deferReply(); + + const { member } = interaction; + if ( + !member || + !(member instanceof GuildMember) || + (!bot.env.helperRoles.some((r) => member.roles.cache.has(r)) && + !member.permissions.has(PermissionFlagsBits.Administrator)) + ) { + await interaction.editReply({ + content: "You do not have permission to use this.", + }); + return; + } + + let rawArchived = await bot.cache.helpChannel.threads.fetchArchived(); + const archived = rawArchived.threads; + const active = (await bot.cache.helpChannel.threads.fetchActive()) + .threads; + const threads = [...archived.map((e) => e), ...active.map((e) => e)]; + const sorted = threads + .map((e) => e) + .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); + let oldest = sorted.slice(-1)[0]; + + while (rawArchived.hasMore) { + rawArchived = await bot.cache.helpChannel.threads.fetchArchived({ + before: oldest.id, + }); + sorted.push(...rawArchived.threads.map((e) => e)); + sorted.sort( + (a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0) + ); + oldest = sorted.slice(-1)[0]; + } + + const total = sorted.length; + const answeredArray = sorted.filter((thread) => + thread.appliedTags.includes(bot.cache.answerTag) + ); + const answered = answeredArray.length; + const unanswered = sorted.filter( + (thread) => !thread.appliedTags.includes(bot.cache.answerTag) + ).length; + const inactive = sorted.filter((thread) => + thread.appliedTags.includes(bot.cache.inactiveTag) + ).length; + const open = sorted.filter((thread) => !thread.archived).length; + const closed = sorted.filter((thread) => thread.archived).length; + const moved = sorted.filter( + (thread) => thread.ownerId === bot.user?.id + ).length; + + /* TODO: Original plan of checking based on updatedAt doesn't work because that doesn't exist for threads. */ + // const averageTime = answeredArray.reduce((thread, sum) => { + // sum += (thread.) + // }) + + await interaction.editReply({ + content: `# Help Channel Stats: +- Answered Threads: ${answered} +- Unanswered Threads: ${unanswered} +- Inactive Threads: ${inactive} +- Open Threads: ${open} +- Closed Threads: ${closed} +- Moved Threads: ${moved} +───────────────────────── +- Average time to answer: Coming soon? +- Total Threads: ${total}`, + }); + } catch (err) { + await errorHandler(bot, "stats command", err); + } + }, +}; diff --git a/src/index.ts b/src/index.ts index a13372b..3b7e0ba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ import { autorespondToThreads } from "./modules/threads/autorespondToThreads"; import { errorHandler } from "./utils/errorHandler"; import { healthCheck } from "./utils/healthCheck"; import { loadChannels } from "./utils/loadChannels"; +import { loadCommands } from "./utils/loadCommands"; import { loadContexts } from "./utils/loadContexts"; import { logHandler } from "./utils/logHandler"; import { registerCommands } from "./utils/registerCommands"; @@ -22,6 +23,7 @@ import { validateEnv } from "./utils/validateEnv"; try { const bot = new Client({ intents: IntentOptions }) as ExtendedClient; bot.env = validateEnv(); + await loadCommands(bot); await loadContexts(bot); bot.on(Events.InteractionCreate, async (interaction) => { diff --git a/src/interfaces/Command.ts b/src/interfaces/Command.ts new file mode 100644 index 0000000..ace8b95 --- /dev/null +++ b/src/interfaces/Command.ts @@ -0,0 +1,11 @@ +import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"; + +import { ExtendedClient } from "./ExtendedClient"; + +export interface Command { + data: SlashCommandBuilder; + run: ( + bot: ExtendedClient, + interaction: ChatInputCommandInteraction + ) => Promise; +} diff --git a/src/interfaces/ExtendedClient.ts b/src/interfaces/ExtendedClient.ts index 47a9788..1444799 100644 --- a/src/interfaces/ExtendedClient.ts +++ b/src/interfaces/ExtendedClient.ts @@ -6,6 +6,7 @@ import { WebhookClient, } from "discord.js"; +import { Command } from "./Command"; import { Context } from "./Context"; export interface ExtendedClient extends Client { @@ -30,4 +31,5 @@ export interface ExtendedClient extends Client { lastSticky: string; }; contexts: Context[]; + commands: Command[]; } diff --git a/src/utils/loadCommands.ts b/src/utils/loadCommands.ts new file mode 100644 index 0000000..45de0f1 --- /dev/null +++ b/src/utils/loadCommands.ts @@ -0,0 +1,34 @@ +import { readdir } from "fs/promises"; +import { join } from "path"; + +import { Command } from "../interfaces/Command"; +import { ExtendedClient } from "../interfaces/ExtendedClient"; + +import { errorHandler } from "./errorHandler"; + +/** + * Dynamically reads the `commands` directory and imports the files. Mounts + * the commands to the bot to be used elsewhere. + * + * @param {ExtendedClient} bot The bot's Discord instance. + */ +export const loadCommands = async (bot: ExtendedClient) => { + try { + const result: Command[] = []; + const files = await readdir( + join(process.cwd(), "prod", "commands"), + "utf-8" + ); + for (const file of files) { + const name = file.split(".")[0]; + if (!name) { + continue; + } + const mod = await import(join(process.cwd(), "prod", "commands", file)); + result.push(mod[name] as Command); + } + bot.commands = result; + } catch (err) { + await errorHandler(bot, "load commands utility", err); + } +}; diff --git a/src/utils/registerCommands.ts b/src/utils/registerCommands.ts index 1c17715..67ec8c6 100644 --- a/src/utils/registerCommands.ts +++ b/src/utils/registerCommands.ts @@ -15,11 +15,12 @@ export const registerCommands = async (bot: ExtendedClient) => { throw new Error("Bot is not logged in. Cannot register commands yet."); } const rest = new REST({ version: "10" }).setToken(bot.env.token); + const commands = bot.commands.map((command) => command.data.toJSON()); const contexts = bot.contexts.map((context) => context.data); await rest.put( Routes.applicationGuildCommands(bot.user.id, bot.env.homeGuild), - { body: contexts } + { body: [...commands, ...contexts] } ); } catch (err) { await errorHandler(bot, "register commands utility", err); From 86bf2158a772b1e56c7c4432f00581c5644c09cd Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 3 Feb 2024 11:13:15 -0800 Subject: [PATCH 07/26] feat: add context to send message to product board (#138) * feat: prototype productboard integration * fix: resolve bugs --- .eslintrc.json | 11 +++++++ sample.env | 2 ++ src/commands/stats.ts | 5 +-- src/contexts/productBoard.ts | 61 ++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 src/contexts/productBoard.ts diff --git a/.eslintrc.json b/.eslintrc.json index 5052df3..9f08ddf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,6 +11,17 @@ "rules": { "require-await": "off" } + }, + { + "files": "src/contexts/productBoard.ts", + "rules": { + "camelcase": [ + "error", + { + "allow": ["display_url"] + } + ] + } } ] } diff --git a/sample.env b/sample.env index 70de9d0..134a69b 100644 --- a/sample.env +++ b/sample.env @@ -14,3 +14,5 @@ AI_URL="" GITHUB_TOKEN="" GITHUB_OWNER="" GITHUB_REPO="" +# This is for the ProductBoard integration. +PRODUCT_BOARD_API_KEY="" diff --git a/src/commands/stats.ts b/src/commands/stats.ts index 83c4d62..fe6beb2 100644 --- a/src/commands/stats.ts +++ b/src/commands/stats.ts @@ -4,6 +4,7 @@ import { SlashCommandBuilder, } from "discord.js"; +import { ResponseText } from "../config/ResponseText"; import { Command } from "../interfaces/Command"; import { errorHandler } from "../utils/errorHandler"; @@ -14,7 +15,7 @@ export const stats: Command = { .setDMPermission(false), run: async (bot, interaction) => { try { - await interaction.deferReply(); + await interaction.deferReply({ ephemeral: true }); const { member } = interaction; if ( @@ -24,7 +25,7 @@ export const stats: Command = { !member.permissions.has(PermissionFlagsBits.Administrator)) ) { await interaction.editReply({ - content: "You do not have permission to use this.", + content: ResponseText.MustBeHelper, }); return; } diff --git a/src/contexts/productBoard.ts b/src/contexts/productBoard.ts new file mode 100644 index 0000000..624c59b --- /dev/null +++ b/src/contexts/productBoard.ts @@ -0,0 +1,61 @@ +import { ResponseText } from "../config/ResponseText"; +import { Context } from "../interfaces/Context"; +import { errorHandler } from "../utils/errorHandler"; + +export const productBoard: Context = { + data: { + name: "Send to Product Board", + type: 3, + }, + run: async (bot, interaction) => { + try { + if (!process.env.PRODUCT_BOARD_API_KEY) { + await interaction.editReply({ + content: "Product Board API is not configured.", + }); + return; + } + const { member } = interaction; + + if (!bot.env.helperRoles.some((r) => member.roles.cache.has(r))) { + await interaction.editReply({ + content: ResponseText.MustBeHelper, + }); + return; + } + + const message = interaction.options.getMessage("message"); + if (!message) { + await interaction.editReply({ + content: ResponseText.NoMessage, + }); + return; + } + const { content, author } = message; + + const req = await fetch("https://api.productboard.com/notes", { + headers: { + authorization: `Bearer ${process.env.PRODUCT_BOARD_API_KEY}`, + "X-Version": "1", + accept: "application/json; charset=utf-8", + "content-type": "application/json", + }, + method: "POST", + body: JSON.stringify({ + title: `${author.username}'s Feedback`, + content, + display_url: message.url, + }), + }); + const res = (await req.json()) as { links: { html: string } }; + await interaction.editReply({ + content: `[Note created](<${res.links.html}>)`, + }); + } catch (err) { + await errorHandler(bot, "product board context", err); + await interaction.editReply({ + content: ResponseText.InteractionError, + }); + } + }, +}; From 4d1a439b4cc5d3d4bdb2b982f0e0b19af9e78d53 Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 3 Feb 2024 11:19:46 -0800 Subject: [PATCH 08/26] fix: actually respond to commands (#139) --- src/events/interactionCreate.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 213ccec..b2cb9c5 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -18,6 +18,18 @@ export const interactionCreate = async ( interaction: Interaction ) => { try { + if (interaction.isChatInputCommand()) { + const target = bot.commands.find( + (c) => c.data.name === interaction.commandName + ); + if (!target) { + await interaction.editReply({ + content: ResponseText.NoCommand, + }); + return; + } + await target.run(bot, interaction); + } if (interaction.isContextMenuCommand()) { await interaction.deferReply({ ephemeral: true }); if (!isGuildContextCommand(interaction)) { From e523afccddc779e61c407494f3e2b0cf1732dd04 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:37:56 +0000 Subject: [PATCH 09/26] chore(deps): update dependency @types/node-schedule to v2.1.6 (#140) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5611e9e..83c277e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@types/mocha": "10.0.6", "@types/node": "18.19.14", "@types/node-fetch": "2", - "@types/node-schedule": "2.1.5", + "@types/node-schedule": "2.1.6", "chai": "4.4.1", "eslint": "8.56.0", "mocha": "10.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d52df3..60b9d29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,8 +50,8 @@ devDependencies: specifier: '2' version: 2.6.4 '@types/node-schedule': - specifier: 2.1.5 - version: 2.1.5 + specifier: 2.1.6 + version: 2.1.6 chai: specifier: 4.4.1 version: 4.4.1 @@ -395,8 +395,8 @@ packages: form-data: 3.0.1 dev: true - /@types/node-schedule@2.1.5: - resolution: {integrity: sha512-bN0MiplDBUxNMmlEi4iykjLYD7+Ze3DEevzliCn8WYuDwYSPj/5XFh8wZw+YXPLpLxiNWlIONYiQ67g/vowSMA==} + /@types/node-schedule@2.1.6: + resolution: {integrity: sha512-6AlZSUiNTdaVmH5jXYxX9YgmF1zfOlbjUqw0EllTBmZCnN1R5RR/m/u3No1OiWR05bnQ4jM4/+w4FcGvkAtnKQ==} dependencies: '@types/node': 18.19.14 dev: true From ad76136cd78410e51f11d49f375e63d46e34508b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:55:12 +0000 Subject: [PATCH 10/26] chore(deps): update dependency mocha to v10.3.0 (#141) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 35 ++++++++++++++--------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 83c277e..9318a62 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/node-schedule": "2.1.6", "chai": "4.4.1", "eslint": "8.56.0", - "mocha": "10.2.0", + "mocha": "10.3.0", "prettier": "2.8.8", "ts-mocha": "10.0.0", "typescript": "5.3.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60b9d29..2d8b70b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,14 +59,14 @@ devDependencies: specifier: 8.56.0 version: 8.56.0 mocha: - specifier: 10.2.0 - version: 10.2.0 + specifier: 10.3.0 + version: 10.3.0 prettier: specifier: 2.8.8 version: 2.8.8 ts-mocha: specifier: 10.0.0 - version: 10.0.0(mocha@10.2.0) + version: 10.0.0(mocha@10.3.0) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1484,8 +1484,8 @@ packages: is-glob: 4.0.3 dev: true - /glob@7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -1495,15 +1495,15 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.1.2 + minimatch: 5.0.1 once: 1.4.0 - path-is-absolute: 1.0.1 dev: true /globals@13.20.0: @@ -1955,8 +1955,8 @@ packages: minimist: 1.2.8 dev: true - /mocha@10.2.0: - resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==} + /mocha@10.3.0: + resolution: {integrity: sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==} engines: {node: '>= 14.0.0'} hasBin: true dependencies: @@ -1967,13 +1967,12 @@ packages: diff: 5.0.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 - glob: 7.2.0 + glob: 8.1.0 he: 1.2.0 js-yaml: 4.1.0 log-symbols: 4.1.0 minimatch: 5.0.1 ms: 2.1.3 - nanoid: 3.3.3 serialize-javascript: 6.0.0 strip-json-comments: 3.1.1 supports-color: 8.1.1 @@ -1990,12 +1989,6 @@ packages: /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - /nanoid@3.3.3: - resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -2439,14 +2432,14 @@ packages: resolution: {integrity: sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==} dev: false - /ts-mocha@10.0.0(mocha@10.2.0): + /ts-mocha@10.0.0(mocha@10.3.0): resolution: {integrity: sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==} engines: {node: '>= 6.X.X'} hasBin: true peerDependencies: mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X dependencies: - mocha: 10.2.0 + mocha: 10.3.0 ts-node: 7.0.1 optionalDependencies: tsconfig-paths: 3.14.2 From 8aefdde63a9850f37b7f2df12de3bc1db00684b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 01:34:05 +0000 Subject: [PATCH 11/26] chore(deps): update dependency @types/node to v18.19.15 (#142) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9318a62..22209dc 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@nhcarrigan/typescript-config": "1.0.1", "@types/chai": "4.3.11", "@types/mocha": "10.0.6", - "@types/node": "18.19.14", + "@types/node": "18.19.15", "@types/node-fetch": "2", "@types/node-schedule": "2.1.6", "chai": "4.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d8b70b..2b9dc0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,8 +44,8 @@ devDependencies: specifier: 10.0.6 version: 10.0.6 '@types/node': - specifier: 18.19.14 - version: 18.19.14 + specifier: 18.19.15 + version: 18.19.15 '@types/node-fetch': specifier: '2' version: 2.6.4 @@ -391,18 +391,18 @@ packages: /@types/node-fetch@2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.19.14 + '@types/node': 18.19.15 form-data: 3.0.1 dev: true /@types/node-schedule@2.1.6: resolution: {integrity: sha512-6AlZSUiNTdaVmH5jXYxX9YgmF1zfOlbjUqw0EllTBmZCnN1R5RR/m/u3No1OiWR05bnQ4jM4/+w4FcGvkAtnKQ==} dependencies: - '@types/node': 18.19.14 + '@types/node': 18.19.15 dev: true - /@types/node@18.19.14: - resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==} + /@types/node@18.19.15: + resolution: {integrity: sha512-AMZ2UWx+woHNfM11PyAEQmfSxi05jm9OlkxczuHeEqmvwPkYj6MWv44gbzDPefYOLysTOFyI3ziiy2ONmUZfpA==} dependencies: undici-types: 5.26.5 @@ -417,7 +417,7 @@ packages: /@types/ws@8.5.9: resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} dependencies: - '@types/node': 18.19.14 + '@types/node': 18.19.15 dev: false /@typescript-eslint/eslint-plugin@5.59.5(@typescript-eslint/parser@5.59.5)(eslint@8.56.0)(typescript@5.3.3): From 32abce897a039a0b9dd56b44e24a4274b7e6d933 Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Sat, 10 Feb 2024 09:59:38 -0800 Subject: [PATCH 12/26] fix: strip links from aggregated thread titles (#146) --- .../aggregateDailyUnansweredThreads.ts | 3 ++- .../threads/aggregateUnansweredThreads.ts | 3 ++- src/modules/threads/aggregateWeeklyThreads.ts | 3 ++- src/utils/stripLinks.ts | 8 ++++++ test/utils/stripLinks.spec.ts | 27 +++++++++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 src/utils/stripLinks.ts create mode 100644 test/utils/stripLinks.spec.ts diff --git a/src/modules/threads/aggregateDailyUnansweredThreads.ts b/src/modules/threads/aggregateDailyUnansweredThreads.ts index 94dfb50..411ee7b 100644 --- a/src/modules/threads/aggregateDailyUnansweredThreads.ts +++ b/src/modules/threads/aggregateDailyUnansweredThreads.ts @@ -1,5 +1,6 @@ import { ExtendedClient } from "../../interfaces/ExtendedClient"; import { errorHandler } from "../../utils/errorHandler"; +import { stripLinks } from "../../utils/stripLinks"; /** * Fetches the threads from the help channel, finds the three most recent threads without @@ -20,7 +21,7 @@ export const aggregateDailyUnansweredThreads = async (bot: ExtendedClient) => { await bot.cache.generalChannel.send({ content: `Heya! It looks like some of your fellow community members might need some assistance.\n${firstThree - .map((t) => `- [${t.name}](<${t.url}>)`) + .map((t) => `- [${stripLinks(t.name)}](<${t.url}>)`) .join("\n")}`, }); } catch (err) { diff --git a/src/modules/threads/aggregateUnansweredThreads.ts b/src/modules/threads/aggregateUnansweredThreads.ts index f7c7abf..26a3b03 100644 --- a/src/modules/threads/aggregateUnansweredThreads.ts +++ b/src/modules/threads/aggregateUnansweredThreads.ts @@ -1,5 +1,6 @@ import { ExtendedClient } from "../../interfaces/ExtendedClient"; import { errorHandler } from "../../utils/errorHandler"; +import { stripLinks } from "../../utils/stripLinks"; /** * Fetches the threads from the help channel, finds unanswered threads, posts a list @@ -19,7 +20,7 @@ export const aggregateUnansweredThreads = async (bot: ExtendedClient) => { const mapped = unanswered .map((e) => e) .sort((a, b) => (a.createdTimestamp ?? 0) - (b.createdTimestamp ?? 0)) - .map((t) => `- [${t.name}](<${t.url}>)`); + .map((t) => `- [${stripLinks(t.name)}](<${t.url}>)`); await bot.cache.modChannel.send({ content: `Please take a look at these threads which are waiting for an answer.\n${mapped diff --git a/src/modules/threads/aggregateWeeklyThreads.ts b/src/modules/threads/aggregateWeeklyThreads.ts index dc73c90..48eee9b 100644 --- a/src/modules/threads/aggregateWeeklyThreads.ts +++ b/src/modules/threads/aggregateWeeklyThreads.ts @@ -1,5 +1,6 @@ import { ExtendedClient } from "../../interfaces/ExtendedClient"; import { errorHandler } from "../../utils/errorHandler"; +import { stripLinks } from "../../utils/stripLinks"; /** * Fetches the threads from the help channel, finds answered threads within the last week, @@ -41,7 +42,7 @@ export const aggregateWeeklyThreads = async (bot: ExtendedClient) => { .filter( (t) => (t.createdTimestamp ?? 0) >= Date.now() - 1000 * 60 * 60 * 24 * 7 ) - .map((t) => `- [${t.name}](<${t.url}>)`); + .map((t) => `- [${stripLinks(t.name)}](<${t.url}>)`); await bot.cache.modChannel.send({ content: `Here's a recap of the threads that have been answered this week.\n${filtered diff --git a/src/utils/stripLinks.ts b/src/utils/stripLinks.ts new file mode 100644 index 0000000..9fa3205 --- /dev/null +++ b/src/utils/stripLinks.ts @@ -0,0 +1,8 @@ +/** + * Utility to strip markdown links out of a string. + * + * @param {string} text The string to strip. + * @returns {string} The string, without links. + */ +export const stripLinks = (text: string): string => + text.replace(/\[(.*?)\]\(.*?\)/g, "$1"); diff --git a/test/utils/stripLinks.spec.ts b/test/utils/stripLinks.spec.ts new file mode 100644 index 0000000..8a8fddc --- /dev/null +++ b/test/utils/stripLinks.spec.ts @@ -0,0 +1,27 @@ +import { assert } from "chai"; + +import { stripLinks } from "../../src/utils/stripLinks"; + +suite("stripLinks utility", () => { + test("does not mutate message with no links", () => { + const str = "Hi, I'm Naomi!"; + assert.equal(stripLinks(str), "Hi, I'm Naomi!"); + }); + test("removes link from message", () => { + const str = "Hi, I'm Naomi! [Check out my profile!](https://naomi.lgbt)"; + assert.equal(stripLinks(str), "Hi, I'm Naomi! Check out my profile!"); + }); + test("removes multiple links from message", () => { + const str = + "Hi, I'm [Naomi](https://naomi.lgbt)! Join my [server?](https://chat.naomi.lgbt)"; + assert.equal(stripLinks(str), "Hi, I'm Naomi! Join my server?"); + }); + test("handles message with ONLY link", () => { + const str = "[Check out my profile!]()"; + assert.equal(stripLinks(str), "Check out my profile!"); + }); + test("handles embed-suppressed links", () => { + const str = "Hi, I'm Naomi! [Check out my profile!]()"; + assert.equal(stripLinks(str), "Hi, I'm Naomi! Check out my profile!"); + }); +}); From 6a2b513670fdf715f77d0a6540c470c634dd5ebd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 11 Feb 2024 00:34:37 +0000 Subject: [PATCH 13/26] fix(deps): update dependency dotenv to v16.4.2 (#147) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 22209dc..453bc44 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@octokit/graphql": "7.0.2", "discord.js": "14.14.1", - "dotenv": "16.4.1", + "dotenv": "16.4.2", "node-fetch": "2", "node-schedule": "2.1.1", "winston": "3.11.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b9dc0e..30ddf7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: 14.14.1 version: 14.14.1 dotenv: - specifier: 16.4.1 - version: 16.4.1 + specifier: 16.4.2 + version: 16.4.2 node-fetch: specifier: '2' version: 2.6.12 @@ -991,8 +991,8 @@ packages: esutils: 2.0.3 dev: true - /dotenv@16.4.1: - resolution: {integrity: sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==} + /dotenv@16.4.2: + resolution: {integrity: sha512-rZSSFxke7d9nYQ5NeMIwp5PP+f8wXgKNljpOb7KtH6SKW1cEqcXAz9VSJYVLKe7Jhup/gUYOkaeSVyK8GJ+nBg==} engines: {node: '>=12'} dev: false From d755697b6baadb8716228522cb810da1552c6d4b Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Mon, 12 Feb 2024 13:47:08 -0800 Subject: [PATCH 14/26] fix: do not repeat myself when sending daily unanswered threads (#148) --- src/modules/threads/aggregateDailyUnansweredThreads.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/threads/aggregateDailyUnansweredThreads.ts b/src/modules/threads/aggregateDailyUnansweredThreads.ts index 411ee7b..19f4847 100644 --- a/src/modules/threads/aggregateDailyUnansweredThreads.ts +++ b/src/modules/threads/aggregateDailyUnansweredThreads.ts @@ -10,6 +10,15 @@ import { stripLinks } from "../../utils/stripLinks"; */ export const aggregateDailyUnansweredThreads = async (bot: ExtendedClient) => { try { + const lastMessage = ( + await bot.cache.generalChannel.messages.fetch({ + limit: 1, + }) + ).first(); + + if (lastMessage?.author.id === bot.user?.id) { + return; + } const threads = (await bot.cache.helpChannel.threads.fetchActive()).threads; const unanswered = threads.filter( (thread) => !thread.appliedTags.includes(bot.cache.answerTag) From c69b28100dc6e1f183aa5d40124133b462596f3a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 00:45:07 +0000 Subject: [PATCH 15/26] fix(deps): update dependency dotenv to v16.4.3 (#149) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 453bc44..3f47a9f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@octokit/graphql": "7.0.2", "discord.js": "14.14.1", - "dotenv": "16.4.2", + "dotenv": "16.4.3", "node-fetch": "2", "node-schedule": "2.1.1", "winston": "3.11.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 30ddf7e..b054792 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: 14.14.1 version: 14.14.1 dotenv: - specifier: 16.4.2 - version: 16.4.2 + specifier: 16.4.3 + version: 16.4.3 node-fetch: specifier: '2' version: 2.6.12 @@ -991,8 +991,8 @@ packages: esutils: 2.0.3 dev: true - /dotenv@16.4.2: - resolution: {integrity: sha512-rZSSFxke7d9nYQ5NeMIwp5PP+f8wXgKNljpOb7KtH6SKW1cEqcXAz9VSJYVLKe7Jhup/gUYOkaeSVyK8GJ+nBg==} + /dotenv@16.4.3: + resolution: {integrity: sha512-II98GFrje5psQTSve0E7bnwMFybNLqT8Vu8JIFWRjsE3khyNUm/loZupuy5DVzG2IXf/ysxvrixYOQnM6mjD3A==} engines: {node: '>=12'} dev: false From d18107d53a46db71a676fbc564f5c8e0f0f16590 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 22:03:28 +0000 Subject: [PATCH 16/26] chore(deps): update github/codeql-action digest to 1a077f8 (#150) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/code-ql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-ql.yml b/.github/workflows/code-ql.yml index 2f6d63d..c67e29c 100644 --- a/.github/workflows/code-ql.yml +++ b/.github/workflows/code-ql.yml @@ -30,8 +30,8 @@ jobs: - name: Build files run: pnpm run build - name: Setup CodeQL - uses: github/codeql-action/init@dc021d495cb77b369e4d9d04a501700fd83b8c51 # v2 + uses: github/codeql-action/init@1a077f8f6c71a45340c26ca0b877e00459e5f443 # v2 with: languages: ${{ matrix.language }} - name: Perform Analysis - uses: github/codeql-action/analyze@dc021d495cb77b369e4d9d04a501700fd83b8c51 # v2 + uses: github/codeql-action/analyze@1a077f8f6c71a45340c26ca0b877e00459e5f443 # v2 From e6a48c6cf4d4af58cd1fe58ad4e1c785fbdb164d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 00:56:43 +0000 Subject: [PATCH 17/26] fix(deps): update dependency dotenv to v16.4.4 (#151) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3f47a9f..a8b9ac5 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@octokit/graphql": "7.0.2", "discord.js": "14.14.1", - "dotenv": "16.4.3", + "dotenv": "16.4.4", "node-fetch": "2", "node-schedule": "2.1.1", "winston": "3.11.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b054792..39a5e08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: 14.14.1 version: 14.14.1 dotenv: - specifier: 16.4.3 - version: 16.4.3 + specifier: 16.4.4 + version: 16.4.4 node-fetch: specifier: '2' version: 2.6.12 @@ -991,8 +991,8 @@ packages: esutils: 2.0.3 dev: true - /dotenv@16.4.3: - resolution: {integrity: sha512-II98GFrje5psQTSve0E7bnwMFybNLqT8Vu8JIFWRjsE3khyNUm/loZupuy5DVzG2IXf/ysxvrixYOQnM6mjD3A==} + /dotenv@16.4.4: + resolution: {integrity: sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==} engines: {node: '>=12'} dev: false From 742f6ef31f402f32f29f764d418e947a8dd3326e Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Tue, 13 Feb 2024 17:03:32 -0800 Subject: [PATCH 18/26] feat: fetch all threads at once, no pagination (#152) --- src/commands/stats.ts | 16 +++---------- .../threads/aggregateUnansweredThreads.ts | 9 ++++--- src/modules/threads/aggregateWeeklyThreads.ts | 24 +++---------------- src/modules/threads/autorespondToThreads.ts | 24 +++---------------- src/utils/loadChannels.ts | 15 ++++++++++++ 5 files changed, 30 insertions(+), 58 deletions(-) diff --git a/src/commands/stats.ts b/src/commands/stats.ts index fe6beb2..4d3cd8a 100644 --- a/src/commands/stats.ts +++ b/src/commands/stats.ts @@ -30,7 +30,9 @@ export const stats: Command = { return; } - let rawArchived = await bot.cache.helpChannel.threads.fetchArchived(); + const rawArchived = await bot.cache.helpChannel.threads.fetchArchived({ + fetchAll: true, + }); const archived = rawArchived.threads; const active = (await bot.cache.helpChannel.threads.fetchActive()) .threads; @@ -38,18 +40,6 @@ export const stats: Command = { const sorted = threads .map((e) => e) .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); - let oldest = sorted.slice(-1)[0]; - - while (rawArchived.hasMore) { - rawArchived = await bot.cache.helpChannel.threads.fetchArchived({ - before: oldest.id, - }); - sorted.push(...rawArchived.threads.map((e) => e)); - sorted.sort( - (a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0) - ); - oldest = sorted.slice(-1)[0]; - } const total = sorted.length; const answeredArray = sorted.filter((thread) => diff --git a/src/modules/threads/aggregateUnansweredThreads.ts b/src/modules/threads/aggregateUnansweredThreads.ts index 26a3b03..d0772bd 100644 --- a/src/modules/threads/aggregateUnansweredThreads.ts +++ b/src/modules/threads/aggregateUnansweredThreads.ts @@ -10,12 +10,15 @@ import { stripLinks } from "../../utils/stripLinks"; */ export const aggregateUnansweredThreads = async (bot: ExtendedClient) => { try { - const archived = (await bot.cache.helpChannel.threads.fetchArchived()) - .threads; + const archived = ( + await bot.cache.helpChannel.threads.fetchArchived({ fetchAll: true }) + ).threads; const active = (await bot.cache.helpChannel.threads.fetchActive()).threads; const threads = [...archived.map((e) => e), ...active.map((e) => e)]; const unanswered = threads.filter( - (thread) => !thread.appliedTags.includes(bot.cache.answerTag) + (thread) => + !thread.appliedTags.includes(bot.cache.answerTag) && + !thread.appliedTags.includes(bot.cache.inactiveTag) ); const mapped = unanswered .map((e) => e) diff --git a/src/modules/threads/aggregateWeeklyThreads.ts b/src/modules/threads/aggregateWeeklyThreads.ts index 48eee9b..b473855 100644 --- a/src/modules/threads/aggregateWeeklyThreads.ts +++ b/src/modules/threads/aggregateWeeklyThreads.ts @@ -10,33 +10,15 @@ import { stripLinks } from "../../utils/stripLinks"; */ export const aggregateWeeklyThreads = async (bot: ExtendedClient) => { try { - const archived = (await bot.cache.helpChannel.threads.fetchArchived()) - .threads; + const archived = ( + await bot.cache.helpChannel.threads.fetchArchived({ fetchAll: true }) + ).threads; const active = (await bot.cache.helpChannel.threads.fetchActive()).threads; const threads = [...archived.map((e) => e), ...active.map((e) => e)]; const answered = threads .filter((thread) => thread.appliedTags.includes(bot.cache.answerTag)) .map((e) => e) .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); - let oldest = answered.slice(-1)[0]; - - while ( - oldest.createdTimestamp && - oldest.createdTimestamp > Date.now() - 1000 * 60 * 60 * 24 * 7 - ) { - const archived = ( - await bot.cache.helpChannel.threads.fetchArchived({ before: oldest.id }) - ).threads; - answered.push( - ...archived - .map((e) => e) - .filter((thread) => thread.appliedTags.includes(bot.cache.answerTag)) - ); - answered.sort( - (a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0) - ); - oldest = answered.slice(-1)[0]; - } const filtered = answered .filter( diff --git a/src/modules/threads/autorespondToThreads.ts b/src/modules/threads/autorespondToThreads.ts index 6fcc2fd..ecb6443 100644 --- a/src/modules/threads/autorespondToThreads.ts +++ b/src/modules/threads/autorespondToThreads.ts @@ -9,33 +9,15 @@ import { errorHandler } from "../../utils/errorHandler"; */ export const autorespondToThreads = async (bot: ExtendedClient) => { try { - const archived = (await bot.cache.helpChannel.threads.fetchArchived()) - .threads; + const archived = ( + await bot.cache.helpChannel.threads.fetchArchived({ fetchAll: true }) + ).threads; const active = (await bot.cache.helpChannel.threads.fetchActive()).threads; const threads = [...archived.map((e) => e), ...active.map((e) => e)]; const unanswered = threads .filter((thread) => !thread.appliedTags.includes(bot.cache.answerTag)) .map((e) => e) .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); - let oldest = unanswered.slice(-1)[0]; - - while ( - oldest.createdTimestamp && - oldest.createdTimestamp > Date.now() - 1000 * 60 * 60 * 24 * 30 - ) { - const archived = ( - await bot.cache.helpChannel.threads.fetchArchived({ before: oldest.id }) - ).threads; - unanswered.push( - ...archived - .map((e) => e) - .filter((thread) => thread.appliedTags.includes(bot.cache.answerTag)) - ); - unanswered.sort( - (a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0) - ); - oldest = unanswered.slice(-1)[0]; - } for (const thread of unanswered) { const lastMessage = (await thread.messages.fetch({ limit: 1 })).first(); diff --git a/src/utils/loadChannels.ts b/src/utils/loadChannels.ts index d75c74b..5d56bfe 100644 --- a/src/utils/loadChannels.ts +++ b/src/utils/loadChannels.ts @@ -3,6 +3,7 @@ import { ChannelType } from "discord.js"; import { ExtendedClient } from "../interfaces/ExtendedClient"; import { errorHandler } from "./errorHandler"; +import { logHandler } from "./logHandler"; /** * Loads the guild and channel IDs from the environment, fetches @@ -85,6 +86,20 @@ export const loadChannels = async (bot: ExtendedClient) => { lastSticky: "", }; } + + logHandler.debug("Loading help threads to cache."); + + const rawArchived = await bot.cache.helpChannel.threads.fetchArchived({ + fetchAll: true, + }); + const archived = rawArchived.threads; + const active = (await bot.cache.helpChannel.threads.fetchActive()).threads; + const threads = [...archived.map((e) => e), ...active.map((e) => e)]; + const sorted = threads + .map((e) => e) + .sort((a, b) => (b.createdTimestamp ?? 0) - (a.createdTimestamp ?? 0)); + + logHandler.debug(`Loaded ${sorted.length} threads.`); } catch (err) { await errorHandler(bot, "load channels utility", err); // shut down because the cache is essential. From a4a296ddba091d898d06ae0b63aaad1faee0f017 Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Thu, 10 Aug 2023 11:39:04 +0100 Subject: [PATCH 19/26] chore: update for package changes --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 85aee5a..9a2a0e2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20 \ No newline at end of file +v20 From 4a15b11672c4026edf2ef4d67b18e7437be3b80e Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 09:22:59 +0000 Subject: [PATCH 20/26] feat: dg bot customisation --- pnpm-lock.yaml | 815 ++++++++++++++++++++++++++++--------------------- src/index.ts | 1 + 2 files changed, 472 insertions(+), 344 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39a5e08..42c2132 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ dependencies: version: 16.4.4 node-fetch: specifier: '2' - version: 2.6.12 + version: 2.7.0 node-schedule: specifier: 2.1.1 version: 2.1.1 @@ -48,7 +48,7 @@ devDependencies: version: 18.19.15 '@types/node-fetch': specifier: '2' - version: 2.6.4 + version: 2.6.11 '@types/node-schedule': specifier: 2.1.6 version: 2.1.6 @@ -78,11 +78,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@colors/colors@1.5.0: - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} - engines: {node: '>=0.1.90'} - dev: false - /@colors/colors@1.6.0: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} @@ -102,7 +97,7 @@ packages: dependencies: '@discordjs/formatters': 0.3.3 '@discordjs/util': 1.0.2 - '@sapphire/shapeshift': 3.9.3 + '@sapphire/shapeshift': 3.9.6 discord-api-types: 0.37.61 fast-deep-equal: 3.1.3 ts-mixer: 6.0.3 @@ -126,17 +121,17 @@ packages: discord-api-types: 0.37.61 dev: false - /@discordjs/rest@2.1.0: - resolution: {integrity: sha512-5gFWFkZX2JCFSRzs8ltx8bWmyVi0wPMk6pBa9KGIQSDPMmrP+uOrZ9j9HOwvmVWGe+LmZ5Bov0jMnQd6/jVReg==} + /@discordjs/rest@2.2.0: + resolution: {integrity: sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==} engines: {node: '>=16.11.0'} dependencies: '@discordjs/collection': 2.0.0 '@discordjs/util': 1.0.2 - '@sapphire/async-queue': 1.5.0 + '@sapphire/async-queue': 1.5.2 '@sapphire/snowflake': 3.5.1 - '@vladfrangu/async_event_emitter': 2.2.2 + '@vladfrangu/async_event_emitter': 2.2.4 discord-api-types: 0.37.61 - magic-bytes.js: 1.5.0 + magic-bytes.js: 1.8.0 tslib: 2.6.2 undici: 5.27.2 dev: false @@ -151,11 +146,11 @@ packages: engines: {node: '>=16.11.0'} dependencies: '@discordjs/collection': 2.0.0 - '@discordjs/rest': 2.1.0 + '@discordjs/rest': 2.2.0 '@discordjs/util': 1.0.2 - '@sapphire/async-queue': 1.5.0 + '@sapphire/async-queue': 1.5.2 '@types/ws': 8.5.9 - '@vladfrangu/async_event_emitter': 2.2.2 + '@vladfrangu/async_event_emitter': 2.2.4 discord-api-types: 0.37.61 tslib: 2.6.2 ws: 8.14.2 @@ -183,8 +178,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.6.2: - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -195,8 +190,8 @@ packages: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 - globals: 13.20.0 - ignore: 5.2.4 + globals: 13.24.0 + ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -221,17 +216,17 @@ packages: hasBin: true dependencies: chalk: 5.3.0 - diff: 5.1.0 + diff: 5.2.0 ejs: 3.1.9 shell-quote: 1.8.1 yargs: 17.7.2 dev: true - /@humanwhocodes/config-array@0.11.13: - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.1 + '@humanwhocodes/object-schema': 2.0.2 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -243,8 +238,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.1: - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true /@nhcarrigan/eslint-config@1.1.3(eslint@8.56.0)(prettier@2.8.8)(typescript@5.3.3): @@ -302,65 +297,63 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.17.1 dev: true - /@octokit/endpoint@9.0.2: - resolution: {integrity: sha512-qhKW8YLIi+Kmc92FQUFGr++DYtkx/1fBv+Thua6baqnjnOsgBYJDCvWZR1YcINuHGOEQt416WOfE+A/oG60NBQ==} + /@octokit/endpoint@9.0.4: + resolution: {integrity: sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==} engines: {node: '>= 18'} dependencies: - '@octokit/types': 12.1.1 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: false /@octokit/graphql@7.0.2: resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} engines: {node: '>= 18'} dependencies: - '@octokit/request': 8.1.4 - '@octokit/types': 12.1.1 - universal-user-agent: 6.0.0 + '@octokit/request': 8.2.0 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: false - /@octokit/openapi-types@19.0.2: - resolution: {integrity: sha512-8li32fUDUeml/ACRp/njCWTsk5t17cfTM1jp9n08pBrqs5cDFJubtjsSnuz56r5Tad6jdEPJld7LxNp9dNcyjQ==} + /@octokit/openapi-types@19.1.0: + resolution: {integrity: sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==} dev: false /@octokit/request-error@5.0.1: resolution: {integrity: sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==} engines: {node: '>= 18'} dependencies: - '@octokit/types': 12.1.1 + '@octokit/types': 12.4.0 deprecation: 2.3.1 once: 1.4.0 dev: false - /@octokit/request@8.1.4: - resolution: {integrity: sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==} + /@octokit/request@8.2.0: + resolution: {integrity: sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==} engines: {node: '>= 18'} dependencies: - '@octokit/endpoint': 9.0.2 + '@octokit/endpoint': 9.0.4 '@octokit/request-error': 5.0.1 - '@octokit/types': 12.1.1 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: false - /@octokit/types@12.1.1: - resolution: {integrity: sha512-qnJTldJ1NyGT5MTsCg/Zi+y2IFHZ1Jo5+njNCjJ9FcainV7LjuHgmB697kA0g4MjZeDAJsM3B45iqCVsCLVFZg==} + /@octokit/types@12.4.0: + resolution: {integrity: sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==} dependencies: - '@octokit/openapi-types': 19.0.2 + '@octokit/openapi-types': 19.1.0 dev: false - /@sapphire/async-queue@1.5.0: - resolution: {integrity: sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==} + /@sapphire/async-queue@1.5.2: + resolution: {integrity: sha512-7X7FFAA4DngXUl95+hYbUF19bp1LGiffjJtu7ygrZrbdCSsdDDBaSjB7Akw0ZbOu6k0xpXyljnJ6/RZUvLfRdg==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} dev: false - /@sapphire/shapeshift@3.9.3: - resolution: {integrity: sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + /@sapphire/shapeshift@3.9.6: + resolution: {integrity: sha512-4+Na/fxu2SEepZRb9z0dbsVh59QtwPuBg/UVaDib3av7ZY14b14+z09z6QVn0P6Dv6eOU2NDTsjIi0mbtgP56g==} + engines: {node: '>=v18'} dependencies: fast-deep-equal: 3.1.3 lodash: 4.17.21 @@ -375,8 +368,8 @@ packages: resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} dev: true - /@types/json-schema@7.0.12: - resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true /@types/json5@0.0.29: @@ -388,11 +381,11 @@ packages: resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} dev: true - /@types/node-fetch@2.6.4: - resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} + /@types/node-fetch@2.6.11: + resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} dependencies: '@types/node': 18.19.15 - form-data: 3.0.1 + form-data: 4.0.0 dev: true /@types/node-schedule@2.1.6: @@ -406,12 +399,12 @@ packages: dependencies: undici-types: 5.26.5 - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + /@types/semver@7.5.7: + resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==} dev: true - /@types/triple-beam@1.3.2: - resolution: {integrity: sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==} + /@types/triple-beam@1.3.5: + resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} dev: false /@types/ws@8.5.9: @@ -431,7 +424,7 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.6.2 + '@eslint-community/regexpp': 4.10.0 '@typescript-eslint/parser': 5.59.5(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/scope-manager': 5.59.5 '@typescript-eslint/type-utils': 5.59.5(eslint@8.56.0)(typescript@5.3.3) @@ -439,9 +432,9 @@ packages: debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 grapheme-splitter: 1.0.4 - ignore: 5.2.4 + ignore: 5.3.1 natural-compare-lite: 1.4.0 - semver: 7.5.2 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -515,7 +508,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.2 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -529,14 +522,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.7 '@typescript-eslint/scope-manager': 5.59.5 '@typescript-eslint/types': 5.59.5 '@typescript-eslint/typescript-estree': 5.59.5(typescript@5.3.3) eslint: 8.56.0 eslint-scope: 5.1.1 - semver: 7.5.2 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -554,21 +547,21 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vladfrangu/async_event_emitter@2.2.2: - resolution: {integrity: sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==} + /@vladfrangu/async_event_emitter@2.2.4: + resolution: {integrity: sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} dev: false - /acorn-jsx@5.3.2(acorn@8.9.0): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.9.0 + acorn: 8.11.3 dev: true - /acorn@8.9.0: - resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -616,21 +609,22 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + /array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - is-array-buffer: 3.0.2 + call-bind: 1.0.7 + is-array-buffer: 3.0.4 dev: true - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} + /array-includes@3.1.7: + resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + get-intrinsic: 1.2.4 is-string: 1.0.7 dev: true @@ -639,24 +633,38 @@ packages: engines: {node: '>=8'} dev: true - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + es-shim-unscopables: 1.0.2 dev: true - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} + /array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + es-shim-unscopables: 1.0.2 + dev: true + + /arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.2 dev: true /arrify@1.0.1: @@ -668,15 +676,15 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /async@3.2.4: - resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + /async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + /available-typed-arrays@1.0.6: + resolution: {integrity: sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==} engines: {node: '>= 0.4'} dev: true @@ -717,11 +725,15 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true - /call-bind@1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.2.1 + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.1 dev: true /callsites@3.1.0: @@ -742,7 +754,7 @@ packages: check-error: 1.0.3 deep-eql: 4.1.3 get-func-name: 2.0.2 - loupe: 2.3.6 + loupe: 2.3.7 pathval: 1.1.1 type-detect: 4.0.8 dev: true @@ -778,7 +790,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /cliui@7.0.4: @@ -911,11 +923,21 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} dependencies: - has-property-descriptors: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dev: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 object-keys: 1.1.1 dev: true @@ -938,8 +960,8 @@ packages: engines: {node: '>=0.3.1'} dev: true - /diff@5.1.0: - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + /diff@5.2.0: + resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} dev: true @@ -961,7 +983,7 @@ packages: '@discordjs/builders': 1.7.0 '@discordjs/collection': 1.5.3 '@discordjs/formatters': 0.3.3 - '@discordjs/rest': 2.1.0 + '@discordjs/rest': 2.2.0 '@discordjs/util': 1.0.2 '@discordjs/ws': 1.0.2 '@sapphire/snowflake': 3.5.1 @@ -1012,59 +1034,78 @@ packages: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} dev: false - /es-abstract@1.21.2: - resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} + /es-abstract@1.22.4: + resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} engines: {node: '>= 0.4'} dependencies: - array-buffer-byte-length: 1.0.0 - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.6 + call-bind: 1.0.7 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 globalthis: 1.0.3 gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.2 has-proto: 1.0.1 has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 + hasown: 2.0.1 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 is-callable: 1.2.7 is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - is-typed-array: 1.1.10 + is-typed-array: 1.1.13 is-weakref: 1.0.2 - object-inspect: 1.12.3 + object-inspect: 1.13.1 object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + safe-array-concat: 1.1.0 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.1 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 + which-typed-array: 1.1.14 + dev: true + + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} dev: true - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + /es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - has-tostringtag: 1.0.0 + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.1 dev: true - /es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: - has: 1.0.3 + hasown: 2.0.1 dev: true /es-to-primitive@1.2.1: @@ -1076,8 +1117,8 @@ packages: is-symbol: 1.0.4 dev: true - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + /escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} dev: true @@ -1095,17 +1136,17 @@ packages: eslint: 8.56.0 dev: true - /eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 - is-core-module: 2.12.1 - resolve: 1.22.2 + is-core-module: 2.13.1 + resolve: 1.22.8 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.5)(eslint-import-resolver-node@0.3.7)(eslint@8.56.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.5)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -1129,7 +1170,7 @@ packages: '@typescript-eslint/parser': 5.59.5(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7 eslint: 8.56.0 - eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true @@ -1145,22 +1186,22 @@ packages: optional: true dependencies: '@typescript-eslint/parser': 5.59.5(eslint@8.56.0)(typescript@5.3.3) - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 + array-includes: 3.1.7 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 eslint: 8.56.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.5)(eslint-import-resolver-node@0.3.7)(eslint@8.56.0) - has: 1.0.3 - is-core-module: 2.12.1 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.5)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) + has: 1.0.4 + is-core-module: 2.13.1 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.2 - semver: 6.3.0 - tsconfig-paths: 3.14.2 + object.values: 1.1.7 + resolve: 1.22.8 + semver: 6.3.1 + tsconfig-paths: 3.15.0 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -1180,7 +1221,7 @@ packages: escape-string-regexp: 4.0.0 eslint: 8.56.0 esquery: 1.5.0 - semver: 7.5.2 + semver: 7.6.0 spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color @@ -1235,10 +1276,10 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@eslint-community/regexpp': 4.6.2 + '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.56.0 - '@humanwhocodes/config-array': 0.11.13 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 @@ -1257,9 +1298,9 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 + globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.2.4 + ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -1280,8 +1321,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.9.0 - acorn-jsx: 5.3.2(acorn@8.9.0) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -1321,8 +1362,8 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -1340,8 +1381,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 dev: true @@ -1354,13 +1395,13 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.0.4 + flat-cache: 3.2.0 dev: true /filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: - minimatch: 5.0.1 + minimatch: 5.1.6 dev: true /fill-range@7.0.1: @@ -1378,11 +1419,12 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.2.7 + flatted: 3.2.9 + keyv: 4.5.4 rimraf: 3.0.2 dev: true @@ -1391,8 +1433,8 @@ packages: hasBin: true dev: true - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true /fn.name@1.1.0: @@ -1405,8 +1447,8 @@ packages: is-callable: 1.2.7 dev: true - /form-data@3.0.1: - resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} + /form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 @@ -1418,25 +1460,25 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true dev: true optional: true - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: true - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 functions-have-names: 1.2.3 dev: true @@ -1453,21 +1495,24 @@ packages: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true - /get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} dependencies: - function-bind: 1.1.1 - has: 1.0.3 + es-errors: 1.3.0 + function-bind: 1.1.2 has-proto: 1.0.1 has-symbols: 1.0.3 + hasown: 2.0.1 dev: true - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + /get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 dev: true /glob-parent@5.1.2: @@ -1506,8 +1551,8 @@ packages: once: 1.4.0 dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -1517,7 +1562,7 @@ packages: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /globby@11.1.0: @@ -1526,8 +1571,8 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.4 + fast-glob: 3.3.2 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -1535,7 +1580,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.4 dev: true /grapheme-splitter@1.0.4: @@ -1555,10 +1600,10 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: - get-intrinsic: 1.2.1 + es-define-property: 1.0.0 dev: true /has-proto@1.0.1: @@ -1571,18 +1616,23 @@ packages: engines: {node: '>= 0.4'} dev: true - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + /has@1.0.4: + resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} + dev: true + + /hasown@2.0.1: + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + engines: {node: '>= 0.4'} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 dev: true /he@1.2.0: @@ -1590,8 +1640,8 @@ packages: hasBin: true dev: true - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} dev: true @@ -1618,21 +1668,21 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + /internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - side-channel: 1.0.4 + es-errors: 1.3.0 + hasown: 2.0.1 + side-channel: 1.0.5 dev: true - /is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + /is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-typed-array: 1.1.10 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 dev: true /is-arrayish@0.3.2: @@ -1656,8 +1706,8 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 + call-bind: 1.0.7 + has-tostringtag: 1.0.2 dev: true /is-callable@1.2.7: @@ -1665,17 +1715,17 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - has: 1.0.3 + hasown: 2.0.1 dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-extglob@2.1.1: @@ -1704,7 +1754,7 @@ packages: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-number@7.0.0: @@ -1722,23 +1772,18 @@ packages: engines: {node: '>=8'} dev: true - /is-plain-object@5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - dev: false - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 + call-bind: 1.0.7 + has-tostringtag: 1.0.2 dev: true /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 dev: true /is-stream@2.0.1: @@ -1750,7 +1795,7 @@ packages: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-symbol@1.0.4: @@ -1760,15 +1805,11 @@ packages: has-symbols: 1.0.3 dev: true - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + /is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + which-typed-array: 1.1.14 dev: true /is-unicode-supported@0.1.0: @@ -1779,7 +1820,11 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true /isexe@2.0.0: @@ -1791,7 +1836,7 @@ packages: engines: {node: '>=10'} hasBin: true dependencies: - async: 3.2.4 + async: 3.2.5 chalk: 4.1.2 filelist: 1.0.4 minimatch: 3.1.2 @@ -1809,6 +1854,10 @@ packages: engines: {node: '>=12.0.0'} dev: true + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -1825,6 +1874,12 @@ packages: minimist: 1.2.8 dev: true + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + /kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} dev: false @@ -1864,24 +1919,24 @@ packages: is-unicode-supported: 0.1.0 dev: true - /logform@2.5.1: - resolution: {integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==} + /logform@2.6.0: + resolution: {integrity: sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==} + engines: {node: '>= 12.0.0'} dependencies: - '@colors/colors': 1.5.0 - '@types/triple-beam': 1.3.2 + '@colors/colors': 1.6.0 + '@types/triple-beam': 1.3.5 fecha: 4.2.3 ms: 2.1.3 safe-stable-stringify: 2.4.3 - triple-beam: 1.3.0 + triple-beam: 1.4.1 dev: false /long-timeout@0.1.1: resolution: {integrity: sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==} dev: false - /loupe@2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} - deprecated: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5 + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 dev: true @@ -1898,8 +1953,8 @@ packages: engines: {node: '>=12'} dev: false - /magic-bytes.js@1.5.0: - resolution: {integrity: sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==} + /magic-bytes.js@1.8.0: + resolution: {integrity: sha512-lyWpfvNGVb5lu8YUAbER0+UMBTdR63w2mcSUlhhBTyVbxJvjgqwyAf3AZD6MprgK0uHuBoWXSDAMWLupX83o3Q==} dev: false /make-error@1.3.6: @@ -1944,6 +1999,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -1997,8 +2059,8 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /node-fetch@2.6.12: - resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -2023,8 +2085,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + /object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true /object-keys@1.1.1: @@ -2032,23 +2094,23 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 + call-bind: 1.0.7 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} + /object.values@1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 dev: true /once@1.4.0: @@ -2146,8 +2208,8 @@ packages: hasBin: true dev: true - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: true @@ -2177,13 +2239,14 @@ packages: picomatch: 2.3.1 dev: true - /regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} + /regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.1 dev: true /require-directory@2.1.1: @@ -2196,11 +2259,11 @@ packages: engines: {node: '>=4'} dev: true - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -2223,14 +2286,25 @@ packages: queue-microtask: 1.2.3 dev: true + /safe-array-concat@1.1.0: + resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + /safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.7 + es-errors: 1.3.0 is-regex: 1.1.4 dev: true @@ -2239,13 +2313,13 @@ packages: engines: {node: '>=10'} dev: false - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: true - /semver@7.5.2: - resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} hasBin: true dependencies: @@ -2258,6 +2332,27 @@ packages: randombytes: 2.1.0 dev: true + /set-function-length@1.2.1: + resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + dev: true + + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -2274,12 +2369,14 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + /side-channel@1.0.5: + resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.1 dev: true /simple-swizzle@0.2.2: @@ -2309,19 +2406,19 @@ packages: engines: {node: '>=0.10.0'} dev: true - /spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + /spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} dev: true /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.17 dev: true - /spdx-license-ids@3.0.13: - resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + /spdx-license-ids@3.0.17: + resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} dev: true /stack-trace@0.0.10: @@ -2337,29 +2434,29 @@ packages: strip-ansi: 6.0.1 dev: true - /string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 dev: true - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 dev: true - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 dev: true /string_decoder@1.3.0: @@ -2424,8 +2521,9 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false - /triple-beam@1.3.0: - resolution: {integrity: sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==} + /triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} dev: false /ts-mixer@6.0.3: @@ -2442,7 +2540,7 @@ packages: mocha: 10.3.0 ts-node: 7.0.1 optionalDependencies: - tsconfig-paths: 3.14.2 + tsconfig-paths: 3.15.0 dev: true /ts-node@7.0.1: @@ -2460,8 +2558,8 @@ packages: yn: 2.0.0 dev: true - /tsconfig-paths@3.14.2: - resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} + /tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: '@types/json5': 0.0.29 json5: 1.0.2 @@ -2504,12 +2602,42 @@ packages: engines: {node: '>=10'} dev: true + /typed-array-buffer@1.0.1: + resolution: {integrity: sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.6 + call-bind: 1.0.7 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.13 + dev: true + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 for-each: 0.3.3 - is-typed-array: 1.1.10 + is-typed-array: 1.1.13 dev: true /typescript@5.3.3: @@ -2521,7 +2649,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -2537,14 +2665,14 @@ packages: '@fastify/busboy': 2.1.0 dev: false - /universal-user-agent@6.0.0: - resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} + /universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} dev: false /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /util-deprecate@1.0.2: @@ -2572,16 +2700,15 @@ packages: is-symbol: 1.0.4 dev: true - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + /which-typed-array@1.1.14: + resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + available-typed-arrays: 1.0.6 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 + has-tostringtag: 1.0.2 dev: true /which@2.0.2: @@ -2592,13 +2719,13 @@ packages: isexe: 2.0.0 dev: true - /winston-transport@4.5.0: - resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} - engines: {node: '>= 6.4.0'} + /winston-transport@4.7.0: + resolution: {integrity: sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==} + engines: {node: '>= 12.0.0'} dependencies: - logform: 2.5.1 + logform: 2.6.0 readable-stream: 3.6.2 - triple-beam: 1.3.0 + triple-beam: 1.4.1 dev: false /winston@3.11.0: @@ -2607,15 +2734,15 @@ packages: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 - async: 3.2.4 + async: 3.2.5 is-stream: 2.0.1 - logform: 2.5.1 + logform: 2.6.0 one-time: 1.0.0 readable-stream: 3.6.2 safe-stable-stringify: 2.4.3 stack-trace: 0.0.10 - triple-beam: 1.3.0 - winston-transport: 4.5.0 + triple-beam: 1.4.1 + winston-transport: 4.7.0 dev: false /workerpool@6.2.1: @@ -2681,7 +2808,7 @@ packages: engines: {node: '>=10'} dependencies: cliui: 7.0.4 - escalade: 3.1.1 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -2694,7 +2821,7 @@ packages: engines: {node: '>=12'} dependencies: cliui: 8.0.1 - escalade: 3.1.1 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/src/index.ts b/src/index.ts index 3b7e0ba..191e0da 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,6 +18,7 @@ import { loadContexts } from "./utils/loadContexts"; import { logHandler } from "./utils/logHandler"; import { registerCommands } from "./utils/registerCommands"; import { validateEnv } from "./utils/validateEnv"; +import { healthCheck } from "./utils/healthCheck"; (async () => { try { From bb448ad47ffd241f379de230279aa984a81af75b Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 09:27:32 +0000 Subject: [PATCH 21/26] fix: fixing lint issues --- src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 191e0da..3b7e0ba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,7 +18,6 @@ import { loadContexts } from "./utils/loadContexts"; import { logHandler } from "./utils/logHandler"; import { registerCommands } from "./utils/registerCommands"; import { validateEnv } from "./utils/validateEnv"; -import { healthCheck } from "./utils/healthCheck"; (async () => { try { From 4e55e5b8180fcef5e06a78da9d1e9e5100d99274 Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 11:06:26 +0000 Subject: [PATCH 22/26] feat: label github discussions --- src/modules/postGithubDiscussion.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/postGithubDiscussion.ts b/src/modules/postGithubDiscussion.ts index 3838149..bd35201 100644 --- a/src/modules/postGithubDiscussion.ts +++ b/src/modules/postGithubDiscussion.ts @@ -97,6 +97,15 @@ export const postGithubDiscussion = async ( const discussionId = discussionQuery.createDiscussion.discussion.id; + await github(` + mutation { + addLabelsToLabelable(input:{ + labelableId: "${discussionId}", + labelIds: ["${label}"] + }) + } + `); + const commentQuery: { addDiscussionComment: { comment: { id: string } } } = await github(` mutation { From 221d3e5c0d1c03faf11529fb9126cb69774129ed Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 11:26:17 +0000 Subject: [PATCH 23/26] feat: fix errors --- src/modules/postGithubDiscussion.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/postGithubDiscussion.ts b/src/modules/postGithubDiscussion.ts index bd35201..ae18d5e 100644 --- a/src/modules/postGithubDiscussion.ts +++ b/src/modules/postGithubDiscussion.ts @@ -62,7 +62,8 @@ export const postGithubDiscussion = async ( } } } - `); + } + `); const category = repoQuery.repository.discussionCategories.nodes.find( (n) => n.name === "General help" @@ -99,10 +100,12 @@ export const postGithubDiscussion = async ( await github(` mutation { - addLabelsToLabelable(input:{ - labelableId: "${discussionId}", - labelIds: ["${label}"] - }) + addLabelsToLabelable(input:{ + labelableId: "${discussionId}", + labelIds: ["${label}"] + }) { + clientMutationId + } } `); From 1bad6c13e2ea981d0a8a0863b2a466eab7f31df6 Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 12:16:24 +0000 Subject: [PATCH 24/26] feat: disable auto labelling because i am a noob --- src/modules/postGithubDiscussion.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/postGithubDiscussion.ts b/src/modules/postGithubDiscussion.ts index ae18d5e..5a627b7 100644 --- a/src/modules/postGithubDiscussion.ts +++ b/src/modules/postGithubDiscussion.ts @@ -98,16 +98,16 @@ export const postGithubDiscussion = async ( const discussionId = discussionQuery.createDiscussion.discussion.id; - await github(` - mutation { - addLabelsToLabelable(input:{ - labelableId: "${discussionId}", - labelIds: ["${label}"] - }) { - clientMutationId - } - } - `); + // await github(` + // mutation { + // addLabelsToLabelable(input:{ + // labelableId: "${discussionId}", + // labelIds: ["${label}"] + // }) { + // clientMutationId + // } + // } + // `); const commentQuery: { addDiscussionComment: { comment: { id: string } } } = await github(` From 1b66cc1d9b96848d003f59ed98b0072a222d3d48 Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Mon, 30 Oct 2023 17:27:47 +0000 Subject: [PATCH 25/26] fix: merge errors --- src/modules/postGithubDiscussion.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/postGithubDiscussion.ts b/src/modules/postGithubDiscussion.ts index 5a627b7..64d72ba 100644 --- a/src/modules/postGithubDiscussion.ts +++ b/src/modules/postGithubDiscussion.ts @@ -62,8 +62,7 @@ export const postGithubDiscussion = async ( } } } - } - `); + `); const category = repoQuery.repository.discussionCategories.nodes.find( (n) => n.name === "General help" From 53cdc3a9d5e6808ecdf8a6d7a146801090a14231 Mon Sep 17 00:00:00 2001 From: Luke Oliff Date: Thu, 2 Nov 2023 10:09:21 +0000 Subject: [PATCH 26/26] feat: delay deleting the moved message until we have confirmed it has all moved successfully --- src/contexts/help.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/contexts/help.ts b/src/contexts/help.ts index 35f10d0..2e46def 100644 --- a/src/contexts/help.ts +++ b/src/contexts/help.ts @@ -11,6 +11,7 @@ export const help: Context = { name: "Move to help channel", type: 3, }, + run: async (bot, interaction) => { try { const { member } = interaction; @@ -23,15 +24,17 @@ export const help: Context = { } const message = interaction.options.getMessage("message"); + if (!message) { await interaction.editReply({ content: ResponseText.NoMessage, }); return; } + const { content, author } = message; - await message.delete(); const response = await makeAiRequest(bot, "response", content); + const thread = await bot.cache.helpChannel.threads.create({ name: `${truncateString(content, 90)}`, autoArchiveDuration: 1440, @@ -40,31 +43,40 @@ export const help: Context = { }, appliedTags: [bot.cache.questionTag], }); + if (response !== ResponseText.NoAiUrl) { const yesButton = new ButtonBuilder() .setCustomId(`yes-${interaction.user.id}`) .setLabel("This helps!") .setEmoji("✅") .setStyle(ButtonStyle.Success); + const noButton = new ButtonBuilder() .setCustomId("no") .setLabel("This is incorrect.") .setEmoji("✖️") .setStyle(ButtonStyle.Danger); + const row = new ActionRowBuilder().addComponents( yesButton, noButton ); + await thread.send({ content: response, components: [row], }); } + await interaction.editReply({ content: ResponseText.HelpSuccess, }); + + // everything is okay, now we can delete the message + await message.delete(); } catch (err) { await errorHandler(bot, "help context", err); + await interaction.editReply({ content: ResponseText.InteractionError, });