From 626fa65335f794b2d1aa9f88aa398f77525ba273 Mon Sep 17 00:00:00 2001 From: Zuza Zuber Date: Thu, 27 Oct 2022 19:45:14 +0200 Subject: [PATCH 1/2] remove discord functionality and add an api call --- .env.example | 3 +- package.json | 1 - src/discord.ts | 362 ------------------------------------------------- src/events.ts | 21 ++- src/index.ts | 1 - 5 files changed, 21 insertions(+), 367 deletions(-) delete mode 100644 src/discord.ts diff --git a/.env.example b/.env.example index d625fea..d1a8acf 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,4 @@ -DISCORD_CLIENT_ID= -DISCORD_TOKEN= +DISCORD_BOT_URL= DATABASE_URL= SERVICE_EVENTS= SERVICE_EVENTS_SALT= diff --git a/package.json b/package.json index a991ed8..48f20c1 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "body-parser": "^1.19.0", "connection-string": "^1.0.1", "cors": "^2.8.5", - "discord.js": "^14.3.0", "dotenv": "^10.0.0", "eslint": "^6.7.2", "express": "^4.17.1", diff --git a/src/discord.ts b/src/discord.ts deleted file mode 100644 index 45a2d79..0000000 --- a/src/discord.ts +++ /dev/null @@ -1,362 +0,0 @@ -import { - Client, - GatewayIntentBits, - REST, - Routes, - SlashCommandBuilder, - ActionRowBuilder, - ButtonBuilder, - ButtonStyle, - PermissionsBitField, - EmbedBuilder, - codeBlock, - underscore, - inlineCode -} from 'discord.js'; -import db from './helpers/mysql'; -import removeMd from 'remove-markdown'; -import { shortenAddress } from './helpers/utils'; -import { subs, loadSubscriptions } from './subscriptions'; -import { checkSpace, getProposal } from './helpers/proposal'; - -const CLIENT_ID = process.env.DISCORD_CLIENT_ID || ''; -const token = process.env.DISCORD_TOKEN || ''; -const sweeperOption = { interval: 300, filter: () => null }; -// const invite = 'https://discord.com/oauth2/authorize?client_id=892847850780762122&permissions=534723951680&scope=bot'; - -const client: any = new Client({ - intents: [ - GatewayIntentBits.Guilds, - GatewayIntentBits.Guilds, - GatewayIntentBits.GuildMessages, - GatewayIntentBits.DirectMessages - ], - // Remove cache for every 5 minutes to prevent memory leaks https://discord.js.org/#/docs/discord.js/stable/class/Sweepers?scrollTo=options - sweepers: { - messages: sweeperOption, - reactions: sweeperOption, - users: sweeperOption, - applicationCommands: sweeperOption, - bans: sweeperOption, - emojis: sweeperOption, - invites: sweeperOption, - guildMembers: sweeperOption, - presences: sweeperOption, - stageInstances: sweeperOption, - stickers: sweeperOption, - threadMembers: sweeperOption, - threads: sweeperOption, - voiceStates: sweeperOption - } -}); - -export let ready = false; - -const commands = [ - new SlashCommandBuilder() - .setName('ping') - .setDescription('Make sure the bot is online.') - .setDMPermission(false) - .setDefaultMemberPermissions(0), // only administrator role - new SlashCommandBuilder() - .setName('help') - .setDescription('List all commands and current notifications.') - .setDMPermission(false) - .setDefaultMemberPermissions(0), - new SlashCommandBuilder() - .setName('add') - .setDescription('Add notifications on a channel when a proposal start.') - .setDMPermission(false) - .setDefaultMemberPermissions(0) - .addChannelOption(option => - option - .setName('channel') - .setDescription('Channel to post the events') - .setRequired(true) - ) - .addStringOption(option => - option - .setName('space') - .setDescription('space to subscribe to') - .setRequired(true) - ) - .addStringOption(option => option.setName('mention').setDescription('Mention role')), - new SlashCommandBuilder() - .setName('remove') - .setDescription('Remove notifications on a channel.') - .setDMPermission(false) - .setDefaultMemberPermissions(0) - .addChannelOption(option => - option - .setName('channel') - .setDescription('Channel to post the events') - .setRequired(true) - ) - .addStringOption(option => - option - .setName('space') - .setDescription('space to subscribe to') - .setRequired(true) - ) -]; - -const rest = new REST({ version: '10' }).setToken(token); - -(async () => { - try { - console.log('Started refreshing application (/) commands.'); - await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); - console.log('Successfully reloaded application (/) commands.'); - } catch (error) { - console.error(error); - } -})(); - -client.login(token); - -export const setActivity = (message, url?) => { - try { - client.user.setActivity(message, { type: 'WATCHING', url }); - return true; - } catch (e) { - console.log('Missing activity', e); - } -}; - -const checkPermissions = async (channelId, botId) => { - try { - const discordChannel = await client.channels.fetch(channelId); - if (!discordChannel.isTextBased()) return 'Channel is not text'; - if (!discordChannel.permissionsFor(botId).has(PermissionsBitField.Flags.ViewChannel)) - return `I do not have permission to view this channel ${discordChannel.toString()}, Add me to the channel and try again`; - if (!discordChannel.permissionsFor(botId).has(PermissionsBitField.Flags.SendMessages)) - return `I do not have permission to send messages in this channel ${discordChannel.toString()}, Add permission and try again`; - return true; - } catch (error) { - console.log('Error checking permissions', error); - const channelExistWithName = client.channels.cache.find(c => c.name === channelId); - if (channelExistWithName) { - return `Make sure the channel is in ${channelExistWithName.toString()} format.`; - } else { - return `Can't find the channel ${channelId}, please try again.`; - } - } -}; - -client.on('ready', async () => { - ready = true; - console.log(`Discord bot logged as "${client.user.tag}"`); - setActivity('!'); - await loadSubscriptions(); -}); - -async function snapshotHelpCommandHandler(interaction) { - const subscriptions = await db.queryAsync( - 'SELECT * FROM subscriptions WHERE guild = ?', - interaction.guildId - ); - let subscriptionsDescription = `\n\n**Subscriptions (${subscriptions.length})**\n\n`; - if (subscriptions.length > 0) { - subscriptions.forEach(subscription => { - subscriptionsDescription += `<#${subscription.channel}> ${subscription.space}\n`; - }); - } else { - subscriptionsDescription += 'No subscriptions\n'; - } - subscriptionsDescription += `\n**Commands**`; - const addSubscriptionExample = codeBlock( - `/add channel:#snapshot space:yam.eth mention:@everyone` - ); - - const removeSubscriptionExample = codeBlock(`/remove channel:#snapshot space:yam.eth`); - - const embed = new EmbedBuilder() - .setColor(0x0099ff) - .setTitle(underscore('Snapshot bot')) - .setDescription(subscriptionsDescription || ' ') - .setThumbnail('https://github.com/snapshot-labs/brand/blob/master/icon/icon.png?raw=true') - .addFields( - { name: '`/ping`', value: 'Description: Make sure the bot is online.' }, - { - name: '`/help`', - value: 'Description: List all commands and current notifications.' - }, - { - name: '`/add`', - value: `Description: Add notifications on a channel when a proposal start. - Options: - *channel*: Channel to post the events - *space*: Space id to subscribe to - *mention*: Mention role (optional) - Example: - ${addSubscriptionExample}` - }, - { - name: '`/remove`', - value: `Description: Remove notifications on a channel. - Options: - *channel*: Channel to post the events - *space*: Space id to subscribe to - Example: - ${removeSubscriptionExample} - - - Have any questions? Join our discord: https://discord.snapshot.org` - } - ); - interaction.reply({ embeds: [embed], ephemeral: true }).catch(console.error); -} - -async function snapshotCommandHandler(interaction, commandType) { - const ts = parseInt((Date.now() / 1e3).toFixed()); - const { id: channelId } = interaction.options.getChannel('channel'); - const space = interaction.options.getString('space'); - const mention = interaction.options.getString('mention'); - console.log( - 'Received', - interaction.guildId, - interaction.user.username, - ':', - commandType, - channelId, - space, - mention - ); - if (commandType === 'add') { - const permissions = await checkPermissions(channelId, CLIENT_ID); - if (permissions !== true) return interaction.reply(permissions).catch(console.error); - - const spaceExist = await checkSpace(space); - if (!spaceExist) return interaction.reply(`Space not found: ${inlineCode(space)}`); - - const subscription = [interaction.guildId, channelId, space, mention || '', ts]; - await db.queryAsync( - `INSERT INTO subscriptions (guild, channel, space, mention, created) VALUES (?, ?, ?, ?, ?) - ON DUPLICATE KEY UPDATE guild = ?, channel = ?, space = ?, mention = ?, updated = ?`, - [...subscription, ...subscription] - ); - await loadSubscriptions(); - const color = '#21B66F'; - const embed = new EmbedBuilder() - .setColor(color) - .addFields( - { name: 'Space', value: space, inline: true }, - { name: 'Channel', value: `<#${channelId}>`, inline: true }, - { name: 'Mention', value: mention || 'None', inline: true } - ) - .setDescription('You have successfully subscribed to space events.'); - interaction.reply({ embeds: [embed], ephemeral: true }).catch(console.error); - } else if (commandType === 'remove') { - const query = `DELETE FROM subscriptions WHERE guild = ? AND channel = ? AND space = ?`; - await db.queryAsync(query, [interaction.guildId, channelId, space]); - await loadSubscriptions(); - const color = '#EE4145'; - const embed = new EmbedBuilder() - .setColor(color) - .addFields( - { name: 'Space', value: space, inline: true }, - { name: 'Channel', value: `<#${channelId}>`, inline: true } - ) - .setDescription('You have successfully unsubscribed to space events.'); - interaction.reply({ embeds: [embed], ephemeral: true }).catch(console.error); - } -} - -client.on('interactionCreate', async interaction => { - if (!interaction.isChatInputCommand()) return; - - if (interaction.commandName === 'ping') { - await interaction.reply({ - content: `Pong! Websocket heartbeat: ${client.ws.ping}ms.`, - ephemeral: true - }); - } else if (interaction.commandName === 'help') { - snapshotHelpCommandHandler(interaction); - } else if (interaction.commandName === 'add') { - snapshotCommandHandler(interaction, 'add'); - } else if (interaction.commandName === 'remove') { - snapshotCommandHandler(interaction, 'remove'); - } -}); - -export const sendMessage = async (channel, message) => { - try { - let speaker = client.channels.cache.get(channel); - // Obtains a channel from Discord, or the channel cache if it's already available. - if (!speaker) speaker = await client.channels.fetch(channel); - await speaker.send(message); - return true; - } catch (e) { - console.log('Discord error:', e); - } -}; - -export const sendEventToDiscordSubscribers = async (event, proposalId) => { - // Only supports proposal/start event - if (event !== 'proposal/start') { - console.log('[sendEventToDiscordSubscribers] Event not supported: ', event); - return; - } - - const proposal = await getProposal(proposalId); - if (!proposal) { - console.log('[sendEventToDiscordSubscribers] Proposal not found: ', proposalId); - return; - } - - const status = 'Active'; - const color = '#21B66F'; - - const url = `https://snapshot.org/#/${proposal.space.id}/proposal/${proposal.id}`; - let components = - !proposal.choices.length || proposal.choices.length > 5 - ? [] - : [ - new ActionRowBuilder().addComponents( - ...proposal.choices.map((choice, i) => - new ButtonBuilder() - .setLabel(choice) - .setURL(`${url}?choice=${i + 1}`) - .setStyle(ButtonStyle.Link) - ) - ) - ]; - components = - event === 'proposal/start' && (proposal.type === 'single-choice' || proposal.type === 'basic') - ? components - : []; - - const limit = 4096 / 16; - let preview = removeMd(proposal.body).slice(0, limit); - if (proposal.body.length > limit) preview += `... [Read more](${url})`; - const avatar = `https://cdn.stamp.fyi/space/${proposal.space.id}?s=56`; - - const embed = new EmbedBuilder() - .setColor(color) - .setTitle(proposal.title) - .setURL(url) - .setTimestamp(proposal.created * 1e3) - .setAuthor({ - name: `${proposal.space.name} by ${shortenAddress(proposal.author)}`, - iconURL: avatar - }) - .addFields( - { name: 'Status', value: status, inline: true }, - { name: 'Start', value: ``, inline: true }, - { name: 'End', value: ``, inline: true } - ) - .setDescription(preview || ' '); - - if (subs[proposal.space.id] || subs['*']) { - [...(subs['*'] || []), ...(subs[proposal.space.id] || [])].forEach(sub => { - sendMessage(sub.channel, { - content: `${sub.mention} `, - embeds: [embed], - components - }); - }); - } - return { success: true }; -}; - -export default client; diff --git a/src/events.ts b/src/events.ts index 33fb1d4..1aee3ec 100644 --- a/src/events.ts +++ b/src/events.ts @@ -1,6 +1,5 @@ import fetch from 'cross-fetch'; import snapshot from '@snapshot-labs/snapshot.js'; -import { sendEventToDiscordSubscribers } from './discord'; import { sendPushNotification } from './helpers/beams'; import db from './helpers/mysql'; import { sha256 } from './helpers/utils'; @@ -11,6 +10,7 @@ const interval = 15; const serviceEvents = parseInt(process.env.SERVICE_EVENTS || '0'); const serviceEventsSalt = parseInt(process.env.SERVICE_EVENTS_SALT || '12345'); const servicePushNotifications = parseInt(process.env.SERVICE_PUSH_NOTIFICATIONS || '0'); +const discordBotUrl = process.env.DISCORD_BOT_URL || 'http://localhost:3000'; export const handleCreatedEvent = async event => { const { space, id } = event; @@ -80,6 +80,25 @@ export async function sendEvent(event, to) { } } +async function sendEventToDiscordSubscribers(event: string, proposalId: string) { + try { + const url = `${discordBotUrl}/api/event-to-subscribers`; + const params = { + event, + proposalId + }; + await fetch(url, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ params }) + }); + + return console.log('[events] Notify Discord subscribers success'); + } catch (error) { + console.log("[events] Discord API Failure", error); + } +} + const sendEventToWebhookSubscribers = (event, subscribers) => { Promise.allSettled( subscribers diff --git a/src/index.ts b/src/index.ts index 8dedd84..34a19d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,6 @@ import bodyParser from 'body-parser'; import cors from 'cors'; import api from './api'; import './replay'; -import './discord'; const app = express(); const PORT = process.env.PORT || 3000; From 5e0f66ccd33f40ca079b27d88b8137ec47beb9dd Mon Sep 17 00:00:00 2001 From: Zuza Zuber Date: Thu, 27 Oct 2022 19:47:40 +0200 Subject: [PATCH 2/2] cleanup dependencies --- yarn.lock | 175 +----------------------------------------------------- 1 file changed, 3 insertions(+), 172 deletions(-) diff --git a/yarn.lock b/yarn.lock index e83c55a..4881b2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30,35 +30,6 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@discordjs/builders@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-1.2.0.tgz#4f5059e258c30a26931ae384985ef8c6b371ba05" - integrity sha512-ARy4BUTMU+S0ZI6605NDqfWO+qZqV2d/xfY32z3hVSsd9IaAKJBZ1ILTZLy87oIjW8+gUpQmk9Kt0ZP9bmmd8Q== - dependencies: - "@sapphire/shapeshift" "^3.5.1" - discord-api-types "^0.37.3" - fast-deep-equal "^3.1.3" - ts-mixer "^6.0.1" - tslib "^2.4.0" - -"@discordjs/collection@^1.0.1", "@discordjs/collection@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-1.1.0.tgz#5f9f926404fd48ccde86a0d2268f202cbec77833" - integrity sha512-PQ2Bv6pnT7aGPCKWbvvNRww5tYCGpggIQVgpuF9TdDPeR6n6vQYxezXiLVOS9z2B62Dp4c+qepQ15SgJbLYtCQ== - -"@discordjs/rest@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@discordjs/rest/-/rest-1.1.0.tgz#5c283571a22b911ca334316245487af40baffe8b" - integrity sha512-yCrthRTQeUyNThQEpCk7bvQJlwQmz6kU0tf3dcWBv2WX3Bncl41x7Wc+v5b5OsIxfNYq38PvVtWircu9jtYZug== - dependencies: - "@discordjs/collection" "^1.0.1" - "@sapphire/async-queue" "^1.5.0" - "@sapphire/snowflake" "^3.2.2" - discord-api-types "^0.37.3" - file-type "^17.1.6" - tslib "^2.4.0" - undici "^5.9.1" - "@ensdomains/eth-ens-namehash@^2.0.15": version "2.0.15" resolved "https://registry.yarnpkg.com/@ensdomains/eth-ens-namehash/-/eth-ens-namehash-2.0.15.tgz#5e5f2f24ba802aff8bc19edd822c9a11200cdf4a" @@ -408,24 +379,6 @@ dependencies: jsonwebtoken "^8.4.0" -"@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== - -"@sapphire/shapeshift@^3.5.1": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@sapphire/shapeshift/-/shapeshift-3.6.0.tgz#988ff6576162a581a29bc26deb5492f7d1bf419f" - integrity sha512-tu2WLRdo5wotHRvsCkspg3qMiP6ETC3Q1dns1Q5V6zKUki+1itq6AbhMwohF9ZcLoYqg+Y8LkgRRtVxxTQVTBQ== - dependencies: - fast-deep-equal "^3.1.3" - lodash.uniqwith "^4.5.0" - -"@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== - "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -456,11 +409,6 @@ dependencies: defer-to-connect "^1.0.1" -"@tokenizer/token@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" - integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== - "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -558,13 +506,6 @@ "@types/mime" "^1" "@types/node" "*" -"@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-eslint/eslint-plugin@^2.33.0": version "2.34.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz#6f8ce8a46c7dea4a6f1d171d2bb8fbae6dac2be9" @@ -1092,28 +1033,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -discord-api-types@^0.37.3: - version "0.37.8" - resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.37.8.tgz#715e437898e136670c8e507c08957e70afa2fed3" - integrity sha512-uhol9KQ2moExZItMpuDMkf0R7sqqNHqcJBFN7S5iSdXBVCMRO7sC0GoyuRrv6ZDBYxoFU6nDy4dv0nld/aysqA== - -discord.js@^14.3.0: - version "14.3.0" - resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.3.0.tgz#9e43df7e4d2d14b11f3de751236e983159c3d3d0" - integrity sha512-CpIwoAAuELiHSgVKRMzsCADS6ZlJwAZ9RlvcJYdEgS00aW36dSvXyBgE+S3pigkc7G+jU6BEalMUWIJFveqrBQ== - dependencies: - "@discordjs/builders" "^1.2.0" - "@discordjs/collection" "^1.1.0" - "@discordjs/rest" "^1.1.0" - "@sapphire/snowflake" "^3.2.2" - "@types/ws" "^8.5.3" - discord-api-types "^0.37.3" - fast-deep-equal "^3.1.3" - lodash.snakecase "^4.1.1" - tslib "^2.4.0" - undici "^5.9.1" - ws "^8.8.1" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1370,7 +1289,7 @@ external-editor@^3.0.3: iconv-lite "^0.4.24" tmp "^0.0.33" -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: +fast-deep-equal@^3.1.1: 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== @@ -1404,15 +1323,6 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-type@^17.1.6: - version "17.1.6" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-17.1.6.tgz#18669e0577a4849ef6e73a41f8bdf1ab5ae21023" - integrity sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw== - dependencies: - readable-web-to-node-stream "^3.0.2" - strtok3 "^7.0.0-alpha.9" - token-types "^5.0.0-alpha.2" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1607,11 +1517,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -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-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -1919,16 +1824,6 @@ lodash.set@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= -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== - -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== - lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -2207,11 +2102,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -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== - picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -2325,22 +2215,6 @@ readable-stream@2.3.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -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: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -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: - readable-stream "^3.6.0" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -2426,7 +2300,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@~5.2.0: +safe-buffer@^5.0.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -2567,13 +2441,6 @@ string-width@^4.2.2: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -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: - safe-buffer "~5.2.0" - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -2612,14 +2479,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strtok3@^7.0.0-alpha.9: - version "7.0.0" - resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-7.0.0.tgz#868c428b4ade64a8fd8fee7364256001c1a4cbe5" - integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ== - dependencies: - "@tokenizer/token" "^0.3.0" - peek-readable "^5.0.0" - supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -2678,14 +2537,6 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -token-types@^5.0.0-alpha.2: - 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" - touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -2693,11 +2544,6 @@ touch@^3.1.0: dependencies: nopt "~1.0.10" -ts-mixer@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.1.tgz#7c2627fb98047eb5f3c7f2fee39d1521d18fe87a" - integrity sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg== - ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -2722,11 +2568,6 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - tsutils@^3.17.1: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -2781,11 +2622,6 @@ undefsafe@^2.0.5: resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== -undici@^5.9.1: - version "5.10.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.10.0.tgz#dd9391087a90ccfbd007568db458674232ebf014" - integrity sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g== - unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -2832,7 +2668,7 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -2912,11 +2748,6 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@^8.8.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" - integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== - xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"