Browse Source

Update packages, refactor code

ghorsington 2 years ago
parent
commit
4702b3bcf0

File diff suppressed because it is too large
+ 550 - 447
bot/package-lock.json


+ 31 - 32
bot/package.json

@@ -26,48 +26,47 @@
       "src": "./build"
    },
    "dependencies": {
-      "@types/cheerio": "^0.22.28",
-      "@types/humanize-duration": "^3.18.1",
-      "@types/koa": "^2.13.1",
-      "@types/koa-router": "^7.4.2",
-      "@types/lowdb": "^1.0.9",
-      "@types/node-schedule": "^1.3.1",
-      "@types/sha1": "^1.1.2",
-      "@types/turndown": "^5.0.0",
-      "@types/ws": "^7.4.1",
-      "@types/xml2js": "^0.4.8",
-      "cheerio": "^1.0.0-rc.6",
-      "discord.js": "^12.5.3",
-      "dotenv": "^8.2.0",
+      "@types/express-serve-static-core": "^4.17.21",
+      "@types/cheerio": "^0.22.30",
+      "@types/humanize-duration": "^3.25.1",
+      "@types/koa": "^2.13.4",
+      "@types/koa-router": "^7.4.4",
+      "@types/node-schedule": "^1.3.2",
+      "@types/sha1": "^1.1.3",
+      "@types/turndown": "^5.0.1",
+      "@types/ws": "^7.4.7",
+      "@types/xml2js": "^0.4.9",
+      "cheerio": "^1.0.0-rc.10",
+      "discord.js": "^13.0.1",
+      "dotenv": "^10.0.0",
       "emoji-regex": "^9.2.2",
       "express": "^4.17.1",
-      "form-data": "^3.0.1",
-      "fp-ts": "^2.10.4",
-      "google-protobuf": "^3.15.8",
+      "form-data": "^4.0.0",
+      "fp-ts": "^2.11.1",
+      "google-protobuf": "^3.17.3",
       "got": "^11.8.2",
       "html2bbcode": "^1.2.6",
-      "humanize-duration": "^3.25.2",
+      "humanize-duration": "^3.27.0",
       "interval-promise": "^1.4.0",
       "io-ts": "^2.2.16",
       "jimp": "^0.16.1",
       "koa": "^2.13.1",
       "koa-body": "^4.2.0",
       "koa-router": "^10.0.0",
-      "lowdb": "^1.0.0",
       "module-alias": "^2.2.2",
-      "node-schedule": "^1.3.3",
-      "nodemailer": "^6.5.0",
-      "pg": "^8.6.0",
+      "node-schedule": "^2.0.0",
+      "nodemailer": "^6.6.3",
+      "pg": "^8.7.1",
       "reflect-metadata": "^0.1.13",
       "rimraf": "^3.0.2",
       "rpc_ts": "^2.1.0",
       "rss-parser": "^3.12.0",
       "sha1": "^1.1.1",
-      "tsconfig-paths": "^3.9.0",
-      "turndown": "^7.0.0",
+      "tsconfig-paths": "^3.10.1",
+      "turndown": "^7.1.1",
       "type-zoo": "^3.4.1",
-      "typeorm": "^0.2.32",
-      "typescript": "^4.2.4",
+      "typeorm": "^0.2.36",
+      "typescript": "^4.3.5",
       "typescript-rest-rpc": "^1.0.10",
       "uws": "^200.0.0",
       "winston": "^3.3.3",
@@ -76,12 +75,12 @@
       "yaml": "^1.10.2"
    },
    "devDependencies": {
-      "@types/node": "^14.14.41",
-      "@types/nodemailer": "^6.4.1",
-      "@typescript-eslint/eslint-plugin": "^4.22.0",
-      "@typescript-eslint/parser": "^4.22.0",
-      "eslint": "^7.25.0",
-      "nodemon": "^2.0.7",
-      "ts-node": "9.0.0"
+      "@types/node": "^16.4.13",
+      "@types/nodemailer": "^6.4.4",
+      "@typescript-eslint/eslint-plugin": "^4.29.0",
+      "@typescript-eslint/parser": "^4.29.0",
+      "eslint": "^7.32.0",
+      "nodemon": "^2.0.12",
+      "ts-node": "^10.1.0"
    }
 }

