From 4b4f109a8b138ecbb306a3bb66b80c0f5402d579 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 19 Nov 2022 13:34:36 -0700 Subject: [PATCH 1/6] Discord v14 --- .vscode/settings.json | 10 +- CHANGELOG.md | 6 + Dockerfile | 2 +- README.md | 4 +- docker-compose.yml | 2 +- package.json | 45 +- src/bot.ts | 86 + src/db.ts | 7 +- src/index.ts | 110 +- src/log.ts | 25 +- src/modules/autorole.ts | 55 +- src/modules/etc.ts | 109 +- src/modules/handbook.ts | 95 +- src/modules/help.ts | 164 +- src/modules/helpthread.ts | 491 +++--- src/modules/mod.ts | 20 +- src/modules/playground.ts | 102 +- src/modules/rep.ts | 345 +++-- src/modules/snippet.ts | 365 +++-- src/modules/twoslash.ts | 342 ++-- src/util/codeBlocks.ts | 7 +- src/util/customCommand.ts | 15 +- src/util/inhibitors.ts | 16 - src/util/send.ts | 5 +- src/util/sendPaginatedMessage.ts | 18 +- tsconfig.json | 77 +- yarn.lock | 2499 ++++++++++++------------------ 27 files changed, 2255 insertions(+), 2767 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 src/bot.ts delete mode 100644 src/util/inhibitors.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 72446f43..9c4d103a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,11 @@ { - "typescript.tsdk": "node_modules/typescript/lib" + "typescript.tsdk": "node_modules/typescript/lib", + "cSpell.words": [ + "algoliasearch", + "autorole", + "Cooldown", + "leaderboard", + "twoslash", + "twoslasher" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e8006176 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# 2022-11-19 + +- Updated to Discord.js 14, removed Cookiecord to prevent future delays in updating versions. +- The bot will now react on the configured autorole messages to indicate available roles. +- Unhandled rejections will now only be ignored if `NODE_ENV` is set to `production`. +- Removed admin `checkThreads` command as using it would result in the bot checking for closed threads twice as often until restarted. diff --git a/Dockerfile b/Dockerfile index 3ba4ceb5..9739434a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.14.0-alpine +FROM node:16.18.1-alpine WORKDIR /usr/src/app COPY yarn.lock ./ diff --git a/README.md b/README.md index fb102a3a..2f9438bb 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ See the [documentation](https://cookiecord.js.org/) for the framework we use. We also have a docker-compose.yml for development, along with a .env.example. -**A quick note about the help channel system:** Please don't use it if you don't have a large server (10k+ members) as it will likely inconvenience your members rather than benefit them. We used a static channel system (#help-1 and #help-2) up until around 9,000 members, when we started to see issues arising (many questions being asked on top of eachother without answers). +**A quick note about the help channel system:** Please only use it if you have a large server (10k+ members) as it will likely inconvenience your members rather than benefit them. We used a static channel system (#help-1 and #help-2) up until around 9,000 members, when we started to see issues arising (many questions being asked on top of each other without answers). ## Thanks! -- [ckie](https://github.com/ckiee) for writing the base for the bot and the amazing [framework](https://github.com/cookiecord/cookiecord) used! +- [ckie](https://github.com/ckiee) for writing the base for the bot. - [Python Discord](https://github.com/python-discord) for heavily influencing our help channel system. diff --git a/docker-compose.yml b/docker-compose.yml index ae040051..8f1df714 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: volumes: - 'postgres_data:/postgres/data' ports: - - 5432 + - 5432:5432 volumes: postgres_data: diff --git a/package.json b/package.json index 3c2d513a..5b116ebf 100644 --- a/package.json +++ b/package.json @@ -4,34 +4,33 @@ "description": "Typescript Community Bot", "main": "dist/index.js", "dependencies": { - "@typescript/twoslash": "^2.1.0", - "algoliasearch": "^4.8.6", - "cookiecord": "^0.8.18", + "@typescript/twoslash": "^3.2.1", + "algoliasearch": "^4.14.2", + "discord.js": "^14.6.0", "dotenv-safe": "^8.2.0", - "html-entities": "^2.3.2", + "html-entities": "^2.3.3", "lz-string": "^1.4.4", - "node-fetch": "^2.6.7", - "npm-registry-fetch": "^9.0.0", - "parse-duration": "^0.4.4", - "pg": "^8.3.0", - "prettier": "^2.2.1", - "pretty-ms": "^7.0.0", - "tar": "^6.1.0", - "typeorm": "^0.2.25" + "npm-registry-fetch": "^14.0.2", + "parse-duration": "^1.0.2", + "pg": "^8.8.0", + "prettier": "^2.7.1", + "pretty-ms": "^8.0.0", + "tar": "^6.1.12", + "typeorm": "^0.3.10", + "undici": "^5.12.0" }, "devDependencies": { - "@types/dotenv-safe": "^8.1.0", + "@types/dotenv-safe": "^8.1.2", "@types/lz-string": "^1.3.34", - "@types/node": "^13.7.0", - "@types/node-fetch": "^2.5.8", - "@types/npm-registry-fetch": "^8.0.0", - "@types/prettier": "^2.2.3", - "@types/tar": "^4.0.4", - "@types/ws": "^7.2.1", - "husky": "^4.2.5", - "pretty-quick": "^2.0.1", - "ts-node-dev": "^1.0.0-pre.60", - "typescript": "^4.1.3" + "@types/node": "^16", + "@types/npm-registry-fetch": "^8.0.4", + "@types/prettier": "^2.7.1", + "@types/tar": "^6.1.3", + "@types/ws": "^8.5.3", + "husky": "^8.0.2", + "pretty-quick": "^3.1.3", + "ts-node-dev": "^2.0.0", + "typescript": "^4.9.3" }, "husky": { "hooks": { diff --git a/src/bot.ts b/src/bot.ts new file mode 100644 index 00000000..2c91983e --- /dev/null +++ b/src/bot.ts @@ -0,0 +1,86 @@ +import { Message, Client, User, GuildMember } from 'discord.js'; +import { prefixes, trustedRoleId } from './env'; + +export interface CommandRegistration { + aliases: string[]; + description?: string; + listener: (msg: Message, content: string) => Promise; +} + +export class Bot { + commands: CommandRegistration[] = []; + adminCommands: CommandRegistration[] = []; + + constructor(public client: Client) { + client.on('messageCreate', msg => { + const triggerWithPrefix = msg.content.split(/\s/)[0]; + const matchingPrefix = prefixes.find(p => + triggerWithPrefix.startsWith(p), + ); + if (matchingPrefix) { + const content = msg.content + .substring(triggerWithPrefix.length + 1) + .trim(); + this.getByTrigger( + triggerWithPrefix.substring(matchingPrefix.length), + ) + ?.listener(msg, content) + .catch(err => { + this.client.emit('error', err); + }); + } + }); + } + + registerCommand(command: CommandRegistration) { + this.commands.push(command); + } + + registerAdminCommand(command: CommandRegistration) { + this.adminCommands.push(command); + } + + getByTrigger(trigger: string): CommandRegistration | undefined { + const match = (c: CommandRegistration) => c.aliases.includes(trigger); + return this.commands.find(match) || this.adminCommands.find(match); + } + + isMod(member: GuildMember | null) { + return member?.permissions.has('ManageMessages') ?? false; + } + + getTrustedMemberError(msg: Message) { + if (!msg.guild || !msg.member || !msg.channel.isTextBased()) { + return ":warning: you can't use that command here."; + } + + if ( + !msg.member.roles.cache.has(trustedRoleId) && + !msg.member.permissions.has('ManageMessages') + ) { + return ":warning: you don't have permission to use that command."; + } + } + + async getTargetUser(msg: Message): Promise { + const query = msg.content.split(/\s/)[1]; + + const mentioned = msg.mentions.members?.first()?.user; + if (mentioned) return mentioned; + + if (query) { + // Search by ID + const queriedUser = await this.client.users + .fetch(query) + .catch(() => undefined); + if (queriedUser) return queriedUser; + + // Search by name, likely a better way to do this... + for (const user of this.client.users.cache.values()) { + if (user.tag === query || user.username === query) { + return user; + } + } + } + } +} diff --git a/src/db.ts b/src/db.ts index 5a326fd0..6f8e373c 100644 --- a/src/db.ts +++ b/src/db.ts @@ -1,10 +1,10 @@ -import { Connection, createConnection } from 'typeorm'; +import { DataSource } from 'typeorm'; import { dbUrl } from './env'; import { Rep } from './entities/Rep'; import { HelpThread } from './entities/HelpThread'; import { Snippet } from './entities/Snippet'; -let db: Connection | undefined; +let db: DataSource | undefined; export async function getDB() { if (db) return db; @@ -21,7 +21,7 @@ export async function getDB() { } : {}; - db = await createConnection({ + db = new DataSource({ type: 'postgres', url: dbUrl, synchronize: true, @@ -29,6 +29,7 @@ export async function getDB() { entities: [Rep, HelpThread, Snippet], ...extraOpts, }); + await db.initialize() console.log('Connected to DB'); return db; } diff --git a/src/index.ts b/src/index.ts index 6ec41113..061ea43e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,63 +1,69 @@ -import { token, botAdmins, prefixes } from './env'; -import CookiecordClient from 'cookiecord'; -import { Intents } from 'discord.js'; +import { Client, GatewayIntentBits, Partials } from 'discord.js'; +import { Bot } from './bot'; import { getDB } from './db'; +import { token } from './env'; import { hookLog } from './log'; -import { AutoroleModule } from './modules/autorole'; -import { EtcModule } from './modules/etc'; -import { HelpThreadModule } from './modules/helpthread'; -import { PlaygroundModule } from './modules/playground'; -import { RepModule } from './modules/rep'; -import { TwoslashModule } from './modules/twoslash'; -import { HelpModule } from './modules/help'; -import { SnippetModule } from './modules/snippet'; -import { HandbookModule } from './modules/handbook'; -import { ModModule } from './modules/mod'; +import { autoroleModule } from './modules/autorole'; +import { etcModule } from './modules/etc'; +import { handbookModule } from './modules/handbook'; +import { helpModule } from './modules/help'; +import { modModule } from './modules/mod'; +import { playgroundModule } from './modules/playground'; +import { repModule } from './modules/rep'; +import { twoslashModule } from './modules/twoslash'; +import { snippetModule } from './modules/snippet'; +import { helpThreadModule } from './modules/helpthread'; -const client = new CookiecordClient( - { - botAdmins, - prefix: prefixes, +const client = new Client({ + partials: [ + Partials.Reaction, + Partials.Message, + Partials.User, + Partials.Channel, + ], + allowedMentions: { + parse: ['users', 'roles'], }, - { - partials: ['REACTION', 'MESSAGE', 'USER', 'CHANNEL'], - allowedMentions: { - parse: ['users', 'roles'], - }, - intents: new Intents([ - 'GUILDS', - 'GUILD_MESSAGES', - 'GUILD_MEMBERS', - 'GUILD_MESSAGE_REACTIONS', - 'DIRECT_MESSAGES', - ]), - }, -).setMaxListeners(Infinity); - -for (const mod of [ - AutoroleModule, - EtcModule, - HelpThreadModule, - PlaygroundModule, - RepModule, - TwoslashModule, - HelpModule, - SnippetModule, - HandbookModule, - ModModule, -]) { - client.registerModule(mod); -} + intents: [ + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMessages, + GatewayIntentBits.GuildMembers, + GatewayIntentBits.GuildMessageReactions, + GatewayIntentBits.DirectMessages, + GatewayIntentBits.MessageContent, + ], +}).setMaxListeners(Infinity); -getDB(); // prepare the db for later +getDB().then(() => client.login(token)); -client.login(token); -client.on('ready', () => { +client.on('ready', async () => { + const bot = new Bot(client); console.log(`Logged in as ${client.user?.tag}`); - hookLog(client); + await hookLog(client); + + for (const mod of [ + autoroleModule, + etcModule, + helpThreadModule, + playgroundModule, + repModule, + twoslashModule, + helpModule, + snippetModule, + handbookModule, + modModule, + ]) { + await mod(bot); + } }); -process.on('unhandledRejection', e => { - console.error('Unhandled rejection', e); +client.on('error', error => { + console.error(error); }); + +if (process.env.NODE_ENV === 'production') { + process.on('unhandledRejection', e => { + console.error('Unhandled rejection', e); + }); +} diff --git a/src/log.ts b/src/log.ts index fc96caba..1e786682 100644 --- a/src/log.ts +++ b/src/log.ts @@ -1,16 +1,23 @@ -import CookiecordClient from 'cookiecord'; -import { Channel, GuildMember, TextChannel, User } from 'discord.js'; +import { + Channel, + Client, + GuildChannel, + GuildMember, + TextChannel, + User, +} from 'discord.js'; import { inspect } from 'util'; import { logChannelId } from './env'; const logDebounceTime = 5000; const logMaxLength = 2000; -export async function hookLog(client: CookiecordClient) { +export async function hookLog(client: Client) { const guild = client.guilds.cache.get( (await client.guilds.fetch()).first()!.id, )!; const channel = (await guild.channels.fetch(logChannelId)) as TextChannel; + console.log('Writing logs to', channel); let curLogText = ''; let timeout: NodeJS.Timeout | null = null; const origLog = console.log; @@ -23,7 +30,6 @@ export async function hookLog(client: CookiecordClient) { origError(...args); postLog(['[ERROR]', ...args]); }; - console.log('Writing logs to', channel); function argToString(arg: unknown) { if (typeof arg === 'string') return arg; return inspect(arg); @@ -47,12 +53,12 @@ export async function hookLog(client: CookiecordClient) { }, logDebounceTime); } async function postCodeblock(content: string) { - channel.send(`\`\`\`ts\n${content}\n\`\`\``); + channel.send(`\`\`\`accesslog\n${content}\n\`\`\``); } } function defineCustomUtilInspect( - Cls: { new (...args: any): T; prototype: T }, + Cls: { prototype: T }, cb: (value: T) => string, ) { // @ts-ignore @@ -66,8 +72,7 @@ const inspectUser = (user: User) => defineCustomUtilInspect(User, inspectUser); defineCustomUtilInspect(GuildMember, member => inspectUser(member.user)); -defineCustomUtilInspect(Channel, channel => - 'name' in channel - ? `#${(channel as any).name}/${(channel as Channel).id}` - : `#${channel.id}`, +defineCustomUtilInspect( + GuildChannel, + channel => `#${channel.name}/${(channel as Channel).id}`, ); diff --git a/src/modules/autorole.ts b/src/modules/autorole.ts index d4baa45d..a762e146 100644 --- a/src/modules/autorole.ts +++ b/src/modules/autorole.ts @@ -1,15 +1,29 @@ -import { default as CookiecordClient, listener, Module } from 'cookiecord'; -import { MessageReaction, User } from 'discord.js'; -import { autorole } from '../env'; +import { TextBasedChannel } from 'discord.js'; +import { Bot } from '../bot'; +import { autorole, rolesChannelId } from '../env'; -export class AutoroleModule extends Module { - constructor(client: CookiecordClient) { - super(client); +export async function autoroleModule({ client }: Bot) { + const channel = await client.channels.fetch(rolesChannelId); + if (!channel?.isTextBased()) { + console.error(`Roles channel (${rolesChannelId}) does not exist or is not text based.`) + return; } - @listener({ event: 'messageReactionAdd' }) - async onReactionAdd(reaction: MessageReaction, user: User) { - if (user.id == this.client.user!.id) return; + for (const ar of autorole) { + const msg = await channel.messages.fetch(ar.msgID); + if (!msg) { + console.error(`Role message does not exist for ${ar.msgID}`) + } + await msg?.react(ar.emoji) + } + + client.channels.fetch(rolesChannelId).then(channel => { + (channel as TextBasedChannel).messages.fetch() + }) + + + client.on("messageReactionAdd", async (reaction, user) => { + if (user.id == client.user.id) return; if (reaction.partial) await reaction.fetch(); for (const ar of autorole) { const msg = reaction.message; @@ -19,21 +33,18 @@ export class AutoroleModule extends Module { !msg.guild ) continue; - if (ar.autoRemove) reaction.users.remove(user); - const member = await msg.guild.members.fetch({ - user, - }); + if (ar.autoRemove) await reaction.users.remove(user.id); + const member = await msg.guild.members.fetch(user.id); await member.roles.add(ar.roleID); console.log('Gave role', ar.roleID, 'to', member); - if (!reaction.users.cache.has(this.client.user!.id)) { + if (!reaction.users.cache.has(client.user.id)) { await msg.react(reaction.emoji); } } - } + }) - @listener({ event: 'messageReactionRemove' }) - async onReactionRemove(reaction: MessageReaction, user: User) { - if (user.id == this.client.user!.id) return; + client.on("messageReactionRemove", async (reaction, user) => { + if (user.id == client.user.id) return; if (reaction.partial) await reaction.fetch(); for (const ar of autorole) { const msg = reaction.message; @@ -44,11 +55,9 @@ export class AutoroleModule extends Module { !msg.guild ) continue; - const member = await msg.guild.members.fetch({ - user, - }); + const member = await msg.guild.members.fetch(user.id); await member.roles.remove(ar.roleID); console.log('Removed role', ar.roleID, 'from', member); } - } -} + }) +} \ No newline at end of file diff --git a/src/modules/etc.ts b/src/modules/etc.ts index 19774984..d28553bd 100644 --- a/src/modules/etc.ts +++ b/src/modules/etc.ts @@ -1,21 +1,11 @@ import { - command, - default as CookiecordClient, - Module, - listener, - CommonInhibitors, -} from 'cookiecord'; -import { ThreadAutoArchiveDuration } from 'discord-api-types'; -import { + ThreadAutoArchiveDuration, Message, MessageReaction, - GuildMember, User, - ReactionEmoji, - TextChannel, ThreadChannel, } from 'discord.js'; -import { MessageChannel, threadId } from 'worker_threads'; +import { Bot } from '../bot'; import { suggestionsChannelId } from '../env'; import { clearMessageOwnership, @@ -27,18 +17,16 @@ const emojiRegex = /<:\w+?:(\d+?)>|(\p{Emoji_Presentation})/gu; const defaultPollEmojis = ['✅', '❌', '🤷']; -export class EtcModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } - - @command({ description: 'See if the bot is alive' }) - async ping(msg: Message) { - await msg.channel.send('pong. :ping_pong:'); - } +export function etcModule(bot: Bot) { + bot.registerAdminCommand({ + aliases: ['ping'], + description: 'See if the bot is alive', + async listener(msg) { + await msg.channel.send('pong. :ping_pong:'); + }, + }); - @listener({ event: 'messageCreate' }) - async onPoll(msg: Message) { + bot.client.on('messageCreate', async msg => { if (msg.author.bot || !msg.content.toLowerCase().startsWith('poll:')) return; let emojis = [ @@ -48,10 +36,9 @@ export class EtcModule extends Module { ]; if (!emojis.length) emojis = defaultPollEmojis; for (const emoji of emojis) await msg.react(emoji); - } + }); - @listener({ event: 'messageCreate' }) - async onSuggestion(msg: Message) { + bot.client.on('messageCreate', async msg => { if (msg.author.bot || msg.channelId !== suggestionsChannelId) return; // First 50 characters of the first line of the content (without cutting off a word) const title = @@ -64,10 +51,9 @@ export class EtcModule extends Module { autoArchiveDuration: ThreadAutoArchiveDuration.OneDay, }); for (let emoji of defaultPollEmojis) await msg.react(emoji); - } + }); - @listener({ event: 'threadUpdate' }) - async onSuggestionClose(thread: ThreadChannel) { + bot.client.on('threadUpdate', async thread => { if ( thread.parentId !== suggestionsChannelId || !((await thread.fetch()) as ThreadChannel).archived @@ -92,21 +78,20 @@ export class EtcModule extends Module { }); const pollingResultStr = pollingResults .sort((a, b) => b[1] - a[1]) - .map(([emoji, count], i) => `${count} ${emoji}`) + .map(([emoji, count]) => `${count} ${emoji}`) .join(' '); await suggestion.reply({ - content: `Polling finished; result: ${pollingResultStr}`, + content: `Polling finished; result: ${pollingResultStr}`, }); - } + }); - @listener({ event: 'messageReactionAdd' }) - async onReact(reaction: MessageReaction, member: GuildMember) { + bot.client.on('messageReactionAdd', async (reaction, member) => { if (reaction.partial) return; - if ((await reaction.message.fetch()).author.id !== this.client.user?.id) + if ((await reaction.message.fetch()).author.id !== bot.client.user.id) return; if (reaction.emoji.name !== DELETE_EMOJI) return; - if (member.id === this.client.user?.id) return; + if (member.id === bot.client.user.id) return; if (ownsBotMessage(reaction.message, member.id)) { clearMessageOwnership(reaction.message); @@ -114,30 +99,29 @@ export class EtcModule extends Module { } else { await reaction.users.remove(member.id); } - } + }); - @command({ - inhibitors: [CommonInhibitors.botAdminsOnly], - }) - async kill(msg: Message) { - const confirm = '✅'; - const confirmationMessage = await msg.channel.send('Confirm?'); - confirmationMessage.react(confirm); - const reactionFilter = (reaction: MessageReaction, user: User) => - reaction.emoji.name === confirm && user.id === msg.author.id; - const proceed = await confirmationMessage - .awaitReactions({ - filter: reactionFilter, - max: 1, - time: 10 * 1000, - errors: ['time'], - }) - .then(() => true) - .catch(() => false); - await confirmationMessage.delete(); - if (!proceed) return; - await msg.react('☠️'); - process.stdout.write(` + bot.registerAdminCommand({ + aliases: ['kill'], + async listener(msg) { + const confirm = '✅'; + const confirmationMessage = await msg.channel.send('Confirm?'); + confirmationMessage.react(confirm); + const reactionFilter = (reaction: MessageReaction, user: User) => + reaction.emoji.name === confirm && user.id === msg.author.id; + const proceed = await confirmationMessage + .awaitReactions({ + filter: reactionFilter, + max: 1, + time: 10 * 1000, + errors: ['time'], + }) + .then(() => true) + .catch(() => false); + await confirmationMessage.delete(); + if (!proceed) return; + await msg.react('☠️'); + process.stdout.write(` ,--. { } K, } @@ -156,7 +140,7 @@ export class EtcModule extends Module { | ', ) | | ,..__ __. Y | .,_./ Y ' / ^Y J )| - \ |' / | | || Killed by @${msg.author.username}#${msg.author.discriminator}/${msg.author.id} + \ |' / | | || Killed by @${msg.author.tag}/${msg.author.id} \ L_/ . _ (_,.'( \, , ^^""' / | ) \_ \ /,L] / @@ -164,6 +148,7 @@ export class EtcModule extends Module { \`'{_ ) ^^\..___,.--\` `); - process.exit(1); - } + process.exit(1); + }, + }); } diff --git a/src/modules/handbook.ts b/src/modules/handbook.ts index cee0273a..ae8115f4 100644 --- a/src/modules/handbook.ts +++ b/src/modules/handbook.ts @@ -1,9 +1,9 @@ -import { command, default as CookiecordClient, Module } from 'cookiecord'; -import { Message, MessageEmbed } from 'discord.js'; +import { EmbedBuilder } from 'discord.js'; import algoliasearch from 'algoliasearch/lite'; import { sendWithMessageOwnership } from '../util/send'; import { TS_BLUE } from '../env'; import { decode } from 'html-entities'; +import { Bot } from '../bot'; const ALGOLIA_APP_ID = 'BGCDYOIYZ5'; const ALGOLIA_API_KEY = '37ee06fa68db6aef451a490df6df7c60'; @@ -16,53 +16,52 @@ type AlgoliaResult = { url: string; }; -export class HandbookModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } +const HANDBOOK_EMBED = new EmbedBuilder() + .setColor(TS_BLUE) + .setTitle('The TypeScript Handbook') + .setURL('https://www.typescriptlang.org/docs/handbook/intro.html') + .setFooter({ text: 'You can search with `!handbook `' }); - HANDBOOK_EMBED = new MessageEmbed() - .setColor(TS_BLUE) - .setTitle('The TypeScript Handbook') - .setURL('https://www.typescriptlang.org/docs/handbook/intro.html') - .setFooter('You can search with `!handbook `'); - - @command({ +export async function handbookModule(bot: Bot) { + bot.registerCommand({ + aliases: ['handbook', 'hb'], description: 'Search the TypeScript Handbook', - aliases: ['hb'], - single: true, - }) - async handbook(msg: Message, text: string) { - if (!text) - return await sendWithMessageOwnership(msg, { - embeds: [this.HANDBOOK_EMBED], - }); - console.log('Searching algolia for', [text]); - const data = await algolia.search([ - { - indexName: ALGOLIA_INDEX_NAME, - query: text, - params: { - offset: 0, - length: 1, + async listener(msg, content) { + if (!content) { + return await sendWithMessageOwnership(msg, { + embeds: [HANDBOOK_EMBED], + }); + } + + console.log('Searching algolia for', [content]); + const data = await algolia.search([ + { + indexName: ALGOLIA_INDEX_NAME, + query: content, + params: { + offset: 0, + length: 1, + }, }, - }, - ]); - console.log('Algolia response:', data); - const hit = data.results[0].hits[0]; - if (!hit) - return await sendWithMessageOwnership( - msg, - ':x: No results found for that query', - ); - const hierarchyParts = [0, 1, 2, 3, 4, 5, 6] - .map(i => hit.hierarchy[`lvl${i}`]) - .filter(x => x); - const embed = new MessageEmbed() - .setColor(TS_BLUE) - .setTitle(decode(hierarchyParts[hierarchyParts.length - 1])) - .setAuthor(decode(hierarchyParts.slice(0, -1).join(' / '))) - .setURL(hit.url); - await sendWithMessageOwnership(msg, { embeds: [embed] }); - } + ]); + console.log('Algolia response:', data); + const hit = data.results[0].hits[0]; + if (!hit) + return await sendWithMessageOwnership( + msg, + ':x: No results found for that query', + ); + const hierarchyParts = [0, 1, 2, 3, 4, 5, 6] + .map(i => hit.hierarchy[`lvl${i}`]) + .filter(x => x); + const embed = new EmbedBuilder() + .setColor(TS_BLUE) + .setTitle(decode(hierarchyParts[hierarchyParts.length - 1])) + .setAuthor({ + name: decode(hierarchyParts.slice(0, -1).join(' / ')), + }) + .setURL(hit.url); + await sendWithMessageOwnership(msg, { embeds: [embed] }); + }, + }); } diff --git a/src/modules/help.ts b/src/modules/help.ts index aeae9406..89e9aa84 100644 --- a/src/modules/help.ts +++ b/src/modules/help.ts @@ -1,23 +1,16 @@ -import { - command, - default as CookiecordClient, - Module, - CommonInhibitors, - optional, - Command, -} from 'cookiecord'; -import { Message, MessageEmbed } from 'discord.js'; +import { EmbedBuilder } from 'discord.js'; +import { Bot, CommandRegistration } from '../bot'; import { Snippet } from '../entities/Snippet'; import { sendWithMessageOwnership } from '../util/send'; -function getCategoryHelp(cat: string, commands: Set) { +function getCategoryHelp(cat: string, commands: Iterable) { const out: string[] = []; for (const cmd of commands) { if (!cmd.description) continue; const [cat2, description] = splitCategoryDescription(cmd.description); if (cat !== cat2) continue; - out.push(`\`${cmd.triggers[0]}\` ► ${description}`); + out.push(`\`${cmd.aliases[0]}\` ► ${description}`); } return out.join('\n'); @@ -31,7 +24,7 @@ function splitCategoryDescription(description: string): [string, string] { return split as [string, string]; } -function getCommandCategories(commands: Set) { +function getCommandCategories(commands: Iterable) { const categories = new Set(); for (const cmd of commands) { @@ -41,81 +34,86 @@ function getCommandCategories(commands: Set) { return [...categories].sort((a, b) => a.localeCompare(b)); } -export class HelpModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } - - @command({ +export function helpModule(bot: Bot) { + bot.registerCommand({ aliases: ['help', 'commands', 'h'], - inhibitors: [CommonInhibitors.guildsOnly], description: "Sends what you're looking at right now", - }) - async help(msg: Message, @optional cmdTrigger?: string) { - if (!msg.guild) return; - - if (!cmdTrigger) { - const embed = new MessageEmbed() - .setAuthor( - msg.guild.name, - msg.guild.iconURL({ dynamic: true }) || undefined, - ) - .setTitle('Bot Usage') - .setDescription( - `Hello ${msg.author.username}! Here is a list of all commands in me! To get detailed description on any specific command, do \`help \``, - ); + async listener(msg) { + const cmdTrigger = msg.content.split(/\s/)[1]; + + if (!msg.guild) return; + + if (!cmdTrigger) { + const embed = new EmbedBuilder() + .setAuthor({ + name: msg.guild.name, + iconURL: msg.guild.iconURL() || undefined, + }) + .setTitle('Bot Usage') + .setDescription( + `Hello ${msg.author.username}! Here is a list of all commands in me! To get detailed description on any specific command, do \`help \``, + ); + + for (const cat of getCommandCategories(bot.commands)) { + embed.addFields({ + name: `**${cat} Commands:**`, + value: getCategoryHelp(cat, bot.commands), + }); + } + + embed + .setFooter({ + text: bot.client.user.username, + iconURL: bot.client.user.displayAvatarURL(), + }) + .setTimestamp(); + + return await sendWithMessageOwnership(msg, { embeds: [embed] }); + } - for (const cat of getCommandCategories( - this.client.commandManager.cmds, - )) { - embed.addField( - `**${cat} Commands:**`, - getCategoryHelp(cat, this.client.commandManager.cmds), - ); + let cmd: { description?: string; aliases?: string[] } = + bot.commands.find(c => c.aliases.includes(cmdTrigger)) || {}; + + if (!cmd.description && cmdTrigger.includes(':')) { + const snippet = await Snippet.findOne({ + where: { title: cmdTrigger }, + }); + if (snippet) + cmd = { + description: `A custom snippet created by <@${snippet.owner}>`, + }; + else + cmd = { + description: + 'Run the first snippet that matches that pattern', + }; } - embed - .setFooter( - this.client.user!.username, - this.client.user!.displayAvatarURL(), - ) - .setTimestamp(); - - return await sendWithMessageOwnership(msg, { embeds: [embed] }); - } - - let cmd: { description?: string; triggers?: string[] } = - this.client.commandManager.getByTrigger(cmdTrigger) ?? {}; - if (!cmd.description && cmdTrigger.includes(':')) { - const snippet = await Snippet.findOne(cmdTrigger); - if (snippet) - cmd = { - description: `A custom snippet created by <@${snippet.owner}>`, - }; - else - cmd = { - description: - 'Run the first snippet that matches that pattern', - }; - } - - if (!cmd.description) - return await sendWithMessageOwnership(msg, `:x: Command not found`); - - const embed = new MessageEmbed().setTitle(`\`${cmdTrigger}\` Usage`); - // Get rid of duplicates, this can happen if someone adds the method name as an alias - const triggers = new Set(cmd.triggers ?? [cmdTrigger]); - if (triggers.size > 1) { - embed.addField( - 'Aliases', - Array.from(triggers, t => `\`${t}\``).join(', '), - ); - } - embed.addField( - 'Description', - `*${splitCategoryDescription(cmd.description ?? '')[1]}*`, - ); + if (!cmd.description) + return await sendWithMessageOwnership( + msg, + `:x: Command not found`, + ); - await sendWithMessageOwnership(msg, { embeds: [embed] }); - } + const embed = new EmbedBuilder().setTitle( + `\`${cmdTrigger}\` Usage`, + ); + // Get rid of duplicates, this can happen if someone adds the method name as an alias + const triggers = new Set(cmd.aliases ?? [cmdTrigger]); + if (triggers.size > 1) { + embed.addFields({ + name: 'Aliases', + value: Array.from(triggers, t => `\`${t}\``).join(', '), + }); + } + embed.addFields({ + name: 'Description', + value: `*${ + splitCategoryDescription(cmd.description ?? '')[1] + }*`, + }); + + await sendWithMessageOwnership(msg, { embeds: [embed] }); + }, + }); } diff --git a/src/modules/helpthread.ts b/src/modules/helpthread.ts index 1d89a0bb..db38f2d9 100644 --- a/src/modules/helpthread.ts +++ b/src/modules/helpthread.ts @@ -1,19 +1,13 @@ -import CookiecordClient, { - command, - Module, - listener, - CommonInhibitors, -} from 'cookiecord'; -import { ThreadAutoArchiveDuration } from 'discord-api-types'; import { - Message, + ThreadAutoArchiveDuration, TextChannel, - Channel, ThreadChannel, - MessageEmbed, + EmbedBuilder, GuildMember, - Client, + MessageType, + Channel, } from 'discord.js'; +import { Bot } from '../bot'; import { HelpThread } from '../entities/HelpThread'; import { trustedRoleId, @@ -26,10 +20,9 @@ import { howToGiveHelpChannel, rolesChannelId, } from '../env'; -import { isTrustedMember } from '../util/inhibitors'; import { sendWithMessageOwnership } from '../util/send'; -const threadExpireEmbed = new MessageEmbed() +const threadExpireEmbed = new EmbedBuilder() .setColor(BLOCKQUOTE_GREY) .setTitle('This help thread expired.').setDescription(` If your question was not resolved, you can make a new thread by simply asking your question again. \ @@ -38,7 +31,7 @@ If you're not sure how, have a look through [StackOverflow's guide on asking a g `); const helperCloseEmbed = (member: GuildMember) => - new MessageEmbed().setColor(BLOCKQUOTE_GREY).setDescription(` + new EmbedBuilder().setColor(BLOCKQUOTE_GREY).setDescription(` Because your issue seemed to be resolved, this thread was closed by ${member}. If your issue is not resolved, **you can post another message here and the thread will automatically re-open**. @@ -49,12 +42,12 @@ If your issue is not resolved, **you can post another message here and the threa const closedEmoji = '☑️'; const helpInfo = (channel: TextChannel) => - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setDescription(channel.topic ?? 'Ask your questions here!'); const howToGetHelpEmbeds = () => [ - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle('How To Get Help') .setDescription( @@ -67,7 +60,7 @@ const howToGetHelpEmbeds = () => [ - When your question is resolved, type \`!close\`. `), ), - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle('How To Get *Better* Help') .setDescription( @@ -82,7 +75,7 @@ const howToGetHelpEmbeds = () => [ - For more tips, check out StackOverflow's guide on **[asking good questions](https://stackoverflow.com/help/how-to-ask)**. `), ), - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle("If You Haven't Gotten Help") .setDescription( @@ -94,7 +87,7 @@ If not, and if you have followed the bullets above, you can ping helpers by runn ]; const howToGiveHelpEmbeds = () => [ - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle('How To Give Help') .setDescription( @@ -107,7 +100,7 @@ const howToGiveHelpEmbeds = () => [ `), ), - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle('How To Give *Better* Help') .setDescription( @@ -122,7 +115,7 @@ const howToGiveHelpEmbeds = () => [ - *Only do this if the asker has indicated that their question has been resolved.* `), ), - new MessageEmbed() + new EmbedBuilder() .setColor(GREEN) .setTitle('Useful Snippets') .setDescription( @@ -145,13 +138,13 @@ const titleSetCooldown = 5 * 60 * 1000; const threadExpireHours = ThreadAutoArchiveDuration.OneDay; const threadCheckInterval = 60 * 60 * 1000; -export class HelpThreadModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } +export function helpThreadModule(bot: Bot) { + const { client } = bot; - @listener({ event: 'messageCreate' }) - async onNewQuestion(msg: Message) { + const helpInfoLocks = new Map>(); + const manuallyArchivedThreads = new Set(); + + client.on('messageCreate', async msg => { if (!isHelpChannel(msg.channel)) return; if (msg.author.bot) return; console.log( @@ -160,7 +153,7 @@ export class HelpThreadModule extends Module { 'in', msg.channel, ); - this.updateHelpInfo(msg.channel); + updateHelpInfo(msg.channel); let thread = await msg.startThread({ name: `Help ${msg.member?.nickname ?? msg.author.username}`, autoArchiveDuration: threadExpireHours, @@ -172,20 +165,18 @@ export class HelpThreadModule extends Module { origMessageId: msg.id, }).save(); console.log(`Created a new help thread for`, msg.author); - } + }); - // Used to differentiate automatic archive from bot archive - manuallyArchivedThreads = new Set(); - - @listener({ event: 'threadUpdate' }) - async onThreadReopen(thread: ThreadChannel, ...a: any[]) { + client.on('threadUpdate', async thread => { if ( !isHelpThread(thread) || !thread.archived || ((await thread.fetch()) as ThreadChannel).archived ) return; - const threadData = (await HelpThread.findOne(thread.id))!; + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; if (!threadData.origMessageId) return; try { const origMessage = await thread.parent.messages.fetch( @@ -193,19 +184,16 @@ export class HelpThreadModule extends Module { ); origMessage.reactions .resolve(closedEmoji) - ?.users.remove(this.client.user!.id); + ?.users.remove(client.user.id); } catch { // Asker deleted original message } - } + }); - @listener({ event: 'ready' }) - @command({ - inhibitors: [CommonInhibitors.hasGuildPermission('MANAGE_MESSAGES')], - }) - checkThreads() { - setTimeout(() => this.checkThreads(), threadCheckInterval); - this.client.guilds.cache.forEach(guild => { + checkThreads(); + function checkThreads() { + setTimeout(checkThreads, threadCheckInterval); + bot.client.guilds.cache.forEach(guild => { guild.channels.cache.forEach(async channel => { if (!isHelpChannel(channel)) return; const threads = await channel.threads.fetchActive(); @@ -215,97 +203,231 @@ export class HelpThreadModule extends Module { (await thread.messages.fetch({ limit: 1 })).first()! .createdTimestamp; if (time >= threadExpireHours * 60 * 1000) { - this._onThreadExpire(thread); + onThreadExpire(thread).catch(console.error); } }); }); }); } - @listener({ event: 'threadUpdate' }) - async onThreadExpire(thread: ThreadChannel) { + client.on('threadUpdate', async thread => { if ( !isHelpThread(thread) || - !((await thread.fetch()) as ThreadChannel).archived || - this.manuallyArchivedThreads.delete(thread.id) + !(await thread.fetch()).archived || + manuallyArchivedThreads.delete(thread.id) ) return; - this._onThreadExpire(thread); - } + await onThreadExpire(thread); + }); + + client.on('messageCreate', msg => { + if ( + isHelpChannel(msg.channel) && + msg.type === MessageType.ChannelPinnedMessage + ) { + msg.delete(); + } + }); - private async _onThreadExpire(thread: ThreadChannel) { - const threadData = (await HelpThread.findOne(thread.id))!; + bot.registerCommand({ + aliases: ['close', 'closed', 'resolved', 'resolve', 'done', 'solved'], + description: 'Help System: Close an active help thread', + async listener(msg) { + if (!isHelpThread(msg.channel)) + return await sendWithMessageOwnership( + msg, + ':warning: This can only be run in a help thread', + ); + + let thread: ThreadChannel = msg.channel; + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; + + const isOwner = threadData.ownerId === msg.author.id; + + if ( + isOwner || + msg.member?.roles.cache.has(trustedRoleId) || + bot.isMod(msg.member) + ) { + console.log(`Closing help thread:`, thread); + await msg.react('✅'); + if (!isOwner) + await msg.channel.send({ + content: `<@${threadData.ownerId}>`, + embeds: [helperCloseEmbed(msg.member!)], + }); + manuallyArchivedThreads.add(thread.id); + await archiveThread(thread); + } else { + return await sendWithMessageOwnership( + msg, + ':warning: You have to be the asker to close the thread.', + ); + } + }, + }); + + bot.registerCommand({ + aliases: ['helper', 'helpers'], + description: 'Help System: Ping the @Helper role from a help thread', + async listener(msg, comment) { + if (!isHelpThread(msg.channel)) { + return sendWithMessageOwnership( + msg, + ':warning: You may only ping helpers from a help thread', + ); + } + + const thread = msg.channel; + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; + + // Ensure the user has permission to ping helpers + const isAsker = msg.author.id === threadData.ownerId; + const isTrusted = bot.getTrustedMemberError(msg) === undefined; // No error if trusted + + if (!isAsker && !isTrusted) { + return sendWithMessageOwnership( + msg, + ':warning: Only the asker can ping helpers', + ); + } + + const askTime = thread.createdTimestamp; + const pingAllowedAfter = + +(threadData.helperTimestamp ?? askTime ?? Date.now()) + + timeBeforeHelperPing; + + // Ensure they've waited long enough + // Trusted members (who aren't the asker) are allowed to disregard the timeout + if (isAsker && Date.now() < pingAllowedAfter) { + return sendWithMessageOwnership( + msg, + `:warning: Please wait a bit longer. You can ping helpers .`, + ); + } + + // The beacons are lit, Gondor calls for aid + await Promise.all([ + thread.parent!.send( + `<@&${trustedRoleId}> ${msg.channel} ${ + isTrusted ? comment : '' + }`, + ), + updateHelpInfo(thread.parent!), + msg.react('✅'), + HelpThread.update(thread.id, { + helperTimestamp: Date.now().toString(), + }), + ]); + }, + }); + + bot.registerCommand({ + aliases: ['title'], + description: 'Help System: Rename a help thread', + async listener(msg, title) { + const m = /^<#(\d+)>\s*([^]*)/.exec(title); + let thread: Omit | undefined = msg.channel; + if (m) { + thread = msg.guild?.channels.cache.get(m[1])!; + title = m[2]; + } + if (!thread || !isHelpThread(thread)) + return sendWithMessageOwnership( + msg, + ':warning: This can only be run in a help thread', + ); + if (!title) + return sendWithMessageOwnership(msg, ':warning: Missing title'); + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; + if ( + msg.author.id !== threadData.ownerId && + !msg.member!.roles.cache.has(trustedRoleId) + ) { + return sendWithMessageOwnership( + msg, + ':warning: Only the asker and helpers can set the title', + ); + } + + const titleSetAllowedAfter = + +(threadData.titleSetTimestamp ?? 0) + titleSetCooldown; + if ( + threadData.titleSetTimestamp && + Date.now() < titleSetAllowedAfter + ) { + return sendWithMessageOwnership( + msg, + `:warning: You can set the title again `, + ); + } + + const owner = await msg.guild!.members.fetch(threadData.ownerId); + const username = owner.nickname ?? owner.user.username; + await Promise.all([ + HelpThread.update(thread.id, { + titleSetTimestamp: Date.now() + '', + }), + // Truncate if longer than 100, the max thread title length + thread.setName(`${username} - ${title}`.slice(0, 100)), + ]); + if (thread !== msg.channel) { + await msg.react('✅'); + } + }, + }); + + bot.registerAdminCommand({ + aliases: ['htgh'], + async listener(msg) { + if (!bot.isMod(msg.member)) return; + if ( + msg.channel.id !== howToGetHelpChannel && + msg.channel.id !== howToGiveHelpChannel + ) { + return; + } + (await msg.channel.messages.fetch()).forEach(x => x.delete()); + const embeds = + msg.channel.id === howToGetHelpChannel + ? howToGetHelpEmbeds() + : howToGiveHelpEmbeds(); + msg.channel.send({ embeds }); + }, + }); + + async function onThreadExpire(thread: ThreadChannel) { + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; console.log(`Help thread expired:`, thread); await thread.send({ content: `<@${threadData.ownerId}>`, embeds: [threadExpireEmbed], }); - this.manuallyArchivedThreads.add(thread.id); - await this.archiveThread(thread); - } - - @command({ - aliases: ['closed', 'resolved', 'resolve', 'done', 'solved'], - description: 'Help System: Close an active help thread', - }) - async close(msg: Message) { - if (!isHelpThread(msg.channel)) - return await sendWithMessageOwnership( - msg, - ':warning: This can only be run in a help thread', - ); - - let thread: ThreadChannel = msg.channel; - const threadData = (await HelpThread.findOne(thread.id))!; - - const isOwner = threadData.ownerId === msg.author.id; - - if ( - isOwner || - msg.member?.roles.cache.has(trustedRoleId) || - msg.member?.permissions.has('MANAGE_MESSAGES') - ) { - console.log(`Closing help thread:`, thread); - await msg.react('✅'); - if (!isOwner) - await msg.channel.send({ - content: `<@${threadData.ownerId}>`, - embeds: [helperCloseEmbed(msg.member!)], - }); - this.manuallyArchivedThreads.add(thread.id); - await this.archiveThread(thread); - } else { - return await sendWithMessageOwnership( - msg, - ':warning: You have to be the asker to close the thread.', - ); - } - } - - private async archiveThread(thread: ThreadChannel) { - await thread.setArchived(true); - const threadData = (await HelpThread.findOne(thread.id))!; - if (!threadData.origMessageId) return; - try { - const origMessage = await thread.parent!.messages.fetch( - threadData.origMessageId, - ); - await origMessage.react(closedEmoji); - } catch { - // Asker deleted original message - } + manuallyArchivedThreads.add(thread.id); + await archiveThread(thread); } - private helpInfoLocks = new Map>(); - private updateHelpInfo(channel: TextChannel) { - this.helpInfoLocks.set( + function updateHelpInfo(channel: TextChannel) { + helpInfoLocks.set( channel.id, - (this.helpInfoLocks.get(channel.id) ?? Promise.resolve()).then( + (helpInfoLocks.get(channel.id) ?? Promise.resolve()).then( async () => { await Promise.all([ - ...(await channel.messages.fetchPinned()).map(x => - x.delete(), - ), + ...( + await channel.messages.fetchPinned() + ).map(x => x.delete()), channel .send({ embeds: [helpInfo(channel)] }) .then(x => x.pin()), @@ -315,137 +437,24 @@ export class HelpThreadModule extends Module { ); } - @listener({ event: 'messageCreate' }) - deletePinMessage(msg: Message) { - if (isHelpChannel(msg.channel) && msg.type === 'CHANNEL_PINNED_MESSAGE') - msg.delete(); - } - - @command({ - description: 'Help System: Ping the @Helper role from a help thread', - aliases: ['helpers'], - single: true, - }) - async helper(msg: Message, comment: string) { - if (!isHelpThread(msg.channel)) { - return sendWithMessageOwnership( - msg, - ':warning: You may only ping helpers from a help thread', - ); - } - - const thread = msg.channel; - const threadData = (await HelpThread.findOne(thread.id))!; - - // Ensure the user has permission to ping helpers - const isAsker = msg.author.id === threadData.ownerId; - const isTrusted = - (await isTrustedMember(msg, this.client)) === undefined; // No error if trusted - - if (!isAsker && !isTrusted) { - return sendWithMessageOwnership( - msg, - ':warning: Only the asker can ping helpers', - ); - } - - const askTime = thread.createdTimestamp; - const pingAllowedAfter = - +(threadData.helperTimestamp ?? askTime) + timeBeforeHelperPing; - - // Ensure they've waited long enough - // Trusted members (who aren't the asker) are allowed to disregard the timeout - if (isAsker && Date.now() < pingAllowedAfter) { - return sendWithMessageOwnership( - msg, - `:warning: Please wait a bit longer. You can ping helpers .`, - ); - } - - // The beacons are lit, Gondor calls for aid - await Promise.all([ - thread.parent.send( - `<@&${trustedRoleId}> ${msg.channel} ${ - isTrusted ? comment : '' - }`, - ), - this.updateHelpInfo(thread.parent), - msg.react('✅'), - HelpThread.update(thread.id, { - helperTimestamp: Date.now().toString(), - }), - ]); - } - - @command({ single: true, description: 'Help System: Rename a help thread' }) - async title(msg: Message, title: string) { - const m = /^<#(\d+)>\s*([^]*)/.exec(title); - let thread: Omit | undefined = msg.channel; - if (m) { - thread = msg.guild?.channels.cache.get(m[1])!; - title = m[2]; - } - if (!thread || !isHelpThread(thread)) - return sendWithMessageOwnership( - msg, - ':warning: This can only be run in a help thread', - ); - if (!title) - return sendWithMessageOwnership(msg, ':warning: Missing title'); - const threadData = (await HelpThread.findOne(thread.id))!; - if ( - msg.author.id !== threadData.ownerId && - !msg.member!.roles.cache.has(trustedRoleId) - ) - return sendWithMessageOwnership( - msg, - ':warning: Only the asker and helpers can set the title', - ); - const titleSetAllowedAfter = - +(threadData.titleSetTimestamp ?? 0) + titleSetCooldown; - if (threadData.titleSetTimestamp && Date.now() < titleSetAllowedAfter) - return sendWithMessageOwnership( - msg, - `:warning: You can set the title again `, + async function archiveThread(thread: ThreadChannel) { + await thread.setArchived(true); + const threadData = (await HelpThread.findOneBy({ + threadId: thread.id, + }))!; + if (!threadData.origMessageId) return; + try { + const origMessage = await thread.parent!.messages.fetch( + threadData.origMessageId, ); - const owner = await msg.guild!.members.fetch(threadData.ownerId); - const username = owner.nickname ?? owner.user.username; - await Promise.all([ - HelpThread.update(thread.id, { - titleSetTimestamp: Date.now() + '', - }), - // Truncate if longer than 100, the max thread title length - thread.setName(`${username} - ${title}`.slice(0, 100)), - ]); - if (thread !== msg.channel) { - await msg.react('✅'); + await origMessage.react(closedEmoji); + } catch { + // Asker deleted original message } } - - @command() - async htgh(msg: Message) { - if (!msg.member?.permissions.has('MANAGE_MESSAGES')) return; - if ( - msg.channel.id !== howToGetHelpChannel && - msg.channel.id !== howToGiveHelpChannel - ) - return; - (await msg.channel.messages.fetch()).forEach(x => x.delete()); - const embeds = - msg.channel.id === howToGetHelpChannel - ? howToGetHelpEmbeds() - : howToGiveHelpEmbeds(); - msg.channel.send({ embeds }); - } } -export function isHelpChannel( - channel: Omit, -): channel is TextChannel { +export function isHelpChannel(channel: unknown): channel is TextChannel { return ( channel instanceof TextChannel && channel.parentId == helpCategory && @@ -455,7 +464,7 @@ export function isHelpChannel( } export function isHelpThread( - channel: Omit, + channel: unknown, ): channel is ThreadChannel & { parent: TextChannel } { return channel instanceof ThreadChannel && isHelpChannel(channel.parent!); } diff --git a/src/modules/mod.ts b/src/modules/mod.ts index f4720269..af215ebb 100644 --- a/src/modules/mod.ts +++ b/src/modules/mod.ts @@ -1,5 +1,5 @@ -import { default as CookiecordClient, Module, listener } from 'cookiecord'; import { Message, Snowflake, User } from 'discord.js'; +import { Bot } from '../bot'; import { rulesChannelId } from '../env'; // Most job posts are in this format: @@ -19,24 +19,18 @@ interface RecentMessageInfo { const recentMessages = new Map(); const CLEANUP_RECENT_MESSAGES_MAP_INTERVAL = 10000; -export class ModModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } - - @listener({ event: 'messageCreate' }) - async onJobMessage(msg: Message) { +export function modModule({ client }: Bot) { + client.on('messageCreate', async msg => { if (msg.author.bot || !jobPostRegex.test(msg.content)) return; await msg.delete(); await msg.channel.send( `${msg.author} We don't do job posts here; see <#${rulesChannelId}>`, ); console.log('Deleted job post message from', msg.author); - } + }); - @listener({ event: 'messageCreate' }) - async onRepeatedMessage(msg: Message) { - if (!msg.guild || msg.author.id === this.client.user!.id) return; + client.on('messageCreate', async msg => { + if (!msg.guild || msg.author.id === client.user.id) return; const messageIdentifier = msg.content.trim().toLowerCase(); if (!messageIdentifier) return; let recentMessageInfo = recentMessages.get(messageIdentifier); @@ -70,7 +64,7 @@ export class ModModule extends Module { messages: [msg], }); } - } + }); } setInterval(() => { diff --git a/src/modules/playground.ts b/src/modules/playground.ts index a7e5d92a..161515e4 100644 --- a/src/modules/playground.ts +++ b/src/modules/playground.ts @@ -1,11 +1,4 @@ -import { - command, - default as CookiecordClient, - listener, - Module, - optional, -} from 'cookiecord'; -import { Message, MessageEmbed, TextChannel, User } from 'discord.js'; +import { EmbedBuilder, Message, User } from 'discord.js'; import { compressToEncodedURIComponent, decompressFromEncodedURIComponent, @@ -25,45 +18,44 @@ import { getResponseChannel, sendWithMessageOwnership, } from '../util/send'; -import fetch from 'node-fetch'; +import { fetch } from 'undici'; import { isHelpChannel } from './helpthread'; +import { Bot } from '../bot'; +const PLAYGROUND_BASE = 'https://www.typescriptlang.org/play/#code/'; const LINK_SHORTENER_ENDPOINT = 'https://tsplay.dev/api/short'; const MAX_EMBED_LENGTH = 512; const DEFAULT_EMBED_LENGTH = 256; -export class PlaygroundModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } - - private editedLongLink = new LimitedSizeMap(1000); +export async function playgroundModule(bot: Bot) { + const editedLongLink = new LimitedSizeMap(1000); - @command({ - aliases: ['pg', 'playg'], - single: true, + bot.registerCommand({ + aliases: ['pg', 'playg', 'playground'], description: 'Shorten a TypeScript playground link', - }) - async playground(msg: Message, @optional code?: string) { - const PLAYGROUND_BASE = 'https://www.typescriptlang.org/play/#code/'; - - if (!code) { - code = await findCode(msg, true); - if (!code) - return sendWithMessageOwnership( - msg, - ":warning: couldn't find a codeblock!", - ); - } - const embed = new MessageEmbed() - .setURL(PLAYGROUND_BASE + compressToEncodedURIComponent(code)) - .setTitle('View in Playground') - .setColor(TS_BLUE); - await sendWithMessageOwnership(msg, { embeds: [embed] }); - } + async listener(msg, content) { + console.log('Playground', msg.content); + + let code: string | undefined = content; + + if (!code) { + code = await findCode(msg, true); + if (!code) + return sendWithMessageOwnership( + msg, + ":warning: couldn't find a codeblock!", + ); + } + console.log('Code is', code); + const embed = new EmbedBuilder() + .setURL(PLAYGROUND_BASE + compressToEncodedURIComponent(code)) + .setTitle('View in Playground') + .setColor(TS_BLUE); + await sendWithMessageOwnership(msg, { embeds: [embed] }); + }, + }); - @listener({ event: 'messageCreate' }) - async onPlaygroundLinkMessage(msg: Message) { + bot.client.on('messageCreate', async msg => { if (msg.author.bot) return; if (msg.content[0] === '!') return; const exec = matchPlaygroundLink(msg.content); @@ -82,13 +74,12 @@ export class PlaygroundModule extends Module { embeds: [embed], content: `${msg.author} Here's a shortened URL of your playground link! You can remove the full link from your message.`, }); - this.editedLongLink.set(msg.id, botMsg); + editedLongLink.set(msg.id, botMsg); await addMessageOwnership(botMsg, msg.author); } - } + }); - @listener({ event: 'messageCreate' }) - async onPlaygroundLinkAttachment(msg: Message) { + bot.client.on('messageCreate', async msg => { const attachment = msg.attachments.find(a => a.name === 'message.txt'); if (msg.author.bot || !attachment) return; const content = await fetch(attachment.url).then(r => r.text()); @@ -103,21 +94,20 @@ export class PlaygroundModule extends Module { embeds: [embed], }); if (!msg.content) await msg.delete(); - } + }); - @listener({ event: 'messageUpdate' }) - async onLongFix(_oldMsg: Message, msg: Message) { - if (msg.partial) await msg.fetch(); + bot.client.on('messageUpdate', async (_oldMsg, msg) => { + if (msg.partial) msg = await msg.fetch(); const exec = matchPlaygroundLink(msg.content); - if (msg.author.bot || !this.editedLongLink.has(msg.id) || exec) return; - const botMsg = this.editedLongLink.get(msg.id); + if (msg.author.bot || !editedLongLink.has(msg.id) || exec) return; + const botMsg = editedLongLink.get(msg.id); // Edit the message to only have the embed and not the "please edit your message" message await botMsg?.edit({ content: '', embeds: [botMsg.embeds[0]], }); - this.editedLongLink.delete(msg.id); - } + editedLongLink.delete(msg.id); + }); } // Take care when messing with the truncation, it's extremely finnicky @@ -126,10 +116,10 @@ function createPlaygroundEmbed( { url: _url, query, code, isEscaped }: PlaygroundLinkMatch, url: string = _url, ) { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setColor(TS_BLUE) .setTitle('Playground Link') - .setAuthor(author.tag, author.displayAvatarURL()) + .setAuthor({ name: author.tag, iconURL: author.displayAvatarURL() }) .setURL(url); const unzipped = decompressFromEncodedURIComponent(code); @@ -186,9 +176,9 @@ function createPlaygroundEmbed( if (!isEscaped) { embed.setDescription('**Preview:**' + makeCodeBlock(content)); if (!startLine && !endLine) { - embed.setFooter( - 'You can choose specific lines to embed by selecting them before copying the link.', - ); + embed.setFooter({ + text: 'You can choose specific lines to embed by selecting them before copying the link.', + }); } } @@ -203,7 +193,7 @@ async function shortenPlaygroundLink(url: string) { 'Content-Type': 'application/json', }, }); - const { shortened } = await response.json(); + const { shortened } = (await response.json()) as any; if (typeof shortened !== 'string') throw new Error('Received invalid api response from link shortener'); return shortened; diff --git a/src/modules/rep.ts b/src/modules/rep.ts index 40491df7..ac9c138f 100644 --- a/src/modules/rep.ts +++ b/src/modules/rep.ts @@ -1,34 +1,23 @@ -import { - command, - default as CookiecordClient, - Module, - optional, - listener, -} from 'cookiecord'; -import { - GuildMember, - Message, - MessageEmbed, - MessageReaction, - User, -} from 'discord.js'; +import { Message, EmbedBuilder } from 'discord.js'; import { repEmoji, TS_BLUE } from '../env'; import { Rep } from '../entities/Rep'; import { sendPaginatedMessage } from '../util/sendPaginatedMessage'; import { getMessageOwner, sendWithMessageOwnership } from '../util/send'; +import { Bot } from '../bot'; // The Chinese is outside the group on purpose, because CJK languages don't have word bounds. Therefore we only look for key characters -const thanksRegex = /\b(?:thank|thanks|thx|cheers|thanx|thnks|ty|tysm|tks|tkx|danke|merci|gracias|grazie|xiexie)\b|谢/i; + +const thanksRegex = + /* cspell:disable-next-line */ + /\b(?:thank|thanks|thx|cheers|thanx|thnks|ty|tysm|tks|tkx|danke|merci|gracias|grazie|xiexie)\b|谢/i; const removedReactions = new Set(); -export class RepModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } +export function repModule(bot: Bot) { + const { client } = bot; - private giveRep( + function giveRep( msg: Pick, { recipient, initialGiver }: Pick, ) { @@ -44,21 +33,19 @@ export class RepModule extends Module { }).save(); } - @listener({ event: 'messageCreate' }) - async onThank(msg: Message, force = false) { + async function onThank(msg: Message, force = false) { // Check for thanks messages const isThanks = thanksRegex.test(msg.content); if (msg.author.bot || (!isThanks && !force) || !msg.guild) return; const mentionUsers = msg.mentions.users.filter( - user => - user.id !== msg.member?.id && user.id !== this.client.user?.id, + user => user.id !== msg.member?.id && user.id !== client.user.id, ); if (mentionUsers.size !== 1) return; const recipient = mentionUsers.first()!; - await this.giveRep(msg, { + await giveRep(msg, { recipient: recipient.id, initialGiver: msg.author.id, }); @@ -66,14 +53,16 @@ export class RepModule extends Module { await msg.react(repEmoji); } - @listener({ event: 'messageReactionAdd' }) - async onRepReact(reaction: MessageReaction, user: User) { + client.on('messageCreate', msg => onThank(msg)); + + client.on('messageReactionAdd', async (reaction, user) => { if ( !reaction.message.guild || - user.id === this.client.user?.id || + user.id === client.user.id || (reaction.emoji.id ?? reaction.emoji.name) !== repEmoji - ) + ) { return; + } const msg = reaction.message; const author = (await msg.fetch()).author; @@ -81,13 +70,12 @@ export class RepModule extends Module { console.log('Received rep reaction on', msg.id); if (user.id === author.id) { - console.log('Reacter is message author; removing reaction'); return removeReaction(); } console.log('Querying database for existing Rep'); - let existingRep = await Rep.findOne({ messageId: msg.id }); + let existingRep = await Rep.findOne({ where: { messageId: msg.id } }); if (existingRep) { console.log('Found existing Rep', existingRep); @@ -102,11 +90,9 @@ export class RepModule extends Module { return; } - console.log('None found'); - let recipient = author.id; - if (recipient == this.client.user!.id) { + if (recipient == client.user.id) { console.log('Recipient is bot; checking for message ownership'); let altRecipient = getMessageOwner(msg); if (!altRecipient) { @@ -117,7 +103,7 @@ export class RepModule extends Module { recipient = altRecipient; } - await this.giveRep(msg, { + await giveRep(msg, { recipient, initialGiver: user.id, }); @@ -126,10 +112,9 @@ export class RepModule extends Module { removedReactions.add([msg.id, user.id].toString()); await reaction.users.remove(user.id); } - } + }); - @listener({ event: 'messageReactionRemove' }) - async onRepReactRemove(reaction: MessageReaction, user: User) { + client.on('messageReactionRemove', async (reaction, user) => { if ( !reaction.message.guild || (reaction.emoji.id ?? reaction.emoji.name) !== repEmoji || @@ -138,7 +123,9 @@ export class RepModule extends Module { return; let rep = await Rep.findOne({ - messageId: reaction.message.id, + where: { + messageId: reaction.message.id, + }, }); if (!rep) return; @@ -152,141 +139,169 @@ export class RepModule extends Module { 'for message', rep.messageId, ); - } + }); - @listener({ event: 'messageDelete' }) - async onRepMsgDelete(msg: Message) { + client.on('messageDelete', async msg => { await Rep.delete(msg.id); - } + }); - @command({ + bot.registerCommand({ + aliases: ['rep'], description: 'Reputation: Give a different user some reputation points', - }) - async rep(msg: Message, targetMember: string) { - if (targetMember.match(/\d+/)) { - const user = await this.client.users - .fetch(targetMember) - .catch(() => null); - if (user) { - if (user.id === msg.author.id) return msg.react('🤡'); - await this.giveRep(msg, { - recipient: targetMember, - initialGiver: msg.author.id, - }); - return msg.react(repEmoji); + async listener(msg) { + const targetMember = msg.content.split(/\s/)[1]; + + if (targetMember.match(/\d+/)) { + const user = await client.users + .fetch(targetMember) + .catch(() => null); + + if (user) { + if (user.id === msg.author.id) { + await msg.react('🤡'); + return; + } + await giveRep(msg, { + recipient: targetMember, + initialGiver: msg.author.id, + }); + await msg.react(repEmoji); + return; + } } - } - this.onThank(msg, true); - } - @command({ + await onThank(msg, true); + }, + }); + + bot.registerCommand({ + aliases: ['history'], description: "Reputation: View a user's reputation history", - }) - async history(msg: Message, @optional user?: User) { - if (!msg.member) return; - if (!user) user = msg.author; - - const records = (await Rep.find({ where: { recipient: user.id } })) - .reverse() - .filter(x => x.amount > 0) - .map(rg => { - const emoji = msg.guild!.emojis.resolve(repEmoji) ?? repEmoji; - const messageLink = `https://discord.com/channels/${ - msg.guild!.id - }/${rg.channel}/${rg.messageId}`; - return `**${ - rg.amount - } ${emoji}** on [message](${messageLink}) (<@${ - rg.initialGiver - }>${rg.amount > 1 ? ' et al.' : ''}) at `; + async listener(msg) { + if (!msg.member) return; + let user = await bot.getTargetUser(msg); + + if (!user) { + await sendWithMessageOwnership( + msg, + 'Unable to find user to give rep', + ); + return; + } + + const records = (await Rep.find({ where: { recipient: user.id } })) + .reverse() + .filter(x => x.amount > 0) + .map(rg => { + const emoji = + msg.guild!.emojis.resolve(repEmoji) ?? repEmoji; + const messageLink = `https://discord.com/channels/${ + msg.guild!.id + }/${rg.channel}/${rg.messageId}`; + return `**${ + rg.amount + } ${emoji}** on [message](${messageLink}) (<@${ + rg.initialGiver + }>${rg.amount > 1 ? ' et al.' : ''}) at `; + }); + if (!records.length) records.push('[no reputation history]'); + const recordsPerPage = 10; + const pages = records + .reduce((acc, cur, index) => { + const curChunk = Math.floor(index / recordsPerPage); + acc[curChunk] ??= []; + acc[curChunk].push(cur); + return acc; + }, []) + .map(page => page.join('\n')); + const embed = new EmbedBuilder().setColor(TS_BLUE).setAuthor({ + name: user.tag, + iconURL: user.displayAvatarURL(), }); - if (!records.length) records.push('[no reputation history]'); - const recordsPerPage = 10; - const pages = records - .reduce((acc, cur, index) => { - const curChunk = Math.floor(index / recordsPerPage); - acc[curChunk] ??= []; - acc[curChunk].push(cur); - return acc; - }, []) - .map(page => page.join('\n')); - const embed = new MessageEmbed() - .setColor(TS_BLUE) - .setAuthor(user.tag, user.displayAvatarURL()); - await sendPaginatedMessage( - embed, - pages, - msg.member, - msg.channel, - 300000, - ); - } + await sendPaginatedMessage( + embed, + pages, + msg.member, + msg.channel, + 300000, + ); + }, + }); - @command({ + bot.registerCommand({ aliases: ['leaderboard', 'lb'], description: 'Reputation: See who has the most reputation', - }) - async leaderboard(msg: Message, @optional period: string = 'month') { - let periods = { - 'rolling-hour': ['(past hour)', Date.now() - 60 * 60 * 1000], - 'rolling-day': ['(past day)', Date.now() - 24 * 60 * 60 * 1000], - 'rolling-month': [ - '(past 30 days)', - Date.now() - 30 * 24 * 60 * 60 * 1000, - ], - 'rolling-year': [ - '(past year)', - Date.now() - 365 * 24 * 60 * 60 * 1000, - ], - day: [ - '(today)', - +new Date( - new Date().getFullYear(), - new Date().getMonth(), - new Date().getDate(), - ), - ], - month: [ - '(this month)', - +new Date(new Date().getFullYear(), new Date().getMonth()), - ], - year: ['(this year)', +new Date(new Date().getFullYear())], - all: ['(all time)', 0], - } as const; - if (!(period in periods)) - return await sendWithMessageOwnership( - msg, - `:x: Invalid period (expected one of ${Object.keys(periods) - .map(x => `\`${x}\``) - .join(', ')})`, - ); - const [text, dateMin] = periods[period as keyof typeof periods]; - const topEmojis = [':first_place:', ':second_place:', ':third_place:']; - const query = Rep.createQueryBuilder() - .where(`date > '${new Date(dateMin).toISOString()}'`) - .select(['recipient', 'SUM(amount)', 'MAX(date)']) - .groupBy('recipient') - .orderBy('SUM(amount)', 'DESC') - .limit(10); - const data = (await query.getRawMany()) as { - recipient: string; - sum: number; - }[]; - const embed = new MessageEmbed() - .setColor(TS_BLUE) - .setTitle(`Top 10 Reputation ${text}`) - .setDescription( - data - .map( - (x, index) => - `${ - topEmojis[index] || ':white_small_square:' - } **<@${x.recipient}>** with **${x.sum}** points.`, - ) - .join('\n'), - ); - await msg.channel.send({ embeds: [embed] }); - } + async listener(msg) { + const periods = { + 'rolling-hour': ['(past hour)', Date.now() - 60 * 60 * 1000], + 'rolling-day': ['(past day)', Date.now() - 24 * 60 * 60 * 1000], + 'rolling-month': [ + '(past 30 days)', + Date.now() - 30 * 24 * 60 * 60 * 1000, + ], + 'rolling-year': [ + '(past year)', + Date.now() - 365 * 24 * 60 * 60 * 1000, + ], + day: [ + '(today)', + +new Date( + new Date().getFullYear(), + new Date().getMonth(), + new Date().getDate(), + ), + ], + month: [ + '(this month)', + +new Date(new Date().getFullYear(), new Date().getMonth()), + ], + year: ['(this year)', +new Date(new Date().getFullYear())], + all: ['(all time)', 0], + } as const; + + const period = msg.content.split(/\s/)[1] || 'rolling-month'; + + if (!(period in periods)) + return await sendWithMessageOwnership( + msg, + `:x: Invalid period (expected one of ${Object.keys(periods) + .map(x => `\`${x}\``) + .join(', ')})`, + ); + const [text, dateMin] = periods[period as keyof typeof periods]; + const topEmojis = [ + ':first_place:', + ':second_place:', + ':third_place:', + ]; + const query = Rep.createQueryBuilder() + .where(`date > '${new Date(dateMin).toISOString()}'`) + .select(['recipient', 'SUM(amount)', 'MAX(date)']) + .groupBy('recipient') + .orderBy('SUM(amount)', 'DESC') + .limit(10); + const data = (await query.getRawMany()) as { + recipient: string; + sum: number; + }[]; + const embed = new EmbedBuilder() + .setColor(TS_BLUE) + .setTitle(`Top 10 Reputation ${text}`) + .setDescription( + data + .map( + (x, index) => + `${ + topEmojis[index] || ':white_small_square:' + } **<@${x.recipient}>** with **${ + x.sum + }** points.`, + ) + .join('\n'), + ); + await msg.channel.send({ embeds: [embed] }); + }, + }); } diff --git a/src/modules/snippet.ts b/src/modules/snippet.ts index e7243040..096ab0bb 100644 --- a/src/modules/snippet.ts +++ b/src/modules/snippet.ts @@ -1,249 +1,240 @@ -import { - command, - default as CookiecordClient, - Module, - listener, - optional, -} from 'cookiecord'; -import { - GuildMember, - Message, - MessageEmbed, - TextChannel, - User, -} from 'discord.js'; -import { BaseEntity } from 'typeorm'; +import { EmbedBuilder, TextChannel, User } from 'discord.js'; import { Snippet } from '../entities/Snippet'; import { BLOCKQUOTE_GREY } from '../env'; import { sendWithMessageOwnership } from '../util/send'; import { getReferencedMessage } from '../util/getReferencedMessage'; import { splitCustomCommand } from '../util/customCommand'; +import { Bot } from '../bot'; // https://stackoverflow.com/a/3809435 -const LINK_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/; +const LINK_REGEX = + /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/; -const DISCORD_MESSAGE_LINK_REGEX_ANCHORED = /^https:\/\/discord.com\/channels\/(\d+)\/(\d+)\/(\d+)$/; +const DISCORD_MESSAGE_LINK_REGEX_ANCHORED = + /^https:\/\/discord.com\/channels\/(\d+)\/(\d+)\/(\d+)$/; -export class SnippetModule extends Module { - constructor(client: CookiecordClient) { - super(client); - } - - @listener({ event: 'messageCreate' }) - async runSnippet(msg: Message) { - const commandData = await splitCustomCommand(this.client, msg); +export function snippetModule(bot: Bot) { + bot.client.on('messageCreate', async msg => { + const commandData = await splitCustomCommand(bot, msg); if (!commandData) return; const { command } = commandData; - if (command.includes('*') && !command.includes(':')) return []; + if (command.includes('*') && !command.includes(':')) return; const [match] = await interpretSpecifier(msg.author, command, 1); if (!match) return; // We already know there's a snippet under this id from the search - const snippet = (await this.getSnippet(match.id))!; + const snippet = (await Snippet.findOneBy({ id: match.id }))!; await addSnippetUses(match.id); const onDelete = () => addSnippetUses(match.id, -1); - if (snippet.content) - return await sendWithMessageOwnership( - msg, - snippet.content, - onDelete, - ); + if (snippet.content) { + await sendWithMessageOwnership(msg, snippet.content, onDelete); + return; + } - const owner = await this.client.users.fetch(snippet.owner); - const embed = new MessageEmbed({ + const owner = await bot.client.users.fetch(snippet.owner); + const embed = new EmbedBuilder({ ...snippet, // image is in an incompatible format, so we have to set it later image: undefined, }); if (match.id.includes(':')) - embed.setAuthor(owner.tag, owner.displayAvatarURL()); + embed.setAuthor({ + name: owner.tag, + iconURL: owner.displayAvatarURL(), + }); if (snippet.image) embed.setImage(snippet.image); await sendWithMessageOwnership(msg, { embeds: [embed] }, onDelete); - } + }); - @command({ + bot.registerCommand({ description: 'Snippet: List snippets matching an optional filter', - aliases: ['snippets', 'snips'], - }) - async listSnippets(msg: Message, @optional specifier: string = '*') { - const limit = 20; - const matches = await interpretSpecifier( - msg.author, - specifier, - limit + 1, - ); - return await sendWithMessageOwnership(msg, { - embeds: [ - new MessageEmbed() - .setColor(BLOCKQUOTE_GREY) - .setTitle( - `${ - matches.length > limit - ? `${limit}+` - : matches.length - } Matches Found`, - ) - .setDescription( - matches - .slice(0, limit) - .map(s => `- \`${s.id}\` with **${s.uses}** uses`) - .join('\n'), - ), - ], - }); - } - - @command({ - description: 'Snippet: Create or edit a snippet', - aliases: ['snip', 'snippet'], - }) - async createSnippet(msg: Message, name: string, @optional source?: string) { - if (!msg.member) return; - - const linkedMessage = await this.getMessageFromLink(source); - - if (!name) { - return await sendWithMessageOwnership( - msg, - ':x: You have to supply a name for the command', + aliases: ['listSnippets', 'snippets', 'snips'], + async listener(msg, specifier) { + const limit = 20; + const matches = await interpretSpecifier( + msg.author, + specifier || '*', + limit + 1, ); - } + await sendWithMessageOwnership(msg, { + embeds: [ + new EmbedBuilder() + .setColor(BLOCKQUOTE_GREY) + .setTitle( + `${ + matches.length > limit + ? `${limit}+` + : matches.length + } Matches Found`, + ) + .setDescription( + matches + .slice(0, limit) + .map( + s => + `- \`${s.id}\` with **${s.uses}** uses`, + ) + .join('\n'), + ), + ], + }); + }, + }); + + bot.registerCommand({ + description: 'Snippet: Create or edit a snippet', + aliases: ['snip', 'snippet', 'createSnippet'], + async listener(msg, content) { + if (!msg.member) return; - const id = name.startsWith('!') - ? `${sanitizeIdPart(name.slice(1))}` - : `${sanitizeIdPart(msg.author.username)}:${sanitizeIdPart(name)}`; - const existingSnippet = await this.getSnippet(id); + const [name, ...parts] = content.split(' '); + const source = parts.join(' '); - if (!id.includes(':') && !this.isMod(msg.member)) - return await sendWithMessageOwnership( - msg, - ":x: You don't have permission to create a global snippet", - ); + const linkedMessage = await getMessageFromLink(source); - if ( - !this.isMod(msg.member) && - existingSnippet && - existingSnippet.owner !== msg.author.id - ) - return await sendWithMessageOwnership( - msg, - ":x: Cannot edit another user's snippet", - ); + if (!name) { + return await sendWithMessageOwnership( + msg, + ':x: You have to supply a name for the command', + ); + } - const title = `\`!${id}\`: `; - const base = { - id, - uses: existingSnippet?.uses ?? 0, - owner: msg.author.id, - title, - }; - let data: Omit | undefined; + const id = name.startsWith('!') + ? `${sanitizeIdPart(name.slice(1))}` + : `${sanitizeIdPart(msg.author.username)}:${sanitizeIdPart( + name, + )}`; + const existingSnippet = await Snippet.findOneBy({ id }); - if (source && !linkedMessage) { - const referencedSnippet = await this.getSnippet(source); - if (!referencedSnippet) + if (!id.includes(':') && !bot.isMod(msg.member)) return await sendWithMessageOwnership( msg, - ':x: Second argument must be a valid discord message link or snippet id', + ":x: You don't have permission to create a global snippet", ); - data = { - ...referencedSnippet, - ...base, - title: - base.title + - referencedSnippet.title?.split(': ').slice(1).join(': '), - }; - } else { - const sourceMessage = - linkedMessage ?? (await getReferencedMessage(msg)); - if (!sourceMessage) + + if ( + !bot.isMod(msg.member) && + existingSnippet && + existingSnippet.owner !== msg.author.id + ) return await sendWithMessageOwnership( msg, - ':x: You have to reply or link to a comment to make it a snippet', + ":x: Cannot edit another user's snippet", ); - const description = sourceMessage.content; - const referencedEmbed = sourceMessage.embeds[0]; - - if (LINK_REGEX.exec(description)?.[0] === description) - data = { - ...base, - content: description, - }; - else if (description) - data = { - ...base, - description, - color: parseInt(BLOCKQUOTE_GREY.slice(1), 16), - }; - else if (referencedEmbed) + const title = `\`!${id}\`: `; + const base = { + id, + uses: existingSnippet?.uses ?? 0, + owner: msg.author.id, + title, + }; + let data: Partial | undefined; + + if (source && !linkedMessage) { + const referencedSnippet = await Snippet.findOneBy({ + id: source, + }); + if (!referencedSnippet) + return await sendWithMessageOwnership( + msg, + ':x: Second argument must be a valid discord message link or snippet id', + ); data = { + ...referencedSnippet, ...base, - title: title + (referencedEmbed.title || ''), - description: referencedEmbed.description!, - color: referencedEmbed.color!, - image: referencedEmbed.image?.url, - url: referencedEmbed.url!, + title: + base.title + + referencedSnippet.title + ?.split(': ') + .slice(1) + .join(': '), }; - } + } else { + const sourceMessage = + linkedMessage ?? (await getReferencedMessage(msg)); + if (!sourceMessage) + return await sendWithMessageOwnership( + msg, + ':x: You have to reply or link to a comment to make it a snippet', + ); + + const description = sourceMessage.content; + const referencedEmbed = sourceMessage.embeds[0]; + + if (LINK_REGEX.exec(description)?.[0] === description) + data = { + ...base, + content: description, + }; + else if (description) + data = { + ...base, + description, + color: parseInt(BLOCKQUOTE_GREY.slice(1), 16), + }; + else if (referencedEmbed) + data = { + ...base, + title: title + (referencedEmbed.title || ''), + description: referencedEmbed.description!, + color: referencedEmbed.color!, + image: referencedEmbed.image?.url, + url: referencedEmbed.url!, + }; + } + + if (!data) { + return await sendWithMessageOwnership( + msg, + ':x: Cannot generate a snippet from that message', + ); + } - if (!data) - return await sendWithMessageOwnership( + await existingSnippet?.remove(); + await Snippet.create(data).save(); + const verb = existingSnippet ? 'Edited' : 'Created'; + await sendWithMessageOwnership( msg, - ':x: Cannot generate a snippet from that message', + `:white_check_mark: ${verb} snippet \`${id}\``, ); + console.log(`${verb} snippet ${id} for`, msg.author); + }, + }); - await existingSnippet?.remove(); - await Snippet.create(data).save(); - const verbed = existingSnippet ? 'Edited' : 'Created'; - await sendWithMessageOwnership( - msg, - `:white_check_mark: ${verbed} snippet \`${id}\``, - ); - console.log(`${verbed} snippet ${id} for`, msg.author); - } - - private async getSnippet(id: string) { - return await Snippet.findOne(id); - } - - @command({ + bot.registerCommand({ description: 'Snippet: Delete a snippet you own', aliases: ['deleteSnip'], - }) - async deleteSnippet(msg: Message, id: string) { - if (!msg.member) return; - const snippet = await this.getSnippet(id); - if (!snippet) - return await sendWithMessageOwnership( - msg, - ':x: No snippet found with that id', - ); - if (!this.isMod(msg.member) && snippet.owner !== msg.author.id) - return await sendWithMessageOwnership( - msg, - ":x: Cannot delete another user's snippet", - ); - await snippet.remove(); - console.log(`Deleted snippet ${id} for`, msg.author); - sendWithMessageOwnership(msg, ':white_check_mark: Deleted snippet'); - } - - private isMod(member: GuildMember | null) { - return member?.permissions.has('MANAGE_MESSAGES') ?? false; - } + async listener(msg, id) { + if (!msg.member) return; + const snippet = await Snippet.findOneBy({ id }); + if (!snippet) + return await sendWithMessageOwnership( + msg, + ':x: No snippet found with that id', + ); + if (!bot.isMod(msg.member) && snippet.owner !== msg.author.id) + return await sendWithMessageOwnership( + msg, + ":x: Cannot delete another user's snippet", + ); + await snippet.remove(); + console.log(`Deleted snippet ${id} for`, msg.author); + sendWithMessageOwnership(msg, ':white_check_mark: Deleted snippet'); + }, + }); - private async getMessageFromLink(messageLink: string | undefined) { + async function getMessageFromLink(messageLink: string | undefined) { const messageLinkExec = DISCORD_MESSAGE_LINK_REGEX_ANCHORED.exec( messageLink ?? '', ); if (!messageLinkExec) return; - const guild = this.client.guilds.cache.get(messageLinkExec[1]); + const guild = bot.client.guilds.cache.get(messageLinkExec[1]); const channel = guild?.channels.cache.get(messageLinkExec[2]); if (!channel || !(channel instanceof TextChannel)) return; const message = await channel.messages.fetch(messageLinkExec[3]); diff --git a/src/modules/twoslash.ts b/src/modules/twoslash.ts index fb64cbee..88f47c4f 100644 --- a/src/modules/twoslash.ts +++ b/src/modules/twoslash.ts @@ -1,10 +1,10 @@ -import { command, Module, listener } from 'cookiecord'; -import { Message, TextChannel } from 'discord.js'; +import { Message } from 'discord.js'; import { twoslasher, TwoSlashReturn } from '@typescript/twoslash'; import { makeCodeBlock, findCode } from '../util/codeBlocks'; import { sendWithMessageOwnership } from '../util/send'; import { getTypeScriptModule, TypeScript } from '../util/getTypeScriptModule'; import { splitCustomCommand } from '../util/customCommand'; +import { Bot } from '../bot'; // Preload typescript@latest getTypeScriptModule('latest'); @@ -14,205 +14,195 @@ function redactNoErrorTruncation(code: string) { return code.replace(/@noErrorTruncation/g, ''); } -export class TwoslashModule extends Module { - @command({ - single: true, +export function twoslashModule(bot: Bot) { + bot.registerCommand({ description: - 'Twoslash: Run twoslash on the latest codeblock, optionally returning the quickinfos of specified symbols', - aliases: ['ts'], - }) - async twoslash(msg: Message, content: string) { - await this._twoslash(msg, 'latest', content); - } - - @listener({ event: 'messageCreate' }) - async twoslashVersion(msg: Message) { - const commandData = await splitCustomCommand(this.client, msg); + 'Twoslash: Run twoslash on the latest codeblock, optionally returning the quick infos of specified symbols. You can use ts@4.8.3 or ts@next to run a specific version.', + aliases: ['twoslash', 'ts'], + async listener(msg, content) { + await twoslash(msg, 'latest', content); + }, + }); + + bot.client.on('messageCreate', async msg => { + const commandData = await splitCustomCommand(bot, msg); if (!commandData) return; const { command, args } = commandData; if (!command.startsWith('ts@') && !command.startsWith('twoslash@')) return; const version = command.split('@').slice(1).join('@'); - await this._twoslash(msg, version, args); - } - - async _twoslash(msg: Message, version: string, content: string) { - const tsModule = await getTypeScriptModule(version); - - if (!tsModule) - return await sendWithMessageOwnership( - msg, - ':x: Could not find that version of TypeScript', - ); - - const code = await findCode(msg); + await twoslash(msg, version, args); + }); - if (!code) - return await sendWithMessageOwnership( + bot.client.on('messageCreate', async msg => { + const match = msg.content.match( + /^```(?:ts |typescript )?twoslash\n([\s\S]+)```$/im, + ); + if (!msg.author.bot && match) { + await twoslashBlock( msg, - `:warning: could not find any TypeScript codeblocks in the past 10 messages`, + match[1], + (await getTypeScriptModule('latest'))!, ); + await msg.delete(); + } + }); +} - if (!content) return await this.twoslashBlock(msg, code, tsModule); +async function twoslash(msg: Message, version: string, content: string) { + const tsModule = await getTypeScriptModule(version); - if (!/^\s*([_$a-zA-Z][_$0-9a-zA-Z]*\b\s*)+/.test(content)) { - return sendWithMessageOwnership( - msg, - 'You need to give me a valid symbol name to look for!', - ); - } + if (!tsModule) + return await sendWithMessageOwnership( + msg, + ':x: Could not find that version of TypeScript', + ); - const symbols = [...new Set(content.trim().split(/\s+/g))]; + const code = await findCode(msg); - let ret: TwoSlashReturn; - try { - ret = twoslasher(redactNoErrorTruncation(code), 'ts', { - tsModule, - defaultOptions: { noErrorValidation: true }, - }); - } catch (e) { - if (!(e instanceof Error)) throw e; - return await sendWithMessageOwnership(msg, `:x: ${e.message}`); - } + if (!code) + return await sendWithMessageOwnership( + msg, + `:warning: could not find any TypeScript codeblocks in the past 10 messages`, + ); - const blocks = []; - - for (const symbol of symbols) { - const block = []; - const matches: Record> = {}; - for (const quickInfo of ret.staticQuickInfos) { - if (quickInfo.targetString !== symbol) continue; - (matches[quickInfo.text] = - matches[quickInfo.text] ?? new Set()).add( - `${quickInfo.line + 1}:${quickInfo.character + 1}`, - ); - } - if (!Object.entries(matches).length) - block.push(`/* No symbol named \`${symbol}\` found */`); - for (const [info, locSet] of Object.entries(matches)) { - block.push(`${info} /* ${[...locSet].join(', ')} */`); - } - blocks.push(block); - } + if (!content) return await twoslashBlock(msg, code, tsModule); - await sendWithMessageOwnership( + if (!/^\s*([_$a-zA-Z][_$0-9a-zA-Z]*\b\s*)+/.test(content)) { + return sendWithMessageOwnership( msg, - blocks.map(block => makeCodeBlock(block.join('\n'))).join(''), + 'You need to give me a valid symbol name to look for!', ); } - @listener({ event: 'messageCreate' }) - async onTwoslashCodeBlock(msg: Message) { - const match = msg.content.match( - /^```(?:ts |typescript )?twoslash\n([\s\S]+)```$/im, - ); - if (!msg.author.bot && match) { - await this.twoslashBlock( - msg, - match[1], - (await getTypeScriptModule('latest'))!, + const symbols = [...new Set(content.trim().split(/\s+/g))]; + + let ret: TwoSlashReturn; + try { + ret = twoslasher(redactNoErrorTruncation(code), 'ts', { + tsModule, + defaultOptions: { noErrorValidation: true }, + }); + } catch (e) { + if (!(e instanceof Error)) throw e; + return await sendWithMessageOwnership(msg, `:x: ${e.message}`); + } + + const blocks = []; + + for (const symbol of symbols) { + const block = []; + const matches: Record> = {}; + for (const quickInfo of ret.staticQuickInfos) { + if (quickInfo.targetString !== symbol) continue; + (matches[quickInfo.text] = + matches[quickInfo.text] ?? new Set()).add( + `${quickInfo.line + 1}:${quickInfo.character + 1}`, ); - await msg.delete(); } + if (!Object.entries(matches).length) + block.push(`/* No symbol named \`${symbol}\` found */`); + for (const [info, locSet] of Object.entries(matches)) { + block.push(`${info} /* ${[...locSet].join(', ')} */`); + } + blocks.push(block); } - private async twoslashBlock( - msg: Message, - code: string, - tsModule: TypeScript, - ) { - let ret: TwoSlashReturn; - try { - ret = twoslasher(redactNoErrorTruncation(code), 'ts', { - tsModule, - defaultOptions: { - noErrorValidation: true, - noStaticSemanticInfo: false, - }, - }); - } catch (e) { - if (!(e instanceof Error)) throw e; - return await sendWithMessageOwnership(msg, `:x: ${e.message}`); - } + await sendWithMessageOwnership( + msg, + blocks.map(block => makeCodeBlock(block.join('\n'))).join(''), + ); +} - const resultLines: string[] = []; - const twoslashLines = ret.code.split('\n'); - - twoslashLines.forEach((line, index) => { - resultLines.push(line); - - const lineErrors = ret.errors.filter(e => e.line === index); - const lineQueries = ret.queries.filter(e => e.line === index + 1); - - if (lineErrors.length + lineQueries.length === 0) return; - - if (lineErrors.length) { - // Make sure all lines of errors start with a comment - const errors = lineErrors.map( - e => '// ' + e.renderedMessage.split('\n').join('\n// '), - ); - - // Points to errors, e.g. ' ^^^^ ^^^^^' - const hats = lineErrors - // only those with a valid span - .filter(x => x.character != null && x.length != null) - // map to [start, end (non-inclusive)] - .map( - error => - [ - error.character!, - error.character! + error.length!, - ] as const, - ) - // sort by start, ascending - .sort((a, b) => a[0] - b[0]) - // fix overlapping ranges - .map((cur, i, a) => { - let prev = a[i - 1]; - if (!prev) return cur; - return [ - Math.max(prev[1], cur[0]), - Math.max(prev[1], cur[1]), - ] as const; - }) - // remove empty ranges - .filter(([start, end]) => start < end) - // map each to hats - .map(([start, end], i, a) => { - let prevEnd = a[i - 1]?.[1] ?? 0; - return ( - ' '.repeat(start - prevEnd) + - '^'.repeat(end - start) - ); - }) - // join the resulting strings - .join(''); - - if (hats.length > 0) { - resultLines.push('//' + hats.slice(2)); - } - - resultLines.push(...errors); - } +async function twoslashBlock(msg: Message, code: string, tsModule: TypeScript) { + let ret: TwoSlashReturn; + try { + ret = twoslasher(redactNoErrorTruncation(code), 'ts', { + tsModule, + defaultOptions: { + noErrorValidation: true, + noStaticSemanticInfo: false, + }, + }); + } catch (e) { + if (!(e instanceof Error)) throw e; + return await sendWithMessageOwnership(msg, `:x: ${e.message}`); + } + + const resultLines: string[] = []; + const twoslashLines = ret.code.split('\n'); + + twoslashLines.forEach((line, index) => { + resultLines.push(line); + + const lineErrors = ret.errors.filter(e => e.line === index); + const lineQueries = ret.queries.filter(e => e.line === index + 1); + + if (lineErrors.length + lineQueries.length === 0) return; + + if (lineErrors.length) { + // Make sure all lines of errors start with a comment + const errors = lineErrors.map( + e => '// ' + e.renderedMessage.split('\n').join('\n// '), + ); - // Inline queries for showing the LSP lookup for a token - if (lineQueries.length) { - let queryComment = '//'; - lineQueries.forEach(q => { - const spaceBefore = q.offset - queryComment.length; - queryComment += ' '.repeat(spaceBefore); - queryComment += '^? - '; - queryComment += - q.text?.replace( - /\n/g, - '\n//' + ' '.repeat(spaceBefore), - ) || ''; - }); - resultLines.push(queryComment); + // Points to errors, e.g. ' ^^^^ ^^^^^' + const hats = lineErrors + // only those with a valid span + .filter(x => x.character != null && x.length != null) + // map to [start, end (non-inclusive)] + .map( + error => + [ + error.character!, + error.character! + error.length!, + ] as const, + ) + // sort by start, ascending + .sort((a, b) => a[0] - b[0]) + // fix overlapping ranges + .map((cur, i, a) => { + let prev = a[i - 1]; + if (!prev) return cur; + return [ + Math.max(prev[1], cur[0]), + Math.max(prev[1], cur[1]), + ] as const; + }) + // remove empty ranges + .filter(([start, end]) => start < end) + // map each to hats + .map(([start, end], i, a) => { + let prevEnd = a[i - 1]?.[1] ?? 0; + return ( + ' '.repeat(start - prevEnd) + '^'.repeat(end - start) + ); + }) + // join the resulting strings + .join(''); + + if (hats.length > 0) { + resultLines.push('//' + hats.slice(2)); } - }); - const output = resultLines.join('\n'); - return sendWithMessageOwnership(msg, makeCodeBlock(output) + '\n'); - } + resultLines.push(...errors); + } + + // Inline queries for showing the LSP lookup for a token + if (lineQueries.length) { + let queryComment = '//'; + lineQueries.forEach(q => { + const spaceBefore = q.offset - queryComment.length; + queryComment += ' '.repeat(spaceBefore); + queryComment += '^? - '; + queryComment += + q.text?.replace(/\n/g, '\n//' + ' '.repeat(spaceBefore)) || + ''; + }); + resultLines.push(queryComment); + } + }); + + const output = resultLines.join('\n'); + return sendWithMessageOwnership(msg, makeCodeBlock(output) + '\n'); } diff --git a/src/util/codeBlocks.ts b/src/util/codeBlocks.ts index 4077a017..d9b9064d 100644 --- a/src/util/codeBlocks.ts +++ b/src/util/codeBlocks.ts @@ -1,10 +1,11 @@ -import { Message, TextChannel } from 'discord.js'; +import { Message, MessageType } from 'discord.js'; import { decompressFromEncodedURIComponent } from 'lz-string'; import { getReferencedMessage } from './getReferencedMessage'; const CODEBLOCK_REGEX = /```(?:ts|typescript|js|javascript)?\n([\s\S]+)```/; -const PLAYGROUND_REGEX = /?/; +const PLAYGROUND_REGEX = + /?/; export type PlaygroundLinkMatch = { url: string; @@ -49,7 +50,7 @@ export async function findCode(message: Message, ignoreLinks = false) { // 2: Link to TS playground. This can be either from a bot or a normal user // since we shorten playground links on their own and delete the message. async function findCodeInMessage(msg: Message, ignoreLinks = false) { - if (msg.type === 'THREAD_STARTER_MESSAGE') { + if (msg.type === MessageType.ThreadStarterMessage) { msg = await msg.fetchReference(); } const { author, content, embeds } = msg; diff --git a/src/util/customCommand.ts b/src/util/customCommand.ts index 1a91561b..626a49bf 100644 --- a/src/util/customCommand.ts +++ b/src/util/customCommand.ts @@ -1,18 +1,13 @@ import { Message } from 'discord.js'; -import { Module } from 'cookiecord'; +import { Bot } from '../bot'; +import { prefixes } from '../env'; -export async function splitCustomCommand( - client: Module['client'], - msg: Message, -) { +export async function splitCustomCommand(bot: Bot, msg: Message) { const [commandPart, ...argParts] = msg.content.split(' '); - const prefixes = await client.getPrefix(msg); - const matchingPrefix = [prefixes] - .flat() - .find(x => msg.content.startsWith(x)); + const matchingPrefix = prefixes.find(x => msg.content.startsWith(x)); if (!matchingPrefix) return; let command = commandPart.slice(matchingPrefix.length); - if (client.commandManager.getByTrigger(command)) return; + if (bot.getByTrigger(command)) return; if (!command) return; return { command, diff --git a/src/util/inhibitors.ts b/src/util/inhibitors.ts deleted file mode 100644 index e2bfe233..00000000 --- a/src/util/inhibitors.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Inhibitor } from 'cookiecord'; -import { TextChannel } from 'discord.js'; -import { trustedRoleId } from '../env'; - -export const isTrustedMember: Inhibitor = async (msg, client) => { - if (!msg.guild || !msg.member || !msg.channel.isText()) { - return ":warning: you can't use that command here."; - } - - if ( - !msg.member.roles.cache.has(trustedRoleId) && - !msg.member.permissions.has('MANAGE_MESSAGES') - ) { - return ":warning: you don't have permission to use that command."; - } -}; diff --git a/src/util/send.ts b/src/util/send.ts index fba85a0b..b4f630f4 100644 --- a/src/util/send.ts +++ b/src/util/send.ts @@ -1,7 +1,6 @@ import { Message, - MessageEmbed, - MessageOptions, + MessageCreateOptions, MessagePayload, PartialMessage, User, @@ -27,7 +26,7 @@ export async function getResponseChannel(message: Message) { export async function sendWithMessageOwnership( message: Message, - toSend: string | MessagePayload | MessageOptions, + toSend: string | MessagePayload | MessageCreateOptions, onDelete?: () => void, ) { const channel = await getResponseChannel(message); diff --git a/src/util/sendPaginatedMessage.ts b/src/util/sendPaginatedMessage.ts index 24697b4f..0a969950 100644 --- a/src/util/sendPaginatedMessage.ts +++ b/src/util/sendPaginatedMessage.ts @@ -1,8 +1,8 @@ import { GuildMember, - MessageEmbed, + EmbedBuilder, MessageReaction, - TextBasedChannels, + TextBasedChannel, User, } from 'discord.js'; @@ -15,10 +15,10 @@ const emojis = { }; export async function sendPaginatedMessage( - embed: MessageEmbed, + embed: EmbedBuilder, pages: string[], member: GuildMember, - channel: TextBasedChannels, + channel: TextBasedChannel, timeout: number = 100000, ) { let curPage = 0; @@ -26,7 +26,7 @@ export async function sendPaginatedMessage( embeds: [ embed .setDescription(pages[curPage]) - .setFooter(`Page ${curPage + 1} of ${pages.length}`), + .setFooter({ text: `Page ${curPage + 1} of ${pages.length}` }), ], }); if (pages.length === 1) return; @@ -38,7 +38,7 @@ export async function sendPaginatedMessage( await message.react(emojis.last); const collector = message.createReactionCollector({ - filter: (reaction, user) => + filter: (_reaction, user) => user.id === member.id && user.id !== message.author.id, time: timeout, }); @@ -68,9 +68,9 @@ export async function sendPaginatedMessage( await message.edit({ embeds: [ - embed - .setDescription(pages[curPage]) - .setFooter(`Page ${curPage + 1} of ${pages.length}`), + embed.setDescription(pages[curPage]).setFooter({ + text: `Page ${curPage + 1} of ${pages.length}`, + }), ], }); }); diff --git a/tsconfig.json b/tsconfig.json index 13318975..0acc4e46 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,65 +1,20 @@ { "compilerOptions": { - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, - "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - "lib": [ - "es2020" - ] /* Specify library files to be included in the compilation. */, - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true /* Generates corresponding '.d.ts' file. */, - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./dist" /* Redirect output structure to the directory. */, - "rootDirs": [ - "./src" - ] /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "typeRoots": [ - // "node_modules/@types", - // ], - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, - "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */ + "target": "ES2020", + "module": "Node16", + "lib": ["ES2020"], + "outDir": "./dist", + "rootDir": "./src", + "types": ["discord.js", "dotenv-safe"], + + "strict": true, + "esModuleInterop": true, + + "noUnusedParameters": true, + "noUnusedLocals": true, + "skipLibCheck": true, + + "experimentalDecorators": true, + "emitDecoratorMetadata": true } } diff --git a/yarn.lock b/yarn.lock index bcaa21a3..2f1dd26a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,193 +2,235 @@ # yarn lockfile v1 -"@algolia/cache-browser-local-storage@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.8.6.tgz#6be9644b68efbbc231ac3f0a4cfa985ef31eade9" - integrity sha512-Bam7otzjIEgrRXWmk0Amm1+B3ROI5dQnUfJEBjIy0YPM0kMahEoJXCw6160tGKxJLl1g6icoC953nGshQKO7cA== - dependencies: - "@algolia/cache-common" "4.8.6" - -"@algolia/cache-common@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.8.6.tgz#dff1697a0fe3d7856630071559661ec5ad90f31c" - integrity sha512-eGQlsXU5G7n4RvV/K6qe6lRAeL6EKAYPT3yZDBjCW4pAh7JWta+77a7BwUQkTqXN1MEQWZXjex3E4z/vFpzNrg== - -"@algolia/cache-in-memory@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.8.6.tgz#9a100a1be05e700a253ef4bdabd3bd45df2f67d4" - integrity sha512-kbJrvCFANxL/l5Pq1NFyHLRphKDwmqcD/OJga0IbNKEulRGDPkt1+pC7/q8d2ikP12adBjLLg2CVias9RJpIaw== - dependencies: - "@algolia/cache-common" "4.8.6" - -"@algolia/client-account@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.8.6.tgz#050cfd6a6d3e06a5a8e1029f24d6d50524d186c6" - integrity sha512-FQVJE/BgCb78jtG7V0r30sMl9P5JKsrsOacGtGF2YebqI0YF25y8Z1nO39lbdjahxUS3QkDw2d0P2EVMj65g2Q== - dependencies: - "@algolia/client-common" "4.8.6" - "@algolia/client-search" "4.8.6" - "@algolia/transporter" "4.8.6" - -"@algolia/client-analytics@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.8.6.tgz#ac644cfc9d87a085b9e53c71a42ef6e90d828501" - integrity sha512-ZBYFUlzNaWDFtt0rYHI7xbfVX0lPWU9lcEEXI/BlnkRgEkm247H503tNatPQFA1YGkob52EU18sV1eJ+OFRBLA== - dependencies: - "@algolia/client-common" "4.8.6" - "@algolia/client-search" "4.8.6" - "@algolia/requester-common" "4.8.6" - "@algolia/transporter" "4.8.6" - -"@algolia/client-common@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.8.6.tgz#c8b81af250ed8beb741a0e5cfdd3236bb4292c94" - integrity sha512-8dI+K3Nvbes2YRZm2LY7bdCUD05e60BhacrMLxFuKxnBGuNehME1wbxq/QxcG1iNFJlxLIze5TxIcNN3+pn76g== - dependencies: - "@algolia/requester-common" "4.8.6" - "@algolia/transporter" "4.8.6" - -"@algolia/client-recommendation@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/client-recommendation/-/client-recommendation-4.8.6.tgz#2518a09bfbeaec78b0d7a4213107f0899f80f9ac" - integrity sha512-Kg8DpjwvaWWujNx6sAUrSL+NTHxFe/UNaliCcSKaMhd3+FiPXN+CrSkO0KWR7I+oK2qGBTG/2Y0BhFOJ5/B/RA== - dependencies: - "@algolia/client-common" "4.8.6" - "@algolia/requester-common" "4.8.6" - "@algolia/transporter" "4.8.6" - -"@algolia/client-search@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.8.6.tgz#1ca3f28c04ef4120b0563a293b30fcfe1b3fd1d0" - integrity sha512-vXLS6umL/9G3bwqc6pkrS9K5/s8coq55mpfRARL+bs0NsToOf77WSTdwzlxv/KdbVF7dHjXgUpBvJ6RyR4ZdAw== - dependencies: - "@algolia/client-common" "4.8.6" - "@algolia/requester-common" "4.8.6" - "@algolia/transporter" "4.8.6" - -"@algolia/logger-common@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.8.6.tgz#8c44a4f550e12418b0ec8d76a068e4f1c64206d1" - integrity sha512-FMRxZGdDxSzd0/Mv0R1021FvUt0CcbsQLYeyckvSWX8w+Uk4o0lcV6UtZdERVR5XZsGOqoXLMIYDbR2vkbGbVw== - -"@algolia/logger-console@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.8.6.tgz#77176570fa6532fa846c7cfa2c6280935b1a3a06" - integrity sha512-TYw9lwUCjvApC6Z0zn36T6gkCl7hbfJmnU+Z/D8pFJ3Yp7lz06S3oWGjbdrULrYP1w1VOhjd0X7/yGNsMhzutQ== - dependencies: - "@algolia/logger-common" "4.8.6" - -"@algolia/requester-browser-xhr@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.8.6.tgz#dbcb5906d10c619d7f08fced2f68fa09abffe5fd" - integrity sha512-omh6uJ3CJXOmcrU9M3/KfGg8XkUuGJGIMkqEbkFvIebpBJxfs6TVs0ziNeMFAcAfhi8/CGgpLbDSgJtWdGQa6w== - dependencies: - "@algolia/requester-common" "4.8.6" - -"@algolia/requester-common@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.8.6.tgz#37ea1f9ecc1afcd91532b9f9c952c62fdef42bca" - integrity sha512-r5xJqq/D9KACkI5DgRbrysVL5DUUagikpciH0k0zjBbm+cXiYfpmdflo/h6JnY6kmvWgjr/4DoeTjKYb/0deAQ== - -"@algolia/requester-node-http@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.8.6.tgz#e966293224f3bd1ba32ce4f9bc0fdada5d8e69ec" - integrity sha512-TB36OqTVOKyHCOtdxhn/IJyI/NXi/BWy8IEbsiWwwZWlL79NWHbetj49jXWFolEYEuu8PgDjjZGpRhypSuO9XQ== - dependencies: - "@algolia/requester-common" "4.8.6" - -"@algolia/transporter@4.8.6": - version "4.8.6" - resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.8.6.tgz#b605dcd971aed374bdd95dd8938b93b9df650109" - integrity sha512-NRb31J0TP7EPoVMpXZ4yAtr61d26R8KGaf6qdULknvq5sOVHuuH4PwmF08386ERfIsgnM/OBhl+uzwACdCIjSg== - dependencies: - "@algolia/cache-common" "4.8.6" - "@algolia/logger-common" "4.8.6" - "@algolia/requester-common" "4.8.6" - -"@babel/code-frame@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@discordjs/builders@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.5.0.tgz#646cbea9cc67f68639e6fb70ed1278b26dacdb14" - integrity sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw== - dependencies: - "@sindresorhus/is" "^4.0.1" - discord-api-types "^0.22.0" - ow "^0.27.0" - ts-mixer "^6.0.0" - tslib "^2.3.0" - -"@discordjs/collection@^0.2.1": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.2.4.tgz#c8ff2250430dcec7324dd4aafd1ccbcbdfa9ac14" - integrity sha512-PVrEJH+V6Ob0OwfagYQ/57kwt/HNEJxt5jqY4P+S3st9y29t9iokdnGMQoJXG5VEMAQIPbzu9Snw1F6yE8PdLA== - -"@discordjs/form-data@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@discordjs/form-data/-/form-data-3.0.1.tgz#5c9e6be992e2e57d0dfa0e39979a850225fb4697" - integrity sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg== +"@algolia/cache-browser-local-storage@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz#d5b1b90130ca87c6321de876e167df9ec6524936" + integrity sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA== + dependencies: + "@algolia/cache-common" "4.14.2" + +"@algolia/cache-common@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.14.2.tgz#b946b6103c922f0c06006fb6929163ed2c67d598" + integrity sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg== + +"@algolia/cache-in-memory@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz#88e4a21474f9ac05331c2fa3ceb929684a395a24" + integrity sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ== + dependencies: + "@algolia/cache-common" "4.14.2" + +"@algolia/client-account@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.14.2.tgz#b76ac1ba9ea71e8c3f77a1805b48350dc0728a16" + integrity sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w== + dependencies: + "@algolia/client-common" "4.14.2" + "@algolia/client-search" "4.14.2" + "@algolia/transporter" "4.14.2" + +"@algolia/client-analytics@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.14.2.tgz#ca04dcaf9a78ee5c92c5cb5e9c74cf031eb2f1fb" + integrity sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ== + dependencies: + "@algolia/client-common" "4.14.2" + "@algolia/client-search" "4.14.2" + "@algolia/requester-common" "4.14.2" + "@algolia/transporter" "4.14.2" + +"@algolia/client-common@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.14.2.tgz#e1324e167ffa8af60f3e8bcd122110fd0bfd1300" + integrity sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q== + dependencies: + "@algolia/requester-common" "4.14.2" + "@algolia/transporter" "4.14.2" + +"@algolia/client-personalization@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.14.2.tgz#656bbb6157a3dd1a4be7de65e457fda136c404ec" + integrity sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw== + dependencies: + "@algolia/client-common" "4.14.2" + "@algolia/requester-common" "4.14.2" + "@algolia/transporter" "4.14.2" + +"@algolia/client-search@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.14.2.tgz#357bdb7e640163f0e33bad231dfcc21f67dc2e92" + integrity sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw== + dependencies: + "@algolia/client-common" "4.14.2" + "@algolia/requester-common" "4.14.2" + "@algolia/transporter" "4.14.2" + +"@algolia/logger-common@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.14.2.tgz#b74b3a92431f92665519d95942c246793ec390ee" + integrity sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA== + +"@algolia/logger-console@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.14.2.tgz#ec49cb47408f5811d4792598683923a800abce7b" + integrity sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g== + dependencies: + "@algolia/logger-common" "4.14.2" + +"@algolia/requester-browser-xhr@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz#a2cd4d9d8d90d53109cc7f3682dc6ebf20f798f2" + integrity sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw== + dependencies: + "@algolia/requester-common" "4.14.2" + +"@algolia/requester-common@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.14.2.tgz#bc4e9e5ee16c953c0ecacbfb334a33c30c28b1a1" + integrity sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg== + +"@algolia/requester-node-http@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz#7c1223a1785decaab1def64c83dade6bea45e115" + integrity sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg== + dependencies: + "@algolia/requester-common" "4.14.2" + +"@algolia/transporter@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.14.2.tgz#77c069047fb1a4359ee6a51f51829508e44a1e3d" + integrity sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ== + dependencies: + "@algolia/cache-common" "4.14.2" + "@algolia/logger-common" "4.14.2" + "@algolia/requester-common" "4.14.2" + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@discordjs/builders@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-1.3.0.tgz#20d4e3fbcd734ce2468df10407c7c6df22c9f77e" + integrity sha512-Pvca6Nw8Hp+n3N+Wp17xjygXmMvggbh5ywUsOYE2Et4xkwwVRwgzxDJiMUuYapPtnYt4w/8aKlf5khc8ipLvhg== dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" + "@discordjs/util" "^0.1.0" + "@sapphire/shapeshift" "^3.7.0" + discord-api-types "^0.37.12" + fast-deep-equal "^3.1.3" + ts-mixer "^6.0.1" + tslib "^2.4.0" -"@npmcli/ci-detect@^1.0.0": +"@discordjs/collection@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-1.2.0.tgz#5cad4bb47521c6f0abd175bf55c84528d1ac94f7" + integrity sha512-VvrrtGb7vbfPHzbhGq9qZB5o8FOB+kfazrxdt0OtxzSkoBuw9dURMkCwWizZ00+rDpiK2HmLHBZX+y6JsG9khw== + +"@discordjs/rest@^1.3.0": version "1.3.0" - resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a" - integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q== + resolved "https://registry.yarnpkg.com/@discordjs/rest/-/rest-1.3.0.tgz#26dd146eeda0c19a3076b3872a00ac9f323763c8" + integrity sha512-U6X5J+r/MxYpPTlHFuPxXEf92aKsBaD2teBC7sWkKILIr30O8c9+XshfL7KFBCavnAqS/qE+PF9fgRilO3N44g== + dependencies: + "@discordjs/collection" "^1.2.0" + "@discordjs/util" "^0.1.0" + "@sapphire/async-queue" "^1.5.0" + "@sapphire/snowflake" "^3.2.2" + discord-api-types "^0.37.12" + file-type "^18.0.0" + tslib "^2.4.0" + undici "^5.11.0" + +"@discordjs/util@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@discordjs/util/-/util-0.1.0.tgz#e42ca1bf407bc6d9adf252877d1b206e32ba369a" + integrity sha512-e7d+PaTLVQav6rOc2tojh2y6FE8S7REkqLldq1XF4soCx74XB/DIjbVbVLtBemf0nLW77ntz0v+o5DytKwFNLQ== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" -"@sapphire/async-queue@^1.1.4": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.8.tgz#dac698654a17fb0e202fa3ff0c2c176bbdc08935" - integrity sha512-Oi4EEi8vOne8RM1tCdQ3kYAtl/J6ztak3Th6wwGFqA2SVNJtedw196LjsLX0bK8Li8cwaljbFf08N+0zeqhkWQ== +"@npmcli/fs@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" + integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== + dependencies: + semver "^7.3.5" -"@sindresorhus/is@^4.0.1": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.0.tgz#667bfc6186ae7c9e0b45a08960c551437176e1ca" - integrity sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw== +"@sapphire/async-queue@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.5.0.tgz#2f255a3f186635c4fb5a2381e375d3dfbc5312d8" + integrity sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA== -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@sapphire/shapeshift@^3.7.0": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@sapphire/shapeshift/-/shapeshift-3.7.0.tgz#488cf06857be75826292dac451c13eeb0143602d" + integrity sha512-A6vI1zJoxhjWo4grsxpBRBgk96SqSdjLX5WlzKp9H+bJbkM07mvwcbtbVAmUZHbi/OG3HLfiZ1rlw4BhH6tsBQ== + dependencies: + fast-deep-equal "^3.1.3" + lodash.uniqwith "^4.5.0" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@sapphire/snowflake@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@sapphire/snowflake/-/snowflake-3.2.2.tgz#faacdc1b5f7c43145a71eddba917de2b707ef780" + integrity sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ== + +"@sqltools/formatter@^1.2.2": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12" + integrity sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw== + +"@tokenizer/token@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" + integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== -"@types/dotenv-safe@^8.1.0": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@types/dotenv-safe/-/dotenv-safe-8.1.1.tgz#2d7248ed4ad969c41d85586266ad64e9a3603ad4" - integrity sha512-JOJuWwYaRinKl3UdmTivWgXO66dKpGW67NaYRMSMjKsNjF+MTsnc/T656I8eNGokIHVLihkY1kx96Ho3l8vfqQ== +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@types/dotenv-safe@^8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@types/dotenv-safe/-/dotenv-safe-8.1.2.tgz#72f126969f445af5654efd3167deabc2cbc6c24e" + integrity sha512-R/B/wIMda6lRE2P1H0vwSoJsV78IOkhccE4vIvmKZQNXOIjiU0QyJsUXwSotBxOPZFZ/oOnjCa3+kK5kVJwGyw== dependencies: dotenv "^8.2.0" @@ -198,52 +240,37 @@ integrity sha512-j6G1e8DULJx3ONf6NdR5JiR2ZY3K3PaaqiEuKYkLQO0Czfi1AzrtjfnfCROyWGeDd5IVMKCwsgSmMip9OWijow== "@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/minipass@*": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/minipass/-/minipass-2.2.0.tgz#51ad404e8eb1fa961f75ec61205796807b6f9651" - integrity sha512-wuzZksN4w4kyfoOv/dlpov4NOunwutLA/q7uc00xU02ZyUY+aoM5PWIXEKBMnm0NHd4a+N71BMjq+x7+2Af1fg== - dependencies: - "@types/node" "*" + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/node-fetch@*": - version "2.5.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" - integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node-fetch@^2.5.8": - version "2.5.8" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.8.tgz#e199c835d234c7eb0846f6618012e558544ee2fb" - integrity sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw== + version "2.6.2" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" + integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== dependencies: "@types/node" "*" form-data "^3.0.0" "@types/node@*": - version "14.0.27" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.27.tgz#a151873af5a5e851b51b3b065c9e63390a9e0eb1" - integrity sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g== + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== -"@types/node@^13.7.0": - version "13.13.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.15.tgz#fe1cc3aa465a3ea6858b793fd380b66c39919766" - integrity sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw== +"@types/node@^16": + version "16.18.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc" + integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg== "@types/npm-package-arg@*": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/npm-package-arg/-/npm-package-arg-6.1.0.tgz#88bdfce72f6a3d5fa1053c8d44d655e7850642e4" - integrity sha512-vbt5fb0y1svMhu++1lwtKmZL76d0uPChFlw7kEzyUmTwfmpHRcFb8i0R8ElT69q/L+QLgK2hgECivIAvaEDwag== + version "6.1.1" + resolved "https://registry.yarnpkg.com/@types/npm-package-arg/-/npm-package-arg-6.1.1.tgz#9e2d8adc04d39824a3d9f36f738010a3f7da3c1a" + integrity sha512-452/1Kp9IdM/oR10AyqAgZOxUt7eLbm+EMJ194L6oarMYdZNiFIFAOJ7IIr0OrZXTySgfHjJezh2oiyk2kc3ag== -"@types/npm-registry-fetch@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@types/npm-registry-fetch/-/npm-registry-fetch-8.0.0.tgz#b66607c291f0e9f15b50ea3fef0d392e9c4e69de" - integrity sha512-3dtNw1VMy1gnaklK0746/cOkJYMvdY/3FNuRDR5ih+WUWIbgTR6JvKq6hmhW4G1/o6lPdjHECPaWcowXgWZDyg== +"@types/npm-registry-fetch@^8.0.4": + version "8.0.4" + resolved "https://registry.yarnpkg.com/@types/npm-registry-fetch/-/npm-registry-fetch-8.0.4.tgz#77b2737cde22314ccda1dfdb9568fd7769e95b90" + integrity sha512-R9yEj6+NDmXLpKNS19cIaMyaHfV0aHjy/1qbo8K9jiHyjyaYg0CEmuOV/L0Q91DZDi3SuxlYY+2XYwh9TbB+eQ== dependencies: "@types/node" "*" "@types/node-fetch" "*" @@ -252,86 +279,84 @@ "@types/ssri" "*" "@types/npmlog@*": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@types/npmlog/-/npmlog-4.1.2.tgz#d070fe6a6b78755d1092a3dc492d34c3d8f871c4" - integrity sha512-4QQmOF5KlwfxJ5IGXFIudkeLCdMABz03RcUXu+LCb24zmln8QW6aDjuGl4d4XPVLf2j+FnjelHTP7dvceAFbhA== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + version "4.1.4" + resolved "https://registry.yarnpkg.com/@types/npmlog/-/npmlog-4.1.4.tgz#30eb872153c7ead3e8688c476054ddca004115f6" + integrity sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ== -"@types/prettier@^2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" - integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== +"@types/prettier@^2.7.1": + version "2.7.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" + integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== "@types/ssri@*": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@types/ssri/-/ssri-7.1.0.tgz#e8871a9ea230fdad6cdf04f0b39eeafdbfb011fc" - integrity sha512-CJR8I0rHwuhpS6YBq1q+StUlQBuxoyfVVZ3O1FDiXH1HJtNm90lErBsZpr2zBMF2x5d9khvq105CQ03EXkZzAQ== + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/ssri/-/ssri-7.1.1.tgz#2a2c94abf0d3a8c3b07bb4ff08142dd571407bb5" + integrity sha512-DPP/jkDaqGiyU75MyMURxLWyYLwKSjnAuGe9ZCsLp9QZOpXmDfuevk769F0BS86TmRuD5krnp06qw9nSoNO+0g== dependencies: "@types/node" "*" "@types/strip-bom@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/strip-bom/-/strip-bom-3.0.0.tgz#14a8ec3956c2e81edb7520790aecf21c290aebd2" - integrity sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I= + integrity sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ== "@types/strip-json-comments@0.0.30": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== -"@types/tar@^4.0.4": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@types/tar/-/tar-4.0.4.tgz#d680de60855e7778a51c672b755869a3b8d2889f" - integrity sha512-0Xv+xcmkTsOZdIF4yCnd7RkOOyfyqPaqJ7RZFKnwdxfDbkN3eAAE9sHl8zJFqBz4VhxolW9EErbjR1oyH7jK2A== - dependencies: - "@types/minipass" "*" - "@types/node" "*" - -"@types/ws@^7.2.1": - version "7.4.6" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.6.tgz#c4320845e43d45a7129bb32905e28781c71c1fff" - integrity sha512-ijZ1vzRawI7QoWnTNL8KpHixd2b2XVb9I9HAqI3triPsh1EC0xH0Eg6w2O3TKbDCgiNNlJqfrof6j4T2I+l9vw== +"@types/tar@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@types/tar/-/tar-6.1.3.tgz#46a2ce7617950c4852dfd7e9cd41aa8161b9d750" + integrity sha512-YzDOr5kdAeqS8dcO6NTTHTMJ44MUCBDoLEIyPtwEn7PssKqUYL49R1iCVJPeiPzPlKi6DbH33eZkpeJ27e4vHg== dependencies: "@types/node" "*" + minipass "^3.3.5" -"@types/ws@^7.4.7": - version "7.4.7" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" - integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== +"@types/ws@^8.5.3": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== dependencies: "@types/node" "*" -"@typescript/twoslash@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@typescript/twoslash/-/twoslash-2.1.0.tgz#0128312e002670367393bb9b48378ac818aceccd" - integrity sha512-J72HH+zAMPA9udOuOgAxTXnzeRyz0t33Ww1jQ6CgNfjP3HtrOS4lNgG+m3u1H497U366zbcUOjNkIgNGqefd/A== +"@typescript/twoslash@^3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@typescript/twoslash/-/twoslash-3.2.1.tgz#7ba5fb2a230925ccd773967b02daf38efc1a3377" + integrity sha512-tS4gLwOe1WCDspqBXhQCb2ESUqzEd1tOkmKpiZ1O+W1x+9l+9njETuXFkLErtH9is/uD1GSvClDjk/tEOJktjQ== dependencies: - "@typescript/vfs" "1.3.4" + "@typescript/vfs" "1.4.0" debug "^4.1.1" lz-string "^1.4.4" -"@typescript/vfs@1.3.4": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.3.4.tgz#07f89d2114f6e29255d589395ed7f3b4af8a00c2" - integrity sha512-RbyJiaAGQPIcAGWFa3jAXSuAexU4BFiDRF1g3hy7LmRqfNpYlTQWGXjcrOaVZjJ8YkkpuwG0FcsYvtWQpd9igQ== +"@typescript/vfs@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.4.0.tgz#2d22985c7666c9d4ce26eb025405e6f156aa32b0" + integrity sha512-Pood7yv5YWMIX+yCHo176OnF8WUlKGImFG7XlsuH14Zb1YN5+dYD3uUtS7lqZtsH7tAveNUi2NzdpQCN0yRbaw== dependencies: debug "^4.1.1" -agent-base@6: +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" -agentkeepalive@^4.1.3: - version "4.1.4" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b" - integrity sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ== +agentkeepalive@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" + integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== dependencies: debug "^4.1.0" depd "^1.1.2" @@ -345,67 +370,44 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -algoliasearch@^4.8.6: - version "4.8.6" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.8.6.tgz#8d6d7d2315bb052705a8ef5c8dbf57a19d357c2b" - integrity sha512-G8IA3lcgaQB4r9HuQ4G+uSFjjz0Wv2OgEPiQ8emA+G2UUlroOfMl064j1bq/G+QTW0LmTQp9JwrFDRWxFM9J7w== - dependencies: - "@algolia/cache-browser-local-storage" "4.8.6" - "@algolia/cache-common" "4.8.6" - "@algolia/cache-in-memory" "4.8.6" - "@algolia/client-account" "4.8.6" - "@algolia/client-analytics" "4.8.6" - "@algolia/client-common" "4.8.6" - "@algolia/client-recommendation" "4.8.6" - "@algolia/client-search" "4.8.6" - "@algolia/logger-common" "4.8.6" - "@algolia/logger-console" "4.8.6" - "@algolia/requester-browser-xhr" "4.8.6" - "@algolia/requester-common" "4.8.6" - "@algolia/requester-node-http" "4.8.6" - "@algolia/transporter" "4.8.6" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" +algoliasearch@^4.14.2: + version "4.14.2" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.14.2.tgz#63f142583bfc3a9bd3cd4a1b098bf6fe58e56f6c" + integrity sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg== + dependencies: + "@algolia/cache-browser-local-storage" "4.14.2" + "@algolia/cache-common" "4.14.2" + "@algolia/cache-in-memory" "4.14.2" + "@algolia/client-account" "4.14.2" + "@algolia/client-analytics" "4.14.2" + "@algolia/client-common" "4.14.2" + "@algolia/client-personalization" "4.14.2" + "@algolia/client-search" "4.14.2" + "@algolia/logger-common" "4.14.2" + "@algolia/logger-console" "4.14.2" + "@algolia/requester-browser-xhr" "4.14.2" + "@algolia/requester-common" "4.14.2" + "@algolia/requester-node-http" "4.14.2" + "@algolia/transporter" "4.14.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== -anymatch@~3.1.1, anymatch@~3.1.2: +anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -414,32 +416,25 @@ anymatch@~3.1.1, anymatch@~3.1.2: picomatch "^2.0.4" app-root-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" - integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" + integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-differ@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -453,17 +448,17 @@ arrify@^2.0.1: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== binary-extensions@^2.0.0: version "2.2.0" @@ -478,6 +473,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -486,93 +488,55 @@ braces@~3.0.2: fill-range "^7.0.1" buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer-writer@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== -buffer@^5.1.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" + base64-js "^1.3.1" + ieee754 "^1.2.1" -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= +builtins@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" -cacache@^15.0.5: - version "15.0.6" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.6.tgz#65a8c580fda15b59150fb76bf3f3a8e45d583099" - integrity sha512-g1WYDMct/jzW+JdWEyjaX2zoBkZ6ZT9VpOyp2I/VMtDsNLffNat3kqPFfi1eDRSK9/SuKGyORDHcQMcPF8sQ/w== +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== dependencies: - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" + streamsearch "^1.1.0" + +cacache@^17.0.0: + version "17.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.0.2.tgz#ff2bd029bf45099b3fe711f56fbf138b846c8d6d" + integrity sha512-rYUs2x4OjSgCQND7nTrh21AHIBFgd7s/ctAYvU3a8u+nK+R5YaX/SFPDYz4Azz7SGL6+6L9ZZWI4Kawpb7grzQ== + dependencies: + "@npmcli/fs" "^3.1.0" + fs-minipass "^2.1.0" + glob "^8.0.1" + lru-cache "^7.7.1" + minipass "^3.1.6" minipass-collect "^1.0.2" minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" + minipass-pipeline "^1.2.4" p-map "^4.0.0" promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - -callsites@^3.0.0, callsites@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" + ssri "^10.0.0" + tar "^6.1.11" + unique-filename "^3.0.0" chalk@^3.0.0: version "3.0.0" @@ -582,18 +546,18 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@^3.3.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== +chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -605,72 +569,45 @@ chokidar@^3.3.1: optionalDependencies: fsevents "~2.3.2" -chokidar@^3.4.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.4.0" - optionalDependencies: - fsevents "~2.1.2" - chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-highlight@^2.0.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.4.tgz#098cb642cf17f42adc1c1145e07f960ec4d7522b" - integrity sha512-s7Zofobm20qriqDoU9sXptQx0t2R9PEgac92mENNm7xaEe1hn71IIMsXMK+6encA6WRCWWxIGQbipr3q998tlQ== +cli-highlight@^2.1.11: + version "2.1.11" + resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" + integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== dependencies: - chalk "^3.0.0" - highlight.js "^9.6.0" + chalk "^4.0.0" + highlight.js "^10.7.1" mz "^2.4.0" parse5 "^5.1.1" - parse5-htmlparser2-tree-adapter "^5.1.1" - yargs "^15.0.0" + parse5-htmlparser2-tree-adapter "^6.0.0" + yargs "^16.0.0" -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + wrap-ansi "^7.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: - color-name "1.1.3" + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" color-convert@^2.0.1: version "2.0.1" @@ -679,11 +616,6 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" @@ -696,37 +628,15 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -cookiecord@^0.8.18: - version "0.8.18" - resolved "https://registry.yarnpkg.com/cookiecord/-/cookiecord-0.8.18.tgz#82b42b752095c4e62f43f08624b7782602f0a9ea" - integrity sha512-xBNTPm7bEBQ9PJBQ4s12VzI4B9HOzP7KkFdaz3aKMmkQ9f32JqViM9guPcFELEgq5NoeIisj/RGB3XBAyU2o8g== - dependencies: - chokidar "^3.3.1" - discord.js discordjs/discord.js#d0bc4d7ff037035d4f315a0286b06f0a1ade29c1 - dotenv-safe "^8.2.0" - humanize-duration "^3.21.0" - reflect-metadata "^0.1.13" - -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-spawn@^7.0.0: version "7.0.3" @@ -737,79 +647,55 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= - dependencies: - array-find-index "^1.0.1" - -dateformat@~1.0.4-1.2.3: - version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" - integrity sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk= - dependencies: - get-stdin "^4.0.1" - meow "^3.3.0" +date-fns@^2.28.0: + version "2.29.3" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" + integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== -debug@4, debug@^4.1.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.2, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depd@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -discord-api-types@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.22.0.tgz#34dc57fe8e016e5eaac5e393646cd42a7e1ccc2a" - integrity sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg== - -discord.js@discordjs/discord.js#d0bc4d7ff037035d4f315a0286b06f0a1ade29c1: - version "13.1.0" - resolved "https://codeload.github.com/discordjs/discord.js/tar.gz/d0bc4d7ff037035d4f315a0286b06f0a1ade29c1" - dependencies: - "@discordjs/builders" "^0.5.0" - "@discordjs/collection" "^0.2.1" - "@discordjs/form-data" "^3.0.1" - "@sapphire/async-queue" "^1.1.4" - "@types/ws" "^7.4.7" - discord-api-types "^0.22.0" - node-fetch "^2.6.1" - ws "^7.5.1" - -dot-prop@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" - integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== - dependencies: - is-obj "^2.0.0" +discord-api-types@^0.37.12: + version "0.37.18" + resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.37.18.tgz#1f0ca95cea4b2380ba77623a62b1d285f1237d7a" + integrity sha512-mJ+9C8gmG5csssVZPH06Y8IGiJykljFyZc6n6F+T3vKo6yNBI5TtLIbwt6t9hJzsR5f1ITzRZ6cuPrTvRCUxqA== + +discord.js@^14.6.0: + version "14.6.0" + resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.6.0.tgz#896f7540d4c6f190dffe91d2f3e9a9f7cbc8bd26" + integrity sha512-On1K7xpJZRe0KsziIaDih2ksYPhgxym/ZqV45i1f3yig4vUotikqs7qp5oXiTzQ/UTiNRCixUWFTh7vA1YBCqw== + dependencies: + "@discordjs/builders" "^1.3.0" + "@discordjs/collection" "^1.2.0" + "@discordjs/rest" "^1.3.0" + "@discordjs/util" "^0.1.0" + "@sapphire/snowflake" "^3.2.2" + "@types/ws" "^8.5.3" + discord-api-types "^0.37.12" + fast-deep-equal "^3.1.3" + lodash.snakecase "^4.1.1" + tslib "^2.4.0" + undici "^5.11.0" + ws "^8.9.0" dotenv-safe@^8.2.0: version "8.2.0" @@ -818,34 +704,29 @@ dotenv-safe@^8.2.0: dependencies: dotenv "^8.2.0" -dotenv@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" - integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== +dotenv@^16.0.0: + version "16.0.3" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" + integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== dotenv@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== dynamic-dedupe@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz#06e44c223f5e4e94d78ef9db23a6515ce2f962a1" - integrity sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE= + integrity sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ== dependencies: xtend "^4.0.0" -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -encoding@^0.1.12: +encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -864,42 +745,39 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -execa@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-2.1.0.tgz#e5d3ecd837d2a60ec50f3da78fd39767747bbe99" - integrity sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw== +execa@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: cross-spawn "^7.0.0" get-stream "^5.0.0" + human-signals "^1.1.1" is-stream "^2.0.0" merge-stream "^2.0.0" - npm-run-path "^3.0.0" + npm-run-path "^4.0.0" onetime "^5.1.0" - p-finally "^2.0.0" signal-exit "^3.0.2" strip-final-newline "^2.0.0" -figlet@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.0.tgz#2db4d00a584e5155a96080632db919213c3e003c" - integrity sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww== +fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +file-type@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-18.0.0.tgz#7a39378f8657ddc02807a0c62cb77cb4dc318197" + integrity sha512-jjMwFpnW8PKofLE/4ohlhqwDk5k0NC6iy0UHAJFKoY1fQeGMN0GDdLgHQrvCbSpMwbqzoCZhRI5dETCZna5qVA== + dependencies: + readable-web-to-node-stream "^3.0.2" + strtok3 "^7.0.0" + token-types "^5.0.1" fill-range@^7.0.1: version "7.0.1" @@ -908,22 +786,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -931,13 +794,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-versions@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -947,7 +803,7 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -fs-minipass@^2.0.0: +fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== @@ -957,217 +813,172 @@ fs-minipass@^2.0.0: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -get-caller-file@^2.0.1: +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - get-stream@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" - integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== dependencies: pump "^3.0.0" -glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +glob@^7.1.3, glob@^7.2.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" -graceful-fs@^4.1.2: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= +glob@^8.0.1: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== dependencies: - ansi-regex "^2.0.0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -highlight.js@^9.6.0: - version "9.18.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634" - integrity sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ== +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +highlight.js@^10.7.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== -hosted-git-info@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" - integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== +hosted-git-info@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58" + integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== dependencies: - lru-cache "^6.0.0" + lru-cache "^7.5.1" -html-entities@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.2.tgz#760b404685cb1d794e4f4b744332e3b00dcfe488" - integrity sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ== +html-entities@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" + integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== dependencies: - "@tootallnate/once" "1" + "@tootallnate/once" "2" agent-base "6" debug "4" https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: agent-base "6" debug "4" -humanize-duration@^3.21.0: - version "3.27.0" - resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.27.0.tgz#3f781b7cf8022ad587f76b9839b60bc2b29636b2" - integrity sha512-qLo/08cNc3Tb0uD7jK0jAcU5cnqCM0n568918E7R2XhMr/+7F37p4EY062W/stg7tmzvknNn9b/1+UhVRzsYrQ== +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== dependencies: ms "^2.0.0" -husky@^4.2.5: - version "4.2.5" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36" - integrity sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ== - dependencies: - chalk "^4.0.0" - ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^6.0.0" - find-versions "^3.2.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^4.2.0" - please-upgrade-node "^3.2.0" - slash "^3.0.0" - which-pm-runs "^1.0.0" +husky@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236" + integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg== iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= - dependencies: - repeating "^2.0.0" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1: +inherits@2, inherits@^2.0.1, inherits@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +ip@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" + integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== is-binary-path@~2.1.0: version "2.1.0" @@ -1176,20 +987,17 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-core-module@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + dependencies: + has "^1.0.3" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -1206,79 +1014,34 @@ is-glob@^4.0.1, is-glob@~4.0.1: is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + argparse "^2.0.1" jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== locate-path@^5.0.0: version "5.0.0" @@ -1287,18 +1050,15 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= +lodash.snakecase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" +lodash.uniqwith@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz#7a0cbf65f43b5928625a9d4d0dc54b18cadc7ef3" + integrity sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q== lru-cache@^6.0.0: version "6.0.0" @@ -1307,91 +1067,83 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.5.1, lru-cache@^7.7.1: + version "7.14.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea" + integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" - integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= + integrity sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ== make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^8.0.9: - version "8.0.14" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" - integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ== +make-fetch-happen@^11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.0.1.tgz#b3c51663d018d9e11d57fdd4393a4c5a1a7d56eb" + integrity sha512-clv3IblugXn2CDUmqFhNzii3rjKa46u5wNeivc+QlLXkGI5FjLX3rGboo+y2kwf1pd8W0iDiC384cemeDtw9kw== dependencies: - agentkeepalive "^4.1.3" - cacache "^15.0.5" + agentkeepalive "^4.2.1" + cacache "^17.0.0" http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" + http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.0" is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" + lru-cache "^7.7.1" + minipass "^3.1.6" minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" + minipass-fetch "^3.0.0" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" + negotiator "^0.6.3" promise-retry "^2.0.1" - socks-proxy-agent "^5.0.0" - ssri "^8.0.0" - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" + socks-proxy-agent "^7.0.0" + ssri "^10.0.0" merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -mime-db@1.50.0: - version "1.50.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" - integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: - version "2.1.33" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" - integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.50.0" + mime-db "1.52.0" mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.1.3, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimatch@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== minipass-collect@^1.0.2: version "1.0.2" @@ -1400,16 +1152,16 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" -minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.3.tgz#34c7cea038c817a8658461bf35174551dce17a0a" - integrity sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ== +minipass-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.0.tgz#02481219ddbd3d30eb0e354016f680b10c6f2bcb" + integrity sha512-NSx3k5gR4Q5Ts2poCM/19d45VwhVLBtJZ6ypYcthj2BwmDx/e7lW8Aadnyt3edd2W0ecb+b0o7FYLRYE2AGcQg== dependencies: - minipass "^3.1.0" + minipass "^3.1.6" minipass-sized "^1.0.3" - minizlib "^2.0.0" + minizlib "^2.1.2" optionalDependencies: - encoding "^0.1.12" + encoding "^0.1.13" minipass-flush@^1.0.5: version "1.0.5" @@ -1426,7 +1178,7 @@ minipass-json-stream@^1.0.1: jsonparse "^1.3.1" minipass "^3.0.0" -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: +minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== @@ -1440,14 +1192,21 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" - integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== +minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: + version "3.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" + integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw== dependencies: yallist "^4.0.0" -minizlib@^2.0.0, minizlib@^2.1.1: +minipass@^3.3.5: + version "3.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.5.tgz#6da7e53a48db8a856eeb9153d85b230a2119e819" + integrity sha512-rQ/p+KfKBkeNwo04U15i+hOwoVBVmekmm/HcfTkTN2t9pbQKCMm4eN5gFeqgrrSp/kH/7BYYhTIHOxGqzbBPaA== + dependencies: + yallist "^4.0.0" + +minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -1460,12 +1219,12 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mri@^1.1.4: - version "1.1.6" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6" - integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== +mri@^1.1.5: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -1495,113 +1254,72 @@ mz@^2.4.0: object-assign "^4.0.1" thenify-all "^1.0.0" -node-fetch@^2.6.1, node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" +negotiator@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -npm-package-arg@^8.0.0: - version "8.1.2" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.2.tgz#b868016ae7de5619e729993fbd8d11dc3c52ab62" - integrity sha512-6Eem455JsSMJY6Kpd3EyWE+n5hC+g9bSyHr9K9U2zqZb7+02+hObQ2c0+8iDk/mNF+8r1MhY44WypKJAkySIYA== +npm-package-arg@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-10.0.0.tgz#a34f4a4208a937074b1fff0943a684fbacc83977" + integrity sha512-7dkh8mRp7s0KwVHKIVJnFCJQ2B34gOGnzgBjDGyprycmARq/82SX/lhilQ95ZuacP/G/1gsS345iAkKmxWBQ2Q== dependencies: - hosted-git-info "^4.0.1" - semver "^7.3.4" - validate-npm-package-name "^3.0.0" + hosted-git-info "^6.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" -npm-registry-fetch@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" - integrity sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA== +npm-registry-fetch@^14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.2.tgz#f637630d9005aeebe4d7411226fb11fa1628c5e8" + integrity sha512-TMenrMagFA9KF81E2bkS5XRyzERK4KXu70vgXt5+i8FcrFeLNgNsc6e5hekTqjDwPDkL3HGn/holWcXDMfnFgw== dependencies: - "@npmcli/ci-detect" "^1.0.0" - lru-cache "^6.0.0" - make-fetch-happen "^8.0.9" - minipass "^3.1.3" - minipass-fetch "^1.3.0" + make-fetch-happen "^11.0.0" + minipass "^3.1.6" + minipass-fetch "^3.0.0" minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" + minizlib "^2.1.2" + npm-package-arg "^10.0.0" + proc-log "^3.0.0" -npm-run-path@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5" - integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg== +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" object-assign@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.1.tgz#5c8016847b0d67fcedb7eef254751cfcdc7e9418" - integrity sha512-ZpZpjcJeugQfWsfyQlshVoowIIQ1qBGSVll4rfDq6JJVO//fesjoX808hXWfBjY+ROZgpKDI5TRSRBSoJiZ8eg== + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - -ow@^0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/ow/-/ow-0.27.0.tgz#d44da088e8184fa11de64b5813206f9f86ab68d0" - integrity sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ== - dependencies: - "@sindresorhus/is" "^4.0.1" - callsites "^3.1.0" - dot-prop "^6.0.1" - lodash.isequal "^4.5.0" - type-fest "^1.2.1" - vali-date "^1.0.0" - -p-finally@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" - integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== - -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -1626,68 +1344,32 @@ packet-reader@1.0.0: resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parent-require@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977" - integrity sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc= - -parse-duration@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-0.4.4.tgz#11c0f51a689e97d06c57bd772f7fda7dc013243c" - integrity sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse-json@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.1.tgz#7cfe35c1ccd641bce3981467e6c2ece61b3b3878" - integrity sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - lines-and-columns "^1.1.6" +parse-duration@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.2.tgz#b9aa7d3a1363cc7e8845bea8fd3baf8a11df5805" + integrity sha512-Dg27N6mfok+ow1a2rj/nRjtCfaKrHUZV2SJpEn/s8GaVUSlf4GGRCRP1c13Hj+wfPKVMrFDqLMLITkYKgKxyyg== -parse-ms@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" - integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== +parse-ms@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-3.0.0.tgz#3ea24a934913345fcc3656deda72df921da3a70e" + integrity sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw== -parse5-htmlparser2-tree-adapter@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-5.1.1.tgz#e8c743d4e92194d5293ecde2b08be31e67461cbc" - integrity sha512-CF+TKjXqoqyDwHqBhFQ+3l5t83xYi6fVT1tQNg+Ye0JRLnTxWvIroCjEp1A0k4lneHNBGnICUf0cfYVYGEazqw== +parse5-htmlparser2-tree-adapter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== dependencies: - parse5 "^5.1.1" + parse5 "^6.0.1" parse5@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== path-exists@^4.0.0: version "4.0.0" @@ -1697,51 +1379,42 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +peek-readable@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-5.0.0.tgz#7ead2aff25dc40458c60347ea76cfdfd63efdfec" + integrity sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A== -pg-connection-string@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.3.0.tgz#c13fcb84c298d0bfa9ba12b40dd6c23d946f55d6" - integrity sha512-ukMTJXLI7/hZIwTW7hGMZJ0Lj0S2XQBCJ4Shv4y1zgQ/vqVea+FLhzywvPj0ujSuofu+yA4MYHGZPTsgjBgJ+w== +pg-connection-string@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.5.0.tgz#538cadd0f7e603fc09a12590f3b8a452c2c0cf34" + integrity sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ== pg-int8@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-pool@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.2.1.tgz#5f4afc0f58063659aeefa952d36af49fa28b30e0" - integrity sha512-BQDPWUeKenVrMMDN9opfns/kZo4lxmSWhIqo+cSAF7+lfi9ZclQbr9vfnlNaPr8wYF3UYjm5X0yPAhbcgqNOdA== +pg-pool@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.5.2.tgz#ed1bed1fb8d79f1c6fd5fb1c99e990fbf9ddf178" + integrity sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w== -pg-protocol@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.2.5.tgz#28a1492cde11646ff2d2d06bdee42a3ba05f126c" - integrity sha512-1uYCckkuTfzz/FCefvavRywkowa6M5FohNMF5OjKrqo9PSR8gYc8poVmwwYQaBxhmQdBjhtP514eXy9/Us2xKg== +pg-protocol@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.5.0.tgz#b5dd452257314565e2d54ab3c132adc46565a6a0" + integrity sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ== pg-types@^2.1.0: version "2.2.0" @@ -1754,62 +1427,30 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.3.0.tgz#941383300d38eef51ecb88a0188cec441ab64d81" - integrity sha512-jQPKWHWxbI09s/Z9aUvoTbvGgoj98AU7FDCcQ7kdejupn/TcNpx56v2gaOTzXkzOajmOEJEdi9eTh9cA2RVAjQ== +pg@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.8.0.tgz#a77f41f9d9ede7009abfca54667c775a240da686" + integrity sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw== dependencies: buffer-writer "2.0.0" packet-reader "1.0.0" - pg-connection-string "^2.3.0" - pg-pool "^3.2.1" - pg-protocol "^1.2.5" + pg-connection-string "^2.5.0" + pg-pool "^3.5.2" + pg-protocol "^1.5.0" pg-types "^2.1.0" pgpass "1.x" - semver "4.3.2" pgpass@1.x: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.2.tgz#2a7bb41b6065b67907e91da1b07c1847c877b306" - integrity sha1-Knu0G2BltnkH6R2hsHwYR8h3swY= + version "1.0.5" + resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.5.tgz#9b873e4a564bb10fa7a7dbd55312728d422a223d" + integrity sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug== dependencies: - split "^1.0.0" + split2 "^4.1.0" picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== postgres-array@~2.0.0: version "2.0.0" @@ -1819,12 +1460,12 @@ postgres-array@~2.0.0: postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" - integrity sha1-AntTPAqokOJtFy1Hz5zOzFIazTU= + integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== postgres-date@~1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.5.tgz#710b27de5f27d550f6e80b5d34f7ba189213c2ee" - integrity sha512-pdau6GRPERdAYUQwkBnGKxEfPyhVZXG/JiS44iZWiNdSOWE09N2lUgN6yshuq6fVSon4Pm0VMXd1srUUkLe9iA== + version "1.0.7" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== postgres-interval@^1.1.0: version "1.2.0" @@ -1833,34 +1474,39 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -prettier@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +prettier@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== -pretty-ms@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-7.0.0.tgz#45781273110caf35f55cab21a8a9bd403a233dc0" - integrity sha512-J3aPWiC5e9ZeZFuSeBraGxSkGMOvulSWsxDByOcbD1Pr75YL3LSNIKIb52WXbCLE1sS5s4inBBbryjF4Y05Ceg== +pretty-ms@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-8.0.0.tgz#a35563b2a02df01e595538f86d7de54ca23194a3" + integrity sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q== dependencies: - parse-ms "^2.1.0" + parse-ms "^3.0.0" -pretty-quick@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-2.0.1.tgz#417ee605ade98ecc686e72f63b5d28a2c35b43e9" - integrity sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg== +pretty-quick@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.3.tgz#15281108c0ddf446675157ca40240099157b638e" + integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA== dependencies: - chalk "^2.4.2" - execa "^2.1.0" + chalk "^3.0.0" + execa "^4.0.0" find-up "^4.1.0" ignore "^5.1.4" - mri "^1.1.4" + mri "^1.1.5" multimatch "^4.0.0" +proc-log@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" + integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== promise-retry@^2.0.1: version "2.0.1" @@ -1878,29 +1524,21 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== +readable-web-to-node-stream@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb" + integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw== dependencies: - picomatch "^2.2.1" + readable-stream "^3.6.0" readdirp@~3.6.0: version "3.6.0" @@ -1909,52 +1547,29 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - reflect-metadata@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve@^1.0.0, resolve@^1.10.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== +resolve@^1.0.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: - path-parse "^1.0.6" + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== rimraf@^2.6.1: version "2.7.1" @@ -1963,14 +1578,7 @@ rimraf@^2.6.1: dependencies: glob "^7.1.3" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -safe-buffer@^5.0.1: +safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -1985,38 +1593,13 @@ sax@>=0.6.0: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - -"semver@2 || 3 || 4 || 5": - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.2.tgz#c7a07158a80bedd052355b770d82d6640f803be7" - integrity sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c= - -semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@^7.0.0, semver@^7.3.5: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - sha.js@^2.4.11: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -2037,42 +1620,37 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -socks-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" - integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== +socks-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" + integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== dependencies: - agent-base "6" - debug "4" - socks "^2.3.3" + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" -socks@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.0.tgz#6b984928461d39871b3666754b9000ecf39dfac2" - integrity sha512-mNmr9owlinMplev0Wd7UHFlqI4ofnBnNzFuzrm63PPaHgbkqCFe4T5LzwKmtQ/f2tX0NTpcdVLyD/FHxFBstYw== +socks@^2.6.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" + integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== dependencies: - ip "^1.1.5" - smart-buffer "^4.1.0" + ip "^2.0.0" + smart-buffer "^4.2.0" -source-map-support@^0.5.12, source-map-support@^0.5.17: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== +source-map-support@^0.5.12: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -2082,142 +1660,85 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +split2@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.1.0.tgz#101907a24370f85bb782f08adaabe4e281ecf809" + integrity sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ== -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== +ssri@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.0.tgz#1e34554cbbc4728f5290674264e21b64aaf27ca7" + integrity sha512-64ghGOpqW0k+jh7m5jndBGdVEoPikWwGQmBNN5ks6jyUSMymzHDTlnNHOvzp+6MmHOljr2MokUzvRksnTwG0Iw== dependencies: minipass "^3.1.1" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" + strip-ansi "^6.0.1" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: - ansi-regex "^5.0.0" + safe-buffer "~5.2.0" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - is-utf8 "^0.2.0" + ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= - dependencies: - get-stdin "^4.0.1" - strip-json-comments@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== +strtok3@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-7.0.0.tgz#868c428b4ade64a8fd8fee7364256001c1a4cbe5" + integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ== dependencies: - has-flag "^3.0.0" + "@tokenizer/token" "^0.3.0" + peek-readable "^5.0.0" supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -tar@^6.0.2, tar@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" - integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tar@^6.1.11, tar@^6.1.12: + version "6.1.12" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6" + integrity sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -2229,7 +1750,7 @@ tar@^6.0.2, tar@^6.1.0: thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== dependencies: thenify ">= 3.1.0 < 4" @@ -2240,11 +1761,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -through@2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2252,52 +1768,57 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= +token-types@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/token-types/-/token-types-5.0.1.tgz#aa9d9e6b23c420a675e55413b180635b86a093b4" + integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg== + dependencies: + "@tokenizer/token" "^0.3.0" + ieee754 "^1.2.1" tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= - -ts-mixer@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.0.tgz#4e631d3a36e3fa9521b973b132e8353bc7267f9f" - integrity sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ== +ts-mixer@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.2.tgz#3e4e4bb8daffb24435f6980b15204cb5b287e016" + integrity sha512-zvHx3VM83m2WYCE8XL99uaM7mFwYSkjR2OZti98fabHrwkjsCvgwChda5xctein3xGOyaQhtTeDq/1H/GNvF3A== -ts-node-dev@^1.0.0-pre.60: - version "1.0.0-pre.60" - resolved "https://registry.yarnpkg.com/ts-node-dev/-/ts-node-dev-1.0.0-pre.60.tgz#428b051264d9b2b3e58a8a4a02a5d36692436e20" - integrity sha512-S1X/2dMH2cxzFEiOWo5r/DTD0oElKbEpG8lnWoEA1LrwxXMFCJs71vIMaXPu6p8ud3MHMI2Ans3syDQ8mkjEUg== +ts-node-dev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ts-node-dev/-/ts-node-dev-2.0.0.tgz#bdd53e17ab3b5d822ef519928dc6b4a7e0f13065" + integrity sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w== dependencies: - chokidar "^3.4.0" - dateformat "~1.0.4-1.2.3" + chokidar "^3.5.1" dynamic-dedupe "^0.3.0" - minimist "^1.2.5" + minimist "^1.2.6" mkdirp "^1.0.4" resolve "^1.0.0" rimraf "^2.6.1" source-map-support "^0.5.12" tree-kill "^1.2.2" - ts-node "^8.10.2" + ts-node "^10.4.0" tsconfig "^7.0.0" -ts-node@^8.10.2: - version "8.10.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== - dependencies: +ts-node@^10.4.0: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" + v8-compile-cache-lib "^3.0.1" yn "3.1.1" tsconfig@^7.0.0: @@ -2310,103 +1831,81 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - -tslib@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - -type-fest@^1.2.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== +tslib@^2.3.1, tslib@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== -typeorm@^0.2.25: - version "0.2.25" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.25.tgz#1a33513b375b78cc7740d2405202208b918d7dde" - integrity sha512-yzQ995fyDy5wolSLK9cmjUNcmQdixaeEm2TnXB5HN++uKbs9TiR6Y7eYAHpDlAE8s9J1uniDBgytecCZVFergQ== +typeorm@^0.3.10: + version "0.3.10" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.10.tgz#aa2857fd4b078c912ca693b7eee01b6535704458" + integrity sha512-VMKiM84EpJQ+Mz9xDIPqnfplWhyUy1d8ccaKdMY9obifxJOTFnv8GYVyPsGwG8Lk7Nb8MlttHyHWENGAhBA3WA== dependencies: + "@sqltools/formatter" "^1.2.2" app-root-path "^3.0.0" - buffer "^5.1.0" - chalk "^2.4.2" - cli-highlight "^2.0.0" - debug "^4.1.1" - dotenv "^6.2.0" - glob "^7.1.2" - js-yaml "^3.13.1" - mkdirp "^1.0.3" + buffer "^6.0.3" + chalk "^4.1.0" + cli-highlight "^2.1.11" + date-fns "^2.28.0" + debug "^4.3.3" + dotenv "^16.0.0" + glob "^7.2.0" + js-yaml "^4.1.0" + mkdirp "^1.0.4" reflect-metadata "^0.1.13" sha.js "^2.4.11" - tslib "^1.9.0" - xml2js "^0.4.17" - yargonaut "^1.1.2" - yargs "^13.2.1" + tslib "^2.3.1" + uuid "^8.3.2" + xml2js "^0.4.23" + yargs "^17.3.1" -typescript@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +typescript@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" + integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== +undici@^5.11.0, undici@^5.12.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.12.0.tgz#c758ffa704fbcd40d506e4948860ccaf4099f531" + integrity sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg== dependencies: - unique-slug "^2.0.0" + busboy "^1.6.0" -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== dependencies: - imurmurhash "^0.1.4" - -vali-date@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" - integrity sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY= + unique-slug "^4.0.0" -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" + imurmurhash "^0.1.4" -validate-npm-package-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= - dependencies: - builtins "^1.0.3" +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -webidl-conversions@^3.0.0: +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -whatwg-url@^5.0.0: +validate-npm-package-name@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" + integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + builtins "^5.0.0" which@^2.0.1: version "2.0.2" @@ -2415,19 +1914,10 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" @@ -2436,14 +1926,14 @@ wrap-ansi@^6.2.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@^7.5.1: - version "7.5.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" - integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== +ws@^8.9.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== -xml2js@^0.4.17: +xml2js@^0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== @@ -2461,78 +1951,51 @@ xtend@^4.0.0: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - -yargonaut@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/yargonaut/-/yargonaut-1.1.4.tgz#c64f56432c7465271221f53f5cc517890c3d6e0c" - integrity sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA== - dependencies: - chalk "^1.1.1" - figlet "^1.1.1" - parent-require "^1.0.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== +yargs@^16.0.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" -yargs@^13.2.1: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== +yargs@^17.3.1: + version "17.6.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" + integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^15.0.0: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" yn@3.1.1: version "3.1.1" From 571a50354701a693d1672f65c1f26416768a4b83 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 19 Nov 2022 13:55:05 -0700 Subject: [PATCH 2/6] Fix some bugs --- src/bot.ts | 26 +++++++++++++++++++------- src/modules/etc.ts | 2 +- src/modules/playground.ts | 3 +-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 2c91983e..6dbda2d6 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -1,5 +1,5 @@ import { Message, Client, User, GuildMember } from 'discord.js'; -import { prefixes, trustedRoleId } from './env'; +import { botAdmins, prefixes, trustedRoleId } from './env'; export interface CommandRegistration { aliases: string[]; @@ -21,13 +21,21 @@ export class Bot { const content = msg.content .substring(triggerWithPrefix.length + 1) .trim(); - this.getByTrigger( + + const command = this.getByTrigger( triggerWithPrefix.substring(matchingPrefix.length), - ) - ?.listener(msg, content) - .catch(err => { - this.client.emit('error', err); - }); + ); + + if ( + !command || + (this.adminCommands.includes(command) && + !this.isAdmin(msg.author)) + ) { + return; + } + command.listener(msg, content).catch(err => { + this.client.emit('error', err); + }); } }); } @@ -49,6 +57,10 @@ export class Bot { return member?.permissions.has('ManageMessages') ?? false; } + isAdmin(user: User) { + return botAdmins.includes(user.id); + } + getTrustedMemberError(msg: Message) { if (!msg.guild || !msg.member || !msg.channel.isTextBased()) { return ":warning: you can't use that command here."; diff --git a/src/modules/etc.ts b/src/modules/etc.ts index d28553bd..92c3328c 100644 --- a/src/modules/etc.ts +++ b/src/modules/etc.ts @@ -18,7 +18,7 @@ const emojiRegex = /<:\w+?:(\d+?)>|(\p{Emoji_Presentation})/gu; const defaultPollEmojis = ['✅', '❌', '🤷']; export function etcModule(bot: Bot) { - bot.registerAdminCommand({ + bot.registerCommand({ aliases: ['ping'], description: 'See if the bot is alive', async listener(msg) { diff --git a/src/modules/playground.ts b/src/modules/playground.ts index 161515e4..dc5fe805 100644 --- a/src/modules/playground.ts +++ b/src/modules/playground.ts @@ -31,7 +31,7 @@ export async function playgroundModule(bot: Bot) { const editedLongLink = new LimitedSizeMap(1000); bot.registerCommand({ - aliases: ['pg', 'playg', 'playground'], + aliases: ['playground', 'pg', 'playg'], description: 'Shorten a TypeScript playground link', async listener(msg, content) { console.log('Playground', msg.content); @@ -46,7 +46,6 @@ export async function playgroundModule(bot: Bot) { ":warning: couldn't find a codeblock!", ); } - console.log('Code is', code); const embed = new EmbedBuilder() .setURL(PLAYGROUND_BASE + compressToEncodedURIComponent(code)) .setTitle('View in Playground') From 6772d83e5e64f25ab9886994fd747ec33e0e6fab Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 19 Nov 2022 14:00:14 -0700 Subject: [PATCH 3/6] Add prepare for recent husky versions --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b116ebf..90b96709 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "start": "ts-node-dev --respawn src", "build": "tsc", "lint": "prettier --check \"src/**/*.ts\"", - "lint:fix": "prettier \"src/**/*.ts\" --write " + "lint:fix": "prettier \"src/**/*.ts\" --write ", + "prepare": "husky install" } } From ca3aff1d6cd5101368deaee4e863302e35e13d87 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 19 Nov 2022 14:01:07 -0700 Subject: [PATCH 4/6] Pretty --- src/db.ts | 2 +- src/modules/autorole.ts | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/db.ts b/src/db.ts index 6f8e373c..2e5a8154 100644 --- a/src/db.ts +++ b/src/db.ts @@ -29,7 +29,7 @@ export async function getDB() { entities: [Rep, HelpThread, Snippet], ...extraOpts, }); - await db.initialize() + await db.initialize(); console.log('Connected to DB'); return db; } diff --git a/src/modules/autorole.ts b/src/modules/autorole.ts index a762e146..1c45a09b 100644 --- a/src/modules/autorole.ts +++ b/src/modules/autorole.ts @@ -5,24 +5,25 @@ import { autorole, rolesChannelId } from '../env'; export async function autoroleModule({ client }: Bot) { const channel = await client.channels.fetch(rolesChannelId); if (!channel?.isTextBased()) { - console.error(`Roles channel (${rolesChannelId}) does not exist or is not text based.`) + console.error( + `Roles channel (${rolesChannelId}) does not exist or is not text based.`, + ); return; } for (const ar of autorole) { const msg = await channel.messages.fetch(ar.msgID); if (!msg) { - console.error(`Role message does not exist for ${ar.msgID}`) + console.error(`Role message does not exist for ${ar.msgID}`); } - await msg?.react(ar.emoji) + await msg?.react(ar.emoji); } client.channels.fetch(rolesChannelId).then(channel => { - (channel as TextBasedChannel).messages.fetch() - }) + (channel as TextBasedChannel).messages.fetch(); + }); - - client.on("messageReactionAdd", async (reaction, user) => { + client.on('messageReactionAdd', async (reaction, user) => { if (user.id == client.user.id) return; if (reaction.partial) await reaction.fetch(); for (const ar of autorole) { @@ -41,9 +42,9 @@ export async function autoroleModule({ client }: Bot) { await msg.react(reaction.emoji); } } - }) + }); - client.on("messageReactionRemove", async (reaction, user) => { + client.on('messageReactionRemove', async (reaction, user) => { if (user.id == client.user.id) return; if (reaction.partial) await reaction.fetch(); for (const ar of autorole) { @@ -59,5 +60,5 @@ export async function autoroleModule({ client }: Bot) { await member.roles.remove(ar.roleID); console.log('Removed role', ar.roleID, 'from', member); } - }) -} \ No newline at end of file + }); +} From 0025e6105fabf722c316468a006da6d8eeeb3c1f Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 19 Nov 2022 14:30:23 -0700 Subject: [PATCH 5/6] Review comments --- .husky/pre-commit | 4 +++ README.md | 2 +- package.json | 19 +++++------- src/bot.ts | 65 ++++++++++++++++++++++++----------------- src/modules/autorole.ts | 5 ---- src/modules/help.ts | 6 ++-- yarn.lock | 14 ++++----- 7 files changed, 61 insertions(+), 54 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..0443daad --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +pretty-quick --staged diff --git a/README.md b/README.md index 2f9438bb..b7174b7f 100644 --- a/README.md +++ b/README.md @@ -16,5 +16,5 @@ We also have a docker-compose.yml for development, along with a .env.example. ## Thanks! -- [ckie](https://github.com/ckiee) for writing the base for the bot. +- [ckie](https://github.com/ckiee) for writing the base for the bot! - [Python Discord](https://github.com/python-discord) for heavily influencing our help channel system. diff --git a/package.json b/package.json index 90b96709..fbd94eae 100644 --- a/package.json +++ b/package.json @@ -20,23 +20,18 @@ "undici": "^5.12.0" }, "devDependencies": { - "@types/dotenv-safe": "^8.1.2", - "@types/lz-string": "^1.3.34", - "@types/node": "^16", - "@types/npm-registry-fetch": "^8.0.4", - "@types/prettier": "^2.7.1", - "@types/tar": "^6.1.3", - "@types/ws": "^8.5.3", + "@types/dotenv-safe": "8.1.2", + "@types/lz-string": "1.3.34", + "@types/node": "16.18.3", + "@types/npm-registry-fetch": "8.0.4", + "@types/prettier": "2.7.1", + "@types/tar": "6.1.3", + "@types/ws": "8.5.3", "husky": "^8.0.2", "pretty-quick": "^3.1.3", "ts-node-dev": "^2.0.0", "typescript": "^4.9.3" }, - "husky": { - "hooks": { - "pre-commit": "pretty-quick --staged" - } - }, "scripts": { "start": "ts-node-dev --respawn src", "build": "tsc", diff --git a/src/bot.ts b/src/bot.ts index 6dbda2d6..fdcd1abf 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -7,9 +7,15 @@ export interface CommandRegistration { listener: (msg: Message, content: string) => Promise; } +interface Command { + admin: boolean; + aliases: string[]; + description?: string; + listener: (msg: Message, content: string) => Promise; +} + export class Bot { - commands: CommandRegistration[] = []; - adminCommands: CommandRegistration[] = []; + commands = new Map(); constructor(public client: Client) { client.on('messageCreate', msg => { @@ -26,11 +32,7 @@ export class Bot { triggerWithPrefix.substring(matchingPrefix.length), ); - if ( - !command || - (this.adminCommands.includes(command) && - !this.isAdmin(msg.author)) - ) { + if (!command || (command.admin && !this.isAdmin(msg.author))) { return; } command.listener(msg, content).catch(err => { @@ -40,17 +42,28 @@ export class Bot { }); } - registerCommand(command: CommandRegistration) { - this.commands.push(command); + registerCommand(registration: CommandRegistration) { + const command: Command = { + ...registration, + admin: false, + }; + for (const a of command.aliases) { + this.commands.set(a, command); + } } - registerAdminCommand(command: CommandRegistration) { - this.adminCommands.push(command); + registerAdminCommand(registration: CommandRegistration) { + const command: Command = { + ...registration, + admin: true, + }; + for (const a of command.aliases) { + this.commands.set(a, command); + } } - getByTrigger(trigger: string): CommandRegistration | undefined { - const match = (c: CommandRegistration) => c.aliases.includes(trigger); - return this.commands.find(match) || this.adminCommands.find(match); + getByTrigger(trigger: string): Command | undefined { + return this.commands.get(trigger); } isMod(member: GuildMember | null) { @@ -80,18 +93,18 @@ export class Bot { const mentioned = msg.mentions.members?.first()?.user; if (mentioned) return mentioned; - if (query) { - // Search by ID - const queriedUser = await this.client.users - .fetch(query) - .catch(() => undefined); - if (queriedUser) return queriedUser; - - // Search by name, likely a better way to do this... - for (const user of this.client.users.cache.values()) { - if (user.tag === query || user.username === query) { - return user; - } + if (!query) return; + + // Search by ID + const queriedUser = await this.client.users + .fetch(query) + .catch(() => undefined); + if (queriedUser) return queriedUser; + + // Search by name, likely a better way to do this... + for (const user of this.client.users.cache.values()) { + if (user.tag === query || user.username === query) { + return user; } } } diff --git a/src/modules/autorole.ts b/src/modules/autorole.ts index 1c45a09b..dcbc4dc8 100644 --- a/src/modules/autorole.ts +++ b/src/modules/autorole.ts @@ -1,4 +1,3 @@ -import { TextBasedChannel } from 'discord.js'; import { Bot } from '../bot'; import { autorole, rolesChannelId } from '../env'; @@ -19,10 +18,6 @@ export async function autoroleModule({ client }: Bot) { await msg?.react(ar.emoji); } - client.channels.fetch(rolesChannelId).then(channel => { - (channel as TextBasedChannel).messages.fetch(); - }); - client.on('messageReactionAdd', async (reaction, user) => { if (user.id == client.user.id) return; if (reaction.partial) await reaction.fetch(); diff --git a/src/modules/help.ts b/src/modules/help.ts index 89e9aa84..0e9da956 100644 --- a/src/modules/help.ts +++ b/src/modules/help.ts @@ -54,10 +54,10 @@ export function helpModule(bot: Bot) { `Hello ${msg.author.username}! Here is a list of all commands in me! To get detailed description on any specific command, do \`help \``, ); - for (const cat of getCommandCategories(bot.commands)) { + for (const cat of getCommandCategories(bot.commands.values())) { embed.addFields({ name: `**${cat} Commands:**`, - value: getCategoryHelp(cat, bot.commands), + value: getCategoryHelp(cat, bot.commands.values()), }); } @@ -72,7 +72,7 @@ export function helpModule(bot: Bot) { } let cmd: { description?: string; aliases?: string[] } = - bot.commands.find(c => c.aliases.includes(cmdTrigger)) || {}; + bot.getByTrigger(cmdTrigger) || {}; if (!cmd.description && cmdTrigger.includes(':')) { const snippet = await Snippet.findOne({ diff --git a/yarn.lock b/yarn.lock index 2f1dd26a..e625c258 100644 --- a/yarn.lock +++ b/yarn.lock @@ -227,14 +227,14 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@types/dotenv-safe@^8.1.2": +"@types/dotenv-safe@8.1.2": version "8.1.2" resolved "https://registry.yarnpkg.com/@types/dotenv-safe/-/dotenv-safe-8.1.2.tgz#72f126969f445af5654efd3167deabc2cbc6c24e" integrity sha512-R/B/wIMda6lRE2P1H0vwSoJsV78IOkhccE4vIvmKZQNXOIjiU0QyJsUXwSotBxOPZFZ/oOnjCa3+kK5kVJwGyw== dependencies: dotenv "^8.2.0" -"@types/lz-string@^1.3.34": +"@types/lz-string@1.3.34": version "1.3.34" resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.34.tgz#69bfadde419314b4a374bf2c8e58659c035ed0a5" integrity sha512-j6G1e8DULJx3ONf6NdR5JiR2ZY3K3PaaqiEuKYkLQO0Czfi1AzrtjfnfCROyWGeDd5IVMKCwsgSmMip9OWijow== @@ -257,7 +257,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== -"@types/node@^16": +"@types/node@16.18.3": version "16.18.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc" integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg== @@ -267,7 +267,7 @@ resolved "https://registry.yarnpkg.com/@types/npm-package-arg/-/npm-package-arg-6.1.1.tgz#9e2d8adc04d39824a3d9f36f738010a3f7da3c1a" integrity sha512-452/1Kp9IdM/oR10AyqAgZOxUt7eLbm+EMJ194L6oarMYdZNiFIFAOJ7IIr0OrZXTySgfHjJezh2oiyk2kc3ag== -"@types/npm-registry-fetch@^8.0.4": +"@types/npm-registry-fetch@8.0.4": version "8.0.4" resolved "https://registry.yarnpkg.com/@types/npm-registry-fetch/-/npm-registry-fetch-8.0.4.tgz#77b2737cde22314ccda1dfdb9568fd7769e95b90" integrity sha512-R9yEj6+NDmXLpKNS19cIaMyaHfV0aHjy/1qbo8K9jiHyjyaYg0CEmuOV/L0Q91DZDi3SuxlYY+2XYwh9TbB+eQ== @@ -283,7 +283,7 @@ resolved "https://registry.yarnpkg.com/@types/npmlog/-/npmlog-4.1.4.tgz#30eb872153c7ead3e8688c476054ddca004115f6" integrity sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ== -"@types/prettier@^2.7.1": +"@types/prettier@2.7.1": version "2.7.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== @@ -305,7 +305,7 @@ resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== -"@types/tar@^6.1.3": +"@types/tar@6.1.3": version "6.1.3" resolved "https://registry.yarnpkg.com/@types/tar/-/tar-6.1.3.tgz#46a2ce7617950c4852dfd7e9cd41aa8161b9d750" integrity sha512-YzDOr5kdAeqS8dcO6NTTHTMJ44MUCBDoLEIyPtwEn7PssKqUYL49R1iCVJPeiPzPlKi6DbH33eZkpeJ27e4vHg== @@ -313,7 +313,7 @@ "@types/node" "*" minipass "^3.3.5" -"@types/ws@^8.5.3": +"@types/ws@8.5.3", "@types/ws@^8.5.3": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== From 338777c5cfbba72af3bf30ff8663dfdf491cea73 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Mon, 21 Nov 2022 11:09:36 -0700 Subject: [PATCH 6/6] Review comments --- .husky/pre-commit | 2 +- src/log.ts | 2 +- src/modules/help.ts | 2 +- src/modules/helpthread.ts | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 0443daad..0da96d6b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pretty-quick --staged +npx pretty-quick --staged diff --git a/src/log.ts b/src/log.ts index 1e786682..50b5df73 100644 --- a/src/log.ts +++ b/src/log.ts @@ -17,7 +17,6 @@ export async function hookLog(client: Client) { (await client.guilds.fetch()).first()!.id, )!; const channel = (await guild.channels.fetch(logChannelId)) as TextChannel; - console.log('Writing logs to', channel); let curLogText = ''; let timeout: NodeJS.Timeout | null = null; const origLog = console.log; @@ -30,6 +29,7 @@ export async function hookLog(client: Client) { origError(...args); postLog(['[ERROR]', ...args]); }; + console.log('Writing logs to', channel); function argToString(arg: unknown) { if (typeof arg === 'string') return arg; return inspect(arg); diff --git a/src/modules/help.ts b/src/modules/help.ts index 0e9da956..c5ff24a9 100644 --- a/src/modules/help.ts +++ b/src/modules/help.ts @@ -6,7 +6,7 @@ import { sendWithMessageOwnership } from '../util/send'; function getCategoryHelp(cat: string, commands: Iterable) { const out: string[] = []; - for (const cmd of commands) { + for (const cmd of new Set(commands)) { if (!cmd.description) continue; const [cat2, description] = splitCategoryDescription(cmd.description); if (cat !== cat2) continue; diff --git a/src/modules/helpthread.ts b/src/modules/helpthread.ts index db38f2d9..f1de11fe 100644 --- a/src/modules/helpthread.ts +++ b/src/modules/helpthread.ts @@ -390,7 +390,6 @@ export function helpThreadModule(bot: Bot) { bot.registerAdminCommand({ aliases: ['htgh'], async listener(msg) { - if (!bot.isMod(msg.member)) return; if ( msg.channel.id !== howToGetHelpChannel && msg.channel.id !== howToGiveHelpChannel