Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit eb1a044ba8e7d04a912808d1a0d86b28a180f60f
parent 8e26706fbdeb2eaeae03179f744ed23cb2454aad
Author: knutsen <samuel@knutsen.co>
Date:   Fri, 28 May 2021 17:54:37 +0100

Switch to using discord.js master branch 🤪.

Diffstat:
MDockerfile | 7+++++--
Mbuild.sh | 2+-
Mlib/action.ts | 6+++---
Mlib/commands/cron.ts | 4++--
Mlib/commands/set.ts | 2+-
Mlib/default.ts | 4++++
Mlib/drug-o-matic/package.json | 2+-
Mlib/extensions.ts | 1+
Mlib/main.ts | 68++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Mpackage.json | 22++++++++++++++--------
Mtsconfig.json | 2+-
Myarn.lock | 129++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
12 files changed, 172 insertions(+), 77 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -1,7 +1,9 @@ FROM node:14-alpine # Dependencies -RUN apk add --update nodejs git ffmpeg espeak yarn python3 +RUN apk add --update curl alpine-sdk bash libtool autoconf automake libsodium g++ +RUN apk add nodejs git ffmpeg espeak yarn python3 +RUN npm install -g node-gyp@latest # Prepare /app RUN mkdir /app @@ -18,6 +20,7 @@ COPY heart.png generate_secrets.sh HELP.md lib \ # Install deps COPY lib/drug-o-matic /app/lib/drug-o-matic RUN yarn install + # Build RUN cp /app/bot.json /app/generate_secrets.sh /app/HELP.md /app/package.json /app/build/ RUN /app/node_modules/.bin/tsc -b /app/tsconfig.json @@ -26,4 +29,4 @@ RUN /app/node_modules/.bin/tsc -b /app/tsconfig.json ENTRYPOINT ["sh", "-c", "source /app/.env && \"$@\"", "-s"] # Kill with `docker stop` for a graceful shutdown (saving configs, etc.) # or use `docker kill` to not follow the bot's shutdown procedur. -CMD ["node", "."] +CMD ["node", ".", "--unhandled-rejections=none"] diff --git a/build.sh b/build.sh @@ -11,7 +11,7 @@ echo "${bold}Copying config files...${reset}" cp ./bot.json ./generate_secrets.sh ./HELP.md ./package.json ./build echo "${bold}Compiling TypeScript...${reset}" -./node_modules/.bin/tsc -b ./tsconfig.json +./node_modules/.bin/tsc # -b ./tsconfig.json [ -f "./.env" ] && . ./.env diff --git a/lib/action.ts b/lib/action.ts @@ -148,7 +148,7 @@ const ACTIONS: Record<ActionType, Actions> = { "https://img2.gelbooru.com/images/7c/9c/7c9cdd15e03df0a2ba06b9bb9aa98180.png", ], transitiveness: true - }, + }, purr: { title: "You are being purred at!", message: "purred at", @@ -158,7 +158,7 @@ const ACTIONS: Record<ActionType, Actions> = { "https://cdn.discordapp.com/attachments/768154669037125712/773217347884417024/giphy_2.gif" ], transitiveness: true - } + } }; export default class Action { @@ -178,7 +178,7 @@ export default class Action { static get(action: ActionType, message: Message): MessageEmbed { const [author, to] = [message.author, message.mentions.users.first()] - .map(m => message.guild.member(m)) + .map(m => message.guild.members.resolve(m)) .map(u => u.displayName); const reaction: Actions = ACTIONS[action]; const images = reaction.images; diff --git a/lib/commands/cron.ts b/lib/commands/cron.ts @@ -179,9 +179,9 @@ export class Timer { // `on_message` does important expansions. this.homescope.main.on_message( - this.homescope.message, + [this.homescope.message], this.homescope.CLIENT, - true + null, true ); } diff --git a/lib/commands/set.ts b/lib/commands/set.ts @@ -17,7 +17,7 @@ export default (homescope: HomeScope) => { message.channel.send(`Assignment successful. \`${args[0].trim()} = ${normal}\``.squeeze()); } catch (e) { - message.channel.send(`Invalid object access-path,` + message.channel.send(`Invalid object access-path or JSON value,` + `nothing set.\nProblem: \`\`\`\n${e}\n\`\`\``); } }; diff --git a/lib/default.ts b/lib/default.ts @@ -29,6 +29,7 @@ const DEFAULT_GUILD_CONFIG : Types.Config = { prefix: '!', max_history: 40, not_understood: "Command not understood...", + bot_issued: false, aliases: { 'img': 'image', 'i': 'image', @@ -68,8 +69,11 @@ const DEFAULT_GUILD_CONFIG : Types.Config = { 'whatis': 'code', 'which': 'code', 'save': 'export', + 'reload': 'refresh', 'trans': 'translate', + 'tr': 'translate', 'cuddle': 'hug', + 'abb': 'abbreviate', 'abbr': 'abbreviate', 'abbrev': 'abbreviate', 't2s': 'tts', diff --git a/lib/drug-o-matic/package.json b/lib/drug-o-matic/package.json @@ -9,7 +9,7 @@ "dependencies": { "bufferutil": "^4.0.0", "forever": "^0.15.3", - "discord.js": "^12.4.1", + "discord.js": "discordjs/discord.js#master", "dotenv": "^5.0.1", "request": "^2.88.0", "request-promise": "^4.2.4" diff --git a/lib/extensions.ts b/lib/extensions.ts @@ -77,6 +77,7 @@ declare global { prefix: string, max_history: number, not_understood: string, + bot_issued: boolean, aliases: { [key: string]: string }, } rules: { diff --git a/lib/main.ts b/lib/main.ts @@ -2,13 +2,15 @@ process.stdin.resume(); // Discord Bot API. -import { Discord, On, Client } from '@typeit/discord'; import { Message, MessageAttachment, MessageEmbed, VoiceConnection, StreamDispatcher, - TextChannel } from 'discord.js'; + TextChannel, + Guild, + Intents } from 'discord.js'; +import { Discord, On, Client, ArgsOf } from '@typeit/discord'; // System interaction modules. import { @@ -30,7 +32,6 @@ import DEFAULT_GUILD_CONFIG from './default'; // API specific modules. import * as JSONBlob from './api/jsonblob'; -import { Guild } from 'discord.js'; import { Timer } from './commands/cron'; // Global instance variables @@ -94,6 +95,8 @@ const FAREWELL_MESSAGES = [ "Bye USER_TAG, we won't miss you." ]; +const MAX_ALIAS_DEPTH = 100; + // Log where __dirname and cwd are for deployment. console.log('File/Execution locations:', { '__dirname': __dirname, @@ -120,8 +123,8 @@ Drugs.load(() => { console.log('`drug` command system loaded.'); }); -@Discord -export class SimpOMatic { +@Discord() +export abstract class SimpOMatic { private static _CLIENT : Client; private _COMMAND_HISTORY : Message[] = []; @@ -142,11 +145,20 @@ export class SimpOMatic { } static start() { - const client = this._CLIENT = new Client(); - const logged_in = client.login( - SECRETS.api.token, - `${__dirname}/*Discord.ts` - ); + const client = this._CLIENT = new Client({ + intents: [ + Intents.FLAGS.GUILDS, + Intents.FLAGS.GUILD_MESSAGES, + Intents.FLAGS.GUILD_VOICE_STATES, + Intents.FLAGS.GUILD_EMOJIS, + Intents.FLAGS.DIRECT_MESSAGE_REACTIONS, + Intents.FLAGS.DIRECT_MESSAGES, + Intents.FLAGS.DIRECT_MESSAGE_TYPING, + Intents.FLAGS.GUILD_PRESENCES, + Intents.FLAGS.GUILD_MEMBERS + ], + }); + const logged_in = client.login(SECRETS.api.token); logged_in.then(() => console.log('Bot logged in.')); client.on('ready', () => this.events()); @@ -292,13 +304,13 @@ export class SimpOMatic { while (expanded !== operator) { operator = expanded; expanded = expander(operator); - if (i > 300) return 'CYCLIC_ALIAS'; + if (i > MAX_ALIAS_DEPTH) return 'CYCLIC_ALIAS'; ++i; } return expanded.toLowerCase(); } - process_command(message : Message, ignore_spam: boolean = false) { + process_command(message : Message, ignoreSpam: boolean = false) { console.log('[command] Processing.'); const CONFIG = GLOBAL_CONFIG.guilds[message.guild.id]; @@ -318,7 +330,7 @@ export class SimpOMatic { } const current_command = this._COMMAND_HISTORY.last(); - if (!ignore_spam) { + if (!ignoreSpam) { // Try and slow the fellas down a little. if (!!last_command && last_command.channel === current_command.channel @@ -348,11 +360,12 @@ Would you like to slow down a little?`.squeeze()); let operator = words[0].toLowerCase(); // Expansion of aliases will expand aliases used within - // the alias definition too. Yay. + // the alias definition too. Yay. operator = this.expand_alias(operator, args, message); if (operator === 'CYCLIC_ALIAS') { message.reply('The command you just used has aliases that go' - + ' 300 levels deep, or the alias is cyclically dependant.' + + ` ${MAX_ALIAS_DEPTH} levels deep, ` + + 'or the alias is cyclically/recursively defined.' + '\n**Fix this immediately.**'); console.log('[command] Aliases cyclic. Aborting.'); return; @@ -483,7 +496,7 @@ Would you like to slow down a little?`.squeeze()); const p = CONFIG.commands.prefix; message.content = `${p}${response}`; // Send it back as a command. - this.on_message(message, SimpOMatic._CLIENT); + this.on_message([message], SimpOMatic._CLIENT); } } for (const rejecter of CONFIG.rules.reject) { @@ -582,7 +595,14 @@ Would you like to slow down a little?`.squeeze()); } @On("message") - async on_message(message : Message, client : Client, ignore_spam=false) { + async on_message([message]: ArgsOf<'message'>, + client : Client, guardPayload: any = null, + ignoreSpam = false) { + if (!message.guild) { + console.warn("Message not in a guild channel."); + console.log(message); + return; + } const guild_id = message.guild.id; // Initialise completely new Guilds. @@ -615,7 +635,16 @@ Would you like to slow down a little?`.squeeze()); if (message.content[0] === CONFIG.commands.prefix) { console.log('Message type: command.'); - this.process_command(message, ignore_spam); + if (message.author.bot && !CONFIG.commands.bot_issued) { + message.reply("**I am dubious about letting other bots " + + "isssue commands.**\n " + + "Say `" + CONFIG.commands.prefix + + "set commands.bot_issued true`, " + + "if you want other bots to be able to " + + "issue commands."); + return; + } + this.process_command(message, ignoreSpam); } else { console.log('Message type: generic.'); this.process_generic(message); @@ -632,10 +661,12 @@ Would you like to slow down a little?`.squeeze()); let CLIENT: Client = null; let term_count = 0; +let shutdown_saved = false; function on_termination(error_type, e?: Error) { if (term_count > 15) return; term_count += 1; + if (shutdown_saved) return; // Back-up the resultant CONFIG to an external file. console.warn(`Received ${error_type}, shutting down.`); if (e) console.warn(e); @@ -654,6 +685,7 @@ function on_termination(error_type, e?: Error) { .then(_ => { console.log('Finished JSONBlob update.'); system_message(CLIENT, `Current configuration saved.`); + shutdown_saved = true; }).catch(e => { console.warn('JSONBlob not saved!', e); system_message(CLIENT, `Could not export configuration.\n${e}`); diff --git a/package.json b/package.json @@ -13,15 +13,15 @@ "author": "Sammy, Danny, Bruno, Accelarion, jack-javana and friends", "version": "1.2.0", "engines": { - "node": "14.x", - "yarn": "1.22.x" + "node": ">=14.0.0", + "yarn": ">=1.22.0" }, "main": "./build/main.js", "types": "./build/main.d.ts", "scripts": { "build": "node -v && . ./build.sh", "reset": "rm -rf ./build ./node_modules ./yarn.lock ./packages-lock.json", - "start": "node .", + "start": "node . --unhandled-rejections=none", "quick": ". ./build.sh && yarn run start", "deploy-scale": "heroku scale web=0 worker=1 -a simp-o-matic", "deploy-restart": "heroku restart -a simp-o-matic", @@ -36,16 +36,18 @@ "url": "https://github.com/Demonstrandum/simpomatic/issues" }, "dependencies": { - "DoseBot-Redux": "file:./lib/drug-o-matic", "@discordjs/opus": "^0.3.3", - "@typeit/discord": "^1.0.3", + "@typeit/discord": "^5.0.0", "@types/node": "^13.9.3", "@types/node-fetch": "^2.5.5", "@types/nodegit": "^0.26.3", "@types/ws": "^7.2.2", + "DoseBot-Redux": "file:./lib/drug-o-matic", "cowsay": "^1.4.0", "deepcopy": "^2.0.0", - "discord.js": "12.5.3", + "discord-api-types": "discordjs/discord-api-types#main", + "discord.js": "discordjs/discord.js#master", + "erlpack": "discord/erlpack", "figlet": "^1.3.0", "figlet-cli": "^0.1.1", "fortune-teller": "^0.1.2", @@ -56,11 +58,15 @@ "node-fetch": "^2.6.1", "node-forge": "^0.10.0", "nodegit": "^0.27.0", + "reflect-metadata": "^0.1.13", "request": "^2.34", + "sodium": "^3.0.2", "tslib": "^1.11.1", - "typescript": "^3.8.3", + "typescript": "^4.2.4", "tz-lookup": "^6.0.0", - "unirest": "^0.6.0" + "unirest": "^0.6.0", + "utf-8-validate": "^5.0.5", + "zlib-sync": "^0.1.7" }, "devDependencies": { "tslint": "^6.1.0" diff --git a/tsconfig.json b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ "lib": [ /* Specify library files to be included in the compilation. */ "es2019", diff --git a/yarn.lock b/yarn.lock @@ -358,6 +358,11 @@ "@babel/runtime" "^7.7.2" regenerator-runtime "^0.13.3" +"@sapphire/async-queue@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.2.tgz#df44c9ece32d0a04b9b52f87d65ddf0135254176" + integrity sha512-NkR7AzC9uyb++tMIZgG4X0ci8JM1rnvNmKbLwY42RgotRV8JGUntZ7ZpR7MN7p5zPlVdKo/YmOqcCCsBJ6LNuw== + "@sindresorhus/is@^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-2.1.1.tgz#ceff6a28a5b4867c2dd4a1ba513de278ccbe8bb1" @@ -370,12 +375,14 @@ dependencies: defer-to-connect "^2.0.0" -"@typeit/discord@^1.0.3": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@typeit/discord/-/discord-1.0.12.tgz#cf60ec626df6979fab75e9a96979c85808557681" - integrity sha512-CP5/GS+xD3Tzl4XPFOIlBBHJahSSb+RNOKLwUiltJv5hK2kIwZsfNh6Fv+Xo8/3lIE0tuPbOdOOUJ/T0V+/d7Q== +"@typeit/discord@^5.0.0": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@typeit/discord/-/discord-5.0.10.tgz#15b32a1c37c949bebd26d1a05f70e8b2403cd752" + integrity sha512-sUSI1FqgEkOe9CrTQJUjsxAOfAQiEG/3KGZEnMIdWXGlNXOQI/CYARplirQNdwsDx/Ce/39n0I1Ybxf7nA7Y2g== dependencies: - glob "^7.1.4" + discord-api-types "^0.18.1" + discord.js "github:discordjs/discord.js" + glob "^7.1.7" "@types/cacheable-request@^6.0.1": version "6.0.1" @@ -442,7 +449,7 @@ version "0.0.1" dependencies: bufferutil "^4.0.0" - discord.js "^12.4.1" + discord.js discordjs/discord.js#master dotenv "^5.0.1" forever "^0.15.3" request "^2.88.0" @@ -1187,33 +1194,40 @@ director@1.2.7: resolved "https://registry.yarnpkg.com/director/-/director-1.2.7.tgz#bfd3741075fd7fb1a5b2e13658c5f4bec77736f3" integrity sha1-v9N0EHX9f7GlsuE2WMX0vsd3NvM= -discord.js@12.5.3: - version "12.5.3" - resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-12.5.3.tgz#56820d473c24320871df9ea0bbc6b462f21cf85c" - integrity sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw== +discord-api-types@^0.18.1: + version "0.18.1" + resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.18.1.tgz#5d08ed1263236be9c21a22065d0e6b51f790f492" + integrity sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg== + +discord-api-types@discordjs/discord-api-types#main: + version "0.18.1" + resolved "https://codeload.github.com/discordjs/discord-api-types/tar.gz/7b47fc96809aed2b28e15064f308651b08a5b74d" + +discord.js@discordjs/discord.js#master: + version "13.0.0-dev" + resolved "https://codeload.github.com/discordjs/discord.js/tar.gz/c89bdd7566599a95a404b0f9e4b0828a866d0a71" dependencies: "@discordjs/collection" "^0.1.6" "@discordjs/form-data" "^3.0.1" + "@sapphire/async-queue" "^1.1.2" abort-controller "^3.0.0" node-fetch "^2.6.1" prism-media "^1.2.9" - setimmediate "^1.0.5" tweetnacl "^1.0.3" - ws "^7.4.4" + ws "^7.4.5" -discord.js@^12.4.1: - version "12.5.1" - resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-12.5.1.tgz#992b45753e3815526a279914ccc281d3496f5990" - integrity sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w== +"discord.js@github:discordjs/discord.js": + version "13.0.0-dev" + resolved "https://codeload.github.com/discordjs/discord.js/tar.gz/b90b0c3cfa2278caa38d1ff41eef2ccf4428b99e" dependencies: "@discordjs/collection" "^0.1.6" "@discordjs/form-data" "^3.0.1" + "@sapphire/async-queue" "^1.1.2" abort-controller "^3.0.0" node-fetch "^2.6.1" - prism-media "^1.2.2" - setimmediate "^1.0.5" + prism-media "^1.2.9" tweetnacl "^1.0.3" - ws "^7.3.1" + ws "^7.4.5" dom-walk@^0.1.0: version "0.1.2" @@ -1252,6 +1266,13 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +erlpack@discord/erlpack: + version "0.1.3" + resolved "https://codeload.github.com/discord/erlpack/tar.gz/e27db8f82892bdb9b28a0547cc394d68b5d2242d" + dependencies: + bindings "^1.5.0" + nan "^2.14.0" + es-abstract@^1.18.0-next.1: version "1.18.0-next.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2" @@ -1719,7 +1740,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.3, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.3, glob@^7.1.1, glob@^7.1.3: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -1731,6 +1752,18 @@ glob@^7.0.3, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" @@ -2671,6 +2704,11 @@ needle@^2.2.1, needle@^2.4.1: iconv-lite "^0.4.4" sax "^1.2.4" +node-addon-api@*: + version "3.2.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.0.tgz#7028b56a7eb572b73873aed731a7f9c9365f5ee4" + integrity sha512-kcwSAWhPi4+QzAtsL2+2s/awvDo2GKLsvMCwNRxb5BUshteXU8U97NCyvQDsGKs/m0He9WcG4YWew/BnuLx++w== + node-addon-api@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.1.0.tgz#98b21931557466c6729e51cb77cd39c965f42239" @@ -3064,11 +3102,6 @@ prettyjson@^1.1.2: colors "^1.1.2" minimist "^1.2.0" -prism-media@^1.2.2: - version "1.2.5" - resolved "https://registry.yarnpkg.com/prism-media/-/prism-media-1.2.5.tgz#a3fcb4f7873336d6fcf420213434c1bf5272efe1" - integrity sha512-YqSnMCugv+KUNE9PQec48Dq22jSxB/B6UcfD9jTpPN1Mbuh+RqELdTJmRPj106z3aa8ZuXrWGQllXPeIGmKbvw== - prism-media@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/prism-media/-/prism-media-1.2.9.tgz#8d4f97b36efdfc82483eb8d3db64020767866f36" @@ -3191,6 +3224,11 @@ readdirp@^2.0.0: micromatch "^3.1.10" readable-stream "^2.0.2" +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== + regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -3387,11 +3425,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - shush@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shush/-/shush-1.0.0.tgz#c27415a9e458f2fed39b27cf8eb37c003782b431" @@ -3444,6 +3477,13 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +sodium@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/sodium/-/sodium-3.0.2.tgz#4dbd7eb4a21c92ca7e7f684756cd733fee78112e" + integrity sha512-IsTwTJeoNBU97km3XkrbCGC/n/9aUQejgD3QPr2YY2gtbSPru3TI6nhCqgoez9Mv88frF9oVZS/jrXFbd6WXyA== + dependencies: + node-addon-api "*" + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -3767,10 +3807,10 @@ type-fest@^0.10.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.10.0.tgz#7f06b2b9fbfc581068d1341ffabd0349ceafc642" integrity sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw== -typescript@^3.8.3: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.2.4: + version "4.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" + integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== tz-lookup@^6.0.0: version "6.1.25" @@ -3831,6 +3871,13 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== +utf-8-validate@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== + dependencies: + node-gyp-build "^4.2.0" + utif@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/utif/-/utif-2.0.1.tgz#9e1582d9bbd20011a6588548ed3266298e711759" @@ -3969,12 +4016,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@^7.3.1: - version "7.4.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" - integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== - -ws@^7.4.4: +ws@^7.4.5: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== @@ -4021,3 +4063,10 @@ 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== + +zlib-sync@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/zlib-sync/-/zlib-sync-0.1.7.tgz#b0b24f9428e434943e306ad586428ef8baf3ed60" + integrity sha512-UmciU6ZrIwtwPC8noMzq+kGMdiWwNRZ3wC0SbED4Ew5Ikqx14MqDPRs/Pbk+3rZPh5SzsOgUBs1WRE0iieddpg== + dependencies: + nan "^2.14.0"