+ 12 - 2
bot/src/client.ts

@@ -1,10 +1,20 @@
-import { Client, ClientUser, Util } from "discord.js";
+import { Client, ClientUser, Intents, Util } from "discord.js";
 import { XenforoClient } from "./xenforo";
 
 export const FORUMS_DOMAIN = "https://custommaid3d2.com";
 
 export class BotClient {
-    public bot = new Client();
+    public bot = new Client({
+        intents: [
+            Intents.FLAGS.GUILDS,
+            Intents.FLAGS.GUILD_MEMBERS,
+            Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
+            Intents.FLAGS.GUILD_MESSAGES,
+            Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
+            Intents.FLAGS.DIRECT_MESSAGES,
+            Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
+        ]
+    });
     public forum = new XenforoClient(`${FORUMS_DOMAIN}/api`, process.env.FORUM_API_KEY ?? "");
 
     get botUser(): ClientUser {

+ 4 - 4
bot/src/plugin_manager.ts

@@ -81,9 +81,9 @@ export class PluginManager {
         for (const evtName of Object.keys(this.botEvents)) {
             if (!Object.prototype.hasOwnProperty.call(this.botEvents, evtName) || isCustomEvent(evtName))
                 continue;
-            client.on(evtName as keyof ClientEvents, async (...args: unknown[]) =>
-                await this.trigger(evtName as EventType, ...args)
-            );
+            client.on(evtName as keyof ClientEvents, async (...args: unknown[]) => {
+                await this.trigger(evtName as EventType, ...args);
+            });
         }
     
         for (const plugin of this.plugins) {
@@ -129,7 +129,7 @@ export class PluginManager {
             }
 
             if (match) {
-                if (!c.allowDM && m.channel.type == "dm") {
+                if (!c.allowDM && m.channel.type == "DM") {
                     await tryDo(m.reply("Sorry, this command is not available in DMs for now."));
                     return false;
                 }

+ 3 - 2
bot/src/plugins/facemorph.ts

@@ -66,7 +66,7 @@ export class Facemorph {
             return jimpImage;
         const emojiKeys = process.env.FOOLS != "TRUE" ? [
             ...emoteGuild
-                .emojis.cache.filter(e => !e.animated && e.name.startsWith("PADORU") == padoru)
+                .emojis.cache.filter(e => !e.animated && e.name?.startsWith("PADORU") == padoru)
                 .keys()
         ]: 
             [
@@ -249,7 +249,8 @@ export class Facemorph {
             successMessage ||
             `I noticed a face in the image. I think this looks better ${client.bot.emojis.resolve("505076258753740810")?.toString() ?? ":)"}`;
 
-        message.channel.send(messageContents, {
+        message.channel.send({
+            content: messageContents,
             files: [buffer]
         });
     }

+ 10 - 2
bot/src/plugins/forums_news_checker.ts

@@ -139,7 +139,12 @@ export class ForumsNewsChecker {
                 continue;
             }
 
-            const collector = m.createReactionCollector(this.isVerifyReaction, { maxEmojis: 1 });
+            
+
+            const collector = m.createReactionCollector({
+                filter: this.isVerifyReaction,
+                maxEmojis: 1,
+            });
             collector.on("collect", this.collectorFor(collector));
             this.reactionCollectors[m.id] = collector;
             this.verifyMessageIdToPost[m.id] = msg.id;
@@ -174,7 +179,10 @@ export class ForumsNewsChecker {
         await newMessage.react("✅");
         await newMessage.react("❌");
 
-        const collector = newMessage.createReactionCollector(this.isVerifyReaction, { maxEmojis: 1 });
+        const collector = newMessage.createReactionCollector({
+            filter: this.isVerifyReaction,
+            maxEmojis: 1
+        });
         collector.on("collect", this.collectorFor(collector));
         this.reactionCollectors[newMessage.id] = collector;
         this.verifyMessageIdToPost[newMessage.id] = item.id;

+ 6 - 5
bot/src/plugins/give_role_for_react.ts

@@ -50,11 +50,11 @@ export class GiveRoleForReact {
         }
 
         const msgSendResult = await tryDo(message.channel.send({
-            embed: {
+            embeds: [{
                 title: params.title,
                 description: `${params.message}\n\nReact with ${REACT_EMOTE} to gain role ${role.toString()}`,
                 color: MSG_COLOR
-            }
+            }]
         }));
 
         if (!msgSendResult.ok) {
@@ -85,7 +85,8 @@ export class GiveRoleForReact {
         const check = (reaction: MessageReaction) => {
             return reaction.emoji.name == REACT_EMOTE;
         };
-        const collector = new ReactionCollector(msg, check, {
+        const collector = new ReactionCollector(msg, {
+            filter: check,
             dispose: true
         });
 
@@ -98,7 +99,7 @@ export class GiveRoleForReact {
             if (user.bot) {
                 return;
             }
-            const gu = guild.member(user);
+            const gu = guild.members.resolve(user);
             if (!gu) {
                 return;
             }
@@ -112,7 +113,7 @@ export class GiveRoleForReact {
             if (user.bot) {
                 return;
             }
-            const gu = guild.member(user);
+            const gu = guild.members.resolve(user);
             if (!gu) {
                 return;
             }

+ 2 - 2
bot/src/plugins/guide.ts

@@ -1,4 +1,4 @@
-import { DMChannel, Message, NewsChannel, TextChannel } from "discord.js";
+import { Message, TextBasedChannels } from "discord.js";
 import { getRepository } from "typeorm";
 import { Guide, GuideType, GuideKeyword } from "@shared/db/entity/Guide";
 import { Event, BotEventData, Command, ICommandData, Plugin } from "src/model/plugin";
@@ -38,7 +38,7 @@ export class GuideCommands {
             .getMany();
 
         const dmChannelResult = await tryDo(msg.author.createDM());
-        let channel: TextChannel | DMChannel | NewsChannel;
+        let channel: TextBasedChannels;
         if (dmChannelResult.ok){
             await tryDo(msg.delete());
             channel = dmChannelResult.result;

+ 2 - 1
bot/src/plugins/inspire.ts

@@ -21,7 +21,8 @@ export class Inspire {
             return;
         }
 
-        const messagePostResult = await tryDo(message.reply("here is a piece of my wisdom:", {
+        const messagePostResult = await tryDo(message.reply({
+            content: "here is a piece of my wisdom:",
             files: [ result.result.body ]
         }));
         if (!messagePostResult.ok) {

+ 16 - 12
bot/src/plugins/news_aggregator.ts

@@ -97,18 +97,22 @@ export class NewsAggregator {
             });
         }
 
-        const msg = await assertOk(ch.send(new MessageEmbed({
-            title: `${(isNew ? "**[NEW]**" : "**[EDIT]**")} ${item.title}`,
-            url: item.link,
-            color: item.embedColor,
-            timestamp: new Date(),
-            author: {
-                name: item.author
-            },
-            footer: {
-                text: "NoctBot News Aggregator"
-            }
-        }))) as Message;
+        const msg = await assertOk(ch.send({
+            embeds: [
+                new MessageEmbed({
+                    title: `${(isNew ? "**[NEW]**" : "**[EDIT]**")} ${item.title}`,
+                    url: item.link,
+                    color: item.embedColor,
+                    timestamp: new Date(),
+                    author: {
+                        name: item.author
+                    },
+                    footer: {
+                        text: "NoctBot News Aggregator"
+                    }
+                })
+            ]
+        }));
 
         newsItem.editMessageId = msg.id;
 

+ 4 - 2
bot/src/plugins/rcg.ts

@@ -19,7 +19,8 @@ export class Rcg {
             await msg.reply("sorry, I couldn't get any comics :(.");
             return;
         }
-        await msg.reply("sorry, I couldn't get a random comic! Here is today's XKCD instead:", {
+        await msg.reply({
+            content: "sorry, I couldn't get a random comic! Here is today's XKCD instead:",
             files: [ xkcdResult.result.body.img ]
         });
     }
@@ -82,7 +83,8 @@ export class Rcg {
         newImg.quality(80);
         const buffer = await newImg.getBufferAsync(Jimp.MIME_JPEG);
 
-        const messagePostResult = await tryDo(message.reply("I find this very funny:", {
+        const messagePostResult = await tryDo(message.reply({
+            content: "I find this very funny:",
             files: [ buffer ]
         }));
 

+ 1 - 1
bot/src/plugins/react.ts

@@ -38,7 +38,7 @@ export class ReactCommands {
             logger.verbose(`Reacting to message ${msg.id} because user ${user.tag} reacted to it`);
             const result = await tryDo(msg.react(reaction.emoji));
             if (!result.ok) {
-                logger.error("Failed to react to user %s#%s (%s): %s", msg.author.username, msg.author.discriminator, msg.author.id, result.error);
+                logger.error("Failed to react to user %s#%s (%s): %s", msg.author?.username, msg.author?.discriminator, msg.author?.id, result.error);
             }
         }
     }

+ 2 - 1
bot/src/plugins/stickers.ts

@@ -31,7 +31,8 @@ export class Stickers {
         if (!deleteResult.ok) {
             logger.error("Stickers: failed to delete message %s from user %s. Reason: %s", msg.id, msg.author.id, deleteResult.error);
         }
-        const sendResult = await tryDo(msg.channel.send(`${msg.author.toString()} *sent a sticker:*`, {
+        const sendResult = await tryDo(msg.channel.send({
+            content: `${msg.author.toString()} *sent a sticker:*`,
             files: [this.stickers[stickerName]]
         }));
 

+ 33 - 29
bot/src/plugins/violation.ts

@@ -96,7 +96,7 @@ export class ViolationPlugin {
                 }
             },
             modify: (member: GuildMember | PartialGuildMember, settings: GuildViolationSettings, violation: DeepPartial<Mute>): DeepPartial<Mute> => {
-                const originalRoles = member.roles.cache.keyArray().filter(r => r != settings.muteRoleId);
+                const originalRoles = [...member.roles.cache.keys()].filter(r => r != settings.muteRoleId);
                 violation.previousRoles = originalRoles;
                 return violation;
             }
@@ -441,42 +441,46 @@ export class ViolationPlugin {
 
     private async sendViolationMessage(message: Message, info: ViolationInfo, title: string) {
         let announceChannel: TextChannel | null = null;
-        if ((info.noAnnounce || info.dryRun) && message.channel.type == "text") {
+        if ((info.noAnnounce || info.dryRun) && message.channel.type == "GUILD_TEXT") {
             announceChannel = message.channel;
         }
         else if (info.settings.violationInfoChannelId) {
             const ch = info.guild.channels.resolve(info.settings.violationInfoChannelId);
-            if (ch && ch.type == "text")
+            if (ch && ch.type == "GUILD_TEXT")
                 announceChannel = ch as TextChannel;
-            else if (message.channel.type == "text") {
+            else if (message.channel.type == "GUILD_TEXT") {
                 announceChannel = message.channel;
             }
         }
-        await announceChannel?.send(new MessageEmbed({
-            title: `${info.dryRun ? "[DRY RUN] " : ""}${title}`,
-            color: 4944347,
-            timestamp: new Date(),
-            footer: {
-                text: client.botUser.username
-            },
-            author: {
-                name: client.botUser.username,
-                iconURL: client.botUser.avatarURL() ?? undefined
-            },
-            fields: [
-                {
-                    name: "Username",
-                    value: info.member.toString()
-                },
-                {
-                    name: "Duration",
-                    value: humanizeDuration(info.duration, { unitMeasures: UNIT_MEASURES })
-                },
-                {
-                    name: "Reason",
-                    value: info.reason
-                }
+        await announceChannel?.send({
+            embeds: [
+                new MessageEmbed({
+                    title: `${info.dryRun ? "[DRY RUN] " : ""}${title}`,
+                    color: 4944347,
+                    timestamp: new Date(),
+                    footer: {
+                        text: client.botUser.username
+                    },
+                    author: {
+                        name: client.botUser.username,
+                        iconURL: client.botUser.avatarURL() ?? undefined
+                    },
+                    fields: [
+                        {
+                            name: "Username",
+                            value: info.member.toString()
+                        },
+                        {
+                            name: "Duration",
+                            value: humanizeDuration(info.duration, { unitMeasures: UNIT_MEASURES })
+                        },
+                        {
+                            name: "Reason",
+                            value: info.reason
+                        }
+                    ]
+                })
             ]
-        }));
+        });
     }
 }

+ 1 - 1
bot/src/util.ts

@@ -60,7 +60,7 @@ export async function isAuthorisedAsync(member: GuildMember | User | null | unde
         const role = await repo.findOne({
             select: ["userID"],
             where: {
-                userID: In(member.roles.cache.keyArray()),
+                userID: In([...member.roles.cache.keys()]),
                 canModerate: true
             }
         });

+ 62 - 46
shared/package-lock.json

@@ -20,23 +20,23 @@
       "integrity": "sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg=="
     },
     "@types/node": {
-      "version": "14.14.41",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz",
-      "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g=="
+      "version": "16.4.13",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz",
+      "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg=="
     },
     "@types/nodemailer": {
-      "version": "6.4.1",
-      "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.1.tgz",
-      "integrity": "sha512-8081UY/0XTTDpuGqCnDc8IY+Q3DSg604wB3dBH0CaZlj4nZWHWuxtZ3NRZ9c9WUrz1Vfm6wioAUnqL3bsh49uQ==",
+      "version": "6.4.4",
+      "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.4.tgz",
+      "integrity": "sha512-Ksw4t7iliXeYGvIQcSIgWQ5BLuC/mljIEbjf615svhZL10PE9t+ei8O9gDaD3FPCasUJn9KTLwz2JFJyiiyuqw==",
       "dev": true,
       "requires": {
         "@types/node": "*"
       }
     },
     "@types/zen-observable": {
-      "version": "0.8.2",
-      "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.2.tgz",
-      "integrity": "sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg=="
+      "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.3.tgz",
+      "integrity": "sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw=="
     },
     "ansi-regex": {
       "version": "5.0.0",
@@ -167,9 +167,9 @@
       }
     },
     "chalk": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
-      "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "requires": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -186,6 +186,22 @@
         "parse5": "^5.1.1",
         "parse5-htmlparser2-tree-adapter": "^6.0.0",
         "yargs": "^16.0.0"
+      },
+      "dependencies": {
+        "yargs": {
+          "version": "16.2.0",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+          "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+          "requires": {
+            "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"
+          }
+        }
       }
     },
     "cliui": {
@@ -254,9 +270,9 @@
       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
     },
     "debug": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
-      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+      "version": "4.3.2",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
+      "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
       "requires": {
         "ms": "2.1.2"
       }
@@ -267,9 +283,9 @@
       "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
     },
     "dotenv": {
-      "version": "8.2.0",
-      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
-      "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+      "version": "8.6.0",
+      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz",
+      "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g=="
     },
     "emoji-regex": {
       "version": "8.0.0",
@@ -355,9 +371,9 @@
       "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
     },
     "highlight.js": {
-      "version": "10.7.2",
-      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz",
-      "integrity": "sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg=="
+      "version": "10.7.3",
+      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",
+      "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
     },
     "ieee754": {
       "version": "1.2.1",
@@ -471,9 +487,9 @@
       }
     },
     "nodemailer": {
-      "version": "6.5.0",
-      "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.5.0.tgz",
-      "integrity": "sha512-Tm4RPrrIZbnqDKAvX+/4M+zovEReiKlEXWDzG4iwtpL9X34MJY+D5LnQPH/+eghe8DLlAVshHAJZAZWBGhkguw=="
+      "version": "6.6.3",
+      "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.6.3.tgz",
+      "integrity": "sha512-faZFufgTMrphYoDjvyVpbpJcYzwyFnbAMmQtj1lVBYAUSm3SOy2fIdd9+Mr4UxPosBa0JRw9bJoIwQn+nswiew=="
     },
     "object-assign": {
       "version": "4.1.1",
@@ -675,20 +691,20 @@
       "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw=="
     },
     "tslib": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
-      "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
     },
     "typeorm": {
-      "version": "0.2.32",
-      "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.32.tgz",
-      "integrity": "sha512-LOBZKZ9As3f8KRMPCUT2H0JZbZfWfkcUnO3w/1BFAbL/X9+cADTF6bczDGGaKVENJ3P8SaKheKmBgpt5h1x+EQ==",
+      "version": "0.2.36",
+      "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.36.tgz",
+      "integrity": "sha512-l4knslldEqKi5EavopnQASnt2V+kLby3SQaww34tXq//ckfUqq/GCU4eMcLhVBQl9OXCxoWOVEDwklBqk+Q+KQ==",
       "requires": {
         "@sqltools/formatter": "^1.2.2",
         "app-root-path": "^3.0.0",
         "buffer": "^6.0.3",
         "chalk": "^4.1.0",
-        "cli-highlight": "^2.1.10",
+        "cli-highlight": "^2.1.11",
         "debug": "^4.3.1",
         "dotenv": "^8.2.0",
         "glob": "^7.1.6",
@@ -699,14 +715,14 @@
         "tslib": "^2.1.0",
         "xml2js": "^0.4.23",
         "yargonaut": "^1.1.4",
-        "yargs": "^16.2.0",
+        "yargs": "^17.0.1",
         "zen-observable-ts": "^1.0.0"
       }
     },
     "typescript": {
-      "version": "4.2.4",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
-      "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg=="
+      "version": "4.3.5",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+      "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA=="
     },
     "util-deprecate": {
       "version": "1.0.2",
@@ -858,9 +874,9 @@
       }
     },
     "yargs": {
-      "version": "16.2.0",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
-      "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+      "version": "17.1.0",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.0.tgz",
+      "integrity": "sha512-SQr7qqmQ2sNijjJGHL4u7t8vyDZdZ3Ahkmo4sc1w5xI9TBX0QDdG/g4SFnxtWOsGLjwHQue57eFALfwFCnixgg==",
       "requires": {
         "cliui": "^7.0.2",
         "escalade": "^3.1.1",
@@ -872,9 +888,9 @@
       }
     },
     "yargs-parser": {
-      "version": "20.2.7",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
-      "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw=="
+      "version": "20.2.9",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="
     },
     "zen-observable": {
       "version": "0.8.15",
@@ -882,12 +898,12 @@
       "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ=="
     },
     "zen-observable-ts": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.0.0.tgz",
-      "integrity": "sha512-KmWcbz+9kKUeAQ8btY8m1SsEFgBcp7h/Uf3V5quhan7ZWdjGsf0JcGLULQiwOZibbFWnHkYq8Nn2AZbJabovQg==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz",
+      "integrity": "sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA==",
       "requires": {
-        "@types/zen-observable": "^0.8.2",
-        "zen-observable": "^0.8.15"
+        "@types/zen-observable": "0.8.3",
+        "zen-observable": "0.8.15"
       }
     }
   }

+ 5 - 5
shared/package.json

@@ -10,16 +10,16 @@
   "author": "ghorsington",
   "license": "ISC",
   "dependencies": {
-    "@types/node": "^14.14.41",
-    "nodemailer": "^6.5.0",
+    "@types/node": "^16.4.13",
+    "nodemailer": "^6.6.3",
     "rimraf": "^3.0.2",
-    "typeorm": "^0.2.32",
-    "typescript": "^4.2.4",
+    "typeorm": "^0.2.36",
+    "typescript": "^4.3.5",
     "winston": "^3.3.3",
     "winston-mongodb": "^5.0.7",
     "winston-transport": "^4.4.0"
   },
   "devDependencies": {
-    "@types/nodemailer": "^6.4.1"
+    "@types/nodemailer": "^6.4.4"
   }
 }

File diff suppressed because it is too large
+ 2530 - 1470
web/package-lock.json


+ 36 - 36
web/package.json

@@ -14,73 +14,73 @@
 		"@improbable-eng/grpc-web-node-http-transport": "^0.13.0",
 		"compression": "^1.7.4",
 		"cookie-session": "^1.4.0",
-		"dotenv": "^8.2.0",
+		"dotenv": "^8.6.0",
 		"easymde": "^2.15.0",
 		"express": "^4.17.1",
-		"google-protobuf": "^3.15.8",
+		"google-protobuf": "^3.17.3",
 		"got": "^11.8.2",
 		"make-error": "^1.3.6",
 		"node-fetch": "^2.6.1",
-		"nodemailer": "^6.5.0",
-		"pg": "^8.6.0",
-		"postcss-nested": "^5.0.5",
+		"nodemailer": "^6.6.3",
+		"pg": "^8.7.1",
+		"postcss-nested": "^5.0.6",
 		"rpc_ts": "^2.1.0",
 		"showdown": "^1.9.1",
-		"sirv": "^1.0.11",
-		"svelte-awesome": "^2.3.1",
-		"typeorm": "^0.2.32",
+		"sirv": "^1.0.12",
+		"svelte-awesome": "^2.3.2",
+		"typeorm": "^0.2.36",
 		"vanilla-hcaptcha": "0.0.5",
 		"winston": "^3.3.3",
 		"winston-mongodb": "^5.0.7",
 		"winston-transport": "^4.4.0"
 	},
 	"devDependencies": {
-		"@babel/core": "^7.13.16",
+		"@babel/core": "^7.15.0",
 		"@babel/plugin-syntax-dynamic-import": "^7.8.3",
-		"@babel/plugin-transform-async-to-generator": "^7.13.0",
-		"@babel/plugin-transform-runtime": "^7.13.15",
-		"@babel/preset-env": "^7.13.15",
-		"@babel/runtime": "^7.13.17",
-		"@fortawesome/free-brands-svg-icons": "^5.15.3",
-		"@fortawesome/free-solid-svg-icons": "^5.15.3",
-		"@rollup/plugin-alias": "^3.1.2",
+		"@babel/plugin-transform-async-to-generator": "^7.14.5",
+		"@babel/plugin-transform-runtime": "^7.15.0",
+		"@babel/preset-env": "^7.15.0",
+		"@babel/runtime": "^7.14.8",
+		"@fortawesome/free-brands-svg-icons": "^5.15.4",
+		"@fortawesome/free-solid-svg-icons": "^5.15.4",
+		"@rollup/plugin-alias": "^3.1.5",
 		"@rollup/plugin-babel": "^5.3.0",
 		"@rollup/plugin-commonjs": "^16.0.0",
 		"@rollup/plugin-json": "^4.1.0",
 		"@rollup/plugin-node-resolve": "^10.0.0",
 		"@rollup/plugin-replace": "^2.4.2",
 		"@rollup/plugin-typescript": "^6.1.0",
-		"@types/compression": "^1.7.0",
-		"@types/cookie-session": "^2.0.42",
-		"@types/express": "^4.17.11",
-		"@types/node-fetch": "^2.5.10",
-		"@types/nodemailer": "^6.4.1",
-		"@types/showdown": "^1.9.3",
-		"@typescript-eslint/eslint-plugin": "^4.22.0",
-		"@typescript-eslint/parser": "^4.22.0",
-		"autoprefixer": "^10.2.5",
+		"@types/compression": "^1.7.1",
+		"@types/cookie-session": "^2.0.43",
+		"@types/express": "^4.17.13",
+		"@types/node-fetch": "^2.5.12",
+		"@types/nodemailer": "^6.4.4",
+		"@types/showdown": "^1.9.4",
+		"@typescript-eslint/eslint-plugin": "^4.29.0",
+		"@typescript-eslint/parser": "^4.29.0",
+		"autoprefixer": "^10.3.1",
 		"bufferutil": "^4.0.3",
 		"class-validator": "^0.12.2",
 		"cross-env": "^7.0.3",
-		"eslint": "^7.25.0",
+		"eslint": "^7.32.0",
 		"eslint-config-airbnb-base": "^14.2.1",
 		"eslint-import-resolver-typescript": "^2.4.0",
-		"eslint-plugin-import": "^2.22.1",
+		"eslint-plugin-import": "^2.23.4",
 		"eslint-plugin-svelte3": "^2.7.3",
-		"postcss": "^8.2.12",
+		"postcss": "^8.3.6",
 		"postcss-import": "^13.0.0",
-		"postcss-load-config": "^3.0.1",
+		"postcss-load-config": "^3.1.0",
 		"postcss-preset-env": "^6.7.0",
 		"reflect-metadata": "^0.1.13",
-		"rollup": "^2.45.2",
+		"rollup": "^2.56.0",
 		"rollup-plugin-svelte": "^7.1.0",
 		"rollup-plugin-terser": "^7.0.2",
-		"sapper": "^0.29.1",
+		"sapper": "^0.29.2",
 		"svelte": "~3.37.0",
-		"svelte-preprocess": "^4.7.2",
-		"tailwindcss": "^2.1.2",
-		"tslib": "^2.2.0",
-		"typescript": "^4.2.4",
-		"utf-8-validate": "^5.0.4"
+		"svelte-preprocess": "^4.7.4",
+		"tailwindcss": "^2.2.7",
+		"tslib": "^2.3.0",
+		"typescript": "^4.3.5",
+		"utf-8-validate": "^5.0.5"
 	}
 }