From 95365d8573595840185ca3affb2e6349a1925c8a Mon Sep 17 00:00:00 2001
From: almeidx
Date: Fri, 26 Nov 2021 11:49:08 +0000
Subject: [PATCH 001/190] fix permissions not showing properly in roleinfo
---
.../Utility/functions/getRoleInfoEmbed.ts | 14 ++----
backend/src/utils/permissionNames.ts | 46 +++++++++++++++++++
2 files changed, 51 insertions(+), 9 deletions(-)
create mode 100644 backend/src/utils/permissionNames.ts
diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
index 36a664e3..4dbc99b7 100644
--- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
@@ -1,8 +1,9 @@
-import { MessageEmbedOptions, Role } from "discord.js";
+import { MessageEmbedOptions, Permissions, Role } from "discord.js";
import humanizeDuration from "humanize-duration";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
+import { permissionNames } from "../../../utils/permissionNames.js";
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { UtilityPluginType } from "../types";
@@ -35,14 +36,9 @@ export async function getRoleInfoEmbed(
round: true,
});
- const rolePerms = Object.keys(role.permissions.toJSON()).map((p) =>
- p
- // Voice channel related permission names start with 'voice'
- .replace(/^voice/i, "")
- .replace(/([a-z])([A-Z])/g, "$1 $2")
- .toLowerCase()
- .replace(/(^\w{1})|(\s{1}\w{1})/g, (l) => l.toUpperCase()),
- );
+ const rolePerms = role.permissions.has(Permissions.FLAGS.ADMINISTRATOR)
+ ? [permissionNames.ADMINISTRATOR]
+ : role.permissions.toArray().map((p) => permissionNames[p]);
// -1 because of the @everyone role
const totalGuildRoles = pluginData.guild.roles.cache.size - 1;
diff --git a/backend/src/utils/permissionNames.ts b/backend/src/utils/permissionNames.ts
new file mode 100644
index 00000000..323f11cf
--- /dev/null
+++ b/backend/src/utils/permissionNames.ts
@@ -0,0 +1,46 @@
+import { PermissionFlags } from "discord.js";
+import { EMPTY_CHAR } from "../utils";
+
+export const permissionNames: Record = {
+ ADD_REACTIONS: "Add Reactions",
+ ADMINISTRATOR: "Administrator",
+ ATTACH_FILES: "Attach Files",
+ BAN_MEMBERS: "Ban Members",
+ CHANGE_NICKNAME: "Change Nickname",
+ CONNECT: "Connect",
+ CREATE_INSTANT_INVITE: "Create Invite",
+ CREATE_PRIVATE_THREADS: "Create Private Threads",
+ CREATE_PUBLIC_THREADS: "Create Public Threads",
+ DEAFEN_MEMBERS: "Deafen Members",
+ EMBED_LINKS: "Embed Links",
+ KICK_MEMBERS: "Kick Members",
+ MANAGE_CHANNELS: "Manage Channels",
+ MANAGE_EMOJIS_AND_STICKERS: "Manage Emojis and Stickers",
+ MANAGE_GUILD: "Manage Server",
+ MANAGE_MESSAGES: "Manage Messages",
+ MANAGE_NICKNAMES: "Manage Nicknames",
+ MANAGE_ROLES: "Manage Roles",
+ MANAGE_THREADS: "Manage Threads",
+ MANAGE_WEBHOOKS: "Manage Webhooks",
+ MENTION_EVERYONE: `Mention @${EMPTY_CHAR}everyone, @${EMPTY_CHAR}here, and All Roles`,
+ MOVE_MEMBERS: "Move Members",
+ MUTE_MEMBERS: "Mute Members",
+ PRIORITY_SPEAKER: "Priority Speaker",
+ READ_MESSAGE_HISTORY: "Read Message History",
+ REQUEST_TO_SPEAK: "Request to Speak",
+ SEND_MESSAGES: "Send Messages",
+ SEND_MESSAGES_IN_THREADS: "Send Messages in Threads",
+ SEND_TTS_MESSAGES: "Send Text-To-Speech Messages",
+ SPEAK: "Speak",
+ START_EMBEDDED_ACTIVITIES: "Start Embedded Activities",
+ STREAM: "Video",
+ USE_APPLICATION_COMMANDS: "Use Application Commands",
+ USE_EXTERNAL_EMOJIS: "Use External Emoji",
+ USE_EXTERNAL_STICKERS: "Use External Stickers",
+ USE_PRIVATE_THREADS: "Use Private Threads",
+ USE_PUBLIC_THREADS: "Use Public Threads",
+ USE_VAD: "Use Voice Activity",
+ VIEW_AUDIT_LOG: "View Audit Log",
+ VIEW_CHANNEL: "View Channels",
+ VIEW_GUILD_INSIGHTS: "View Guild Insights",
+};
From d7dc84077891bb7189b89feb34ccb4bd8bcad403 Mon Sep 17 00:00:00 2001
From: almeidx
Date: Fri, 26 Nov 2021 12:21:03 +0000
Subject: [PATCH 002/190] rename record
---
backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts | 6 +++---
backend/src/utils/permissionNames.ts | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
index 4dbc99b7..f58f61be 100644
--- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts
@@ -3,7 +3,7 @@ import humanizeDuration from "humanize-duration";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
-import { permissionNames } from "../../../utils/permissionNames.js";
+import { PERMISSION_NAMES } from "../../../utils/permissionNames.js";
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { UtilityPluginType } from "../types";
@@ -37,8 +37,8 @@ export async function getRoleInfoEmbed(
});
const rolePerms = role.permissions.has(Permissions.FLAGS.ADMINISTRATOR)
- ? [permissionNames.ADMINISTRATOR]
- : role.permissions.toArray().map((p) => permissionNames[p]);
+ ? [PERMISSION_NAMES.ADMINISTRATOR]
+ : role.permissions.toArray().map((p) => PERMISSION_NAMES[p]);
// -1 because of the @everyone role
const totalGuildRoles = pluginData.guild.roles.cache.size - 1;
diff --git a/backend/src/utils/permissionNames.ts b/backend/src/utils/permissionNames.ts
index 323f11cf..3bf0c4f1 100644
--- a/backend/src/utils/permissionNames.ts
+++ b/backend/src/utils/permissionNames.ts
@@ -1,7 +1,7 @@
import { PermissionFlags } from "discord.js";
import { EMPTY_CHAR } from "../utils";
-export const permissionNames: Record = {
+export const PERMISSION_NAMES: Record = {
ADD_REACTIONS: "Add Reactions",
ADMINISTRATOR: "Administrator",
ATTACH_FILES: "Attach Files",
From ff160be1fa598250e96972d54f92dfea6b69f5d1 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 27 Nov 2021 11:52:26 +0200
Subject: [PATCH 003/190] fix(automod): don't try to reply with an empty
message
---
backend/src/plugins/Automod/actions/reply.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts
index efe833cb..52aa491d 100644
--- a/backend/src/plugins/Automod/actions/reply.ts
+++ b/backend/src/plugins/Automod/actions/reply.ts
@@ -17,6 +17,7 @@ import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
import { automodAction } from "../helpers";
import { AutomodContext } from "../types";
import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { messageIsEmpty } from "../../../utils/messageIsEmpty";
export const ReplyAction = automodAction({
configType: t.union([
@@ -109,6 +110,10 @@ export const ReplyAction = automodAction({
};
}
+ if (messageIsEmpty(messageOpts)) {
+ return;
+ }
+
const replyMsg = await channel.send(messageOpts);
if (typeof actionConfig === "object" && actionConfig.auto_delete) {
From d5363449a03475f38a14505b814f9d06cdea0a9b Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 19 Dec 2021 17:47:21 +0200
Subject: [PATCH 004/190] fix: show all attachment URLs in !message, fix crash
with attachments
---
backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts
index 17e2c63f..9d3c6d68 100644
--- a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts
@@ -130,9 +130,10 @@ export async function getMessageInfoEmbed(
}
if (message.attachments.size) {
+ const attachmentUrls = message.attachments.map((att) => att.url);
embed.fields.push({
name: preEmbedPadding + "Attachments",
- value: message.attachments[0].url,
+ value: attachmentUrls.join("\n"),
});
}
From 2b03c999be3891518ffbdbfc681c69b0b7c0d4e9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 22 Dec 2021 15:00:53 +0200
Subject: [PATCH 005/190] feat: improve data validation errors when importing
data
---
backend/src/api/guilds/importExport.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backend/src/api/guilds/importExport.ts b/backend/src/api/guilds/importExport.ts
index 019c5369..8d0fcfe3 100644
--- a/backend/src/api/guilds/importExport.ts
+++ b/backend/src/api/guilds/importExport.ts
@@ -75,7 +75,10 @@ export function initGuildsImportExportAPI(guildRouter: express.Router) {
try {
data = importExportData.parse(req.body.data);
} catch (err) {
- return clientError(res, "Invalid import data format");
+ const prettyMessage = `${err.issues[0].code}: expected ${err.issues[0].expected}, received ${
+ err.issues[0].received
+ } at /${err.issues[0].path.join("/")}`;
+ return clientError(res, `Invalid import data format: ${prettyMessage}`);
return;
}
From 264cf93fe24aa8c1e5dfab61d795cc397e1a55e9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 22 Dec 2021 15:06:55 +0200
Subject: [PATCH 006/190] fix: fix crash when importing cases with duplicate
case numbers
---
backend/src/api/guilds/importExport.ts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/backend/src/api/guilds/importExport.ts b/backend/src/api/guilds/importExport.ts
index 8d0fcfe3..8bb46748 100644
--- a/backend/src/api/guilds/importExport.ts
+++ b/backend/src/api/guilds/importExport.ts
@@ -90,6 +90,14 @@ export function initGuildsImportExportAPI(guildRouter: express.Router) {
return;
}
+ const seenCaseNumbers = new Set();
+ for (const theCase of data.cases) {
+ if (seenCaseNumbers.has(theCase.case_number)) {
+ return clientError(res, `Duplicate case number: ${theCase.case_number}`);
+ }
+ seenCaseNumbers.add(theCase.case_number);
+ }
+
const guildCases = GuildCases.getGuildInstance(req.params.guildId);
// Prepare cases
From feeb0488556f10f6b02311476b32797dba314fa5 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 17 Jan 2022 21:28:00 +0200
Subject: [PATCH 007/190] debug: add debug logging to automod clean action
---
backend/src/plugins/Automod/actions/clean.ts | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/backend/src/plugins/Automod/actions/clean.ts b/backend/src/plugins/Automod/actions/clean.ts
index 27ee1cb6..56452d79 100644
--- a/backend/src/plugins/Automod/actions/clean.ts
+++ b/backend/src/plugins/Automod/actions/clean.ts
@@ -4,6 +4,8 @@ import { LogType } from "../../../data/LogType";
import { noop } from "../../../utils";
import { automodAction } from "../helpers";
+const cleanDebugServer = process.env.TEMP_CLEAN_DEBUG_SERVER;
+
export const CleanAction = automodAction({
configType: t.boolean,
defaultConfig: false,
@@ -27,13 +29,26 @@ export const CleanAction = automodAction({
}
}
+ if (pluginData.guild.id === cleanDebugServer) {
+ const toDeleteFormatted = Array.from(messageIdsToDeleteByChannelId.entries())
+ .map(([channelId, messageIds]) => `- ${channelId}: ${messageIds.join(", ")}`)
+ .join("\n");
+ // tslint:disable-next-line:no-console
+ console.log(`[DEBUG] Cleaning messages (${ruleName}):\n${toDeleteFormatted}`);
+ }
+
for (const [channelId, messageIds] of messageIdsToDeleteByChannelId.entries()) {
for (const id of messageIds) {
pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id);
}
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel;
- await channel.bulkDelete(messageIds as Snowflake[]).catch(noop);
+ await channel.bulkDelete(messageIds as Snowflake[]).catch((err) => {
+ if (pluginData.guild.id === cleanDebugServer) {
+ // tslint:disable-next-line:no-console
+ console.error(`[DEBUG] Failed to bulk delete messages (${ruleName}): ${err}`);
+ }
+ });
}
},
});
From 9d301a42427e50bd4f36985d8418a82fdf57c7b1 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 22 Jan 2022 17:20:44 +0200
Subject: [PATCH 008/190] debug: reduce 'lowest global remaining' console spam
The lowest global remaining rate limit is now only logged when it's
below 30, which usually indicates an unusually high amount of API calls.
---
backend/src/index.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/src/index.ts b/backend/src/index.ts
index deceb3be..f5438991 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -390,8 +390,10 @@ connect().then(async () => {
}, 100);
setInterval(() => {
// FIXME: Debug
- // tslint:disable-next-line:no-console
- console.log("Lowest global remaining in the past 15 seconds:", lowestGlobalRemaining);
+ if (lowestGlobalRemaining < 30) {
+ // tslint:disable-next-line:no-console
+ console.log("[DEBUG] Lowest global remaining in the past 15 seconds:", lowestGlobalRemaining);
+ }
lowestGlobalRemaining = Infinity;
}, 15000);
From ea6df32da59ce52048e0438ece92a3d678cd32e1 Mon Sep 17 00:00:00 2001
From: almeidx
Date: Tue, 25 Jan 2022 19:37:56 +0000
Subject: [PATCH 009/190] fix createCase()
---
backend/src/plugins/Cases/functions/createCase.ts | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/backend/src/plugins/Cases/functions/createCase.ts b/backend/src/plugins/Cases/functions/createCase.ts
index 9df38f26..0a0925d7 100644
--- a/backend/src/plugins/Cases/functions/createCase.ts
+++ b/backend/src/plugins/Cases/functions/createCase.ts
@@ -1,3 +1,4 @@
+import type { Snowflake } from "discord-api-types/globals";
import { GuildPluginData } from "knub";
import { logger } from "../../../logger";
import { resolveUser } from "../../../utils";
@@ -13,9 +14,11 @@ export async function createCase(pluginData: GuildPluginData, a
const modName = mod.tag;
let ppName: string | null = null;
+ let ppId: Snowflake | null = null;
if (args.ppId) {
const pp = await resolveUser(pluginData.client, args.ppId);
ppName = pp.tag;
+ ppId = pp.id;
}
if (args.auditLogId) {
@@ -28,20 +31,20 @@ export async function createCase(pluginData: GuildPluginData, a
const createdCase = await pluginData.state.cases.create({
type: args.type,
- user_id: args.userId,
+ user_id: user.id,
user_name: userName,
- mod_id: args.modId,
+ mod_id: mod.id,
mod_name: modName,
audit_log_id: args.auditLogId,
- pp_id: args.ppId,
+ pp_id: ppId,
pp_name: ppName,
is_hidden: Boolean(args.hide),
});
- if (args.reason || (args.noteDetails && args.noteDetails.length)) {
+ if (args.reason || args.noteDetails?.length) {
await createCaseNote(pluginData, {
caseId: createdCase.id,
- modId: args.modId,
+ modId: mod.id,
body: args.reason || "",
automatic: args.automatic,
postInCaseLogOverride: false,
@@ -53,7 +56,7 @@ export async function createCase(pluginData: GuildPluginData, a
for (const extraNote of args.extraNotes) {
await createCaseNote(pluginData, {
caseId: createdCase.id,
- modId: args.modId,
+ modId: mod.id,
body: extraNote,
automatic: args.automatic,
postInCaseLogOverride: false,
From af4b82d48da54d11e9ee657b71690aebc6d49615 Mon Sep 17 00:00:00 2001
From: almeidx
Date: Mon, 7 Feb 2022 21:18:41 +0000
Subject: [PATCH 010/190] fix(userinfocmd): limit the amount of roles shown
---
.../src/plugins/Utility/functions/getUserInfoEmbed.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
index 39cf4166..e775205c 100644
--- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
@@ -16,6 +16,13 @@ import {
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { UtilityPluginType } from "../types";
+const MAX_ROLES_TO_DISPLAY = 15;
+
+const trimRoles = (roles: string[]) =>
+ roles.length > MAX_ROLES_TO_DISPLAY
+ ? roles.slice(0, MAX_ROLES_TO_DISPLAY).join(", ") + `, and ${MAX_ROLES_TO_DISPLAY - roles.length} more roles`
+ : roles.join(", ");
+
export async function getUserInfoEmbed(
pluginData: GuildPluginData,
userId: string,
@@ -109,7 +116,7 @@ export async function getUserInfoEmbed(
name: preEmbedPadding + "Member information",
value: trimLines(`
${user.bot ? "Added" : "Joined"}: **${joinAge} ago** (\`${prettyJoinedAt}\`)
- ${roles.length > 0 ? "Roles: " + roles.map((r) => `<@&${r.id}>`).join(", ") : ""}
+ ${roles.length > 0 ? "Roles: " + trimRoles(roles.map((r) => `<@&${r.id}>`)) : ""}
`),
});
From 49df2609d82485ee612902b7ea91e6ef40df407b Mon Sep 17 00:00:00 2001
From: almeidx
Date: Thu, 17 Feb 2022 14:47:53 +0000
Subject: [PATCH 011/190] fix: embed validation
---
backend/src/utils.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/utils.ts b/backend/src/utils.ts
index 9a37511e..93d52418 100644
--- a/backend/src/utils.ts
+++ b/backend/src/utils.ts
@@ -327,7 +327,7 @@ export const zEmbedInput = z.object({
title: z.string().optional(),
description: z.string().optional(),
url: z.string().optional(),
- timestamp: z.number().optional(),
+ timestamp: z.string().optional(),
color: z.number().optional(),
footer: z.optional(
From 24cc532e86958ccbe05ac952d544de5aa631f9a6 Mon Sep 17 00:00:00 2001
From: almeidx
Date: Sat, 19 Feb 2022 17:57:01 +0000
Subject: [PATCH 012/190] fix: allow 0 deleteMessageDays and fix upper limit
---
backend/src/plugins/Automod/actions/ban.ts | 2 +-
backend/src/plugins/ModActions/functions/banUserId.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/plugins/Automod/actions/ban.ts b/backend/src/plugins/Automod/actions/ban.ts
index e32279a7..9cd0fd86 100644
--- a/backend/src/plugins/Automod/actions/ban.ts
+++ b/backend/src/plugins/Automod/actions/ban.ts
@@ -25,7 +25,7 @@ export const BanAction = automodAction({
const reason = actionConfig.reason || "Kicked automatically";
const duration = actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : undefined;
const contactMethods = actionConfig.notify ? resolveActionContactMethods(pluginData, actionConfig) : undefined;
- const deleteMessageDays = actionConfig.deleteMessageDays || undefined;
+ const deleteMessageDays = actionConfig.deleteMessageDays ?? undefined;
const caseArgs: Partial = {
modId: pluginData.client.user!.id,
diff --git a/backend/src/plugins/ModActions/functions/banUserId.ts b/backend/src/plugins/ModActions/functions/banUserId.ts
index 21d02738..9833ce2c 100644
--- a/backend/src/plugins/ModActions/functions/banUserId.ts
+++ b/backend/src/plugins/ModActions/functions/banUserId.ts
@@ -85,7 +85,7 @@ export async function banUserId(
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_BAN, userId);
ignoreEvent(pluginData, IgnoredEventType.Ban, userId);
try {
- const deleteMessageDays = Math.min(30, Math.max(0, banOptions.deleteMessageDays ?? 1));
+ const deleteMessageDays = Math.min(7, Math.max(0, banOptions.deleteMessageDays ?? 1));
await pluginData.guild.bans.create(userId as Snowflake, {
days: deleteMessageDays,
reason: reason ?? undefined,
From 7259f6017e747efd82edbd39b058995600e1e757 Mon Sep 17 00:00:00 2001
From: almeidx
Date: Sun, 20 Feb 2022 02:05:57 +0000
Subject: [PATCH 013/190] chore: remove double parenthesis in
match_attachment_type trigger
---
backend/src/plugins/Automod/triggers/matchAttachmentType.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts
index d905fbc0..142e7b0e 100644
--- a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts
+++ b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts
@@ -72,7 +72,7 @@ export const MatchAttachmentTypeTrigger = automodTrigger()({
return (
asSingleLine(`
Matched attachment type \`${Util.escapeInlineCode(matchResult.extra.matchedType)}\`
- (${matchResult.extra.mode === "blacklist" ? "(blacklisted)" : "(not in whitelist)"})
+ (${matchResult.extra.mode === "blacklist" ? "blacklisted" : "not in whitelist"})
in message (\`${contexts[0].message!.id}\`) in ${prettyChannel}:
`) + messageSummary(contexts[0].message!)
);
From b9422ce12d65374709942bf058e9a9f81e65c2a8 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 4 Apr 2022 23:10:07 +0300
Subject: [PATCH 014/190] feat: update to discord.js@13.6.0 and
discord-api-types@0.31.0
---
backend/package-lock.json | 358 +++++++++++++++-----------------------
backend/package.json | 4 +-
2 files changed, 138 insertions(+), 224 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index e7f8c0bc..f37db60d 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -13,8 +13,8 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.22.0",
- "discord.js": "^13.3.1",
+ "discord-api-types": "^0.31.0",
+ "discord.js": "^13.6.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
@@ -167,15 +167,15 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
- "integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
+ "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
"dependencies": {
"@sindresorhus/is": "^4.2.0",
- "discord-api-types": "^0.24.0",
- "ow": "^0.27.0",
+ "discord-api-types": "^0.26.0",
"ts-mixer": "^6.0.0",
- "tslib": "^2.3.1"
+ "tslib": "^2.3.1",
+ "zod": "^3.11.6"
},
"engines": {
"node": ">=16.0.0",
@@ -183,9 +183,9 @@
}
},
"node_modules/@discordjs/builders/node_modules/@sindresorhus/is": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
- "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==",
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
"engines": {
"node": ">=10"
},
@@ -194,9 +194,9 @@
}
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
- "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==",
+ "version": "0.26.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
+ "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
"engines": {
"node": ">=12"
}
@@ -207,27 +207,14 @@
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/@discordjs/collection": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
- "integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
+ "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==",
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
- "node_modules/@discordjs/form-data": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
- "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
@@ -264,9 +251,9 @@
}
},
"node_modules/@sapphire/async-queue": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.8.tgz",
- "integrity": "sha512-Oi4EEi8vOne8RM1tCdQ3kYAtl/J6ztak3Th6wwGFqA2SVNJtedw196LjsLX0bK8Li8cwaljbFf08N+0zeqhkWQ==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz",
+ "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
@@ -533,9 +520,9 @@
"dev": true
},
"node_modules/@types/ws": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
- "integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
+ "version": "8.5.3",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
+ "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
"dependencies": {
"@types/node": "*"
}
@@ -2180,27 +2167,24 @@
}
},
"node_modules/discord-api-types": {
- "version": "0.22.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
- "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
- "engines": {
- "node": ">=12"
- }
+ "version": "0.31.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.0.tgz",
+ "integrity": "sha512-IL4KKEo3QOQRcrtkpAYiDOQHIVuDBgtzFgDKsMqllbPKi3o/54mJOvYEG38oFa1G2qR4b+nTB5mMgc85W4/eQw=="
},
"node_modules/discord.js": {
- "version": "13.3.1",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
- "integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
+ "version": "13.6.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
+ "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
"dependencies": {
- "@discordjs/builders": "^0.8.1",
- "@discordjs/collection": "^0.3.2",
- "@discordjs/form-data": "^3.0.1",
- "@sapphire/async-queue": "^1.1.8",
+ "@discordjs/builders": "^0.11.0",
+ "@discordjs/collection": "^0.4.0",
+ "@sapphire/async-queue": "^1.1.9",
"@types/node-fetch": "^2.5.12",
- "@types/ws": "^8.2.0",
- "discord-api-types": "^0.24.0",
+ "@types/ws": "^8.2.2",
+ "discord-api-types": "^0.26.0",
+ "form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.2.3"
+ "ws": "^8.4.0"
},
"engines": {
"node": ">=16.6.0",
@@ -2208,13 +2192,26 @@
}
},
"node_modules/discord.js/node_modules/discord-api-types": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
- "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==",
+ "version": "0.26.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
+ "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
"engines": {
"node": ">=12"
}
},
+ "node_modules/discord.js/node_modules/form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/dot-prop": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
@@ -3059,6 +3056,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+ "dev": true,
"engines": {
"node": ">=8"
}
@@ -3226,6 +3224,15 @@
"node": ">=8"
}
},
+ "node_modules/knub/node_modules/discord-api-types": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
+ "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
+ "deprecated": "No longer supported. Install the latest release!",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/last-commit-log": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/last-commit-log/-/last-commit-log-2.1.0.tgz",
@@ -3882,61 +3889,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/ow": {
- "version": "0.27.0",
- "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
- "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"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ow/node_modules/@sindresorhus/is": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
- "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/ow/node_modules/dot-prop": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
- "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
- "dependencies": {
- "is-obj": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ow/node_modules/type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@@ -5312,9 +5264,9 @@
}
},
"node_modules/ts-mixer": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
- "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
+ "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
},
"node_modules/tsc-watch": {
"version": "4.0.0",
@@ -5785,14 +5737,6 @@
"uuid": "bin/uuid"
}
},
- "node_modules/vali-date": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
- "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -6020,9 +5964,9 @@
}
},
"node_modules/ws": {
- "version": "8.2.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
- "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
+ "version": "8.5.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
+ "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
"engines": {
"node": ">=10.0.0"
},
@@ -6250,9 +6194,9 @@
}
},
"node_modules/zod": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.7.2.tgz",
- "integrity": "sha512-JhYYcj+TS/a0+3kqxnbmuXMVtA+QkJUPu91beQTo1Y3xA891pHeMPQgVOSu97FdzAd056Yp87lpEi8Xvmd3zhw==",
+ "version": "3.14.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
+ "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -6313,26 +6257,26 @@
}
},
"@discordjs/builders": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
- "integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
+ "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
"requires": {
"@sindresorhus/is": "^4.2.0",
- "discord-api-types": "^0.24.0",
- "ow": "^0.27.0",
+ "discord-api-types": "^0.26.0",
"ts-mixer": "^6.0.0",
- "tslib": "^2.3.1"
+ "tslib": "^2.3.1",
+ "zod": "^3.11.6"
},
"dependencies": {
"@sindresorhus/is": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
- "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw=="
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
},
"discord-api-types": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
- "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A=="
+ "version": "0.26.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
+ "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
},
"tslib": {
"version": "2.3.1",
@@ -6342,19 +6286,9 @@
}
},
"@discordjs/collection": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
- "integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg=="
- },
- "@discordjs/form-data": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
- "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- }
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
+ "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw=="
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
@@ -6383,9 +6317,9 @@
}
},
"@sapphire/async-queue": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.8.tgz",
- "integrity": "sha512-Oi4EEi8vOne8RM1tCdQ3kYAtl/J6ztak3Th6wwGFqA2SVNJtedw196LjsLX0bK8Li8cwaljbFf08N+0zeqhkWQ=="
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz",
+ "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g=="
},
"@silvia-odwyer/photon-node": {
"version": "0.3.1",
@@ -6642,9 +6576,9 @@
"dev": true
},
"@types/ws": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
- "integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
+ "version": "8.5.3",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
+ "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
"requires": {
"@types/node": "*"
}
@@ -7923,30 +7857,40 @@
}
},
"discord-api-types": {
- "version": "0.22.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
- "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg=="
+ "version": "0.31.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.0.tgz",
+ "integrity": "sha512-IL4KKEo3QOQRcrtkpAYiDOQHIVuDBgtzFgDKsMqllbPKi3o/54mJOvYEG38oFa1G2qR4b+nTB5mMgc85W4/eQw=="
},
"discord.js": {
- "version": "13.3.1",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
- "integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
+ "version": "13.6.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
+ "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
"requires": {
- "@discordjs/builders": "^0.8.1",
- "@discordjs/collection": "^0.3.2",
- "@discordjs/form-data": "^3.0.1",
- "@sapphire/async-queue": "^1.1.8",
+ "@discordjs/builders": "^0.11.0",
+ "@discordjs/collection": "^0.4.0",
+ "@sapphire/async-queue": "^1.1.9",
"@types/node-fetch": "^2.5.12",
- "@types/ws": "^8.2.0",
- "discord-api-types": "^0.24.0",
+ "@types/ws": "^8.2.2",
+ "discord-api-types": "^0.26.0",
+ "form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.2.3"
+ "ws": "^8.4.0"
},
"dependencies": {
"discord-api-types": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
- "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A=="
+ "version": "0.26.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
+ "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
+ },
+ "form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
}
}
},
@@ -8590,7 +8534,8 @@
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+ "dev": true
},
"is-observable": {
"version": "2.1.0",
@@ -8711,6 +8656,13 @@
"discord.js": "^13.0.1",
"knub-command-manager": "^9.1.0",
"ts-essentials": "^6.0.7"
+ },
+ "dependencies": {
+ "discord-api-types": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
+ "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg=="
+ }
}
},
"knub-command-manager": {
@@ -9237,39 +9189,6 @@
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
- "ow": {
- "version": "0.27.0",
- "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
- "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
- "requires": {
- "@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"
- },
- "dependencies": {
- "@sindresorhus/is": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
- "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw=="
- },
- "dot-prop": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
- "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA=="
- }
- }
- },
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@@ -10344,9 +10263,9 @@
"requires": {}
},
"ts-mixer": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
- "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
+ "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
},
"tsc-watch": {
"version": "4.0.0",
@@ -10698,11 +10617,6 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
- "vali-date": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
- "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY="
- },
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -10883,9 +10797,9 @@
}
},
"ws": {
- "version": "8.2.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
- "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
+ "version": "8.5.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
+ "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
"requires": {}
},
"xdg-basedir": {
@@ -11053,9 +10967,9 @@
}
},
"zod": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.7.2.tgz",
- "integrity": "sha512-JhYYcj+TS/a0+3kqxnbmuXMVtA+QkJUPu91beQTo1Y3xA891pHeMPQgVOSu97FdzAd056Yp87lpEi8Xvmd3zhw=="
+ "version": "3.14.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
+ "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw=="
}
}
}
diff --git a/backend/package.json b/backend/package.json
index d8a01466..018a359d 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -28,8 +28,8 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.22.0",
- "discord.js": "^13.3.1",
+ "discord-api-types": "^0.31.0",
+ "discord.js": "^13.6.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
From 0d59a7844cd0c2a86c470afb82e88f89d4093b45 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 4 Apr 2022 23:18:34 +0300
Subject: [PATCH 015/190] chore: update backend dependencies to address npm
audit issues
---
backend/package-lock.json | 5499 +++++++++++--------------------------
backend/package.json | 8 +-
2 files changed, 1561 insertions(+), 3946 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index f37db60d..eb8b26ae 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -36,11 +36,11 @@
"moment-timezone": "^0.5.21",
"multer": "^1.4.3",
"mysql": "^2.16.0",
- "node-fetch": "^2.6.5",
+ "node-fetch": "^2.6.7",
"parse-color": "^1.0.0",
"passport": "^0.4.0",
"passport-custom": "^1.0.5",
- "passport-oauth2": "^1.5.0",
+ "passport-oauth2": "^1.6.1",
"pkg-up": "^3.1.0",
"reflect-metadata": "^0.1.12",
"regexp-worker": "^1.1.0",
@@ -75,81 +75,39 @@
"@types/safe-regex": "^1.1.2",
"@types/tmp": "0.0.33",
"@types/twemoji": "^12.1.0",
- "ava": "^3.10.0",
+ "ava": "^3.15.0",
"rimraf": "^2.6.2",
"source-map-support": "^0.5.16",
- "tsc-watch": "^4.0.0"
- }
- },
- "../../Knub": {
- "name": "knub",
- "version": "30.0.0-beta.38",
- "extraneous": true,
- "license": "MIT",
- "dependencies": {
- "discord-api-types": "^0.22.0",
- "discord.js": "^13.1.0",
- "knub-command-manager": "^9.1.0",
- "ts-essentials": "^6.0.7"
- },
- "devDependencies": {
- "@types/chai": "^4.2.18",
- "@types/mocha": "^7.0.2",
- "@types/node": "^14.14.45",
- "@typescript-eslint/eslint-plugin": "^4.23.0",
- "@typescript-eslint/parser": "^4.23.0",
- "chai": "^4.3.4",
- "eslint": "^7.2.0",
- "husky": "^4.3.8",
- "lint-staged": "^10.5.4",
- "mocha": "^8.4.0",
- "prettier": "^2.3.0",
- "shx": "^0.3.3",
- "ts-node": "^8.10.2",
- "typescript": "^4.2.4"
+ "tsc-watch": "^5.0.2"
}
},
"node_modules/@babel/code-frame": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
- "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@babel/highlight": "^7.10.4"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
- "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@babel/highlight": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
- "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@babel/helper-validator-identifier": "^7.10.4",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
},
- "node_modules/@babel/runtime-corejs3": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.4.tgz",
- "integrity": "sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw==",
- "dev": true,
- "dependencies": {
- "core-js-pure": "^3.0.0",
- "regenerator-runtime": "^0.13.4"
- }
- },
"node_modules/@concordance/react": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz",
- "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"arrify": "^1.0.1"
},
@@ -159,17 +117,15 @@
},
"node_modules/@concordance/react/node_modules/arrify": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@discordjs/builders": {
"version": "0.11.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
- "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
+ "license": "Apache-2.0",
"dependencies": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.26.0",
@@ -184,8 +140,7 @@
},
"node_modules/@discordjs/builders/node_modules/@sindresorhus/is": {
"version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -195,21 +150,18 @@
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
"version": "0.26.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
- "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
+ "license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/@discordjs/builders/node_modules/tslib": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
- "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
+ "license": "0BSD"
},
"node_modules/@discordjs/collection": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
- "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==",
+ "license": "Apache-2.0",
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
@@ -217,9 +169,8 @@
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
- "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "2.0.3",
"run-parallel": "^1.1.9"
@@ -230,18 +181,16 @@
},
"node_modules/@nodelib/fs.stat": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
- "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 8"
}
},
"node_modules/@nodelib/fs.walk": {
"version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
- "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@nodelib/fs.scandir": "2.1.3",
"fastq": "^1.6.0"
@@ -252,8 +201,7 @@
},
"node_modules/@sapphire/async-queue": {
"version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz",
- "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==",
+ "license": "MIT",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
@@ -261,28 +209,24 @@
},
"node_modules/@silvia-odwyer/photon-node": {
"version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.1.tgz",
- "integrity": "sha512-Q4SRhdupqOiDQKZZbQy4P5GqePUcS+Zv6SB3YD5ZTQVKZ9BLXasSG76dPccK3wZ9aU0vEUEypCalLy41Q7sVDA=="
+ "license": "Apache-2.0"
},
"node_modules/@sindresorhus/is": {
"version": "0.14.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
- "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/@sqltools/formatter": {
"version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.2.tgz",
- "integrity": "sha512-/5O7Fq6Vnv8L6ucmPjaWbVG1XkP4FO+w5glqfkIsq3Xw4oyNAdJddbnYodNDAfjVUvo/rrSCTom4kAND7T1o5Q=="
+ "license": "MIT"
},
"node_modules/@szmarczak/http-timer": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
- "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"defer-to-connect": "^1.0.1"
},
@@ -292,9 +236,8 @@
},
"node_modules/@types/body-parser": {
"version": "1.17.1",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.1.tgz",
- "integrity": "sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/connect": "*",
"@types/node": "*"
@@ -302,33 +245,29 @@
},
"node_modules/@types/color-name": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
- "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/connect": {
"version": "3.4.32",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
- "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/cors": {
"version": "2.8.6",
- "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.6.tgz",
- "integrity": "sha512-invOmosX0DqbpA+cE2yoHGUlF/blyf7nB0OGYBBiH27crcVm5NmFaZkLP4Ta1hGaesckCi5lVLlydNJCxkTOSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express": "*"
}
},
"node_modules/@types/express": {
"version": "4.17.2",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.2.tgz",
- "integrity": "sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -337,104 +276,76 @@
},
"node_modules/@types/express-serve-static-core": {
"version": "4.16.11",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.11.tgz",
- "integrity": "sha512-K8d2M5t3tBQimkyaYTXxtHYyoJPUEhy2/omVRnTAKw5FEdT+Ft6lTaTOpoJdHeG+mIwQXXtqiTcYZ6IR8LTzjQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/node": "*",
"@types/range-parser": "*"
}
},
- "node_modules/@types/glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA==",
- "dev": true,
- "dependencies": {
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
"node_modules/@types/jest": {
"version": "24.0.21",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.21.tgz",
- "integrity": "sha512-uyqFvx78Tuy0h5iLCPWRCvi5HhWwEqhIj30doitp191oYLqlCxUyAJHdWVm5+Nr271/vPnkyt6rWeEIjGowBTg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/jest-diff": "*"
}
},
"node_modules/@types/jest-diff": {
"version": "20.0.1",
- "resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz",
- "integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/js-yaml": {
"version": "3.12.1",
- "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.1.tgz",
- "integrity": "sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/json5": {
"version": "0.0.29",
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
- "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
+ "license": "MIT"
},
"node_modules/@types/lodash": {
"version": "4.14.144",
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.144.tgz",
- "integrity": "sha512-ogI4g9W5qIQQUhXAclq6zhqgqNUr7UlFaqDHbch7WLSLeeM/7d3CRaw7GLajxvyFvhJqw4Rpcz5bhoaYtIx6Tg==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/lodash.at": {
"version": "4.6.6",
- "resolved": "https://registry.npmjs.org/@types/lodash.at/-/lodash.at-4.6.6.tgz",
- "integrity": "sha512-OAfIqBWv0HjWVxKF8y6ZFTEwLM1wgpvsrMOb/fEKp8/HM2JO2V555Au5JZkiTnXOF453rqCooGKYFzNrR/kaAA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/lodash": "*"
}
},
"node_modules/@types/mime": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.1.tgz",
- "integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw==",
- "dev": true
- },
- "node_modules/@types/minimatch": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
- "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/moment-timezone": {
"version": "0.5.12",
- "resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.12.tgz",
- "integrity": "sha512-hnHH2+Efg2vExr/dSz+IX860nSiyk9Sk4pJF2EmS11lRpMcNXeB4KBW5xcgw2QPsb9amTXdsVNEe5IoJXiT0uw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"moment": ">=2.14.0"
}
},
"node_modules/@types/multer": {
"version": "1.4.7",
- "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz",
- "integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express": "*"
}
},
"node_modules/@types/node": {
"version": "14.0.14",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.14.tgz",
- "integrity": "sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ=="
+ "license": "MIT"
},
"node_modules/@types/node-fetch": {
"version": "2.5.12",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
- "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
+ "license": "MIT",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -442,33 +353,29 @@
},
"node_modules/@types/normalize-package-data": {
"version": "2.4.0",
- "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
- "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/oauth": {
"version": "0.9.1",
- "resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.1.tgz",
- "integrity": "sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/passport": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.1.tgz",
- "integrity": "sha512-oK87JjN8i8kmqb0RN0sCUB/ZjrWf3b8U45eAzZVy1ssYYgBrMOuALmvoqp7MglsilXAjxum+LS29VQqeQx6ddA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express": "*"
}
},
"node_modules/@types/passport-oauth2": {
"version": "1.4.8",
- "resolved": "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.4.8.tgz",
- "integrity": "sha512-tlX16wyFE5YJR2pHpZ308dgB1MV9/Ra2wfQh71eWk+/umPoD1Rca2D4N5M27W7nZm1wqUNGTk1I864nHvEgiFA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express": "*",
"@types/oauth": "*",
@@ -477,9 +384,8 @@
},
"node_modules/@types/passport-strategy": {
"version": "0.2.35",
- "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.35.tgz",
- "integrity": "sha512-o5D19Jy2XPFoX2rKApykY15et3Apgax00RRLf0RUotPDUsYrQa7x4howLYr9El2mlUApHmCMv5CZ1IXqKFQ2+g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express": "*",
"@types/passport": "*"
@@ -487,21 +393,18 @@
},
"node_modules/@types/range-parser": {
"version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz",
- "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/safe-regex": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@types/safe-regex/-/safe-regex-1.1.2.tgz",
- "integrity": "sha512-wuS9LVpgIiTYaGKd+s6Dj0kRXBkttaXjVxzaXmviCACi8RO+INPayND+VNjAcall/l1Jkyhh9lyPfKW/aP/Yug==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/serve-static": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz",
- "integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -509,28 +412,24 @@
},
"node_modules/@types/tmp": {
"version": "0.0.33",
- "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha1-EHPEvIJHVK49EM+riKsCN7qWTk0=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/twemoji": {
"version": "12.1.0",
- "resolved": "https://registry.npmjs.org/@types/twemoji/-/twemoji-12.1.0.tgz",
- "integrity": "sha512-dTHU1ZE83qUlF3oFWrdxKBmOimM+/3o9hzDBszcKjajmNu5G/DjWgQrRNkq+zxeR+zDN030ciAt5qTH+WXBD8A==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/ws": {
"version": "8.5.3",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
- "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
+ "license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/accepts": {
"version": "1.3.7",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
- "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+ "license": "MIT",
"dependencies": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
@@ -540,10 +439,9 @@
}
},
"node_modules/acorn": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
- "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
+ "version": "8.7.0",
"dev": true,
+ "license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
@@ -552,19 +450,17 @@
}
},
"node_modules/acorn-walk": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
- "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
+ "version": "8.2.0",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/aggregate-error": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz",
- "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"clean-stack": "^2.0.0",
"indent-string": "^4.0.0"
@@ -574,28 +470,24 @@
}
},
"node_modules/ansi-align": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
- "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
+ "version": "3.0.1",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "string-width": "^3.0.0"
+ "string-width": "^4.1.0"
}
},
"node_modules/ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true,
+ "version": "5.0.1",
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-convert": "^1.9.0"
},
@@ -605,14 +497,12 @@
},
"node_modules/any-promise": {
"version": "1.3.0",
- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
- "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
+ "license": "MIT"
},
"node_modules/anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "version": "3.1.2",
"dev": true,
+ "license": "ISC",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
@@ -623,95 +513,84 @@
},
"node_modules/app-root-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz",
- "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==",
+ "license": "MIT",
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/append-field": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
- "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
+ "license": "MIT"
},
"node_modules/argparse": {
"version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "license": "MIT",
"dependencies": {
"sprintf-js": "~1.0.2"
}
},
"node_modules/array-find-index": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
- "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
+ "license": "MIT"
},
"node_modules/array-union": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/arrgv": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
- "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/arrify": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
- "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/astral-regex": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
- "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ "license": "MIT"
},
"node_modules/ava": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/ava/-/ava-3.10.0.tgz",
- "integrity": "sha512-CxcYQYeE39pcLWrN2/TASMpnqH/SoaX+W61+4m3saETU041PIDcoP9LLNWPAE/yJZXjp0M1RWTohSkmGqJZKww==",
+ "version": "3.15.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@concordance/react": "^2.0.0",
- "acorn": "^7.3.1",
- "acorn-walk": "^7.2.0",
- "ansi-styles": "^4.2.1",
+ "acorn": "^8.0.4",
+ "acorn-walk": "^8.0.0",
+ "ansi-styles": "^5.0.0",
"arrgv": "^1.0.2",
"arrify": "^2.0.1",
"callsites": "^3.1.0",
"chalk": "^4.1.0",
- "chokidar": "^3.4.0",
+ "chokidar": "^3.4.3",
"chunkd": "^2.0.1",
"ci-info": "^2.0.0",
"ci-parallel-vars": "^1.0.1",
@@ -720,12 +599,12 @@
"cli-truncate": "^2.1.0",
"code-excerpt": "^3.0.0",
"common-path-prefix": "^3.0.0",
- "concordance": "^5.0.0",
+ "concordance": "^5.0.1",
"convert-source-map": "^1.7.0",
"currently-unhandled": "^0.4.1",
- "debug": "^4.1.1",
- "del": "^5.1.0",
- "emittery": "^0.7.0",
+ "debug": "^4.3.1",
+ "del": "^6.0.0",
+ "emittery": "^0.8.0",
"equal-length": "^1.0.0",
"figures": "^3.2.0",
"globby": "^11.0.1",
@@ -733,59 +612,46 @@
"import-local": "^3.0.2",
"indent-string": "^4.0.0",
"is-error": "^2.2.2",
- "is-plain-object": "^3.0.1",
+ "is-plain-object": "^5.0.0",
"is-promise": "^4.0.0",
- "lodash": "^4.17.15",
+ "lodash": "^4.17.20",
"matcher": "^3.0.0",
"md5-hex": "^3.0.1",
- "mem": "^6.1.0",
- "ms": "^2.1.2",
- "ora": "^4.0.4",
+ "mem": "^8.0.0",
+ "ms": "^2.1.3",
+ "ora": "^5.2.0",
+ "p-event": "^4.2.0",
"p-map": "^4.0.0",
"picomatch": "^2.2.2",
"pkg-conf": "^3.1.0",
"plur": "^4.0.0",
- "pretty-ms": "^7.0.0",
+ "pretty-ms": "^7.0.1",
"read-pkg": "^5.2.0",
"resolve-cwd": "^3.0.0",
"slash": "^3.0.0",
"source-map-support": "^0.5.19",
- "stack-utils": "^2.0.2",
+ "stack-utils": "^2.0.3",
"strip-ansi": "^6.0.0",
- "supertap": "^1.0.0",
+ "supertap": "^2.0.0",
"temp-dir": "^2.0.0",
"trim-off-newlines": "^1.0.1",
- "update-notifier": "^4.1.0",
+ "update-notifier": "^5.0.1",
"write-file-atomic": "^3.0.3",
- "yargs": "^15.4.0"
+ "yargs": "^16.2.0"
},
"bin": {
"ava": "cli.js"
},
"engines": {
- "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0"
- }
- },
- "node_modules/ava/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true,
- "engines": {
- "node": ">=8"
+ "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15"
}
},
"node_modules/ava/node_modules/ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "5.2.0",
"dev": true,
- "dependencies": {
- "@types/color-name": "^1.1.1",
- "color-convert": "^2.0.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
@@ -793,9 +659,8 @@
},
"node_modules/ava/node_modules/chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -807,22 +672,24 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/ava/node_modules/cliui": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
- "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "node_modules/ava/node_modules/chalk/node_modules/ansi-styles": {
+ "version": "4.3.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^6.2.0"
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/ava/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -832,143 +699,56 @@
},
"node_modules/ava/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/ava/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "version": "4.3.4",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/ava/node_modules/decamelize": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-3.2.0.tgz",
- "integrity": "sha512-4TgkVUsmmu7oCSyGBm5FvfMoACuoh9EOidm7V5/J2X2djAwwt57qb3F2KMP2ITqODTCSwb+YRV+0Zqrv18k/hw==",
- "dev": true,
- "dependencies": {
- "xregexp": "^4.2.4"
+ "ms": "2.1.2"
},
"engines": {
- "node": ">=6"
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
}
},
- "node_modules/ava/node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "node_modules/ava/node_modules/debug/node_modules/ms": {
+ "version": "2.1.2",
"dev": true,
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
"node_modules/ava/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "dependencies": {
- "p-locate": "^4.1.0"
- },
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/ava/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/ava/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "version": "2.1.3",
"dev": true,
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
"node_modules/ava/node_modules/source-map-support": {
"version": "0.5.19",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
- "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
- "node_modules/ava/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/ava/node_modules/supports-color": {
"version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -976,79 +756,12 @@
"node": ">=8"
}
},
- "node_modules/ava/node_modules/wrap-ansi": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
- "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/yargs": {
- "version": "15.4.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.0.tgz",
- "integrity": "sha512-D3fRFnZwLWp8jVAAhPZBsmeIHY8tTsb8ItV9KaAaopmC6wde2u6Yw29JBIZHXw14kgkRnYmDgmQU4FVMDlIsWw==",
- "dev": true,
- "dependencies": {
- "cliui": "^6.0.0",
- "decamelize": "^3.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"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ava/node_modules/yargs-parser": {
- "version": "18.1.3",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
- "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
- "dev": true,
- "dependencies": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/ava/node_modules/yargs-parser/node_modules/decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/ava/node_modules/yargs/node_modules/y18n": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
- "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
- "dev": true
- },
"node_modules/balanced-match": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "license": "MIT"
},
"node_modules/base64-js": {
"version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
@@ -1062,51 +775,74 @@
"type": "consulting",
"url": "https://feross.org/support"
}
- ]
+ ],
+ "license": "MIT"
},
"node_modules/base64url": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
- "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==",
+ "license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/bignumber.js": {
"version": "7.2.1",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz",
- "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==",
+ "license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/bindings": {
"version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+ "license": "MIT",
"dependencies": {
"file-uri-to-path": "1.0.0"
}
},
+ "node_modules/bl": {
+ "version": "4.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/bl/node_modules/inherits": {
+ "version": "2.0.4",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/bl/node_modules/readable-stream": {
+ "version": "3.6.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/blueimp-md5": {
- "version": "2.16.0",
- "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.16.0.tgz",
- "integrity": "sha512-j4nzWIqEFpLSbdhUApHRGDwfXbV8ALhqOn+FY5L6XBdKPAXU9BpGgFSbDsgqogfqPPR9R2WooseWCsfhfEC6uQ==",
- "dev": true
+ "version": "2.19.0",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/body-parser": {
"version": "1.19.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
- "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
+ "license": "MIT",
"dependencies": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
@@ -1124,43 +860,31 @@
}
},
"node_modules/boxen": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
- "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
+ "version": "5.1.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-align": "^3.0.0",
- "camelcase": "^5.3.1",
- "chalk": "^3.0.0",
- "cli-boxes": "^2.2.0",
- "string-width": "^4.1.0",
- "term-size": "^2.1.0",
- "type-fest": "^0.8.1",
- "widest-line": "^3.1.0"
+ "camelcase": "^6.2.0",
+ "chalk": "^4.1.0",
+ "cli-boxes": "^2.2.1",
+ "string-width": "^4.2.2",
+ "type-fest": "^0.20.2",
+ "widest-line": "^3.1.0",
+ "wrap-ansi": "^7.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/boxen/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/boxen/node_modules/ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
},
"engines": {
@@ -1171,23 +895,24 @@
}
},
"node_modules/boxen/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/boxen/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -1197,59 +922,21 @@
},
"node_modules/boxen/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/boxen/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/boxen/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/boxen/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/boxen/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/boxen/node_modules/supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -1258,18 +945,19 @@
}
},
"node_modules/boxen/node_modules/type-fest": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
- "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "version": "0.20.2",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/brace-expansion": {
"version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1277,9 +965,8 @@
},
"node_modules/braces": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"fill-range": "^7.0.1"
},
@@ -1289,8 +976,6 @@
},
"node_modules/buffer": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
@@ -1305,6 +990,7 @@
"url": "https://feross.org/support"
}
],
+ "license": "MIT",
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
@@ -1312,22 +998,18 @@
},
"node_modules/buffer-from": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+ "license": "MIT"
},
"node_modules/bufferutil": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz",
- "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==",
"hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
"node-gyp-build": "^4.2.0"
}
},
"node_modules/busboy": {
"version": "0.2.14",
- "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
- "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=",
"dependencies": {
"dicer": "0.2.5",
"readable-stream": "1.1.x"
@@ -1338,13 +1020,11 @@
},
"node_modules/busboy/node_modules/isarray": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ "license": "MIT"
},
"node_modules/busboy/node_modules/readable-stream": {
"version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -1354,22 +1034,19 @@
},
"node_modules/busboy/node_modules/string_decoder": {
"version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ "license": "MIT"
},
"node_modules/bytes": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
- "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/cacheable-request": {
"version": "6.1.0",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
- "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"clone-response": "^1.0.2",
"get-stream": "^5.1.0",
@@ -1384,48 +1061,49 @@
}
},
"node_modules/cacheable-request/node_modules/get-stream": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
- "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
+ "version": "5.2.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"pump": "^3.0.0"
},
"engines": {
"node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cacheable-request/node_modules/lowercase-keys": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/callsites": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "version": "6.3.0",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/chalk": {
"version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -1436,76 +1114,77 @@
}
},
"node_modules/chokidar": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
- "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
+ "version": "3.5.3",
"dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "anymatch": "~3.1.1",
+ "anymatch": "~3.1.2",
"braces": "~3.0.2",
- "glob-parent": "~5.1.0",
+ "glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
- "readdirp": "~3.4.0"
+ "readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
- "fsevents": "~2.1.2"
+ "fsevents": "~2.3.2"
}
},
"node_modules/chunkd": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
- "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/ci-info": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/ci-parallel-vars": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
- "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/clean-stack": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/clean-yaml-object": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
- "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/cli-boxes": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz",
- "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==",
+ "version": "2.2.1",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cli-cursor": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"restore-cursor": "^3.1.0"
},
@@ -1515,8 +1194,7 @@
},
"node_modules/cli-highlight": {
"version": "2.1.10",
- "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.10.tgz",
- "integrity": "sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw==",
+ "license": "ISC",
"dependencies": {
"chalk": "^4.0.0",
"highlight.js": "^10.0.0",
@@ -1535,8 +1213,7 @@
},
"node_modules/cli-highlight/node_modules/ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
@@ -1549,8 +1226,7 @@
},
"node_modules/cli-highlight/node_modules/chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -1564,8 +1240,7 @@
},
"node_modules/cli-highlight/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -1575,21 +1250,18 @@
},
"node_modules/cli-highlight/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "license": "MIT"
},
"node_modules/cli-highlight/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/cli-highlight/node_modules/supports-color": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -1598,19 +1270,20 @@
}
},
"node_modules/cli-spinners": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz",
- "integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==",
+ "version": "2.6.1",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cli-truncate": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
- "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"slice-ansi": "^3.0.0",
"string-width": "^4.2.0"
@@ -1622,123 +1295,35 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/cli-truncate/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cli-truncate/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cli-truncate/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/cliui": {
"version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+ "license": "ISC",
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.0"
}
},
- "node_modules/cliui/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/clone": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
- "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.8"
}
},
"node_modules/clone-response": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
- "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"mimic-response": "^1.0.0"
}
},
"node_modules/code-excerpt": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz",
- "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"convert-to-spaces": "^1.0.1"
},
@@ -1748,23 +1333,20 @@
},
"node_modules/color-convert": {
"version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/color-name": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/combined-stream": {
"version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
@@ -1774,22 +1356,19 @@
},
"node_modules/common-path-prefix": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
- "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
- "dev": true
+ "dev": true,
+ "license": "ISC"
},
"node_modules/concat-map": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "license": "MIT"
},
"node_modules/concat-stream": {
"version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"engines": [
"node >= 0.8"
],
+ "license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@@ -1798,10 +1377,9 @@
}
},
"node_modules/concordance": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.0.tgz",
- "integrity": "sha512-stOCz9ffg0+rytwTaL2njUOIyMfANwfwmqc9Dr4vTUS/x/KkVFlWx9Zlzu6tHYtjKxxaCF/cEAZgPDac+n35sg==",
+ "version": "5.0.4",
"dev": true,
+ "license": "ISC",
"dependencies": {
"date-time": "^3.1.0",
"esutils": "^2.0.3",
@@ -1813,14 +1391,27 @@
"well-known-symbols": "^2.0.0"
},
"engines": {
- "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
+ "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14"
+ }
+ },
+ "node_modules/concordance/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/concordance/node_modules/semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "version": "7.3.5",
"dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
"bin": {
"semver": "bin/semver.js"
},
@@ -1828,11 +1419,15 @@
"node": ">=10"
}
},
+ "node_modules/concordance/node_modules/yallist": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/configstore": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
- "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
"dot-prop": "^5.2.0",
"graceful-fs": "^4.1.2",
@@ -1847,8 +1442,7 @@
},
"node_modules/content-disposition": {
"version": "0.5.3",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
- "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
+ "license": "MIT",
"dependencies": {
"safe-buffer": "5.1.2"
},
@@ -1858,63 +1452,45 @@
},
"node_modules/content-type": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/convert-source-map": {
"version": "1.7.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
- "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"safe-buffer": "~5.1.1"
}
},
"node_modules/convert-to-spaces": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz",
- "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 4"
}
},
"node_modules/cookie": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
- "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
- },
- "node_modules/core-js-pure": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz",
- "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==",
- "dev": true,
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
+ "license": "MIT"
},
"node_modules/core-util-is": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "license": "MIT"
},
"node_modules/cors": {
"version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "license": "MIT",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
@@ -1925,8 +1501,7 @@
},
"node_modules/cross-env": {
"version": "5.2.1",
- "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz",
- "integrity": "sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==",
+ "license": "MIT",
"dependencies": {
"cross-spawn": "^6.0.5"
},
@@ -1940,8 +1515,7 @@
},
"node_modules/cross-spawn": {
"version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "license": "MIT",
"dependencies": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
@@ -1955,18 +1529,16 @@
},
"node_modules/crypto-random-string": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
- "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/currently-unhandled": {
"version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"array-find-index": "^1.0.1"
},
@@ -1976,9 +1548,8 @@
},
"node_modules/date-time": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
- "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"time-zone": "^1.0.0"
},
@@ -1988,17 +1559,15 @@
},
"node_modules/debug": {
"version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/decompress-response": {
"version": "3.3.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
- "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"mimic-response": "^1.0.0"
},
@@ -2008,88 +1577,54 @@
},
"node_modules/deep-diff": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-1.0.2.tgz",
- "integrity": "sha512-aWS3UIVH+NPGCD1kki+DCU9Dua032iSsO43LqQpcs4R3+dVv7tX0qBGjiVHJHjplsoUM2XRO/KB92glqc68awg=="
+ "license": "MIT"
},
"node_modules/deep-extend": {
"version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/defaults": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
- "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"clone": "^1.0.2"
}
},
"node_modules/defer-to-connect": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
- "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/del": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz",
- "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==",
+ "version": "6.0.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "globby": "^10.0.1",
- "graceful-fs": "^4.2.2",
+ "globby": "^11.0.1",
+ "graceful-fs": "^4.2.4",
"is-glob": "^4.0.1",
"is-path-cwd": "^2.2.0",
- "is-path-inside": "^3.0.1",
- "p-map": "^3.0.0",
- "rimraf": "^3.0.0",
+ "is-path-inside": "^3.0.2",
+ "p-map": "^4.0.0",
+ "rimraf": "^3.0.2",
"slash": "^3.0.0"
},
"engines": {
- "node": ">=8"
- }
- },
- "node_modules/del/node_modules/globby": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
- "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
- "dev": true,
- "dependencies": {
- "@types/glob": "^7.1.1",
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.0.3",
- "glob": "^7.1.3",
- "ignore": "^5.1.1",
- "merge2": "^1.2.3",
- "slash": "^3.0.0"
+ "node": ">=10"
},
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/del/node_modules/p-map": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
- "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
- "dev": true,
- "dependencies": {
- "aggregate-error": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/del/node_modules/rimraf": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"glob": "^7.1.3"
},
@@ -2102,29 +1637,24 @@
},
"node_modules/delayed-stream": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/depd": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/destroy": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
- "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
+ "license": "MIT"
},
"node_modules/dicer": {
"version": "0.2.5",
- "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
- "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=",
"dependencies": {
"readable-stream": "1.1.x",
"streamsearch": "0.1.2"
@@ -2135,13 +1665,11 @@
},
"node_modules/dicer/node_modules/isarray": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ "license": "MIT"
},
"node_modules/dicer/node_modules/readable-stream": {
"version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -2151,14 +1679,12 @@
},
"node_modules/dicer/node_modules/string_decoder": {
"version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ "license": "MIT"
},
"node_modules/dir-glob": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"path-type": "^4.0.0"
},
@@ -2168,13 +1694,11 @@
},
"node_modules/discord-api-types": {
"version": "0.31.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.0.tgz",
- "integrity": "sha512-IL4KKEo3QOQRcrtkpAYiDOQHIVuDBgtzFgDKsMqllbPKi3o/54mJOvYEG38oFa1G2qR4b+nTB5mMgc85W4/eQw=="
+ "license": "MIT"
},
"node_modules/discord.js": {
"version": "13.6.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
- "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
+ "license": "Apache-2.0",
"dependencies": {
"@discordjs/builders": "^0.11.0",
"@discordjs/collection": "^0.4.0",
@@ -2193,16 +1717,14 @@
},
"node_modules/discord.js/node_modules/discord-api-types": {
"version": "0.26.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
- "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
+ "license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/discord.js/node_modules/form-data": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
- "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@@ -2213,10 +1735,9 @@
}
},
"node_modules/dot-prop": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
- "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
+ "version": "5.3.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-obj": "^2.0.0"
},
@@ -2226,42 +1747,35 @@
},
"node_modules/dotenv": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz",
- "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=",
+ "license": "BSD-2-Clause",
"engines": {
"node": ">=4.6.0"
}
},
"node_modules/dotgitconfig": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dotgitconfig/-/dotgitconfig-1.0.1.tgz",
- "integrity": "sha512-a6RPc5Cco7ogiKLVExcGBMEEP6jHkzJFYbS/HYGFvQSZrm3EkC876YIqqrj92N8SZYGLqPz6pU522/LlNAaedQ==",
+ "license": "MIT",
"dependencies": {
"ini": "^1.3.5"
}
},
"node_modules/duplexer": {
"version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
- "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true
},
"node_modules/duplexer3": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
- "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
- "dev": true
+ "dev": true,
+ "license": "BSD-3-Clause"
},
"node_modules/ee-first": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+ "license": "MIT"
},
"node_modules/emittery": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz",
- "integrity": "sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ==",
+ "version": "0.8.1",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -2271,31 +1785,27 @@
},
"node_modules/emoji-regex": {
"version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ "license": "MIT"
},
"node_modules/encodeurl": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/end-of-stream": {
"version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/equal-length": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz",
- "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
@@ -2303,6 +1813,7 @@
"node_modules/erlpack": {
"version": "0.1.3",
"resolved": "git+ssh://git@github.com/almeidx/erlpack.git#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
+ "integrity": "sha512-2Tux713HiQIXdxv6nHBFmn6sOBKca5xQOyaIXMquNUTUEx56JhyBaguMWGWV73LM8xOZ/fAow4diI+4KfEAhkg==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -2312,47 +1823,41 @@
},
"node_modules/error-ex": {
"version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-arrayish": "^0.2.1"
}
},
"node_modules/escalade": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/escape-goat": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
- "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+ "license": "MIT"
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "license": "MIT",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/esm": {
"version": "3.2.25",
- "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
- "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
+ "license": "MIT",
"optional": true,
"engines": {
"node": ">=6"
@@ -2360,8 +1865,7 @@
},
"node_modules/esprima": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "license": "BSD-2-Clause",
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
@@ -2372,26 +1876,23 @@
},
"node_modules/esutils": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true,
+ "license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/etag": {
"version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/event-stream": {
"version": "3.3.4",
- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
- "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"duplexer": "~0.1.1",
"from": "~0",
@@ -2404,8 +1905,7 @@
},
"node_modules/express": {
"version": "4.17.1",
- "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
- "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
+ "license": "MIT",
"dependencies": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
@@ -2444,15 +1944,13 @@
},
"node_modules/fast-diff": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
- "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
- "dev": true
+ "dev": true,
+ "license": "Apache-2.0"
},
"node_modules/fast-glob": {
"version": "3.2.4",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
- "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
@@ -2467,26 +1965,23 @@
},
"node_modules/fastq": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz",
- "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"reusify": "^1.0.4"
}
},
"node_modules/figlet": {
"version": "1.5.0",
- "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz",
- "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==",
+ "license": "MIT",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/figures": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"escape-string-regexp": "^1.0.5"
},
@@ -2499,14 +1994,12 @@
},
"node_modules/file-uri-to-path": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+ "license": "MIT"
},
"node_modules/fill-range": {
"version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@@ -2516,8 +2009,7 @@
},
"node_modules/finalhandler": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
- "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
+ "license": "MIT",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
@@ -2533,8 +2025,7 @@
},
"node_modules/find-up": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "license": "MIT",
"dependencies": {
"locate-path": "^3.0.0"
},
@@ -2544,8 +2035,7 @@
},
"node_modules/form-data": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
- "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
+ "license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@@ -2557,35 +2047,30 @@
},
"node_modules/forwarded": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
- "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fp-ts": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.1.1.tgz",
- "integrity": "sha512-YcWhMdDCFCja0MmaDroTgNu+NWWrrnUEn92nvDgrtVy9Z71YFnhNVIghoHPt8gs82ijoMzFGeWKvArbyICiJgw=="
+ "license": "MIT"
},
"node_modules/fresh": {
"version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/from": {
"version": "0.1.7",
- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
- "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/fs-extra": {
"version": "8.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
@@ -2597,45 +2082,26 @@
},
"node_modules/fs-extra/node_modules/jsonfile": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "license": "MIT",
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/fs.realpath": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "node_modules/fsevents": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
- "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
- "deprecated": "\"Please update to latest v2.3 or v2.2\"",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
+ "license": "ISC"
},
"node_modules/get-caller-file": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "license": "ISC",
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/get-stream": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"pump": "^3.0.0"
},
@@ -2645,9 +2111,8 @@
},
"node_modules/glob": {
"version": "7.1.5",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz",
- "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -2662,9 +2127,8 @@
},
"node_modules/glob-parent": {
"version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
},
@@ -2673,22 +2137,31 @@
}
},
"node_modules/global-dirs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz",
- "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==",
+ "version": "3.0.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ini": "^1.3.5"
+ "ini": "2.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/global-dirs/node_modules/ini": {
+ "version": "2.0.0",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/globby": {
"version": "11.0.1",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
- "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
@@ -2706,9 +2179,8 @@
},
"node_modules/got": {
"version": "9.6.0",
- "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
- "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@sindresorhus/is": "^0.14.0",
"@szmarczak/http-timer": "^1.1.2",
@@ -2727,14 +2199,12 @@
}
},
"node_modules/graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
+ "version": "4.2.10",
+ "license": "ISC"
},
"node_modules/has-ansi": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^2.0.0"
},
@@ -2744,54 +2214,47 @@
},
"node_modules/has-ansi/node_modules/ansi-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/has-flag": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/has-yarn": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
- "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/highlight.js": {
"version": "10.6.0",
- "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz",
- "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==",
+ "license": "BSD-3-Clause",
"engines": {
"node": "*"
}
},
"node_modules/hosted-git-info": {
"version": "2.8.9",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
- "dev": true
+ "dev": true,
+ "license": "ISC"
},
"node_modules/http-cache-semantics": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
- "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
- "dev": true
+ "dev": true,
+ "license": "BSD-2-Clause"
},
"node_modules/http-errors": {
"version": "1.7.2",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
- "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
+ "license": "MIT",
"dependencies": {
"depd": "~1.1.2",
"inherits": "2.0.3",
@@ -2805,13 +2268,11 @@
},
"node_modules/humanize-duration": {
"version": "3.21.0",
- "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.21.0.tgz",
- "integrity": "sha512-7BLsrQZ2nMGeakmGDUl1pDne6/7iAdvwf1RtDLCOPHNFIHjkOVW7lcu7xHkIM9HhZAlSSO5crhC1dHvtl4dIQw=="
+ "license": "Unlicense"
},
"node_modules/iconv-lite": {
"version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
@@ -2821,8 +2282,6 @@
},
"node_modules/ieee754": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
@@ -2836,40 +2295,37 @@
"type": "consulting",
"url": "https://feross.org/support"
}
- ]
+ ],
+ "license": "BSD-3-Clause"
},
"node_modules/ignore": {
"version": "5.1.8",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
- "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 4"
}
},
"node_modules/ignore-by-default": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.0.0.tgz",
- "integrity": "sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==",
"dev": true,
+ "license": "ISC",
"engines": {
"node": ">=10 <11 || >=12 <13 || >=14"
}
},
"node_modules/import-lazy": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
- "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/import-local": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz",
- "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"pkg-dir": "^4.2.0",
"resolve-cwd": "^3.0.0"
@@ -2883,26 +2339,23 @@
},
"node_modules/imurmurhash": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.8.19"
}
},
"node_modules/indent-string": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/inflight": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "license": "ISC",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
@@ -2910,50 +2363,43 @@
},
"node_modules/inherits": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ "license": "ISC"
},
"node_modules/ini": {
"version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+ "license": "ISC"
},
"node_modules/io-ts": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.0.1.tgz",
- "integrity": "sha512-RezD+WcCfW4VkMkEcQWL/Nmy/nqsWTvTYg7oUmTGzglvSSV2P9h2z1PVeREPFf0GWNzruYleAt1XCMQZSg1xxQ==",
+ "license": "MIT",
"peerDependencies": {
"fp-ts": "^2.0.0"
}
},
"node_modules/ipaddr.js": {
"version": "1.9.0",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
- "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==",
+ "license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/irregular-plurals": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz",
- "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-arrayish": {
"version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/is-binary-path": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"binary-extensions": "^2.0.0"
},
@@ -2963,9 +2409,8 @@
},
"node_modules/is-ci": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
- "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ci-info": "^2.0.0"
},
@@ -2975,33 +2420,28 @@
},
"node_modules/is-error": {
"version": "2.2.2",
- "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
- "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/is-extglob": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true,
+ "version": "3.0.0",
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
"node_modules/is-glob": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
- "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
},
@@ -3010,16 +2450,15 @@
}
},
"node_modules/is-installed-globally": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz",
- "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==",
+ "version": "0.4.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "global-dirs": "^2.0.1",
- "is-path-inside": "^3.0.1"
+ "global-dirs": "^3.0.0",
+ "is-path-inside": "^3.0.2"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -3027,44 +2466,42 @@
},
"node_modules/is-interactive": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
- "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-npm": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz",
- "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==",
+ "version": "5.0.0",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-number": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/is-obj": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-observable": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz",
- "integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw==",
+ "license": "MIT",
"engines": {
"node": ">=8"
},
@@ -3074,78 +2511,78 @@
},
"node_modules/is-path-cwd": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
- "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/is-path-inside": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
- "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==",
+ "version": "3.0.3",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-plain-object": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz",
- "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==",
+ "version": "5.0.0",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-promise": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/is-typedarray": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "0.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/is-yarn-global": {
"version": "0.3.0",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
- "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/isarray": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ "license": "MIT"
},
"node_modules/isexe": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ "license": "ISC"
},
"node_modules/js-string-escape": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
- "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "version": "3.14.1",
+ "license": "MIT",
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@@ -3156,20 +2593,17 @@
},
"node_modules/json-buffer": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
- "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/json-parse-better-errors": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
- "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/json5": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+ "license": "MIT",
"dependencies": {
"minimist": "^1.2.0"
},
@@ -3179,8 +2613,7 @@
},
"node_modules/jsonfile": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz",
- "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==",
+ "license": "MIT",
"dependencies": {
"universalify": "^0.1.2"
},
@@ -3190,17 +2623,15 @@
},
"node_modules/keyv": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
- "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"json-buffer": "3.0.0"
}
},
"node_modules/knub": {
"version": "30.0.0-beta.46",
- "resolved": "https://registry.npmjs.org/knub/-/knub-30.0.0-beta.46.tgz",
- "integrity": "sha512-eNGfFVXwdDnyIjL3nLJceVIlwDdfnM3zJPuPdsOKUbRp4yNBnRSBcG+TnaXc3nUWmXIq3q78rRPeThoo0qz6iQ==",
+ "license": "MIT",
"dependencies": {
"discord-api-types": "^0.22.0",
"discord.js": "^13.0.1",
@@ -3210,33 +2641,28 @@
},
"node_modules/knub-command-manager": {
"version": "9.1.0",
- "resolved": "https://registry.npmjs.org/knub-command-manager/-/knub-command-manager-9.1.0.tgz",
- "integrity": "sha512-pEtpWElbBoTRSL8kWSPRrTIuTIdvYGkP/wzOn77cieumC02adfwEt1Cc09HFvVT4ib35nf1y31oul36csaG7Vg==",
+ "license": "MIT",
"dependencies": {
"escape-string-regexp": "^2.0.0"
}
},
"node_modules/knub-command-manager/node_modules/escape-string-regexp": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/knub/node_modules/discord-api-types": {
"version": "0.22.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
- "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
- "deprecated": "No longer supported. Install the latest release!",
+ "license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/last-commit-log": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/last-commit-log/-/last-commit-log-2.1.0.tgz",
- "integrity": "sha512-vvZNAaiPSQ/PtyfDP2UrIRwKx0xttliGSwEfd/4tU1B/2iD/g4e3nWbttYb6YLarpULpM6s5OW5JWl97ogB6jA==",
+ "license": "MIT",
"dependencies": {
"dotgitconfig": "^1.0.1"
},
@@ -3246,9 +2672,8 @@
},
"node_modules/latest-version": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
- "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"package-json": "^6.3.0"
},
@@ -3258,15 +2683,13 @@
},
"node_modules/lines-and-columns": {
"version": "1.1.6",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
- "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/load-json-file": {
"version": "5.3.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
- "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"graceful-fs": "^4.1.15",
"parse-json": "^4.0.0",
@@ -3280,8 +2703,7 @@
},
"node_modules/locate-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "license": "MIT",
"dependencies": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -3292,46 +2714,106 @@
},
"node_modules/lodash": {
"version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ "license": "MIT"
},
"node_modules/lodash.chunk": {
"version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz",
- "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw="
+ "license": "MIT"
},
"node_modules/lodash.clonedeep": {
"version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
- "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
+ "license": "MIT"
},
"node_modules/lodash.difference": {
"version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz",
- "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw="
+ "license": "MIT"
},
"node_modules/lodash.intersection": {
"version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.intersection/-/lodash.intersection-4.4.0.tgz",
- "integrity": "sha1-ChG6Yx0OlcI8fy9Mu5ppLtF45wU="
+ "license": "MIT"
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
- "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
+ "license": "MIT"
},
"node_modules/lodash.pick": {
"version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
- "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM="
+ "license": "MIT"
},
"node_modules/log-symbols": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
- "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
+ "version": "4.1.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^2.4.2"
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-symbols/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/log-symbols/node_modules/chalk": {
+ "version": "4.1.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-name": {
+ "version": "1.1.4",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/log-symbols/node_modules/has-flag": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/log-symbols/node_modules/supports-color": {
+ "version": "7.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
@@ -3339,28 +2821,16 @@
},
"node_modules/lowercase-keys": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
- "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
- "dev": true,
- "dependencies": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
"node_modules/make-dir": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
- "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"semver": "^6.0.0"
},
@@ -3373,18 +2843,16 @@
},
"node_modules/make-dir/node_modules/semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true,
+ "license": "ISC",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/map-age-cleaner": {
"version": "0.1.3",
- "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
- "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-defer": "^1.0.0"
},
@@ -3394,15 +2862,12 @@
},
"node_modules/map-stream": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
- "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
"dev": true
},
"node_modules/matcher": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"escape-string-regexp": "^4.0.0"
},
@@ -3412,9 +2877,8 @@
},
"node_modules/matcher/node_modules/escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -3424,9 +2888,8 @@
},
"node_modules/md5-hex": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
- "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"blueimp-md5": "^2.10.0"
},
@@ -3436,61 +2899,49 @@
},
"node_modules/media-typer": {
"version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mem": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-6.1.0.tgz",
- "integrity": "sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==",
+ "version": "8.1.1",
"dev": true,
+ "license": "MIT",
"dependencies": {
"map-age-cleaner": "^0.1.3",
- "mimic-fn": "^3.0.0"
+ "mimic-fn": "^3.1.0"
},
"engines": {
- "node": ">=8"
- }
- },
- "node_modules/mem/node_modules/mimic-fn": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.0.0.tgz",
- "integrity": "sha512-PiVO95TKvhiwgSwg1IdLYlCTdul38yZxZMIcnDSFIBUm4BNZha2qpQ4GpJ++15bHoKDtrW2D69lMfFwdFYtNZQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/mem?sponsor=1"
}
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
+ "license": "MIT"
},
"node_modules/merge2": {
"version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 8"
}
},
"node_modules/methods": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/micromatch": {
"version": "4.0.2",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
- "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
@@ -3501,8 +2952,7 @@
},
"node_modules/mime": {
"version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
"bin": {
"mime": "cli.js"
},
@@ -3512,16 +2962,14 @@
},
"node_modules/mime-db": {
"version": "1.40.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.24",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
- "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "license": "MIT",
"dependencies": {
"mime-db": "1.40.0"
},
@@ -3530,27 +2978,24 @@
}
},
"node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "version": "3.1.0",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
"node_modules/mimic-response": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/minimatch": {
"version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
},
@@ -3559,14 +3004,13 @@
}
},
"node_modules/minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/mkdirp": {
"version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "license": "MIT",
"dependencies": {
"minimist": "^1.2.5"
},
@@ -3576,16 +3020,14 @@
},
"node_modules/moment": {
"version": "2.24.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
- "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==",
+ "license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/moment-timezone": {
"version": "0.5.27",
- "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.27.tgz",
- "integrity": "sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw==",
+ "license": "MIT",
"dependencies": {
"moment": ">= 2.9.0"
},
@@ -3595,13 +3037,11 @@
},
"node_modules/ms": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "license": "MIT"
},
"node_modules/multer": {
"version": "1.4.3",
- "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.3.tgz",
- "integrity": "sha512-np0YLKncuZoTzufbkM6wEKp68EhWJXcU6fq6QqrSwkckd2LlMgd1UqhUJLj6NS/5sZ8dE8LYDWslsltJznnXlg==",
+ "license": "MIT",
"dependencies": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
@@ -3616,16 +3056,9 @@
"node": ">= 0.10.0"
}
},
- "node_modules/mute-stream": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
- "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
- "dev": true
- },
"node_modules/mysql": {
"version": "2.17.1",
- "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.17.1.tgz",
- "integrity": "sha512-7vMqHQ673SAk5C8fOzTG2LpPcf3bNt0oL3sFpxPEEFp1mdlDcrLK0On7z8ZYKaaHrHwNcQ/MTUz7/oobZ2OyyA==",
+ "license": "MIT",
"dependencies": {
"bignumber.js": "7.2.1",
"readable-stream": "2.3.6",
@@ -3638,8 +3071,7 @@
},
"node_modules/mz": {
"version": "2.7.0",
- "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
- "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "license": "MIT",
"dependencies": {
"any-promise": "^1.0.0",
"object-assign": "^4.0.1",
@@ -3648,43 +3080,45 @@
},
"node_modules/nan": {
"version": "2.14.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
- "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
+ "license": "MIT"
},
"node_modules/negotiator": {
"version": "0.6.2",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
- "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/nice-try": {
"version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
+ "license": "MIT"
},
"node_modules/node-cleanup": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
- "integrity": "sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/node-fetch": {
- "version": "2.6.5",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
- "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
+ "version": "2.6.7",
+ "license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
}
},
"node_modules/node-gyp-build": {
"version": "4.2.3",
- "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz",
- "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==",
+ "license": "MIT",
"bin": {
"node-gyp-build": "bin.js",
"node-gyp-build-optional": "optional.js",
@@ -3693,9 +3127,8 @@
},
"node_modules/normalize-package-data": {
"version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
@@ -3705,44 +3138,38 @@
},
"node_modules/normalize-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/normalize-url": {
"version": "4.5.1",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",
- "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/oauth": {
"version": "0.9.15",
- "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
- "integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE="
+ "license": "MIT"
},
"node_modules/object-assign": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/observable-fns": {
"version": "0.6.1",
- "resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz",
- "integrity": "sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg=="
+ "license": "MIT"
},
"node_modules/on-finished": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+ "license": "MIT",
"dependencies": {
"ee-first": "1.1.1"
},
@@ -3752,62 +3179,60 @@
},
"node_modules/once": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/onetime": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
- "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
+ "version": "5.1.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
"mimic-fn": "^2.1.0"
},
"engines": {
"node": ">=6"
- }
- },
- "node_modules/ora": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/ora/-/ora-4.0.4.tgz",
- "integrity": "sha512-77iGeVU1cIdRhgFzCK8aw1fbtT1B/iZAvWjS+l/o1x0RShMgxHUZaD2yDpWsNCPwXg9z1ZA78Kbdvr8kBmG/Ww==",
- "dev": true,
- "dependencies": {
- "chalk": "^3.0.0",
- "cli-cursor": "^3.1.0",
- "cli-spinners": "^2.2.0",
- "is-interactive": "^1.0.0",
- "log-symbols": "^3.0.0",
- "mute-stream": "0.0.8",
- "strip-ansi": "^6.0.0",
- "wcwidth": "^1.0.1"
- },
- "engines": {
- "node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ora/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "node_modules/onetime/node_modules/mimic-fn": {
+ "version": "2.1.0",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=6"
+ }
+ },
+ "node_modules/ora": {
+ "version": "5.4.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "bl": "^4.1.0",
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.5.0",
+ "is-interactive": "^1.0.0",
+ "is-unicode-supported": "^0.1.0",
+ "log-symbols": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ora/node_modules/ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
},
"engines": {
@@ -3818,23 +3243,24 @@
}
},
"node_modules/ora/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/ora/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -3844,36 +3270,21 @@
},
"node_modules/ora/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/ora/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ora/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/ora/node_modules/supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -3883,34 +3294,52 @@
},
"node_modules/os-tmpdir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/p-cancelable": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
- "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/p-defer": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
- "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
"dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-event": {
+ "version": "4.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-timeout": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-finally": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/p-limit": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
- "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
+ "license": "MIT",
"dependencies": {
"p-try": "^2.0.0"
},
@@ -3920,8 +3349,7 @@
},
"node_modules/p-locate": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "license": "MIT",
"dependencies": {
"p-limit": "^2.0.0"
},
@@ -3931,9 +3359,8 @@
},
"node_modules/p-map": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"aggregate-error": "^3.0.0"
},
@@ -3944,19 +3371,28 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/p-timeout": {
+ "version": "3.2.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-finally": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/p-try": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/package-json": {
"version": "6.5.0",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
- "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"got": "^9.6.0",
"registry-auth-token": "^4.0.0",
@@ -3969,39 +3405,32 @@
},
"node_modules/package-json/node_modules/semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true,
+ "license": "ISC",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/parent-require": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz",
- "integrity": "sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc=",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/parse-color": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parse-color/-/parse-color-1.0.0.tgz",
- "integrity": "sha1-e3SLlag/A/FqlPU15S1/PZRlhhk=",
+ "license": "MIT",
"dependencies": {
"color-convert": "~0.5.0"
}
},
"node_modules/parse-color/node_modules/color-convert": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
- "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0="
+ "version": "0.5.3"
},
"node_modules/parse-json": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1"
@@ -4012,43 +3441,37 @@
},
"node_modules/parse-ms": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
- "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/parse5": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
- "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="
+ "license": "MIT"
},
"node_modules/parse5-htmlparser2-tree-adapter": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz",
- "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==",
+ "license": "MIT",
"dependencies": {
"parse5": "^6.0.1"
}
},
"node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
- "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
+ "license": "MIT"
},
"node_modules/parseurl": {
"version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/passport": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz",
- "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=",
+ "license": "MIT",
"dependencies": {
"passport-strategy": "1.x.x",
"pause": "0.0.1"
@@ -4059,8 +3482,7 @@
},
"node_modules/passport-custom": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/passport-custom/-/passport-custom-1.1.0.tgz",
- "integrity": "sha512-wWlewQHKQfiQPY7SwQj1w+/MioiVRc/rBuNEgLaBKinKoFkiTDOFVzJ03wYK5e0i9h9Rk6AOf1k6lIpVNYGQiA==",
+ "license": "MIT",
"dependencies": {
"passport-strategy": "1.x.x"
},
@@ -4069,9 +3491,8 @@
}
},
"node_modules/passport-oauth2": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.5.0.tgz",
- "integrity": "sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==",
+ "version": "1.6.1",
+ "license": "MIT",
"dependencies": {
"base64url": "3.x.x",
"oauth": "0.9.x",
@@ -4081,79 +3502,75 @@
},
"engines": {
"node": ">= 0.4.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/jaredhanson"
}
},
"node_modules/passport-strategy": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
- "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/path-exists": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-key": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/path-to-regexp": {
"version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+ "license": "MIT"
},
"node_modules/path-type": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/pause": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
- "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10="
+ "version": "0.0.1"
},
"node_modules/pause-stream": {
"version": "0.0.11",
- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
- "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
"dev": true,
+ "license": [
+ "MIT",
+ "Apache2"
+ ],
"dependencies": {
"through": "~2.3"
}
},
"node_modules/picomatch": {
"version": "2.2.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
- "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8.6"
},
@@ -4163,18 +3580,16 @@
},
"node_modules/pify": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/pkg-conf": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz",
- "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"find-up": "^3.0.0",
"load-json-file": "^5.2.0"
@@ -4185,9 +3600,8 @@
},
"node_modules/pkg-dir": {
"version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"find-up": "^4.0.0"
},
@@ -4197,9 +3611,8 @@
},
"node_modules/pkg-dir/node_modules/find-up": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
@@ -4210,9 +3623,8 @@
},
"node_modules/pkg-dir/node_modules/locate-path": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-locate": "^4.1.0"
},
@@ -4222,9 +3634,8 @@
},
"node_modules/pkg-dir/node_modules/p-locate": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-limit": "^2.2.0"
},
@@ -4234,17 +3645,15 @@
},
"node_modules/pkg-dir/node_modules/path-exists": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/pkg-up": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
- "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
+ "license": "MIT",
"dependencies": {
"find-up": "^3.0.0"
},
@@ -4254,9 +3663,8 @@
},
"node_modules/plur": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz",
- "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"irregular-plurals": "^3.2.0"
},
@@ -4269,18 +3677,16 @@
},
"node_modules/prepend-http": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
- "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/pretty-ms": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.0.tgz",
- "integrity": "sha512-J3aPWiC5e9ZeZFuSeBraGxSkGMOvulSWsxDByOcbD1Pr75YL3LSNIKIb52WXbCLE1sS5s4inBBbryjF4Y05Ceg==",
+ "version": "7.0.1",
"dev": true,
+ "license": "MIT",
"dependencies": {
"parse-ms": "^2.1.0"
},
@@ -4293,13 +3699,11 @@
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ "license": "MIT"
},
"node_modules/proxy-addr": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
- "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
+ "license": "MIT",
"dependencies": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.9.0"
@@ -4310,9 +3714,8 @@
},
"node_modules/ps-tree": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",
- "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"event-stream": "=3.3.4"
},
@@ -4323,27 +3726,19 @@
"node": ">= 0.10"
}
},
- "node_modules/pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
- },
"node_modules/pump": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/pupa": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz",
- "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==",
+ "version": "2.1.1",
"dev": true,
+ "license": "MIT",
"dependencies": {
"escape-goat": "^2.0.0"
},
@@ -4353,24 +3748,21 @@
},
"node_modules/qs": {
"version": "6.7.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
- "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
+ "license": "BSD-3-Clause",
"engines": {
"node": ">=0.6"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
"version": "2.4.0",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
- "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
+ "license": "MIT",
"dependencies": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
@@ -4383,9 +3775,8 @@
},
"node_modules/rc": {
"version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"dev": true,
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
"dependencies": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
@@ -4398,9 +3789,8 @@
},
"node_modules/read-pkg": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
- "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/normalize-package-data": "^2.4.0",
"normalize-package-data": "^2.5.0",
@@ -4413,9 +3803,8 @@
},
"node_modules/read-pkg/node_modules/parse-json": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
- "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
@@ -4428,17 +3817,15 @@
},
"node_modules/read-pkg/node_modules/type-fest": {
"version": "0.6.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
- "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=8"
}
},
"node_modules/readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -4450,10 +3837,9 @@
}
},
"node_modules/readdirp": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
- "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
+ "version": "3.6.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
"picomatch": "^2.2.1"
},
@@ -4463,36 +3849,26 @@
},
"node_modules/reflect-metadata": {
"version": "0.1.13",
- "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
- "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
- },
- "node_modules/regenerator-runtime": {
- "version": "0.13.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
- "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
- "dev": true
+ "license": "Apache-2.0"
},
"node_modules/regexp-tree": {
"version": "0.1.14",
- "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.14.tgz",
- "integrity": "sha512-59v5A90TAh4cAMyDQEOzcnsu4q7Wb10RsyTjngEnJIZsWYM4siVGu+JmLT1WsxHvOWhiu4YS20XiTuxWMeVoHQ==",
+ "license": "MIT",
"bin": {
"regexp-tree": "bin/regexp-tree"
}
},
"node_modules/regexp-worker": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/regexp-worker/-/regexp-worker-1.1.0.tgz",
- "integrity": "sha512-IDDOhDlI972T7bexYwyw+JKdqFsBtJvX8RA+ChVwjhgcK/gv4eG3oZu8Rbidnamh2U2b0ZWdawKksjzY2dmVFw==",
+ "license": "MIT",
"engines": {
"node": ">= 12.0.0"
}
},
"node_modules/registry-auth-token": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz",
- "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==",
+ "version": "4.2.1",
"dev": true,
+ "license": "MIT",
"dependencies": {
"rc": "^1.2.8"
},
@@ -4502,9 +3878,8 @@
},
"node_modules/registry-url": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
- "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"rc": "^1.2.8"
},
@@ -4514,23 +3889,15 @@
},
"node_modules/require-directory": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/require-main-filename": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
- "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
- "dev": true
- },
"node_modules/resolve": {
"version": "1.17.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
- "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"path-parse": "^1.0.6"
},
@@ -4540,9 +3907,8 @@
},
"node_modules/resolve-cwd": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
- "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"resolve-from": "^5.0.0"
},
@@ -4552,27 +3918,24 @@
},
"node_modules/resolve-from": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/responselike": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
- "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"lowercase-keys": "^1.0.0"
}
},
"node_modules/restore-cursor": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
@@ -4583,9 +3946,8 @@
},
"node_modules/reusify": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true,
+ "license": "MIT",
"engines": {
"iojs": ">=1.0.0",
"node": ">=0.10.0"
@@ -4593,9 +3955,8 @@
},
"node_modules/rimraf": {
"version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"glob": "^7.1.3"
},
@@ -4605,51 +3966,43 @@
},
"node_modules/run-parallel": {
"version": "1.1.9",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
- "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/safe-buffer": {
"version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "license": "MIT"
},
"node_modules/safe-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz",
- "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==",
+ "license": "MIT",
"dependencies": {
"regexp-tree": "~0.1.1"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ "license": "MIT"
},
"node_modules/sax": {
"version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
+ "license": "ISC"
},
"node_modules/seedrandom": {
"version": "3.0.5",
- "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
- "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+ "license": "MIT"
},
"node_modules/semver": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/semver-diff": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
- "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"semver": "^6.3.0"
},
@@ -4659,17 +4012,15 @@
},
"node_modules/semver-diff/node_modules/semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true,
+ "license": "ISC",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/send": {
"version": "0.17.1",
- "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
- "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
+ "license": "MIT",
"dependencies": {
"debug": "2.6.9",
"depd": "~1.1.2",
@@ -4691,22 +4042,36 @@
},
"node_modules/send/node_modules/ms": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ "license": "MIT"
},
"node_modules/serialize-error": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
- "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=",
+ "version": "7.0.1",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serialize-error/node_modules/type-fest": {
+ "version": "0.13.1",
+ "dev": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/serve-static": {
"version": "1.14.1",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
- "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
+ "license": "MIT",
"dependencies": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
@@ -4717,21 +4082,13 @@
"node": ">= 0.8.0"
}
},
- "node_modules/set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
- "dev": true
- },
"node_modules/setprototypeof": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
- "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
+ "license": "ISC"
},
"node_modules/sha.js": {
"version": "2.4.11",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
- "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "license": "(MIT AND BSD-3-Clause)",
"dependencies": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -4742,8 +4099,7 @@
},
"node_modules/shebang-command": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "license": "MIT",
"dependencies": {
"shebang-regex": "^1.0.0"
},
@@ -4753,32 +4109,28 @@
},
"node_modules/shebang-regex": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
+ "version": "3.0.7",
+ "dev": true,
+ "license": "ISC"
},
"node_modules/slash": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/slice-ansi": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
- "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
@@ -4790,9 +4142,8 @@
},
"node_modules/slice-ansi/node_modules/ansi-styles": {
"version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
@@ -4806,9 +4157,8 @@
},
"node_modules/slice-ansi/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -4818,33 +4168,21 @@
},
"node_modules/slice-ansi/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
"node_modules/source-map": {
"version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-support": {
"version": "0.5.16",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
- "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@@ -4852,9 +4190,8 @@
},
"node_modules/spdx-correct": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
- "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
@@ -4862,15 +4199,13 @@
},
"node_modules/spdx-exceptions": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
- "dev": true
+ "dev": true,
+ "license": "CC-BY-3.0"
},
"node_modules/spdx-expression-parse": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
@@ -4878,15 +4213,13 @@
},
"node_modules/spdx-license-ids": {
"version": "3.0.5",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
- "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
- "dev": true
+ "dev": true,
+ "license": "CC0-1.0"
},
"node_modules/split": {
"version": "0.3.3",
- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
- "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"through": "2"
},
@@ -4896,22 +4229,19 @@
},
"node_modules/sprintf-js": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
+ "license": "BSD-3-Clause"
},
"node_modules/sqlstring": {
"version": "2.3.1",
- "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
- "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/stack-utils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz",
- "integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==",
+ "version": "2.0.5",
"dev": true,
+ "license": "MIT",
"dependencies": {
"escape-string-regexp": "^2.0.0"
},
@@ -4921,169 +4251,108 @@
},
"node_modules/stack-utils/node_modules/escape-string-regexp": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/statuses": {
"version": "1.5.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+ "license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/stream-combiner": {
"version": "0.0.4",
- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
- "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"duplexer": "~0.1.1"
}
},
"node_modules/streamsearch": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
- "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/string_decoder": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/string-argv": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.1.2.tgz",
- "integrity": "sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.6.19"
}
},
"node_modules/string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
+ "version": "4.2.3",
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
},
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
- "node_modules/string-width/node_modules/emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
"node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
+ "version": "6.0.1",
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^4.1.0"
+ "ansi-regex": "^5.0.1"
},
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
"node_modules/strip-bom": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/strip-combining-marks": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-combining-marks/-/strip-combining-marks-1.0.0.tgz",
- "integrity": "sha1-gpXK/RGDN+u+Rt3Fgizb2flb6nE="
+ "license": "MIT"
},
"node_modules/strip-json-comments": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/supertap": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz",
- "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==",
+ "version": "2.0.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "arrify": "^1.0.1",
- "indent-string": "^3.2.0",
- "js-yaml": "^3.10.0",
- "serialize-error": "^2.1.0",
- "strip-ansi": "^4.0.0"
+ "arrify": "^2.0.1",
+ "indent-string": "^4.0.0",
+ "js-yaml": "^3.14.0",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^6.0.0"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/supertap/node_modules/ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/supertap/node_modules/arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/supertap/node_modules/indent-string": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
- "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/supertap/node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
"node_modules/supports-color": {
"version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^3.0.0"
},
@@ -5093,37 +4362,22 @@
},
"node_modules/temp-dir": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
- "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/term-size": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz",
- "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/thenify": {
"version": "3.3.1",
- "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
- "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "license": "MIT",
"dependencies": {
"any-promise": "^1.0.0"
}
},
"node_modules/thenify-all": {
"version": "1.6.0",
- "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
- "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
+ "license": "MIT",
"dependencies": {
"thenify": ">= 3.1.0 < 4"
},
@@ -5133,8 +4387,7 @@
},
"node_modules/threads": {
"version": "1.7.0",
- "resolved": "https://registry.npmjs.org/threads/-/threads-1.7.0.tgz",
- "integrity": "sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ==",
+ "license": "MIT",
"dependencies": {
"callsites": "^3.1.0",
"debug": "^4.2.0",
@@ -5150,8 +4403,7 @@
},
"node_modules/threads/node_modules/debug": {
"version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
+ "license": "MIT",
"dependencies": {
"ms": "2.1.2"
},
@@ -5166,28 +4418,24 @@
},
"node_modules/threads/node_modules/ms": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "license": "MIT"
},
"node_modules/through": {
"version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/time-zone": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
- "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/tiny-worker": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz",
- "integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==",
+ "license": "BSD-3-Clause",
"optional": true,
"dependencies": {
"esm": "^3.2.25"
@@ -5195,16 +4443,14 @@
},
"node_modules/tlds": {
"version": "1.221.1",
- "resolved": "https://registry.npmjs.org/tlds/-/tlds-1.221.1.tgz",
- "integrity": "sha512-N1Afn/SLeOQRpxMwHBuNFJ3GvGrdtY4XPXKPFcx8he0U9Jg9ZkvTKE1k3jQDtCmlFn44UxjVtouF6PT4rEGd3Q==",
+ "license": "MIT",
"bin": {
"tlds": "bin.js"
}
},
"node_modules/tmp": {
"version": "0.0.33",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
+ "license": "MIT",
"dependencies": {
"os-tmpdir": "~1.0.2"
},
@@ -5214,18 +4460,16 @@
},
"node_modules/to-readable-stream": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
- "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
@@ -5235,21 +4479,19 @@
},
"node_modules/toidentifier": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
- "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
+ "license": "MIT",
"engines": {
"node": ">=0.6"
}
},
"node_modules/tr46": {
"version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
+ "license": "MIT"
},
"node_modules/trim-off-newlines": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
- "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz",
+ "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
@@ -5257,75 +4499,93 @@
},
"node_modules/ts-essentials": {
"version": "6.0.7",
- "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz",
- "integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==",
+ "license": "MIT",
"peerDependencies": {
"typescript": ">=3.7.0"
}
},
"node_modules/ts-mixer": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
- "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
+ "license": "MIT"
},
"node_modules/tsc-watch": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-4.0.0.tgz",
- "integrity": "sha512-I+1cE7WN9YhDknNRAO5NRI7jzeiIZCxUZ0dFEM/Gf+3KTlHasusDEftwezJ+PSFkECSn3RQmf28RdovjTptkRA==",
+ "version": "5.0.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "cross-spawn": "^5.1.0",
+ "cross-spawn": "^7.0.3",
"node-cleanup": "^2.1.2",
"ps-tree": "^1.2.0",
"string-argv": "^0.1.1",
- "strip-ansi": "^4.0.0"
+ "strip-ansi": "^6.0.0"
},
"bin": {
"tsc-watch": "index.js"
},
"engines": {
- "node": ">=6.4.0"
+ "node": ">=8.17.0"
},
"peerDependencies": {
"typescript": "*"
}
},
- "node_modules/tsc-watch/node_modules/ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/tsc-watch/node_modules/cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "version": "7.0.3",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "node_modules/tsc-watch/node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^3.0.0"
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">= 8"
+ }
+ },
+ "node_modules/tsc-watch/node_modules/path-key": {
+ "version": "3.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tsc-watch/node_modules/shebang-command": {
+ "version": "2.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tsc-watch/node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tsc-watch/node_modules/which": {
+ "version": "2.0.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
"node_modules/tsconfig-paths": {
"version": "3.9.0",
- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
- "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==",
+ "license": "MIT",
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
@@ -5335,13 +4595,14 @@
},
"node_modules/tslib": {
"version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+ "license": "0BSD"
},
"node_modules/twemoji": {
"version": "12.1.4",
- "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.1.4.tgz",
- "integrity": "sha512-e37lUlVijmABF7wPCc09s1kKj3hcpzU8KL5zw2bBDIXOtOr4luLF+ODJaEqca8dZPmLR5ezrJYI93nhPovKBiQ==",
+ "license": [
+ "MIT",
+ "CC-BY-4.0"
+ ],
"dependencies": {
"fs-extra": "^8.0.1",
"jsonfile": "^5.0.0",
@@ -5351,22 +4612,19 @@
},
"node_modules/twemoji-parser": {
"version": "12.1.1",
- "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.1.1.tgz",
- "integrity": "sha512-XFUB4ReEvPbNPtiuyo/+crM4RldYbRRAhyE7Hw6EnfBdXECGydw7a49EGADayRvaeierP/m4DSv/OZQObh0LGA=="
+ "license": "MIT"
},
"node_modules/type-fest": {
"version": "0.3.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
- "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=6"
}
},
"node_modules/type-is": {
"version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
@@ -5377,22 +4635,19 @@
},
"node_modules/typedarray": {
"version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
+ "license": "MIT"
},
"node_modules/typedarray-to-buffer": {
"version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-typedarray": "^1.0.0"
}
},
"node_modules/typeorm": {
"version": "0.2.31",
- "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.31.tgz",
- "integrity": "sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA==",
+ "license": "MIT",
"dependencies": {
"@sqltools/formatter": "1.2.2",
"app-root-path": "^3.0.0",
@@ -5420,8 +4675,7 @@
},
"node_modules/typeorm/node_modules/ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
@@ -5434,8 +4688,7 @@
},
"node_modules/typeorm/node_modules/chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -5449,8 +4702,7 @@
},
"node_modules/typeorm/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -5460,13 +4712,11 @@
},
"node_modules/typeorm/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "license": "MIT"
},
"node_modules/typeorm/node_modules/debug": {
"version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+ "license": "MIT",
"dependencies": {
"ms": "2.1.2"
},
@@ -5481,16 +4731,14 @@
},
"node_modules/typeorm/node_modules/dotenv": {
"version": "8.2.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
- "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
+ "license": "BSD-2-Clause",
"engines": {
"node": ">=8"
}
},
"node_modules/typeorm/node_modules/glob": {
"version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -5508,28 +4756,14 @@
},
"node_modules/typeorm/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/typeorm/node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
"node_modules/typeorm/node_modules/mkdirp": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "license": "MIT",
"bin": {
"mkdirp": "bin/cmd.js"
},
@@ -5539,13 +4773,11 @@
},
"node_modules/typeorm/node_modules/ms": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "license": "MIT"
},
"node_modules/typeorm/node_modules/supports-color": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -5555,8 +4787,7 @@
},
"node_modules/typescript": {
"version": "4.4.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
- "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
+ "license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
@@ -5567,15 +4798,12 @@
}
},
"node_modules/uid2": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz",
- "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I="
+ "version": "0.0.3"
},
"node_modules/unique-string": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
- "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"crypto-random-string": "^2.0.0"
},
@@ -5585,54 +4813,50 @@
},
"node_modules/universalify": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "license": "MIT",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/update-notifier": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz",
- "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==",
+ "version": "5.1.0",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "boxen": "^4.2.0",
- "chalk": "^3.0.0",
+ "boxen": "^5.0.0",
+ "chalk": "^4.1.0",
"configstore": "^5.0.1",
"has-yarn": "^2.1.0",
"import-lazy": "^2.1.0",
"is-ci": "^2.0.0",
- "is-installed-globally": "^0.3.1",
- "is-npm": "^4.0.0",
+ "is-installed-globally": "^0.4.0",
+ "is-npm": "^5.0.0",
"is-yarn-global": "^0.3.0",
- "latest-version": "^5.0.0",
- "pupa": "^2.0.1",
+ "latest-version": "^5.1.0",
+ "pupa": "^2.1.1",
+ "semver": "^7.3.4",
"semver-diff": "^3.1.1",
"xdg-basedir": "^4.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/yeoman/update-notifier?sponsor=1"
}
},
"node_modules/update-notifier/node_modules/ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
},
"engines": {
@@ -5643,23 +4867,24 @@
}
},
"node_modules/update-notifier/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/update-notifier/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -5669,24 +4894,46 @@
},
"node_modules/update-notifier/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/update-notifier/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/update-notifier/node_modules/supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "node_modules/update-notifier/node_modules/lru-cache": {
+ "version": "6.0.0",
"dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/update-notifier/node_modules/semver": {
+ "version": "7.3.5",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/update-notifier/node_modules/supports-color": {
+ "version": "7.2.0",
+ "dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -5694,11 +4941,15 @@
"node": ">=8"
}
},
+ "node_modules/update-notifier/node_modules/yallist": {
+ "version": "4.0.0",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/url-parse-lax": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
- "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"prepend-http": "^2.0.0"
},
@@ -5708,40 +4959,34 @@
},
"node_modules/utf-8-validate": {
"version": "5.0.5",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz",
- "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==",
"hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
"node-gyp-build": "^4.2.0"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ "license": "MIT"
},
"node_modules/utils-merge": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+ "license": "MIT",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/uuid": {
"version": "3.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
- "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
+ "license": "MIT",
"bin": {
"uuid": "bin/uuid"
}
},
"node_modules/validate-npm-package-license": {
"version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
@@ -5749,39 +4994,34 @@
},
"node_modules/vary": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+ "license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/wcwidth": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
- "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
"dev": true,
+ "license": "MIT",
"dependencies": {
"defaults": "^1.0.3"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
+ "license": "BSD-2-Clause"
},
"node_modules/well-known-symbols": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
- "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
"dev": true,
+ "license": "ISC",
"engines": {
"node": ">=6"
}
},
"node_modules/whatwg-url": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
+ "license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
@@ -5789,8 +5029,7 @@
},
"node_modules/which": {
"version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
@@ -5798,17 +5037,10 @@
"which": "bin/which"
}
},
- "node_modules/which-module": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
- "dev": true
- },
"node_modules/widest-line": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
- "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"string-width": "^4.0.0"
},
@@ -5816,54 +5048,9 @@
"node": ">=8"
}
},
- "node_modules/widest-line/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/widest-line/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/widest-line/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/widest-line/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/wrap-ansi": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
@@ -5876,18 +5063,9 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/wrap-ansi/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/wrap-ansi/node_modules/ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
@@ -5900,8 +5078,7 @@
},
"node_modules/wrap-ansi/node_modules/color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -5911,51 +5088,16 @@
},
"node_modules/wrap-ansi/node_modules/color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wrap-ansi/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wrap-ansi/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
"node_modules/wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ "license": "ISC"
},
"node_modules/write-file-atomic": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"imurmurhash": "^0.1.4",
"is-typedarray": "^1.0.0",
@@ -5965,8 +5107,7 @@
},
"node_modules/ws": {
"version": "8.5.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
- "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
+ "license": "MIT",
"engines": {
"node": ">=10.0.0"
},
@@ -5985,17 +5126,15 @@
},
"node_modules/xdg-basedir": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
- "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/xml2js": {
"version": "0.4.23",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
- "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
+ "license": "MIT",
"dependencies": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
@@ -6006,44 +5145,25 @@
},
"node_modules/xmlbuilder": {
"version": "11.0.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
- "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
+ "license": "MIT",
"engines": {
"node": ">=4.0"
}
},
- "node_modules/xregexp": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz",
- "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==",
- "dev": true,
- "dependencies": {
- "@babel/runtime-corejs3": "^7.8.3"
- }
- },
"node_modules/xtend": {
"version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
"engines": {
"node": ">=0.4"
}
},
- "node_modules/yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
- },
"node_modules/yaml-js": {
"version": "0.2.3",
- "resolved": "https://registry.npmjs.org/yaml-js/-/yaml-js-0.2.3.tgz",
- "integrity": "sha512-6xUQtVKl1qcd0EXtTEzUDVJy9Ji1fYa47LtkDtYKlIjhibPE9knNPmoRyf6SGREFHlOAUyDe9OdYqRP4DuSi5Q=="
+ "license": "WTFPL"
},
"node_modules/yargonaut": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz",
- "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==",
+ "license": "Apache-2.0",
"dependencies": {
"chalk": "^1.1.1",
"figlet": "^1.1.1",
@@ -6052,24 +5172,21 @@
},
"node_modules/yargonaut/node_modules/ansi-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/yargonaut/node_modules/ansi-styles": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/yargonaut/node_modules/chalk": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
@@ -6083,8 +5200,7 @@
},
"node_modules/yargonaut/node_modules/strip-ansi": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^2.0.0"
},
@@ -6094,16 +5210,14 @@
},
"node_modules/yargonaut/node_modules/supports-color": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "license": "MIT",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/yargs": {
"version": "16.2.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+ "license": "MIT",
"dependencies": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
@@ -6119,56 +5233,14 @@
},
"node_modules/yargs-parser": {
"version": "20.2.5",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.5.tgz",
- "integrity": "sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg==",
+ "license": "ISC",
"engines": {
"node": ">=10"
}
},
- "node_modules/yargs/node_modules/ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/yargs/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/yargs/node_modules/string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/yargs/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/yargs/node_modules/y18n": {
"version": "5.0.5",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz",
- "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==",
+ "license": "ISC",
"engines": {
"node": ">=10"
}
@@ -6176,7 +5248,6 @@
"node_modules/yawn-yaml": {
"version": "1.5.0",
"resolved": "git+ssh://git@github.com/dragory/yawn-yaml.git#77ab3870ca53c4693002c4a41336e7476e7934ed",
- "integrity": "sha512-22gZa51NZQgBnoQzTqoNAXqNn8l7vonJhU+MEiqDXz6sA0GszMk0Un2xyN1p+8uhdq6ndFKz5qXeDC0eAyaMtQ==",
"license": "MIT",
"dependencies": {
"js-yaml": "^3.4.2",
@@ -6186,17 +5257,14 @@
},
"node_modules/zlib-sync": {
"version": "0.1.7",
- "resolved": "https://registry.npmjs.org/zlib-sync/-/zlib-sync-0.1.7.tgz",
- "integrity": "sha512-UmciU6ZrIwtwPC8noMzq+kGMdiWwNRZ3wC0SbED4Ew5Ikqx14MqDPRs/Pbk+3rZPh5SzsOgUBs1WRE0iieddpg==",
- "hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
"nan": "^2.14.0"
}
},
"node_modules/zod": {
"version": "3.14.4",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
- "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==",
+ "license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -6205,8 +5273,6 @@
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
- "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
@@ -6214,14 +5280,10 @@
},
"@babel/helper-validator-identifier": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
- "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
"dev": true
},
"@babel/highlight": {
"version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
- "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
@@ -6229,20 +5291,8 @@
"js-tokens": "^4.0.0"
}
},
- "@babel/runtime-corejs3": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.4.tgz",
- "integrity": "sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw==",
- "dev": true,
- "requires": {
- "core-js-pure": "^3.0.0",
- "regenerator-runtime": "^0.13.4"
- }
- },
"@concordance/react": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz",
- "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==",
"dev": true,
"requires": {
"arrify": "^1.0.1"
@@ -6250,16 +5300,12 @@
"dependencies": {
"arrify": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
}
}
},
"@discordjs/builders": {
"version": "0.11.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
- "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
"requires": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.26.0",
@@ -6269,31 +5315,21 @@
},
"dependencies": {
"@sindresorhus/is": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
+ "version": "4.6.0"
},
"discord-api-types": {
- "version": "0.26.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
- "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
+ "version": "0.26.1"
},
"tslib": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
- "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
+ "version": "2.3.1"
}
}
},
"@discordjs/collection": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
- "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw=="
+ "version": "0.4.0"
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
- "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "2.0.3",
@@ -6302,14 +5338,10 @@
},
"@nodelib/fs.stat": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
- "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
"dev": true
},
"@nodelib/fs.walk": {
"version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
- "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
"dev": true,
"requires": {
"@nodelib/fs.scandir": "2.1.3",
@@ -6317,30 +5349,20 @@
}
},
"@sapphire/async-queue": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz",
- "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g=="
+ "version": "1.3.1"
},
"@silvia-odwyer/photon-node": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.1.tgz",
- "integrity": "sha512-Q4SRhdupqOiDQKZZbQy4P5GqePUcS+Zv6SB3YD5ZTQVKZ9BLXasSG76dPccK3wZ9aU0vEUEypCalLy41Q7sVDA=="
+ "version": "0.3.1"
},
"@sindresorhus/is": {
"version": "0.14.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
- "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
"dev": true
},
"@sqltools/formatter": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.2.tgz",
- "integrity": "sha512-/5O7Fq6Vnv8L6ucmPjaWbVG1XkP4FO+w5glqfkIsq3Xw4oyNAdJddbnYodNDAfjVUvo/rrSCTom4kAND7T1o5Q=="
+ "version": "1.2.2"
},
"@szmarczak/http-timer": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
- "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
"dev": true,
"requires": {
"defer-to-connect": "^1.0.1"
@@ -6348,8 +5370,6 @@
},
"@types/body-parser": {
"version": "1.17.1",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.1.tgz",
- "integrity": "sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w==",
"dev": true,
"requires": {
"@types/connect": "*",
@@ -6358,14 +5378,10 @@
},
"@types/color-name": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
- "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/connect": {
"version": "3.4.32",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
- "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -6373,8 +5389,6 @@
},
"@types/cors": {
"version": "2.8.6",
- "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.6.tgz",
- "integrity": "sha512-invOmosX0DqbpA+cE2yoHGUlF/blyf7nB0OGYBBiH27crcVm5NmFaZkLP4Ta1hGaesckCi5lVLlydNJCxkTOSg==",
"dev": true,
"requires": {
"@types/express": "*"
@@ -6382,8 +5396,6 @@
},
"@types/express": {
"version": "4.17.2",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.2.tgz",
- "integrity": "sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA==",
"dev": true,
"requires": {
"@types/body-parser": "*",
@@ -6393,28 +5405,14 @@
},
"@types/express-serve-static-core": {
"version": "4.16.11",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.11.tgz",
- "integrity": "sha512-K8d2M5t3tBQimkyaYTXxtHYyoJPUEhy2/omVRnTAKw5FEdT+Ft6lTaTOpoJdHeG+mIwQXXtqiTcYZ6IR8LTzjQ==",
"dev": true,
"requires": {
"@types/node": "*",
"@types/range-parser": "*"
}
},
- "@types/glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA==",
- "dev": true,
- "requires": {
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
"@types/jest": {
"version": "24.0.21",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.21.tgz",
- "integrity": "sha512-uyqFvx78Tuy0h5iLCPWRCvi5HhWwEqhIj30doitp191oYLqlCxUyAJHdWVm5+Nr271/vPnkyt6rWeEIjGowBTg==",
"dev": true,
"requires": {
"@types/jest-diff": "*"
@@ -6422,31 +5420,21 @@
},
"@types/jest-diff": {
"version": "20.0.1",
- "resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz",
- "integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==",
"dev": true
},
"@types/js-yaml": {
"version": "3.12.1",
- "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.1.tgz",
- "integrity": "sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==",
"dev": true
},
"@types/json5": {
- "version": "0.0.29",
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
- "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
+ "version": "0.0.29"
},
"@types/lodash": {
"version": "4.14.144",
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.144.tgz",
- "integrity": "sha512-ogI4g9W5qIQQUhXAclq6zhqgqNUr7UlFaqDHbch7WLSLeeM/7d3CRaw7GLajxvyFvhJqw4Rpcz5bhoaYtIx6Tg==",
"dev": true
},
"@types/lodash.at": {
"version": "4.6.6",
- "resolved": "https://registry.npmjs.org/@types/lodash.at/-/lodash.at-4.6.6.tgz",
- "integrity": "sha512-OAfIqBWv0HjWVxKF8y6ZFTEwLM1wgpvsrMOb/fEKp8/HM2JO2V555Au5JZkiTnXOF453rqCooGKYFzNrR/kaAA==",
"dev": true,
"requires": {
"@types/lodash": "*"
@@ -6454,20 +5442,10 @@
},
"@types/mime": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.1.tgz",
- "integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw==",
- "dev": true
- },
- "@types/minimatch": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
- "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"dev": true
},
"@types/moment-timezone": {
"version": "0.5.12",
- "resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.12.tgz",
- "integrity": "sha512-hnHH2+Efg2vExr/dSz+IX860nSiyk9Sk4pJF2EmS11lRpMcNXeB4KBW5xcgw2QPsb9amTXdsVNEe5IoJXiT0uw==",
"dev": true,
"requires": {
"moment": ">=2.14.0"
@@ -6475,22 +5453,16 @@
},
"@types/multer": {
"version": "1.4.7",
- "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz",
- "integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==",
"dev": true,
"requires": {
"@types/express": "*"
}
},
"@types/node": {
- "version": "14.0.14",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.14.tgz",
- "integrity": "sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ=="
+ "version": "14.0.14"
},
"@types/node-fetch": {
"version": "2.5.12",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
- "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -6498,14 +5470,10 @@
},
"@types/normalize-package-data": {
"version": "2.4.0",
- "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
- "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==",
"dev": true
},
"@types/oauth": {
"version": "0.9.1",
- "resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.1.tgz",
- "integrity": "sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -6513,8 +5481,6 @@
},
"@types/passport": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.1.tgz",
- "integrity": "sha512-oK87JjN8i8kmqb0RN0sCUB/ZjrWf3b8U45eAzZVy1ssYYgBrMOuALmvoqp7MglsilXAjxum+LS29VQqeQx6ddA==",
"dev": true,
"requires": {
"@types/express": "*"
@@ -6522,8 +5488,6 @@
},
"@types/passport-oauth2": {
"version": "1.4.8",
- "resolved": "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.4.8.tgz",
- "integrity": "sha512-tlX16wyFE5YJR2pHpZ308dgB1MV9/Ra2wfQh71eWk+/umPoD1Rca2D4N5M27W7nZm1wqUNGTk1I864nHvEgiFA==",
"dev": true,
"requires": {
"@types/express": "*",
@@ -6533,8 +5497,6 @@
},
"@types/passport-strategy": {
"version": "0.2.35",
- "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.35.tgz",
- "integrity": "sha512-o5D19Jy2XPFoX2rKApykY15et3Apgax00RRLf0RUotPDUsYrQa7x4howLYr9El2mlUApHmCMv5CZ1IXqKFQ2+g==",
"dev": true,
"requires": {
"@types/express": "*",
@@ -6543,20 +5505,14 @@
},
"@types/range-parser": {
"version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz",
- "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==",
"dev": true
},
"@types/safe-regex": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@types/safe-regex/-/safe-regex-1.1.2.tgz",
- "integrity": "sha512-wuS9LVpgIiTYaGKd+s6Dj0kRXBkttaXjVxzaXmviCACi8RO+INPayND+VNjAcall/l1Jkyhh9lyPfKW/aP/Yug==",
"dev": true
},
"@types/serve-static": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz",
- "integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==",
"dev": true,
"requires": {
"@types/express-serve-static-core": "*",
@@ -6565,49 +5521,35 @@
},
"@types/tmp": {
"version": "0.0.33",
- "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha1-EHPEvIJHVK49EM+riKsCN7qWTk0=",
"dev": true
},
"@types/twemoji": {
"version": "12.1.0",
- "resolved": "https://registry.npmjs.org/@types/twemoji/-/twemoji-12.1.0.tgz",
- "integrity": "sha512-dTHU1ZE83qUlF3oFWrdxKBmOimM+/3o9hzDBszcKjajmNu5G/DjWgQrRNkq+zxeR+zDN030ciAt5qTH+WXBD8A==",
"dev": true
},
"@types/ws": {
"version": "8.5.3",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
- "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
"requires": {
"@types/node": "*"
}
},
"accepts": {
"version": "1.3.7",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
- "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
}
},
"acorn": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
- "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
+ "version": "8.7.0",
"dev": true
},
"acorn-walk": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
- "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
+ "version": "8.2.0",
"dev": true
},
"aggregate-error": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz",
- "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==",
"dev": true,
"requires": {
"clean-stack": "^2.0.0",
@@ -6615,38 +5557,27 @@
}
},
"ansi-align": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
- "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
+ "version": "3.0.1",
"dev": true,
"requires": {
- "string-width": "^3.0.0"
+ "string-width": "^4.1.0"
}
},
"ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
+ "version": "5.0.1"
},
"ansi-styles": {
"version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"any-promise": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
- "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
+ "version": "1.3.0"
},
"anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "version": "3.1.2",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
@@ -6654,78 +5585,56 @@
}
},
"app-root-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz",
- "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw=="
+ "version": "3.0.0"
},
"append-field": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
- "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
+ "version": "1.0.0"
},
"argparse": {
"version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"array-find-index": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
- "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
"dev": true
},
"array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
+ "version": "1.1.1"
},
"array-union": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"arrgv": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
- "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
"dev": true
},
"arrify": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
- "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
"dev": true
},
"astral-regex": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
- "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ "version": "0.4.0"
},
"ava": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/ava/-/ava-3.10.0.tgz",
- "integrity": "sha512-CxcYQYeE39pcLWrN2/TASMpnqH/SoaX+W61+4m3saETU041PIDcoP9LLNWPAE/yJZXjp0M1RWTohSkmGqJZKww==",
+ "version": "3.15.0",
"dev": true,
"requires": {
"@concordance/react": "^2.0.0",
- "acorn": "^7.3.1",
- "acorn-walk": "^7.2.0",
- "ansi-styles": "^4.2.1",
+ "acorn": "^8.0.4",
+ "acorn-walk": "^8.0.0",
+ "ansi-styles": "^5.0.0",
"arrgv": "^1.0.2",
"arrify": "^2.0.1",
"callsites": "^3.1.0",
"chalk": "^4.1.0",
- "chokidar": "^3.4.0",
+ "chokidar": "^3.4.3",
"chunkd": "^2.0.1",
"ci-info": "^2.0.0",
"ci-parallel-vars": "^1.0.1",
@@ -6734,12 +5643,12 @@
"cli-truncate": "^2.1.0",
"code-excerpt": "^3.0.0",
"common-path-prefix": "^3.0.0",
- "concordance": "^5.0.0",
+ "concordance": "^5.0.1",
"convert-source-map": "^1.7.0",
"currently-unhandled": "^0.4.1",
- "debug": "^4.1.1",
- "del": "^5.1.0",
- "emittery": "^0.7.0",
+ "debug": "^4.3.1",
+ "del": "^6.0.0",
+ "emittery": "^0.8.0",
"equal-length": "^1.0.0",
"figures": "^3.2.0",
"globby": "^11.0.1",
@@ -6747,74 +5656,57 @@
"import-local": "^3.0.2",
"indent-string": "^4.0.0",
"is-error": "^2.2.2",
- "is-plain-object": "^3.0.1",
+ "is-plain-object": "^5.0.0",
"is-promise": "^4.0.0",
- "lodash": "^4.17.15",
+ "lodash": "^4.17.20",
"matcher": "^3.0.0",
"md5-hex": "^3.0.1",
- "mem": "^6.1.0",
- "ms": "^2.1.2",
- "ora": "^4.0.4",
+ "mem": "^8.0.0",
+ "ms": "^2.1.3",
+ "ora": "^5.2.0",
+ "p-event": "^4.2.0",
"p-map": "^4.0.0",
"picomatch": "^2.2.2",
"pkg-conf": "^3.1.0",
"plur": "^4.0.0",
- "pretty-ms": "^7.0.0",
+ "pretty-ms": "^7.0.1",
"read-pkg": "^5.2.0",
"resolve-cwd": "^3.0.0",
"slash": "^3.0.0",
"source-map-support": "^0.5.19",
- "stack-utils": "^2.0.2",
+ "stack-utils": "^2.0.3",
"strip-ansi": "^6.0.0",
- "supertap": "^1.0.0",
+ "supertap": "^2.0.0",
"temp-dir": "^2.0.0",
"trim-off-newlines": "^1.0.1",
- "update-notifier": "^4.1.0",
+ "update-notifier": "^5.0.1",
"write-file-atomic": "^3.0.3",
- "yargs": "^15.4.0"
+ "yargs": "^16.2.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
"ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
- "dev": true,
- "requires": {
- "@types/color-name": "^1.1.1",
- "color-convert": "^2.0.1"
- }
+ "version": "5.2.0",
+ "dev": true
},
"chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
- }
- },
- "cliui": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
- "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
- "dev": true,
- "requires": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^6.2.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ }
}
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -6822,221 +5714,98 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "version": "4.3.4",
"dev": true,
"requires": {
- "ms": "^2.1.1"
- }
- },
- "decamelize": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-3.2.0.tgz",
- "integrity": "sha512-4TgkVUsmmu7oCSyGBm5FvfMoACuoh9EOidm7V5/J2X2djAwwt57qb3F2KMP2ITqODTCSwb+YRV+0Zqrv18k/hw==",
- "dev": true,
- "requires": {
- "xregexp": "^4.2.4"
- }
- },
- "find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
- "requires": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
+ "ms": "2.1.2"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.2",
+ "dev": true
+ }
}
},
"has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "requires": {
- "p-locate": "^4.1.0"
- }
- },
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
- "requires": {
- "p-limit": "^2.2.0"
- }
- },
- "path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "version": "2.1.3",
"dev": true
},
"source-map-support": {
"version": "0.5.19",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
- "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- },
"supports-color": {
"version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
- },
- "wrap-ansi": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
- "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "yargs": {
- "version": "15.4.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.0.tgz",
- "integrity": "sha512-D3fRFnZwLWp8jVAAhPZBsmeIHY8tTsb8ItV9KaAaopmC6wde2u6Yw29JBIZHXw14kgkRnYmDgmQU4FVMDlIsWw==",
- "dev": true,
- "requires": {
- "cliui": "^6.0.0",
- "decamelize": "^3.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"
- },
- "dependencies": {
- "y18n": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
- "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
- "dev": true
- }
- }
- },
- "yargs-parser": {
- "version": "18.1.3",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
- "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
- "dev": true,
- "requires": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- },
- "dependencies": {
- "decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true
- }
- }
}
}
},
"balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "version": "1.0.0"
},
"base64-js": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ "version": "1.5.1"
},
"base64url": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
- "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
+ "version": "3.0.1"
},
"bignumber.js": {
- "version": "7.2.1",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz",
- "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ=="
+ "version": "7.2.1"
},
"binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
"dev": true
},
"bindings": {
"version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"requires": {
"file-uri-to-path": "1.0.0"
}
},
+ "bl": {
+ "version": "4.1.0",
+ "dev": true,
+ "requires": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.4",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
"blueimp-md5": {
- "version": "2.16.0",
- "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.16.0.tgz",
- "integrity": "sha512-j4nzWIqEFpLSbdhUApHRGDwfXbV8ALhqOn+FY5L6XBdKPAXU9BpGgFSbDsgqogfqPPR9R2WooseWCsfhfEC6uQ==",
+ "version": "2.19.0",
"dev": true
},
"body-parser": {
"version": "1.19.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
- "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
"requires": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
@@ -7051,41 +5820,28 @@
}
},
"boxen": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
- "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
+ "version": "5.1.2",
"dev": true,
"requires": {
"ansi-align": "^3.0.0",
- "camelcase": "^5.3.1",
- "chalk": "^3.0.0",
- "cli-boxes": "^2.2.0",
- "string-width": "^4.1.0",
- "term-size": "^2.1.0",
- "type-fest": "^0.8.1",
- "widest-line": "^3.1.0"
+ "camelcase": "^6.2.0",
+ "chalk": "^4.1.0",
+ "cli-boxes": "^2.2.1",
+ "string-width": "^4.2.2",
+ "type-fest": "^0.20.2",
+ "widest-line": "^3.1.0",
+ "wrap-ansi": "^7.0.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
"ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
"requires": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -7094,8 +5850,6 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -7103,63 +5857,27 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- },
"supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"type-fest": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
- "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "version": "0.20.2",
"dev": true
}
}
},
"brace-expansion": {
"version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -7167,8 +5885,6 @@
},
"braces": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
@@ -7176,44 +5892,32 @@
},
"buffer": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"buffer-from": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+ "version": "1.1.1"
},
"bufferutil": {
"version": "4.0.3",
- "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz",
- "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==",
"requires": {
"node-gyp-build": "^4.2.0"
}
},
"busboy": {
"version": "0.2.14",
- "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
- "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=",
"requires": {
"dicer": "0.2.5",
"readable-stream": "1.1.x"
},
"dependencies": {
"isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ "version": "0.0.1"
},
"readable-stream": {
"version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -7222,21 +5926,15 @@
}
},
"string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ "version": "0.10.31"
}
}
},
"bytes": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
- "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
+ "version": "3.1.0"
},
"cacheable-request": {
"version": "6.1.0",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
- "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
"dev": true,
"requires": {
"clone-response": "^1.0.2",
@@ -7249,9 +5947,7 @@
},
"dependencies": {
"get-stream": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
- "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
+ "version": "5.2.0",
"dev": true,
"requires": {
"pump": "^3.0.0"
@@ -7259,27 +5955,19 @@
},
"lowercase-keys": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
"dev": true
}
}
},
"callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
+ "version": "3.1.0"
},
"camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "version": "6.3.0",
"dev": true
},
"chalk": {
"version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
@@ -7288,61 +5976,45 @@
}
},
"chokidar": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
- "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
+ "version": "3.5.3",
"dev": true,
"requires": {
- "anymatch": "~3.1.1",
+ "anymatch": "~3.1.2",
"braces": "~3.0.2",
- "fsevents": "~2.1.2",
- "glob-parent": "~5.1.0",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
- "readdirp": "~3.4.0"
+ "readdirp": "~3.6.0"
}
},
"chunkd": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
- "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
"dev": true
},
"ci-info": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
"dev": true
},
"ci-parallel-vars": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
- "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
"dev": true
},
"clean-stack": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"dev": true
},
"clean-yaml-object": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
- "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=",
"dev": true
},
"cli-boxes": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz",
- "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==",
+ "version": "2.2.1",
"dev": true
},
"cli-cursor": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
"restore-cursor": "^3.1.0"
@@ -7350,8 +6022,6 @@
},
"cli-highlight": {
"version": "2.1.10",
- "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.10.tgz",
- "integrity": "sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw==",
"requires": {
"chalk": "^4.0.0",
"highlight.js": "^10.0.0",
@@ -7363,16 +6033,12 @@
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -7380,26 +6046,18 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "version": "1.1.4"
},
"has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ "version": "4.0.0"
},
"supports-color": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": {
"has-flag": "^4.0.0"
}
@@ -7407,105 +6065,31 @@
}
},
"cli-spinners": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz",
- "integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==",
+ "version": "2.6.1",
"dev": true
},
"cli-truncate": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
- "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
"dev": true,
"requires": {
"slice-ansi": "^3.0.0",
"string-width": "^4.2.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
}
},
"cliui": {
"version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
}
},
"clone": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
- "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
"dev": true
},
"clone-response": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
- "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
"dev": true,
"requires": {
"mimic-response": "^1.0.0"
@@ -7513,8 +6097,6 @@
},
"code-excerpt": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz",
- "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==",
"dev": true,
"requires": {
"convert-to-spaces": "^1.0.1"
@@ -7522,8 +6104,6 @@
},
"color-convert": {
"version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
@@ -7531,33 +6111,23 @@
},
"color-name": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"combined-stream": {
"version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"common-path-prefix": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
- "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
"dev": true
},
"concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "version": "0.0.1"
},
"concat-stream": {
"version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@@ -7566,9 +6136,7 @@
}
},
"concordance": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.0.tgz",
- "integrity": "sha512-stOCz9ffg0+rytwTaL2njUOIyMfANwfwmqc9Dr4vTUS/x/KkVFlWx9Zlzu6tHYtjKxxaCF/cEAZgPDac+n35sg==",
+ "version": "5.0.4",
"dev": true,
"requires": {
"date-time": "^3.1.0",
@@ -7581,18 +6149,28 @@
"well-known-symbols": "^2.0.0"
},
"dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "version": "7.3.5",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
"dev": true
}
}
},
"configstore": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
- "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
"dev": true,
"requires": {
"dot-prop": "^5.2.0",
@@ -7605,21 +6183,15 @@
},
"content-disposition": {
"version": "0.5.3",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
- "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"content-type": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
+ "version": "1.0.4"
},
"convert-source-map": {
"version": "1.7.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
- "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.1"
@@ -7627,35 +6199,19 @@
},
"convert-to-spaces": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz",
- "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=",
"dev": true
},
"cookie": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
- "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
+ "version": "0.4.0"
},
"cookie-signature": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
- },
- "core-js-pure": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz",
- "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==",
- "dev": true
+ "version": "1.0.6"
},
"core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "version": "1.0.2"
},
"cors": {
"version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
@@ -7663,16 +6219,12 @@
},
"cross-env": {
"version": "5.2.1",
- "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz",
- "integrity": "sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==",
"requires": {
"cross-spawn": "^6.0.5"
}
},
"cross-spawn": {
"version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
@@ -7683,14 +6235,10 @@
},
"crypto-random-string": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
- "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
"dev": true
},
"currently-unhandled": {
"version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
"dev": true,
"requires": {
"array-find-index": "^1.0.1"
@@ -7698,8 +6246,6 @@
},
"date-time": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
- "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
"dev": true,
"requires": {
"time-zone": "^1.0.0"
@@ -7707,36 +6253,26 @@
},
"debug": {
"version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"decompress-response": {
"version": "3.3.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
- "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
"dev": true,
"requires": {
"mimic-response": "^1.0.0"
}
},
"deep-diff": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-1.0.2.tgz",
- "integrity": "sha512-aWS3UIVH+NPGCD1kki+DCU9Dua032iSsO43LqQpcs4R3+dVv7tX0qBGjiVHJHjplsoUM2XRO/KB92glqc68awg=="
+ "version": "1.0.2"
},
"deep-extend": {
"version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"dev": true
},
"defaults": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
- "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
"dev": true,
"requires": {
"clone": "^1.0.2"
@@ -7744,55 +6280,24 @@
},
"defer-to-connect": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
- "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
"del": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz",
- "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==",
+ "version": "6.0.0",
"dev": true,
"requires": {
- "globby": "^10.0.1",
- "graceful-fs": "^4.2.2",
+ "globby": "^11.0.1",
+ "graceful-fs": "^4.2.4",
"is-glob": "^4.0.1",
"is-path-cwd": "^2.2.0",
- "is-path-inside": "^3.0.1",
- "p-map": "^3.0.0",
- "rimraf": "^3.0.0",
+ "is-path-inside": "^3.0.2",
+ "p-map": "^4.0.0",
+ "rimraf": "^3.0.2",
"slash": "^3.0.0"
},
"dependencies": {
- "globby": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
- "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
- "dev": true,
- "requires": {
- "@types/glob": "^7.1.1",
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.0.3",
- "glob": "^7.1.3",
- "ignore": "^5.1.1",
- "merge2": "^1.2.3",
- "slash": "^3.0.0"
- }
- },
- "p-map": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
- "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
- "dev": true,
- "requires": {
- "aggregate-error": "^3.0.0"
- }
- },
"rimraf": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
@@ -7801,38 +6306,26 @@
}
},
"delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+ "version": "1.0.0"
},
"depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
+ "version": "1.1.2"
},
"destroy": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
- "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
+ "version": "1.0.4"
},
"dicer": {
"version": "0.2.5",
- "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
- "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=",
"requires": {
"readable-stream": "1.1.x",
"streamsearch": "0.1.2"
},
"dependencies": {
"isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ "version": "0.0.1"
},
"readable-stream": {
"version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -7841,30 +6334,22 @@
}
},
"string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ "version": "0.10.31"
}
}
},
"dir-glob": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
"requires": {
"path-type": "^4.0.0"
}
},
"discord-api-types": {
- "version": "0.31.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.0.tgz",
- "integrity": "sha512-IL4KKEo3QOQRcrtkpAYiDOQHIVuDBgtzFgDKsMqllbPKi3o/54mJOvYEG38oFa1G2qR4b+nTB5mMgc85W4/eQw=="
+ "version": "0.31.0"
},
"discord.js": {
"version": "13.6.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
- "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
"requires": {
"@discordjs/builders": "^0.11.0",
"@discordjs/collection": "^0.4.0",
@@ -7878,14 +6363,10 @@
},
"dependencies": {
"discord-api-types": {
- "version": "0.26.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
- "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
+ "version": "0.26.1"
},
"form-data": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
- "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@@ -7895,64 +6376,44 @@
}
},
"dot-prop": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
- "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
+ "version": "5.3.0",
"dev": true,
"requires": {
"is-obj": "^2.0.0"
}
},
"dotenv": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz",
- "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0="
+ "version": "4.0.0"
},
"dotgitconfig": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dotgitconfig/-/dotgitconfig-1.0.1.tgz",
- "integrity": "sha512-a6RPc5Cco7ogiKLVExcGBMEEP6jHkzJFYbS/HYGFvQSZrm3EkC876YIqqrj92N8SZYGLqPz6pU522/LlNAaedQ==",
"requires": {
"ini": "^1.3.5"
}
},
"duplexer": {
"version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
- "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true
},
"duplexer3": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
- "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
"dev": true
},
"ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+ "version": "1.1.1"
},
"emittery": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz",
- "integrity": "sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ==",
+ "version": "0.8.1",
"dev": true
},
"emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ "version": "8.0.0"
},
"encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
+ "version": "1.0.2"
},
"end-of-stream": {
"version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": {
"once": "^1.4.0"
@@ -7960,12 +6421,11 @@
},
"equal-length": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz",
- "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=",
"dev": true
},
"erlpack": {
"version": "git+ssh://git@github.com/almeidx/erlpack.git#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
+ "integrity": "sha512-2Tux713HiQIXdxv6nHBFmn6sOBKca5xQOyaIXMquNUTUEx56JhyBaguMWGWV73LM8xOZ/fAow4diI+4KfEAhkg==",
"from": "erlpack@github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
"requires": {
"bindings": "^1.5.0",
@@ -7974,60 +6434,40 @@
},
"error-ex": {
"version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
"requires": {
"is-arrayish": "^0.2.1"
}
},
"escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
+ "version": "3.1.1"
},
"escape-goat": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
- "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==",
"dev": true
},
"escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+ "version": "1.0.3"
},
"escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+ "version": "1.0.5"
},
"esm": {
"version": "3.2.25",
- "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
- "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
"optional": true
},
"esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
+ "version": "4.0.1"
},
"esutils": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
+ "version": "1.8.1"
},
"event-stream": {
"version": "3.3.4",
- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
- "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
"dev": true,
"requires": {
"duplexer": "~0.1.1",
@@ -8041,8 +6481,6 @@
},
"express": {
"version": "4.17.1",
- "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
- "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
"requires": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
@@ -8078,14 +6516,10 @@
},
"fast-diff": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
- "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
"dev": true
},
"fast-glob": {
"version": "3.2.4",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
- "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "^2.0.2",
@@ -8098,36 +6532,26 @@
},
"fastq": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz",
- "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==",
"dev": true,
"requires": {
"reusify": "^1.0.4"
}
},
"figlet": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz",
- "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww=="
+ "version": "1.5.0"
},
"figures": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
}
},
"file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+ "version": "1.0.0"
},
"fill-range": {
"version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
@@ -8135,8 +6559,6 @@
},
"finalhandler": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
- "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
@@ -8149,16 +6571,12 @@
},
"find-up": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"form-data": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
- "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@@ -8166,30 +6584,20 @@
}
},
"forwarded": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
- "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
+ "version": "0.1.2"
},
"fp-ts": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.1.1.tgz",
- "integrity": "sha512-YcWhMdDCFCja0MmaDroTgNu+NWWrrnUEn92nvDgrtVy9Z71YFnhNVIghoHPt8gs82ijoMzFGeWKvArbyICiJgw=="
+ "version": "2.1.1"
},
"fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
+ "version": "0.5.2"
},
"from": {
"version": "0.1.7",
- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
- "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=",
"dev": true
},
"fs-extra": {
"version": "8.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
@@ -8198,8 +6606,6 @@
"dependencies": {
"jsonfile": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
}
@@ -8207,26 +6613,13 @@
}
},
"fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "fsevents": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
- "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
- "dev": true,
- "optional": true
+ "version": "1.0.0"
},
"get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
+ "version": "2.0.5"
},
"get-stream": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"dev": true,
"requires": {
"pump": "^3.0.0"
@@ -8234,8 +6627,6 @@
},
"glob": {
"version": "7.1.5",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz",
- "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -8248,26 +6639,26 @@
},
"glob-parent": {
"version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"global-dirs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz",
- "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==",
+ "version": "3.0.0",
"dev": true,
"requires": {
- "ini": "^1.3.5"
+ "ini": "2.0.0"
+ },
+ "dependencies": {
+ "ini": {
+ "version": "2.0.0",
+ "dev": true
+ }
}
},
"globby": {
"version": "11.0.1",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
- "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
"dev": true,
"requires": {
"array-union": "^2.1.0",
@@ -8280,8 +6671,6 @@
},
"got": {
"version": "9.6.0",
- "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
- "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
"dev": true,
"requires": {
"@sindresorhus/is": "^0.14.0",
@@ -8298,58 +6687,40 @@
}
},
"graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
+ "version": "4.2.10"
},
"has-ansi": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "^2.0.0"
},
"dependencies": {
"ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ "version": "2.1.1"
}
}
},
"has-flag": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-yarn": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
- "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
"dev": true
},
"highlight.js": {
- "version": "10.6.0",
- "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz",
- "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ=="
+ "version": "10.6.0"
},
"hosted-git-info": {
"version": "2.8.9",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
"http-cache-semantics": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
- "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
"dev": true
},
"http-errors": {
"version": "1.7.2",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
- "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
@@ -8359,45 +6730,31 @@
}
},
"humanize-duration": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.21.0.tgz",
- "integrity": "sha512-7BLsrQZ2nMGeakmGDUl1pDne6/7iAdvwf1RtDLCOPHNFIHjkOVW7lcu7xHkIM9HhZAlSSO5crhC1dHvtl4dIQw=="
+ "version": "3.21.0"
},
"iconv-lite": {
"version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ieee754": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ "version": "1.2.1"
},
"ignore": {
"version": "5.1.8",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
- "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
"dev": true
},
"ignore-by-default": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.0.0.tgz",
- "integrity": "sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==",
"dev": true
},
"import-lazy": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
- "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
"dev": true
},
"import-local": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz",
- "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==",
"dev": true,
"requires": {
"pkg-dir": "^4.2.0",
@@ -8406,62 +6763,42 @@
},
"imurmurhash": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true
},
"indent-string": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true
},
"inflight": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ "version": "2.0.3"
},
"ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+ "version": "1.3.8"
},
"io-ts": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.0.1.tgz",
- "integrity": "sha512-RezD+WcCfW4VkMkEcQWL/Nmy/nqsWTvTYg7oUmTGzglvSSV2P9h2z1PVeREPFf0GWNzruYleAt1XCMQZSg1xxQ==",
"requires": {}
},
"ipaddr.js": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
- "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
+ "version": "1.9.0"
},
"irregular-plurals": {
"version": "3.2.0",
- "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz",
- "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==",
"dev": true
},
"is-arrayish": {
"version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
"is-binary-path": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"requires": {
"binary-extensions": "^2.0.0"
@@ -8469,8 +6806,6 @@
},
"is-ci": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
- "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
"dev": true,
"requires": {
"ci-info": "^2.0.0"
@@ -8478,132 +6813,93 @@
},
"is-error": {
"version": "2.2.2",
- "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
- "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
"dev": true
},
"is-extglob": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"dev": true
},
"is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
+ "version": "3.0.0"
},
"is-glob": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
- "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-installed-globally": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz",
- "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==",
+ "version": "0.4.0",
"dev": true,
"requires": {
- "global-dirs": "^2.0.1",
- "is-path-inside": "^3.0.1"
+ "global-dirs": "^3.0.0",
+ "is-path-inside": "^3.0.2"
}
},
"is-interactive": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
- "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
"dev": true
},
"is-npm": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz",
- "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==",
+ "version": "5.0.0",
"dev": true
},
"is-number": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
"is-obj": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"dev": true
},
"is-observable": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz",
- "integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw=="
+ "version": "2.1.0"
},
"is-path-cwd": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
- "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
"dev": true
},
"is-path-inside": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
- "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==",
+ "version": "3.0.3",
"dev": true
},
"is-plain-object": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz",
- "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==",
+ "version": "5.0.0",
"dev": true
},
"is-promise": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
"dev": true
},
"is-typedarray": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
+ },
+ "is-unicode-supported": {
+ "version": "0.1.0",
"dev": true
},
"is-yarn-global": {
"version": "0.3.0",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
- "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==",
"dev": true
},
"isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ "version": "1.0.0"
},
"isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ "version": "2.0.0"
},
"js-string-escape": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
- "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=",
"dev": true
},
"js-tokens": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
"js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "version": "3.14.1",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@@ -8611,28 +6907,20 @@
},
"json-buffer": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
- "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
"dev": true
},
"json-parse-better-errors": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
- "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
"json5": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"requires": {
"minimist": "^1.2.0"
}
},
"jsonfile": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz",
- "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==",
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^0.1.2"
@@ -8640,8 +6928,6 @@
},
"keyv": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
- "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
"dev": true,
"requires": {
"json-buffer": "3.0.0"
@@ -8649,8 +6935,6 @@
},
"knub": {
"version": "30.0.0-beta.46",
- "resolved": "https://registry.npmjs.org/knub/-/knub-30.0.0-beta.46.tgz",
- "integrity": "sha512-eNGfFVXwdDnyIjL3nLJceVIlwDdfnM3zJPuPdsOKUbRp4yNBnRSBcG+TnaXc3nUWmXIq3q78rRPeThoo0qz6iQ==",
"requires": {
"discord-api-types": "^0.22.0",
"discord.js": "^13.0.1",
@@ -8659,39 +6943,29 @@
},
"dependencies": {
"discord-api-types": {
- "version": "0.22.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
- "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg=="
+ "version": "0.22.0"
}
}
},
"knub-command-manager": {
"version": "9.1.0",
- "resolved": "https://registry.npmjs.org/knub-command-manager/-/knub-command-manager-9.1.0.tgz",
- "integrity": "sha512-pEtpWElbBoTRSL8kWSPRrTIuTIdvYGkP/wzOn77cieumC02adfwEt1Cc09HFvVT4ib35nf1y31oul36csaG7Vg==",
"requires": {
"escape-string-regexp": "^2.0.0"
},
"dependencies": {
"escape-string-regexp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
+ "version": "2.0.0"
}
}
},
"last-commit-log": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/last-commit-log/-/last-commit-log-2.1.0.tgz",
- "integrity": "sha512-vvZNAaiPSQ/PtyfDP2UrIRwKx0xttliGSwEfd/4tU1B/2iD/g4e3nWbttYb6YLarpULpM6s5OW5JWl97ogB6jA==",
"requires": {
"dotgitconfig": "^1.0.1"
}
},
"latest-version": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
- "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
"dev": true,
"requires": {
"package-json": "^6.3.0"
@@ -8699,14 +6973,10 @@
},
"lines-and-columns": {
"version": "1.1.6",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
- "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true
},
"load-json-file": {
"version": "5.3.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
- "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.15",
@@ -8718,77 +6988,85 @@
},
"locate-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ "version": "4.17.21"
},
"lodash.chunk": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz",
- "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw="
+ "version": "4.2.0"
},
"lodash.clonedeep": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
- "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
+ "version": "4.5.0"
},
"lodash.difference": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz",
- "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw="
+ "version": "4.5.0"
},
"lodash.intersection": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.intersection/-/lodash.intersection-4.4.0.tgz",
- "integrity": "sha1-ChG6Yx0OlcI8fy9Mu5ppLtF45wU="
+ "version": "4.4.0"
},
"lodash.isequal": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
- "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
+ "version": "4.5.0"
},
"lodash.pick": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
- "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM="
+ "version": "4.4.0"
},
"log-symbols": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
- "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
+ "version": "4.1.0",
"dev": true,
"requires": {
- "chalk": "^2.4.2"
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
}
},
"lowercase-keys": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
- "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
"dev": true
},
- "lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
- "dev": true,
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
"make-dir": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
- "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"dev": true,
"requires": {
"semver": "^6.0.0"
@@ -8796,16 +7074,12 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
}
}
},
"map-age-cleaner": {
"version": "0.1.3",
- "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
- "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
"dev": true,
"requires": {
"p-defer": "^1.0.0"
@@ -8813,14 +7087,10 @@
},
"map-stream": {
"version": "0.1.0",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
- "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
"dev": true
},
"matcher": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
"dev": true,
"requires": {
"escape-string-regexp": "^4.0.0"
@@ -8828,64 +7098,40 @@
"dependencies": {
"escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true
}
}
},
"md5-hex": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
- "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
"dev": true,
"requires": {
"blueimp-md5": "^2.10.0"
}
},
"media-typer": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
+ "version": "0.3.0"
},
"mem": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-6.1.0.tgz",
- "integrity": "sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==",
+ "version": "8.1.1",
"dev": true,
"requires": {
"map-age-cleaner": "^0.1.3",
- "mimic-fn": "^3.0.0"
- },
- "dependencies": {
- "mimic-fn": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.0.0.tgz",
- "integrity": "sha512-PiVO95TKvhiwgSwg1IdLYlCTdul38yZxZMIcnDSFIBUm4BNZha2qpQ4GpJ++15bHoKDtrW2D69lMfFwdFYtNZQ==",
- "dev": true
- }
+ "mimic-fn": "^3.1.0"
}
},
"merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
+ "version": "1.0.1"
},
"merge2": {
"version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true
},
"methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
+ "version": "1.1.2"
},
"micromatch": {
"version": "4.0.2",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
- "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"dev": true,
"requires": {
"braces": "^3.0.1",
@@ -8893,78 +7139,56 @@
}
},
"mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
+ "version": "1.6.0"
},
"mime-db": {
- "version": "1.40.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
+ "version": "1.40.0"
},
"mime-types": {
"version": "2.1.24",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
- "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"requires": {
"mime-db": "1.40.0"
}
},
"mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "version": "3.1.0",
"dev": true
},
"mimic-response": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
"dev": true
},
"minimatch": {
"version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"mkdirp": {
"version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": {
"minimist": "^1.2.5"
}
},
"moment": {
- "version": "2.24.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
- "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
+ "version": "2.24.0"
},
"moment-timezone": {
"version": "0.5.27",
- "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.27.tgz",
- "integrity": "sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw==",
"requires": {
"moment": ">= 2.9.0"
}
},
"ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "version": "2.0.0"
},
"multer": {
"version": "1.4.3",
- "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.3.tgz",
- "integrity": "sha512-np0YLKncuZoTzufbkM6wEKp68EhWJXcU6fq6QqrSwkckd2LlMgd1UqhUJLj6NS/5sZ8dE8LYDWslsltJznnXlg==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
@@ -8976,16 +7200,8 @@
"xtend": "^4.0.0"
}
},
- "mute-stream": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
- "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
- "dev": true
- },
"mysql": {
"version": "2.17.1",
- "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.17.1.tgz",
- "integrity": "sha512-7vMqHQ673SAk5C8fOzTG2LpPcf3bNt0oL3sFpxPEEFp1mdlDcrLK0On7z8ZYKaaHrHwNcQ/MTUz7/oobZ2OyyA==",
"requires": {
"bignumber.js": "7.2.1",
"readable-stream": "2.3.6",
@@ -8995,8 +7211,6 @@
},
"mz": {
"version": "2.7.0",
- "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
- "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
"requires": {
"any-promise": "^1.0.0",
"object-assign": "^4.0.1",
@@ -9004,43 +7218,29 @@
}
},
"nan": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
- "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
+ "version": "2.14.0"
},
"negotiator": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
- "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
+ "version": "0.6.2"
},
"nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
+ "version": "1.0.5"
},
"node-cleanup": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
- "integrity": "sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=",
"dev": true
},
"node-fetch": {
- "version": "2.6.5",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
- "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
+ "version": "2.6.7",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-gyp-build": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz",
- "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg=="
+ "version": "4.2.3"
},
"normalize-package-data": {
"version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
"requires": {
"hosted-git-info": "^2.1.4",
@@ -9051,92 +7251,70 @@
},
"normalize-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
"normalize-url": {
"version": "4.5.1",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",
- "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==",
"dev": true
},
"oauth": {
- "version": "0.9.15",
- "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
- "integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE="
+ "version": "0.9.15"
},
"object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+ "version": "4.1.1"
},
"observable-fns": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz",
- "integrity": "sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg=="
+ "version": "0.6.1"
},
"on-finished": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"requires": {
"ee-first": "1.1.1"
}
},
"once": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"onetime": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
- "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
+ "version": "5.1.2",
"dev": true,
"requires": {
"mimic-fn": "^2.1.0"
+ },
+ "dependencies": {
+ "mimic-fn": {
+ "version": "2.1.0",
+ "dev": true
+ }
}
},
"ora": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/ora/-/ora-4.0.4.tgz",
- "integrity": "sha512-77iGeVU1cIdRhgFzCK8aw1fbtT1B/iZAvWjS+l/o1x0RShMgxHUZaD2yDpWsNCPwXg9z1ZA78Kbdvr8kBmG/Ww==",
+ "version": "5.4.1",
"dev": true,
"requires": {
- "chalk": "^3.0.0",
+ "bl": "^4.1.0",
+ "chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
- "cli-spinners": "^2.2.0",
+ "cli-spinners": "^2.5.0",
"is-interactive": "^1.0.0",
- "log-symbols": "^3.0.0",
- "mute-stream": "0.0.8",
+ "is-unicode-supported": "^0.1.0",
+ "log-symbols": "^4.1.0",
"strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1"
},
"dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
"ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
"requires": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -9145,8 +7323,6 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -9154,29 +7330,14 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- },
"supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
@@ -9185,56 +7346,58 @@
}
},
"os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+ "version": "1.0.2"
},
"p-cancelable": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
- "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",
"dev": true
},
"p-defer": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
- "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
+ "dev": true
+ },
+ "p-event": {
+ "version": "4.2.0",
+ "dev": true,
+ "requires": {
+ "p-timeout": "^3.1.0"
+ }
+ },
+ "p-finally": {
+ "version": "1.0.0",
"dev": true
},
"p-limit": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
- "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-map": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
"requires": {
"aggregate-error": "^3.0.0"
}
},
+ "p-timeout": {
+ "version": "3.2.0",
+ "dev": true,
+ "requires": {
+ "p-finally": "^1.0.0"
+ }
+ },
"p-try": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
+ "version": "2.2.0"
},
"package-json": {
"version": "6.5.0",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
- "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
"dev": true,
"requires": {
"got": "^9.6.0",
@@ -9245,36 +7408,26 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
}
}
},
"parent-require": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz",
- "integrity": "sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc="
+ "version": "1.0.0"
},
"parse-color": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parse-color/-/parse-color-1.0.0.tgz",
- "integrity": "sha1-e3SLlag/A/FqlPU15S1/PZRlhhk=",
"requires": {
"color-convert": "~0.5.0"
},
"dependencies": {
"color-convert": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
- "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0="
+ "version": "0.5.3"
}
}
},
"parse-json": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
"requires": {
"error-ex": "^1.3.1",
@@ -9283,39 +7436,27 @@
},
"parse-ms": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
- "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==",
"dev": true
},
"parse5": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
- "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="
+ "version": "5.1.1"
},
"parse5-htmlparser2-tree-adapter": {
"version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz",
- "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==",
"requires": {
"parse5": "^6.0.1"
},
"dependencies": {
"parse5": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
- "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
+ "version": "6.0.1"
}
}
},
"parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
+ "version": "1.3.3"
},
"passport": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz",
- "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=",
"requires": {
"passport-strategy": "1.x.x",
"pause": "0.0.1"
@@ -9323,16 +7464,12 @@
},
"passport-custom": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/passport-custom/-/passport-custom-1.1.0.tgz",
- "integrity": "sha512-wWlewQHKQfiQPY7SwQj1w+/MioiVRc/rBuNEgLaBKinKoFkiTDOFVzJ03wYK5e0i9h9Rk6AOf1k6lIpVNYGQiA==",
"requires": {
"passport-strategy": "1.x.x"
}
},
"passport-oauth2": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.5.0.tgz",
- "integrity": "sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==",
+ "version": "1.6.1",
"requires": {
"base64url": "3.x.x",
"oauth": "0.9.x",
@@ -9342,51 +7479,35 @@
}
},
"passport-strategy": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
- "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ="
+ "version": "1.0.0"
},
"path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
+ "version": "3.0.0"
},
"path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ "version": "1.0.1"
},
"path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
+ "version": "2.0.1"
},
"path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+ "version": "0.1.7"
},
"path-type": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true
},
"pause": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
- "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10="
+ "version": "0.0.1"
},
"pause-stream": {
"version": "0.0.11",
- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
- "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
"dev": true,
"requires": {
"through": "~2.3"
@@ -9394,20 +7515,14 @@
},
"picomatch": {
"version": "2.2.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
- "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true
},
"pify": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true
},
"pkg-conf": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz",
- "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==",
"dev": true,
"requires": {
"find-up": "^3.0.0",
@@ -9416,8 +7531,6 @@
},
"pkg-dir": {
"version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"dev": true,
"requires": {
"find-up": "^4.0.0"
@@ -9425,8 +7538,6 @@
"dependencies": {
"find-up": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
"locate-path": "^5.0.0",
@@ -9435,8 +7546,6 @@
},
"locate-path": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"requires": {
"p-locate": "^4.1.0"
@@ -9444,8 +7553,6 @@
},
"p-locate": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"requires": {
"p-limit": "^2.2.0"
@@ -9453,24 +7560,18 @@
},
"path-exists": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
}
}
},
"pkg-up": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
- "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
"requires": {
"find-up": "^3.0.0"
}
},
"plur": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz",
- "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==",
"dev": true,
"requires": {
"irregular-plurals": "^3.2.0"
@@ -9478,28 +7579,20 @@
},
"prepend-http": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
- "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
"dev": true
},
"pretty-ms": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.0.tgz",
- "integrity": "sha512-J3aPWiC5e9ZeZFuSeBraGxSkGMOvulSWsxDByOcbD1Pr75YL3LSNIKIb52WXbCLE1sS5s4inBBbryjF4Y05Ceg==",
+ "version": "7.0.1",
"dev": true,
"requires": {
"parse-ms": "^2.1.0"
}
},
"process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ "version": "2.0.1"
},
"proxy-addr": {
"version": "2.0.5",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
- "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
"requires": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.9.0"
@@ -9507,23 +7600,13 @@
},
"ps-tree": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",
- "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",
"dev": true,
"requires": {
"event-stream": "=3.3.4"
}
},
- "pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
- },
"pump": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
@@ -9531,28 +7614,20 @@
}
},
"pupa": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz",
- "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==",
+ "version": "2.1.1",
"dev": true,
"requires": {
"escape-goat": "^2.0.0"
}
},
"qs": {
- "version": "6.7.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
- "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
+ "version": "6.7.0"
},
"range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
+ "version": "1.2.1"
},
"raw-body": {
"version": "2.4.0",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
- "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
"requires": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
@@ -9562,8 +7637,6 @@
},
"rc": {
"version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"dev": true,
"requires": {
"deep-extend": "^0.6.0",
@@ -9574,8 +7647,6 @@
},
"read-pkg": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
- "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
"dev": true,
"requires": {
"@types/normalize-package-data": "^2.4.0",
@@ -9586,8 +7657,6 @@
"dependencies": {
"parse-json": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
- "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -9598,16 +7667,12 @@
},
"type-fest": {
"version": "0.6.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
- "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true
}
}
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -9619,39 +7684,23 @@
}
},
"readdirp": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
- "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
+ "version": "3.6.0",
"dev": true,
"requires": {
"picomatch": "^2.2.1"
}
},
"reflect-metadata": {
- "version": "0.1.13",
- "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
- "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
- },
- "regenerator-runtime": {
- "version": "0.13.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
- "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
- "dev": true
+ "version": "0.1.13"
},
"regexp-tree": {
- "version": "0.1.14",
- "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.14.tgz",
- "integrity": "sha512-59v5A90TAh4cAMyDQEOzcnsu4q7Wb10RsyTjngEnJIZsWYM4siVGu+JmLT1WsxHvOWhiu4YS20XiTuxWMeVoHQ=="
+ "version": "0.1.14"
},
"regexp-worker": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/regexp-worker/-/regexp-worker-1.1.0.tgz",
- "integrity": "sha512-IDDOhDlI972T7bexYwyw+JKdqFsBtJvX8RA+ChVwjhgcK/gv4eG3oZu8Rbidnamh2U2b0ZWdawKksjzY2dmVFw=="
+ "version": "1.1.0"
},
"registry-auth-token": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz",
- "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==",
+ "version": "4.2.1",
"dev": true,
"requires": {
"rc": "^1.2.8"
@@ -9659,28 +7708,16 @@
},
"registry-url": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
- "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
"dev": true,
"requires": {
"rc": "^1.2.8"
}
},
"require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
- },
- "require-main-filename": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
- "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
- "dev": true
+ "version": "2.1.1"
},
"resolve": {
"version": "1.17.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
- "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -9688,8 +7725,6 @@
},
"resolve-cwd": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
- "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
"dev": true,
"requires": {
"resolve-from": "^5.0.0"
@@ -9697,14 +7732,10 @@
},
"resolve-from": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
"responselike": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
- "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
"dev": true,
"requires": {
"lowercase-keys": "^1.0.0"
@@ -9712,8 +7743,6 @@
},
"restore-cursor": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
"onetime": "^5.1.0",
@@ -9722,14 +7751,10 @@
},
"reusify": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true
},
"rimraf": {
"version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"dev": true,
"requires": {
"glob": "^7.1.3"
@@ -9737,47 +7762,31 @@
},
"run-parallel": {
"version": "1.1.9",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
- "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
"dev": true
},
"safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "version": "5.1.2"
},
"safe-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz",
- "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==",
"requires": {
"regexp-tree": "~0.1.1"
}
},
"safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ "version": "2.1.2"
},
"sax": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
+ "version": "1.2.4"
},
"seedrandom": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
- "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+ "version": "3.0.5"
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ "version": "5.7.1"
},
"semver-diff": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
- "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
"dev": true,
"requires": {
"semver": "^6.3.0"
@@ -9785,16 +7794,12 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
}
}
},
"send": {
"version": "0.17.1",
- "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
- "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
@@ -9812,22 +7817,25 @@
},
"dependencies": {
"ms": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ "version": "2.1.1"
}
}
},
"serialize-error": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
- "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=",
- "dev": true
+ "version": "7.0.1",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.13.1"
+ },
+ "dependencies": {
+ "type-fest": {
+ "version": "0.13.1",
+ "dev": true
+ }
+ }
},
"serve-static": {
"version": "1.14.1",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
- "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
@@ -9835,21 +7843,11 @@
"send": "0.17.1"
}
},
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
- "dev": true
- },
"setprototypeof": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
- "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
+ "version": "1.1.1"
},
"sha.js": {
"version": "2.4.11",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
- "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -9857,33 +7855,23 @@
},
"shebang-command": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
+ "version": "1.0.0"
},
"signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "version": "3.0.7",
"dev": true
},
"slash": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
},
"slice-ansi": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
- "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
@@ -9893,8 +7881,6 @@
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
@@ -9903,8 +7889,6 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -9912,28 +7896,16 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
}
}
},
"source-map": {
"version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"source-map-support": {
"version": "0.5.16",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
- "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
@@ -9942,8 +7914,6 @@
},
"spdx-correct": {
"version": "3.1.1",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
- "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
"dev": true,
"requires": {
"spdx-expression-parse": "^3.0.0",
@@ -9952,14 +7922,10 @@
},
"spdx-exceptions": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
"dev": true
},
"spdx-expression-parse": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
"requires": {
"spdx-exceptions": "^2.1.0",
@@ -9968,33 +7934,23 @@
},
"spdx-license-ids": {
"version": "3.0.5",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
- "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
"dev": true
},
"split": {
"version": "0.3.3",
- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
- "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
"dev": true,
"requires": {
"through": "2"
}
},
"sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
+ "version": "1.0.3"
},
"sqlstring": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
- "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
+ "version": "2.3.1"
},
"stack-utils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz",
- "integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==",
+ "version": "2.0.5",
"dev": true,
"requires": {
"escape-string-regexp": "^2.0.0"
@@ -10002,135 +7958,70 @@
"dependencies": {
"escape-string-regexp": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true
}
}
},
"statuses": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
+ "version": "1.5.0"
},
"stream-combiner": {
"version": "0.0.4",
- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
- "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
"dev": true,
"requires": {
"duplexer": "~0.1.1"
}
},
"streamsearch": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
- "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo="
+ "version": "0.1.2"
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"string-argv": {
"version": "0.1.2",
- "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.1.2.tgz",
- "integrity": "sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA==",
"dev": true
},
"string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
+ "version": "4.2.3",
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- },
- "dependencies": {
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- }
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
}
},
"strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
+ "version": "6.0.1",
"requires": {
- "ansi-regex": "^4.1.0"
+ "ansi-regex": "^5.0.1"
}
},
"strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
+ "version": "3.0.0"
},
"strip-combining-marks": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-combining-marks/-/strip-combining-marks-1.0.0.tgz",
- "integrity": "sha1-gpXK/RGDN+u+Rt3Fgizb2flb6nE="
+ "version": "1.0.0"
},
"strip-json-comments": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true
},
"supertap": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz",
- "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==",
+ "version": "2.0.0",
"dev": true,
"requires": {
- "arrify": "^1.0.1",
- "indent-string": "^3.2.0",
- "js-yaml": "^3.10.0",
- "serialize-error": "^2.1.0",
- "strip-ansi": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true
- },
- "arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
- "dev": true
- },
- "indent-string": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
- "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
- "dev": true
- },
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- }
+ "arrify": "^2.0.1",
+ "indent-string": "^4.0.0",
+ "js-yaml": "^3.14.0",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^6.0.0"
}
},
"supports-color": {
"version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
@@ -10138,36 +8029,22 @@
},
"temp-dir": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
- "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==",
- "dev": true
- },
- "term-size": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz",
- "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==",
"dev": true
},
"thenify": {
"version": "3.3.1",
- "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
- "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
"requires": {
"any-promise": "^1.0.0"
}
},
"thenify-all": {
"version": "1.6.0",
- "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
- "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
"requires": {
"thenify": ">= 3.1.0 < 4"
}
},
"threads": {
"version": "1.7.0",
- "resolved": "https://registry.npmjs.org/threads/-/threads-1.7.0.tgz",
- "integrity": "sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ==",
"requires": {
"callsites": "^3.1.0",
"debug": "^4.2.0",
@@ -10178,140 +8055,115 @@
"dependencies": {
"debug": {
"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"
}
},
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "version": "2.1.2"
}
}
},
"through": {
"version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
},
"time-zone": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
- "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=",
"dev": true
},
"tiny-worker": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz",
- "integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==",
"optional": true,
"requires": {
"esm": "^3.2.25"
}
},
"tlds": {
- "version": "1.221.1",
- "resolved": "https://registry.npmjs.org/tlds/-/tlds-1.221.1.tgz",
- "integrity": "sha512-N1Afn/SLeOQRpxMwHBuNFJ3GvGrdtY4XPXKPFcx8he0U9Jg9ZkvTKE1k3jQDtCmlFn44UxjVtouF6PT4rEGd3Q=="
+ "version": "1.221.1"
},
"tmp": {
"version": "0.0.33",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"requires": {
"os-tmpdir": "~1.0.2"
}
},
"to-readable-stream": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
- "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
"dev": true
},
"to-regex-range": {
"version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
"is-number": "^7.0.0"
}
},
"toidentifier": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
- "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
+ "version": "1.0.0"
},
"tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
+ "version": "0.0.3"
},
"trim-off-newlines": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
- "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz",
+ "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==",
"dev": true
},
"ts-essentials": {
"version": "6.0.7",
- "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz",
- "integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==",
"requires": {}
},
"ts-mixer": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
- "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
+ "version": "6.0.1"
},
"tsc-watch": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-4.0.0.tgz",
- "integrity": "sha512-I+1cE7WN9YhDknNRAO5NRI7jzeiIZCxUZ0dFEM/Gf+3KTlHasusDEftwezJ+PSFkECSn3RQmf28RdovjTptkRA==",
+ "version": "5.0.2",
"dev": true,
"requires": {
- "cross-spawn": "^5.1.0",
+ "cross-spawn": "^7.0.3",
"node-cleanup": "^2.1.2",
"ps-tree": "^1.2.0",
"string-argv": "^0.1.1",
- "strip-ansi": "^4.0.0"
+ "strip-ansi": "^6.0.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true
- },
"cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "version": "7.0.3",
"dev": true,
"requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
}
},
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "path-key": {
+ "version": "3.1.1",
+ "dev": true
+ },
+ "shebang-command": {
+ "version": "2.0.0",
"dev": true,
"requires": {
- "ansi-regex": "^3.0.0"
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
}
}
}
},
"tsconfig-paths": {
"version": "3.9.0",
- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
- "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==",
"requires": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
@@ -10320,14 +8172,10 @@
}
},
"tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+ "version": "1.14.1"
},
"twemoji": {
"version": "12.1.4",
- "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.1.4.tgz",
- "integrity": "sha512-e37lUlVijmABF7wPCc09s1kKj3hcpzU8KL5zw2bBDIXOtOr4luLF+ODJaEqca8dZPmLR5ezrJYI93nhPovKBiQ==",
"requires": {
"fs-extra": "^8.0.1",
"jsonfile": "^5.0.0",
@@ -10336,34 +8184,24 @@
}
},
"twemoji-parser": {
- "version": "12.1.1",
- "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.1.1.tgz",
- "integrity": "sha512-XFUB4ReEvPbNPtiuyo/+crM4RldYbRRAhyE7Hw6EnfBdXECGydw7a49EGADayRvaeierP/m4DSv/OZQObh0LGA=="
+ "version": "12.1.1"
},
"type-fest": {
"version": "0.3.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
- "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==",
"dev": true
},
"type-is": {
"version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
}
},
"typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
+ "version": "0.0.6"
},
"typedarray-to-buffer": {
"version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
"requires": {
"is-typedarray": "^1.0.0"
@@ -10371,8 +8209,6 @@
},
"typeorm": {
"version": "0.2.31",
- "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.31.tgz",
- "integrity": "sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA==",
"requires": {
"@sqltools/formatter": "1.2.2",
"app-root-path": "^3.0.0",
@@ -10394,16 +8230,12 @@
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -10411,34 +8243,24 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "version": "1.1.4"
},
"debug": {
"version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
}
},
"dotenv": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
- "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ "version": "8.2.0"
},
"glob": {
"version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -10449,33 +8271,16 @@
}
},
"has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
- },
- "js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- }
+ "version": "4.0.0"
},
"mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
+ "version": "1.0.4"
},
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "version": "2.1.2"
},
"supports-color": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": {
"has-flag": "^4.0.0"
}
@@ -10484,69 +8289,53 @@
},
"typescript": {
"version": "4.4.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
- "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"peer": true
},
"uid2": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz",
- "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I="
+ "version": "0.0.3"
},
"unique-string": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
- "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
"dev": true,
"requires": {
"crypto-random-string": "^2.0.0"
}
},
"universalify": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
+ "version": "0.1.2"
},
"unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
+ "version": "1.0.0"
},
"update-notifier": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz",
- "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==",
+ "version": "5.1.0",
"dev": true,
"requires": {
- "boxen": "^4.2.0",
- "chalk": "^3.0.0",
+ "boxen": "^5.0.0",
+ "chalk": "^4.1.0",
"configstore": "^5.0.1",
"has-yarn": "^2.1.0",
"import-lazy": "^2.1.0",
"is-ci": "^2.0.0",
- "is-installed-globally": "^0.3.1",
- "is-npm": "^4.0.0",
+ "is-installed-globally": "^0.4.0",
+ "is-npm": "^5.0.0",
"is-yarn-global": "^0.3.0",
- "latest-version": "^5.0.0",
- "pupa": "^2.0.1",
+ "latest-version": "^5.1.0",
+ "pupa": "^2.1.1",
+ "semver": "^7.3.4",
"semver-diff": "^3.1.1",
"xdg-basedir": "^4.0.0"
},
"dependencies": {
"ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "version": "4.3.0",
"dev": true,
"requires": {
- "@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "version": "4.1.2",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -10555,8 +8344,6 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -10564,31 +8351,41 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
+ "lru-cache": {
+ "version": "6.0.0",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.5",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
"supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "dev": true
}
}
},
"url-parse-lax": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
- "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
"dev": true,
"requires": {
"prepend-http": "^2.0.0"
@@ -10596,31 +8393,21 @@
},
"utf-8-validate": {
"version": "5.0.5",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz",
- "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==",
"requires": {
"node-gyp-build": "^4.2.0"
}
},
"util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ "version": "1.0.2"
},
"utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
+ "version": "1.0.1"
},
"uuid": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
+ "version": "3.3.2"
},
"validate-npm-package-license": {
"version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
"requires": {
"spdx-correct": "^3.0.0",
@@ -10628,34 +8415,24 @@
}
},
"vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
+ "version": "1.1.2"
},
"wcwidth": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
- "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
"dev": true,
"requires": {
"defaults": "^1.0.3"
}
},
"webidl-conversions": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
+ "version": "3.0.1"
},
"well-known-symbols": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
- "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
"dev": true
},
"whatwg-url": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
@@ -10663,131 +8440,47 @@
},
"which": {
"version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
},
- "which-module": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
- "dev": true
- },
"widest-line": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
- "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
"dev": true,
"requires": {
"string-width": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
}
},
"wrap-ansi": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
- },
"ansi-styles": {
"version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "requires": {
- "ansi-regex": "^5.0.0"
- }
+ "version": "1.1.4"
}
}
},
"wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ "version": "1.0.2"
},
"write-file-atomic": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
"dev": true,
"requires": {
"imurmurhash": "^0.1.4",
@@ -10798,59 +8491,30 @@
},
"ws": {
"version": "8.5.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
- "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
"requires": {}
},
"xdg-basedir": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
- "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
"dev": true
},
"xml2js": {
"version": "0.4.23",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
- "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
- "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
- },
- "xregexp": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz",
- "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==",
- "dev": true,
- "requires": {
- "@babel/runtime-corejs3": "^7.8.3"
- }
+ "version": "11.0.1"
},
"xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
- },
- "yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
+ "version": "4.0.2"
},
"yaml-js": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/yaml-js/-/yaml-js-0.2.3.tgz",
- "integrity": "sha512-6xUQtVKl1qcd0EXtTEzUDVJy9Ji1fYa47LtkDtYKlIjhibPE9knNPmoRyf6SGREFHlOAUyDe9OdYqRP4DuSi5Q=="
+ "version": "0.2.3"
},
"yargonaut": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz",
- "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==",
"requires": {
"chalk": "^1.1.1",
"figlet": "^1.1.1",
@@ -10858,19 +8522,13 @@
},
"dependencies": {
"ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ "version": "2.1.1"
},
"ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
+ "version": "2.2.1"
},
"chalk": {
"version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
@@ -10881,23 +8539,17 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
+ "version": "2.0.0"
}
}
},
"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",
@@ -10908,49 +8560,16 @@
"yargs-parser": "^20.2.2"
},
"dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- },
"y18n": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz",
- "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg=="
+ "version": "5.0.5"
}
}
},
"yargs-parser": {
- "version": "20.2.5",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.5.tgz",
- "integrity": "sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg=="
+ "version": "20.2.5"
},
"yawn-yaml": {
"version": "git+ssh://git@github.com/dragory/yawn-yaml.git#77ab3870ca53c4693002c4a41336e7476e7934ed",
- "integrity": "sha512-22gZa51NZQgBnoQzTqoNAXqNn8l7vonJhU+MEiqDXz6sA0GszMk0Un2xyN1p+8uhdq6ndFKz5qXeDC0eAyaMtQ==",
"from": "yawn-yaml@github:dragory/yawn-yaml#string-number-fix-build",
"requires": {
"js-yaml": "^3.4.2",
@@ -10960,16 +8579,12 @@
},
"zlib-sync": {
"version": "0.1.7",
- "resolved": "https://registry.npmjs.org/zlib-sync/-/zlib-sync-0.1.7.tgz",
- "integrity": "sha512-UmciU6ZrIwtwPC8noMzq+kGMdiWwNRZ3wC0SbED4Ew5Ikqx14MqDPRs/Pbk+3rZPh5SzsOgUBs1WRE0iieddpg==",
"requires": {
"nan": "^2.14.0"
}
},
"zod": {
- "version": "3.14.4",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
- "integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw=="
+ "version": "3.14.4"
}
}
}
diff --git a/backend/package.json b/backend/package.json
index 018a359d..49372314 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -51,11 +51,11 @@
"moment-timezone": "^0.5.21",
"multer": "^1.4.3",
"mysql": "^2.16.0",
- "node-fetch": "^2.6.5",
+ "node-fetch": "^2.6.7",
"parse-color": "^1.0.0",
"passport": "^0.4.0",
"passport-custom": "^1.0.5",
- "passport-oauth2": "^1.5.0",
+ "passport-oauth2": "^1.6.1",
"pkg-up": "^3.1.0",
"reflect-metadata": "^0.1.12",
"regexp-worker": "^1.1.0",
@@ -90,10 +90,10 @@
"@types/safe-regex": "^1.1.2",
"@types/tmp": "0.0.33",
"@types/twemoji": "^12.1.0",
- "ava": "^3.10.0",
+ "ava": "^3.15.0",
"rimraf": "^2.6.2",
"source-map-support": "^0.5.16",
- "tsc-watch": "^4.0.0"
+ "tsc-watch": "^5.0.2"
},
"ava": {
"files": [
From 8f96fa4ec13efa56ce72250c75cf14d8c228977c Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 4 Apr 2022 23:26:06 +0300
Subject: [PATCH 016/190] ci: add cla-bot configuration
---
.clabot | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 .clabot
diff --git a/.clabot b/.clabot
new file mode 100644
index 00000000..b1bca0bb
--- /dev/null
+++ b/.clabot
@@ -0,0 +1,17 @@
+{
+ "contributors": [
+ "CleverSource",
+ "DarkView",
+ "Jernik",
+ "WeebHiroyuki",
+ "almeidx",
+ "axisiscool",
+ "dexbiobot",
+ "greenbigfrog",
+ "metal0",
+ "roflmaoqwerty",
+ "usoka",
+ "vcokltfre"
+ ],
+ "message": "Thank you for contributing to Zeppelin! We require contributors to sign our Contributor License Agreement (CLA). To let us review and merge your code, please visit https://github.com/ZeppelinBot/CLA to sign the CLA!"
+}
From 280543df4e45bfebb27c1c8142c787ecbfb6fc2a Mon Sep 17 00:00:00 2001
From: Almeida
Date: Mon, 4 Apr 2022 21:40:28 +0100
Subject: [PATCH 017/190] chore: update erlpack (#331)
---
backend/package-lock.json | 23 ++++++++++++-----------
backend/package.json | 2 +-
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index eb8b26ae..1647e84c 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -17,7 +17,7 @@
"discord.js": "^13.6.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
- "erlpack": "github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
+ "erlpack": "github:discord/erlpack",
"escape-string-regexp": "^1.0.5",
"express": "^4.17.0",
"fp-ts": "^2.0.1",
@@ -1812,13 +1812,12 @@
},
"node_modules/erlpack": {
"version": "0.1.3",
- "resolved": "git+ssh://git@github.com/almeidx/erlpack.git#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
- "integrity": "sha512-2Tux713HiQIXdxv6nHBFmn6sOBKca5xQOyaIXMquNUTUEx56JhyBaguMWGWV73LM8xOZ/fAow4diI+4KfEAhkg==",
+ "resolved": "git+ssh://git@github.com/discord/erlpack.git#3b793a333dd3f6a140b9168ea91e9fa9660753ce",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"bindings": "^1.5.0",
- "nan": "^2.14.0"
+ "nan": "^2.15.0"
}
},
"node_modules/error-ex": {
@@ -3079,8 +3078,9 @@
}
},
"node_modules/nan": {
- "version": "2.14.0",
- "license": "MIT"
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"node_modules/negotiator": {
"version": "0.6.2",
@@ -6424,12 +6424,11 @@
"dev": true
},
"erlpack": {
- "version": "git+ssh://git@github.com/almeidx/erlpack.git#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
- "integrity": "sha512-2Tux713HiQIXdxv6nHBFmn6sOBKca5xQOyaIXMquNUTUEx56JhyBaguMWGWV73LM8xOZ/fAow4diI+4KfEAhkg==",
- "from": "erlpack@github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
+ "version": "git+ssh://git@github.com/discord/erlpack.git#3b793a333dd3f6a140b9168ea91e9fa9660753ce",
+ "from": "erlpack@github:discord/erlpack.git",
"requires": {
"bindings": "^1.5.0",
- "nan": "^2.14.0"
+ "nan": "^2.15.0"
}
},
"error-ex": {
@@ -7218,7 +7217,9 @@
}
},
"nan": {
- "version": "2.14.0"
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"negotiator": {
"version": "0.6.2"
diff --git a/backend/package.json b/backend/package.json
index 49372314..fbdac67f 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -32,7 +32,7 @@
"discord.js": "^13.6.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
- "erlpack": "github:almeidx/erlpack#f0c535f73817fd914806d6ca26a7730c14e0fb7c",
+ "erlpack": "github:discord/erlpack",
"escape-string-regexp": "^1.0.5",
"express": "^4.17.0",
"fp-ts": "^2.0.1",
From 4f5222508d2a4bae316f0c83fceac24c14c66545 Mon Sep 17 00:00:00 2001
From: Shoaib Sajid
Date: Fri, 22 Apr 2022 00:16:16 +0500
Subject: [PATCH 018/190] docs: update phisherman docs link (#327)
---
backend/src/plugins/Phisherman/info.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/Phisherman/info.ts b/backend/src/plugins/Phisherman/info.ts
index 5c9a1818..5c1ea94f 100644
--- a/backend/src/plugins/Phisherman/info.ts
+++ b/backend/src/plugins/Phisherman/info.ts
@@ -8,7 +8,7 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
`),
configurationGuide: trimPluginDescription(`
### Getting started
- To get started, request an API key for Phisherman following the instructions at https://docs.phisherman.gg/#/api/getting-started?id=requesting-api-access.
+ To get started, request an API key for Phisherman following the instructions at https://docs.phisherman.gg/guide/getting-started.html#requesting-api-access
Then, add the api key to the plugin's config:
~~~yml
From da42291dcbb3bd953f54ca7ff91c0bb52082e956 Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Thu, 21 Apr 2022 22:21:40 +0300
Subject: [PATCH 019/190] Update .clabot
---
.clabot | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.clabot b/.clabot
index b1bca0bb..d75794c9 100644
--- a/.clabot
+++ b/.clabot
@@ -11,7 +11,8 @@
"metal0",
"roflmaoqwerty",
"usoka",
- "vcokltfre"
+ "vcokltfre",
+ "Rstar284"
],
"message": "Thank you for contributing to Zeppelin! We require contributors to sign our Contributor License Agreement (CLA). To let us review and merge your code, please visit https://github.com/ZeppelinBot/CLA to sign the CLA!"
}
From a88b5139c4eae93d3dcfd6742c193055cc39a8b8 Mon Sep 17 00:00:00 2001
From: metal
Date: Thu, 21 Apr 2022 20:31:18 +0100
Subject: [PATCH 020/190] docs: document template functions (#281)
---
backend/src/plugins/Tags/TagsPlugin.ts | 15 +-
backend/src/plugins/Tags/docs.ts | 17 ++
backend/src/plugins/Tags/templateFunctions.ts | 166 ++++++++++++++++++
backend/src/plugins/Tags/types.ts | 9 +
4 files changed, 206 insertions(+), 1 deletion(-)
create mode 100644 backend/src/plugins/Tags/docs.ts
create mode 100644 backend/src/plugins/Tags/templateFunctions.ts
diff --git a/backend/src/plugins/Tags/TagsPlugin.ts b/backend/src/plugins/Tags/TagsPlugin.ts
index 0bfe05da..c2cc6a1d 100644
--- a/backend/src/plugins/Tags/TagsPlugin.ts
+++ b/backend/src/plugins/Tags/TagsPlugin.ts
@@ -8,7 +8,7 @@ import { GuildLogs } from "../../data/GuildLogs";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
import { GuildTags } from "../../data/GuildTags";
import { mapToPublicFn } from "../../pluginUtils";
-import { convertDelayStringToMS } from "../../utils";
+import { convertDelayStringToMS, trimPluginDescription } from "../../utils";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { TagCreateCmd } from "./commands/TagCreateCmd";
@@ -22,6 +22,8 @@ import { onMessageCreate } from "./util/onMessageCreate";
import { onMessageDelete } from "./util/onMessageDelete";
import { renderTagBody } from "./util/renderTagBody";
import { LogsPlugin } from "../Logs/LogsPlugin";
+import { generateTemplateMarkdown } from "./docs";
+import { TemplateFunctions } from "./templateFunctions";
const defaultOptions: PluginOptions = {
config: {
@@ -58,6 +60,17 @@ export const TagsPlugin = zeppelinGuildPlugin()({
showInDocs: true,
info: {
prettyName: "Tags",
+ description: "Tags are a way to store and reuse information.",
+ configurationGuide: trimPluginDescription(`
+ ### Template Functions
+ You can use template functions in your tags. These functions are called when the tag is rendered.
+ You can use these functions to render dynamic content, or to access information from the message and/or user calling the tag.
+ You use them by adding a \`{}\` on your tag.
+
+ Here are the functions you can use in your tags:
+
+ ${generateTemplateMarkdown(TemplateFunctions)}
+ `),
},
configSchema: ConfigSchema,
diff --git a/backend/src/plugins/Tags/docs.ts b/backend/src/plugins/Tags/docs.ts
new file mode 100644
index 00000000..efdb0b86
--- /dev/null
+++ b/backend/src/plugins/Tags/docs.ts
@@ -0,0 +1,17 @@
+import { trimPluginDescription } from "src/utils";
+import { TemplateFunction } from "./types";
+
+export function generateTemplateMarkdown(definitions: TemplateFunction[]): string {
+ return definitions
+ .map(def => {
+ const usage = def.signature ?? `(${def.arguments.join(", ")})`;
+ const examples = def.examples?.map(ex => `> \`{${ex}}\``).join("\n") ?? null;
+ return trimPluginDescription(`
+ ## ${def.name}
+ **${def.description}**\n
+ __Usage__: \`{${def.name}${usage}}\`\n
+ ${examples ? `__Examples__:\n${examples}` : ""}\n\n
+ `);
+ })
+ .join("\n\n");
+}
diff --git a/backend/src/plugins/Tags/templateFunctions.ts b/backend/src/plugins/Tags/templateFunctions.ts
new file mode 100644
index 00000000..67a49069
--- /dev/null
+++ b/backend/src/plugins/Tags/templateFunctions.ts
@@ -0,0 +1,166 @@
+import { TemplateFunction } from "./types";
+
+// TODO: Generate this dynamically, lmao
+export const TemplateFunctions: TemplateFunction[] = [
+ {
+ name: "if",
+ description: "Checks if a condition is true or false and returns the corresponding ifTrue or ifFalse",
+ returnValue: "boolean",
+ arguments: ["condition", "ifTrue", "ifFalse"],
+ examples: ['if(user.bot, "User is a bot", "User is not a bot")'],
+ },
+ {
+ name: "and",
+ description: "Checks if all provided conditions are true",
+ returnValue: "boolean",
+ arguments: ["condition1", "condition2", "..."],
+ examples: ["and(user.bot, user.verified)"],
+ },
+ {
+ name: "or",
+ description: "Checks if atleast one of the provided conditions is true",
+ returnValue: "boolean",
+ arguments: ["condition1", "condition2", "..."],
+ examples: ["or(user.bot, user.verified)"],
+ },
+ {
+ name: "not",
+ description: "Checks if the provided condition is false",
+ returnValue: "boolean",
+ arguments: ["condition"],
+ examples: ["not(user.bot)"],
+ },
+ {
+ name: "concat",
+ description: "Concatenates several arguments into a string",
+ returnValue: "string",
+ arguments: ["argument1", "argument2", "..."],
+ examples: ['concat("Hello ", user.username, "!")'],
+ },
+ {
+ name: "concatArr",
+ description: "Joins a array with the provided separator",
+ returnValue: "string",
+ arguments: ["array", "separator"],
+ examples: ['concatArr(["Hello", "World"], " ")'],
+ },
+ {
+ name: "eq",
+ description: "Checks if all provided arguments are equal to each other",
+ returnValue: "boolean",
+ arguments: ["argument1", "argument2", "..."],
+ examples: ['eq(user.id, "106391128718245888")'],
+ },
+ {
+ name: "gt",
+ description: "Checks if the first argument is greater than the second",
+ returnValue: "boolean",
+ arguments: ["argument1", "argument2"],
+ examples: ["gt(5, 2)"],
+ },
+ {
+ name: "gte",
+ description: "Checks if the first argument is greater or equal to the second",
+ returnValue: "boolean",
+ arguments: ["argument1", "argument2"],
+ examples: ["gte(2, 2)"],
+ },
+ {
+ name: "lt",
+ description: "Checks if the first argument is smaller than the second",
+ returnValue: "boolean",
+ arguments: ["argument1", "argument2"],
+ examples: ["lt(2, 5)"],
+ },
+ {
+ name: "lte",
+ description: "Checks if the first argument is smaller or equal to the second",
+ returnValue: "boolean",
+ arguments: ["argument1", "argument2"],
+ examples: ["lte(2, 2)"],
+ },
+ {
+ name: "slice",
+ description: "Slices a string argument at start and end",
+ returnValue: "string",
+ arguments: ["string", "start", "end"],
+ examples: ['slice("Hello World", 0, 5)'],
+ },
+ {
+ name: "lower",
+ description: "Converts a string argument to lowercase",
+ returnValue: "string",
+ arguments: ["string"],
+ examples: ['lower("Hello World")'],
+ },
+ {
+ name: "upper",
+ description: "Converts a string argument to uppercase",
+ returnValue: "string",
+ arguments: ["string"],
+ examples: ['upper("Hello World")'],
+ },
+ {
+ name: "upperFirst",
+ description: "Converts the first character of a string argument to uppercase",
+ returnValue: "string",
+ arguments: ["string"],
+ examples: ['upperFirst("hello World")'],
+ },
+ {
+ name: "rand",
+ description: "Returns a random number between from and to, optionally using seed",
+ returnValue: "number",
+ arguments: ["from", "to", "seed"],
+ examples: ["rand(1, 10)"],
+ },
+ {
+ name: "round",
+ description: "Rounds a number to the given decimal places",
+ returnValue: "number",
+ arguments: ["number", "decimalPlaces"],
+ examples: ["round(1.2345, 2)"],
+ },
+ {
+ name: "add",
+ description: "Adds two or more numbers",
+ returnValue: "number",
+ arguments: ["number1", "number2", "..."],
+ examples: ["add(1, 2)"],
+ },
+ {
+ name: "sub",
+ description: "Subtracts two or more numbers",
+ returnValue: "number",
+ arguments: ["number1", "number2", "..."],
+ examples: ["sub(3, 1)"],
+ },
+ {
+ name: "mul",
+ description: "Multiplies two or more numbers",
+ returnValue: "number",
+ arguments: ["number1", "number2", "..."],
+ examples: ["mul(2, 3)"],
+ },
+ {
+ name: "div",
+ description: "Divides two or more numbers",
+ returnValue: "number",
+ arguments: ["number1", "number2", "..."],
+ examples: ["div(6, 2)"],
+ },
+ {
+ name: "cases",
+ description: "Returns the argument at position",
+ returnValue: "any",
+ arguments: ["position", "argument1", "argument2", "..."],
+ examples: ['cases(1, "Hello", "World")'],
+ },
+ {
+ name: "choose",
+ description: "Returns a random argument",
+ returnValue: "any",
+ arguments: ["argument1", "argument2", "..."],
+ examples: ['choose("Hello", "World", "!")'],
+ },
+];
diff --git a/backend/src/plugins/Tags/types.ts b/backend/src/plugins/Tags/types.ts
index c87110f5..7c0ce10c 100644
--- a/backend/src/plugins/Tags/types.ts
+++ b/backend/src/plugins/Tags/types.ts
@@ -59,5 +59,14 @@ export interface TagsPluginType extends BasePluginType {
};
}
+export interface TemplateFunction {
+ name: string;
+ description: string;
+ arguments: string[];
+ returnValue: string;
+ signature?: string;
+ examples?: string[];
+}
+
export const tagsCmd = typedGuildCommand();
export const tagsEvt = typedGuildEventListener();
From be5b6a8d49b3595ac1f5d6e975a96c95c4079ad7 Mon Sep 17 00:00:00 2001
From: Luke
Date: Thu, 21 Apr 2022 14:47:06 -0500
Subject: [PATCH 021/190] feat: add check to refreshApiKeyExpiryTime to not
refresh long lived keys (#301)
---
backend/src/data/ApiLogins.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/backend/src/data/ApiLogins.ts b/backend/src/data/ApiLogins.ts
index ab8779d0..5ad9c262 100644
--- a/backend/src/data/ApiLogins.ts
+++ b/backend/src/data/ApiLogins.ts
@@ -90,10 +90,15 @@ export class ApiLogins extends BaseRepository {
const [loginId, token] = apiKey.split(".");
if (!loginId || !token) return;
+ const updatedTime = moment().utc().add(LOGIN_EXPIRY_TIME, "ms");
+
+ const login = await this.apiLogins.createQueryBuilder().where("id = :id", { id: loginId }).getOne();
+ if (!login || moment.utc(login.expires_at).isSameOrAfter(updatedTime)) return;
+
await this.apiLogins.update(
{ id: loginId },
{
- expires_at: moment().utc().add(LOGIN_EXPIRY_TIME, "ms").format(DBDateFormat),
+ expires_at: updatedTime.format(DBDateFormat),
},
);
}
From c08335d58240204b2d114ce17bd97d358caeb6d4 Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 13:07:32 +0300
Subject: [PATCH 022/190] chore: add dependabot to .clabot config
---
.clabot | 1 +
1 file changed, 1 insertion(+)
diff --git a/.clabot b/.clabot
index d75794c9..e4625a4a 100644
--- a/.clabot
+++ b/.clabot
@@ -1,5 +1,6 @@
{
"contributors": [
+ "dependabot",
"CleverSource",
"DarkView",
"Jernik",
From 9314d57645a14536082393ccce8059b2a7c32e17 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 13:14:08 +0300
Subject: [PATCH 023/190] chore: formatter pass
---
backend/src/data/ApiLogins.ts | 2 +-
backend/src/plugins/Tags/docs.ts | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/data/ApiLogins.ts b/backend/src/data/ApiLogins.ts
index 5ad9c262..ae6106fc 100644
--- a/backend/src/data/ApiLogins.ts
+++ b/backend/src/data/ApiLogins.ts
@@ -94,7 +94,7 @@ export class ApiLogins extends BaseRepository {
const login = await this.apiLogins.createQueryBuilder().where("id = :id", { id: loginId }).getOne();
if (!login || moment.utc(login.expires_at).isSameOrAfter(updatedTime)) return;
-
+
await this.apiLogins.update(
{ id: loginId },
{
diff --git a/backend/src/plugins/Tags/docs.ts b/backend/src/plugins/Tags/docs.ts
index efdb0b86..bc1608bb 100644
--- a/backend/src/plugins/Tags/docs.ts
+++ b/backend/src/plugins/Tags/docs.ts
@@ -3,9 +3,9 @@ import { TemplateFunction } from "./types";
export function generateTemplateMarkdown(definitions: TemplateFunction[]): string {
return definitions
- .map(def => {
+ .map((def) => {
const usage = def.signature ?? `(${def.arguments.join(", ")})`;
- const examples = def.examples?.map(ex => `> \`{${ex}}\``).join("\n") ?? null;
+ const examples = def.examples?.map((ex) => `> \`{${ex}}\``).join("\n") ?? null;
return trimPluginDescription(`
## ${def.name}
**${def.description}**\n
From 3fe71b3e27aab24618d0798c3b707928f81bcc37 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 16:31:41 +0300
Subject: [PATCH 024/190] feat: add internal role manager plugin; add role
buttons plugin
---
backend/src/data/GuildRoleButtons.ts | 39 ++++++
backend/src/data/GuildRoleQueue.ts | 48 +++++++
backend/src/data/entities/RoleButtonsItem.ts | 16 +++
backend/src/data/entities/RoleQueueItem.ts | 16 +++
.../1650709103864-CreateRoleQueueTable.ts | 50 +++++++
.../1650712828384-CreateRoleButtonsTable.ts | 51 +++++++
.../plugins/RoleButtons/RoleButtonsPlugin.ts | 56 ++++++++
.../RoleButtons/events/buttonInteraction.ts | 50 +++++++
.../functions/applyAllRoleButtons.ts | 42 ++++++
.../RoleButtons/functions/applyRoleButtons.ts | 129 ++++++++++++++++++
.../functions/splitButtonsIntoRows.ts | 12 ++
backend/src/plugins/RoleButtons/types.ts | 48 +++++++
.../plugins/RoleManager/RoleManagerPlugin.ts | 39 ++++++
backend/src/plugins/RoleManager/constants.ts | 1 +
.../RoleManager/functions/addPriorityRole.ts | 13 ++
.../plugins/RoleManager/functions/addRole.ts | 8 ++
.../functions/removePriorityRole.ts | 13 ++
.../RoleManager/functions/removeRole.ts | 8 ++
.../functions/runRoleAssignmentLoop.ts | 69 ++++++++++
backend/src/plugins/RoleManager/types.ts | 17 +++
backend/src/plugins/availablePlugins.ts | 4 +
backend/src/utils.ts | 2 +-
backend/src/utils/permissionNames.ts | 2 +
23 files changed, 732 insertions(+), 1 deletion(-)
create mode 100644 backend/src/data/GuildRoleButtons.ts
create mode 100644 backend/src/data/GuildRoleQueue.ts
create mode 100644 backend/src/data/entities/RoleButtonsItem.ts
create mode 100644 backend/src/data/entities/RoleQueueItem.ts
create mode 100644 backend/src/migrations/1650709103864-CreateRoleQueueTable.ts
create mode 100644 backend/src/migrations/1650712828384-CreateRoleButtonsTable.ts
create mode 100644 backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
create mode 100644 backend/src/plugins/RoleButtons/events/buttonInteraction.ts
create mode 100644 backend/src/plugins/RoleButtons/functions/applyAllRoleButtons.ts
create mode 100644 backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
create mode 100644 backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
create mode 100644 backend/src/plugins/RoleButtons/types.ts
create mode 100644 backend/src/plugins/RoleManager/RoleManagerPlugin.ts
create mode 100644 backend/src/plugins/RoleManager/constants.ts
create mode 100644 backend/src/plugins/RoleManager/functions/addPriorityRole.ts
create mode 100644 backend/src/plugins/RoleManager/functions/addRole.ts
create mode 100644 backend/src/plugins/RoleManager/functions/removePriorityRole.ts
create mode 100644 backend/src/plugins/RoleManager/functions/removeRole.ts
create mode 100644 backend/src/plugins/RoleManager/functions/runRoleAssignmentLoop.ts
create mode 100644 backend/src/plugins/RoleManager/types.ts
diff --git a/backend/src/data/GuildRoleButtons.ts b/backend/src/data/GuildRoleButtons.ts
new file mode 100644
index 00000000..106e0055
--- /dev/null
+++ b/backend/src/data/GuildRoleButtons.ts
@@ -0,0 +1,39 @@
+import { getRepository, Repository } from "typeorm";
+import { Reminder } from "./entities/Reminder";
+import { BaseRepository } from "./BaseRepository";
+import moment from "moment-timezone";
+import { DBDateFormat } from "../utils";
+import { BaseGuildRepository } from "./BaseGuildRepository";
+import { RoleQueueItem } from "./entities/RoleQueueItem";
+import { connection } from "./db";
+import { RoleButtonsItem } from "./entities/RoleButtonsItem";
+
+export class GuildRoleButtons extends BaseGuildRepository {
+ private roleButtons: Repository;
+
+ constructor(guildId) {
+ super(guildId);
+ this.roleButtons = getRepository(RoleButtonsItem);
+ }
+
+ getSavedRoleButtons(): Promise {
+ return this.roleButtons.find({ guild_id: this.guildId });
+ }
+
+ async deleteRoleButtonItem(name: string): Promise {
+ await this.roleButtons.delete({
+ guild_id: this.guildId,
+ name,
+ });
+ }
+
+ async saveRoleButtonItem(name: string, channelId: string, messageId: string, hash: string): Promise {
+ await this.roleButtons.insert({
+ guild_id: this.guildId,
+ name,
+ channel_id: channelId,
+ message_id: messageId,
+ hash,
+ });
+ }
+}
diff --git a/backend/src/data/GuildRoleQueue.ts b/backend/src/data/GuildRoleQueue.ts
new file mode 100644
index 00000000..20d84012
--- /dev/null
+++ b/backend/src/data/GuildRoleQueue.ts
@@ -0,0 +1,48 @@
+import { getRepository, Repository } from "typeorm";
+import { Reminder } from "./entities/Reminder";
+import { BaseRepository } from "./BaseRepository";
+import moment from "moment-timezone";
+import { DBDateFormat } from "../utils";
+import { BaseGuildRepository } from "./BaseGuildRepository";
+import { RoleQueueItem } from "./entities/RoleQueueItem";
+import { connection } from "./db";
+
+export class GuildRoleQueue extends BaseGuildRepository {
+ private roleQueue: Repository;
+
+ constructor(guildId) {
+ super(guildId);
+ this.roleQueue = getRepository(RoleQueueItem);
+ }
+
+ consumeNextRoleAssignments(count: number): Promise {
+ return connection.transaction(async (entityManager) => {
+ const repository = entityManager.getRepository(RoleQueueItem);
+
+ const nextAssignments = await repository
+ .createQueryBuilder()
+ .where("guild_id = :guildId", { guildId: this.guildId })
+ .addOrderBy("priority", "DESC")
+ .addOrderBy("id", "ASC")
+ .take(count)
+ .getMany();
+
+ if (nextAssignments.length > 0) {
+ const ids = nextAssignments.map((assignment) => assignment.id);
+ await repository.createQueryBuilder().where("id IN (:ids)", { ids }).delete().execute();
+ }
+
+ return nextAssignments;
+ });
+ }
+
+ async addQueueItem(userId: string, roleId: string, shouldAdd: boolean, priority = 0) {
+ await this.roleQueue.insert({
+ guild_id: this.guildId,
+ user_id: userId,
+ role_id: roleId,
+ should_add: shouldAdd,
+ priority,
+ });
+ }
+}
diff --git a/backend/src/data/entities/RoleButtonsItem.ts b/backend/src/data/entities/RoleButtonsItem.ts
new file mode 100644
index 00000000..520ae6c9
--- /dev/null
+++ b/backend/src/data/entities/RoleButtonsItem.ts
@@ -0,0 +1,16 @@
+import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
+
+@Entity("role_buttons")
+export class RoleButtonsItem {
+ @PrimaryGeneratedColumn() id: number;
+
+ @Column() guild_id: string;
+
+ @Column() name: string;
+
+ @Column() channel_id: string;
+
+ @Column() message_id: string;
+
+ @Column() hash: string;
+}
diff --git a/backend/src/data/entities/RoleQueueItem.ts b/backend/src/data/entities/RoleQueueItem.ts
new file mode 100644
index 00000000..b17006be
--- /dev/null
+++ b/backend/src/data/entities/RoleQueueItem.ts
@@ -0,0 +1,16 @@
+import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
+
+@Entity("role_queue")
+export class RoleQueueItem {
+ @PrimaryGeneratedColumn() id: number;
+
+ @Column() guild_id: string;
+
+ @Column() user_id: string;
+
+ @Column() role_id: string;
+
+ @Column() should_add: boolean;
+
+ @Column() priority: number;
+}
diff --git a/backend/src/migrations/1650709103864-CreateRoleQueueTable.ts b/backend/src/migrations/1650709103864-CreateRoleQueueTable.ts
new file mode 100644
index 00000000..c903c0df
--- /dev/null
+++ b/backend/src/migrations/1650709103864-CreateRoleQueueTable.ts
@@ -0,0 +1,50 @@
+import { MigrationInterface, QueryRunner, Table } from "typeorm";
+
+export class CreateRoleQueueTable1650709103864 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.createTable(
+ new Table({
+ name: "role_queue",
+ columns: [
+ {
+ name: "id",
+ type: "int",
+ isPrimary: true,
+ isGenerated: true,
+ generationStrategy: "increment",
+ },
+ {
+ name: "guild_id",
+ type: "bigint",
+ },
+ {
+ name: "user_id",
+ type: "bigint",
+ },
+ {
+ name: "role_id",
+ type: "bigint",
+ },
+ {
+ name: "should_add",
+ type: "boolean",
+ },
+ {
+ name: "priority",
+ type: "smallint",
+ default: 0,
+ },
+ ],
+ indices: [
+ {
+ columnNames: ["guild_id"],
+ },
+ ],
+ }),
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.dropTable("role_queue");
+ }
+}
diff --git a/backend/src/migrations/1650712828384-CreateRoleButtonsTable.ts b/backend/src/migrations/1650712828384-CreateRoleButtonsTable.ts
new file mode 100644
index 00000000..53fcaba4
--- /dev/null
+++ b/backend/src/migrations/1650712828384-CreateRoleButtonsTable.ts
@@ -0,0 +1,51 @@
+import { MigrationInterface, QueryRunner, Table } from "typeorm";
+
+export class CreateRoleButtonsTable1650712828384 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.createTable(
+ new Table({
+ name: "role_buttons",
+ columns: [
+ {
+ name: "id",
+ type: "int",
+ isPrimary: true,
+ isGenerated: true,
+ generationStrategy: "increment",
+ },
+ {
+ name: "guild_id",
+ type: "bigint",
+ },
+ {
+ name: "name",
+ type: "varchar",
+ length: "255",
+ },
+ {
+ name: "channel_id",
+ type: "bigint",
+ },
+ {
+ name: "message_id",
+ type: "bigint",
+ },
+ {
+ name: "hash",
+ type: "text",
+ },
+ ],
+ indices: [
+ {
+ columnNames: ["guild_id", "name"],
+ isUnique: true,
+ },
+ ],
+ }),
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.dropTable("role_buttons");
+ }
+}
diff --git a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
new file mode 100644
index 00000000..35359f52
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
@@ -0,0 +1,56 @@
+import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
+import { ConfigSchema, RoleButtonsPluginType } from "./types";
+import { mapToPublicFn } from "../../pluginUtils";
+import { LogsPlugin } from "../Logs/LogsPlugin";
+import { applyAllRoleButtons } from "./functions/applyAllRoleButtons";
+import { GuildRoleButtons } from "../../data/GuildRoleButtons";
+import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
+import { StrictValidationError } from "../../validatorUtils";
+import { onButtonInteraction } from "./events/buttonInteraction";
+
+export const RoleButtonsPlugin = zeppelinGuildPlugin()({
+ name: "role_buttons",
+ configSchema: ConfigSchema,
+
+ configPreprocessor(options) {
+ // Auto-fill "name" property for buttons based on the object key
+ const buttonsArray = Array.isArray(options.config?.buttons) ? options.config.buttons : [];
+ const seenMessages = new Set();
+ for (const [name, buttonsConfig] of Object.entries(options.config?.buttons ?? {})) {
+ if (name.length > 16) {
+ throw new StrictValidationError(["Name for role buttons can be at most 16 characters long"]);
+ }
+
+ if (buttonsConfig) {
+ buttonsConfig.name = name;
+ // 5 action rows * 5 buttons
+ if (buttonsConfig.options?.length > 25) {
+ throw new StrictValidationError(["A single message can have at most 25 role buttons"]);
+ }
+
+ if (buttonsConfig.message) {
+ if ("message_id" in buttonsConfig.message) {
+ if (seenMessages.has(buttonsConfig.message.message_id)) {
+ throw new StrictValidationError(["Can't target the same message with two sets of role buttons"]);
+ }
+ seenMessages.add(buttonsConfig.message.message_id);
+ }
+ }
+ }
+ }
+
+ return options;
+ },
+
+ dependencies: () => [LogsPlugin, RoleManagerPlugin],
+
+ events: [onButtonInteraction],
+
+ beforeLoad(pluginData) {
+ pluginData.state.roleButtons = GuildRoleButtons.getGuildInstance(pluginData.guild.id);
+ },
+
+ async afterLoad(pluginData) {
+ await applyAllRoleButtons(pluginData);
+ },
+});
diff --git a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
new file mode 100644
index 00000000..0b0c4a65
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
@@ -0,0 +1,50 @@
+import { typedGuildEventListener } from "knub";
+import { RoleButtonsPluginType, TRoleButtonOption } from "../types";
+import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
+
+export const onButtonInteraction = typedGuildEventListener()({
+ event: "interactionCreate",
+ async listener({ pluginData, args }) {
+ if (!args.interaction.isButton() || !args.interaction.customId.startsWith("roleButtons:")) {
+ return;
+ }
+
+ const config = pluginData.config.get();
+ const [, name, optionIndex] = args.interaction.customId.split(":");
+ // For some reason TS's type inference fails here so using a type annotation
+ const option: TRoleButtonOption | undefined = config.buttons[name]?.options[optionIndex];
+ if (!option) {
+ args.interaction.reply({
+ ephemeral: true,
+ content: "Invalid option selected",
+ });
+ return;
+ }
+
+ const member = args.interaction.member || (await pluginData.guild.members.fetch(args.interaction.user.id));
+ if (!member) {
+ args.interaction.reply({
+ ephemeral: true,
+ content: "Error while fetching member to apply roles for",
+ });
+ return;
+ }
+
+ const hasRole = Array.isArray(member.roles)
+ ? member.roles.includes(option.role_id)
+ : member.roles.cache.has(option.role_id);
+ if (hasRole) {
+ pluginData.getPlugin(RoleManagerPlugin).removeRole(member.user.id, option.role_id);
+ args.interaction.reply({
+ ephemeral: true,
+ content: "The selected role will be removed shortly!",
+ });
+ } else {
+ pluginData.getPlugin(RoleManagerPlugin).addRole(member.user.id, option.role_id);
+ args.interaction.reply({
+ ephemeral: true,
+ content: "You will receive the selected role shortly!",
+ });
+ }
+ },
+});
diff --git a/backend/src/plugins/RoleButtons/functions/applyAllRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyAllRoleButtons.ts
new file mode 100644
index 00000000..e956377b
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/functions/applyAllRoleButtons.ts
@@ -0,0 +1,42 @@
+import { GuildPluginData } from "knub";
+import { RoleButtonsPluginType } from "../types";
+import { createHash } from "crypto";
+import { applyRoleButtons } from "./applyRoleButtons";
+
+export async function applyAllRoleButtons(pluginData: GuildPluginData) {
+ const savedRoleButtons = await pluginData.state.roleButtons.getSavedRoleButtons();
+ const config = pluginData.config.get();
+ for (const buttons of Object.values(config.buttons)) {
+ // Use the hash of the config to quickly check if we need to update buttons
+ const hash = createHash("md5").update(JSON.stringify(buttons)).digest("hex");
+ const savedButtonsItem = savedRoleButtons.find((bt) => bt.name === buttons.name);
+ if (savedButtonsItem?.hash === hash) {
+ // No changes
+ continue;
+ }
+
+ if (savedButtonsItem) {
+ await pluginData.state.roleButtons.deleteRoleButtonItem(buttons.name);
+ }
+
+ const applyResult = await applyRoleButtons(pluginData, buttons, savedButtonsItem ?? null);
+ if (!applyResult) {
+ return;
+ }
+
+ await pluginData.state.roleButtons.saveRoleButtonItem(
+ buttons.name,
+ applyResult.channel_id,
+ applyResult.message_id,
+ hash,
+ );
+ }
+
+ // Remove saved role buttons from the DB that are no longer in the config
+ const savedRoleButtonsToDelete = savedRoleButtons
+ .filter((savedRoleButton) => !config.buttons[savedRoleButton.name])
+ .map((savedRoleButton) => savedRoleButton.name);
+ for (const name of savedRoleButtonsToDelete) {
+ await pluginData.state.roleButtons.deleteRoleButtonItem(name);
+ }
+}
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
new file mode 100644
index 00000000..30b413ef
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -0,0 +1,129 @@
+import { GuildPluginData } from "knub";
+import { RoleButtonsPluginType, TRoleButtonsConfigItem } from "../types";
+import { isSnowflake, snowflakeRegex } from "../../../utils";
+import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { Message, MessageButton, MessageEditOptions, MessageOptions, Snowflake } from "discord.js";
+import { RoleButtonsItem } from "../../../data/entities/RoleButtonsItem";
+import { splitButtonsIntoRows } from "./splitButtonsIntoRows";
+
+const channelMessageRegex = new RegExp(`^(${snowflakeRegex.source})-(${snowflakeRegex.source})$`);
+
+export async function applyRoleButtons(
+ pluginData: GuildPluginData,
+ configItem: TRoleButtonsConfigItem,
+ existingSavedButtons: RoleButtonsItem | null,
+): Promise<{ channel_id: string; message_id: string } | null> {
+ let message: Message;
+
+ // Remove existing role buttons, if any
+ if (existingSavedButtons?.channel_id) {
+ const existingChannel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ const existingMessage = await (existingChannel?.isText() &&
+ existingChannel.messages.fetch(existingSavedButtons.message_id));
+ if (existingMessage && existingMessage.components.length) {
+ await existingMessage.edit({
+ components: [],
+ });
+ }
+ }
+
+ // Find or create message for role buttons
+ if ("message_id" in configItem.message) {
+ // channel id + message id: apply role buttons to existing message
+ const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ const messageCandidate = await (channel?.isText() && channel.messages.fetch(configItem.message.message_id));
+ if (!messageCandidate) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Message not found for role_buttons/${configItem.name}`,
+ });
+ return null;
+ }
+ message = messageCandidate;
+ } else {
+ // channel id + message content: post new message to apply role buttons to
+ const contentIsValid =
+ typeof configItem.message.content === "string"
+ ? configItem.message.content.trim() !== ""
+ : Boolean(configItem.message.content.content?.trim()) || configItem.message.content.embeds?.length;
+ if (!contentIsValid) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Invalid message content for role_buttons/${configItem.name}`,
+ });
+ return null;
+ }
+
+ const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ if (!channel || !channel.isText()) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Text channel not found for role_buttons/${configItem.name}`,
+ });
+ return null;
+ }
+
+ let candidateMessage: Message | null = null;
+
+ if (existingSavedButtons?.channel_id === configItem.message.channel_id && existingSavedButtons.message_id) {
+ try {
+ candidateMessage = await channel.messages.fetch(existingSavedButtons.message_id);
+ // Make sure message contents are up-to-date
+ const editContent =
+ typeof configItem.message.content === "string"
+ ? { content: configItem.message.content }
+ : { ...configItem.message.content };
+ if (!editContent.content) {
+ // Editing with empty content doesn't go through at all for whatever reason, even if there's differences in e.g. the embeds,
+ // so send a space as the content instead. This still functions as if there's no content at all.
+ editContent.content = " ";
+ }
+ await candidateMessage.edit(editContent as MessageEditOptions);
+ } catch (err) {
+ // Message was deleted or is inaccessible. Proceed with reposting it.
+ }
+ }
+
+ if (!candidateMessage) {
+ try {
+ candidateMessage = await channel.send(configItem.message.content as string | MessageOptions);
+ } catch (err) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Error while posting message for role_buttons/${configItem.name}`,
+ });
+ return null;
+ }
+ }
+
+ message = candidateMessage;
+ }
+
+ if (message.author.id !== pluginData.client.user?.id) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Error applying role buttons for role_buttons/${configItem.name}: target message must be posted by the bot`,
+ });
+ return null;
+ }
+
+ // Apply role buttons
+ const buttons = configItem.options.map((opt, index) => {
+ const button = new MessageButton()
+ .setLabel(opt.label ?? "")
+ .setStyle(opt.style ?? "PRIMARY")
+ .setCustomId(`roleButtons:${configItem.name}:${index}:${Math.round(Date.now() / 1000)}`);
+
+ if (opt.emoji) {
+ const emo = pluginData.client.emojis.resolve(opt.emoji as Snowflake) ?? opt.emoji;
+ button.setEmoji(emo);
+ }
+
+ return button;
+ });
+ const rows = splitButtonsIntoRows(buttons);
+
+ await message.edit({
+ components: rows,
+ });
+
+ return {
+ channel_id: message.channelId,
+ message_id: message.id,
+ };
+}
diff --git a/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts b/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
new file mode 100644
index 00000000..118f20ce
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
@@ -0,0 +1,12 @@
+import { MessageActionRow, MessageButton } from "discord.js";
+import { chunkArray } from "../../../utils";
+
+export function splitButtonsIntoRows(buttons: MessageButton[]): MessageActionRow[] {
+ // Max 5 buttons per row
+ const buttonChunks = chunkArray(buttons, 5);
+ return buttonChunks.map((chunk) => {
+ const row = new MessageActionRow();
+ row.setComponents(chunk);
+ return row;
+ });
+}
diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts
new file mode 100644
index 00000000..b02db577
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/types.ts
@@ -0,0 +1,48 @@
+import * as t from "io-ts";
+import { BasePluginType } from "knub";
+import { tMessageContent, tNullable } from "../../utils";
+import { GuildRoleButtons } from "../../data/GuildRoleButtons";
+
+enum ButtonStyles {
+ PRIMARY = 1,
+ SECONDARY = 2,
+ SUCCESS = 3,
+ DANGER = 4,
+ // LINK = 5, We do not want users to create link buttons, but it would be style 5
+}
+
+const RoleButtonOption = t.type({
+ role_id: t.string,
+ label: tNullable(t.string),
+ emoji: tNullable(t.string),
+ style: tNullable(t.keyof(ButtonStyles)), // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle
+});
+export type TRoleButtonOption = t.TypeOf;
+
+const RoleButtonsConfigItem = t.type({
+ name: t.string,
+ message: t.union([
+ t.type({
+ channel_id: t.string,
+ message_id: t.string,
+ }),
+ t.type({
+ channel_id: t.string,
+ content: tMessageContent,
+ }),
+ ]),
+ options: t.array(RoleButtonOption),
+});
+export type TRoleButtonsConfigItem = t.TypeOf;
+
+export const ConfigSchema = t.type({
+ buttons: t.record(t.string, RoleButtonsConfigItem),
+});
+export type TConfigSchema = t.TypeOf;
+
+export interface RoleButtonsPluginType extends BasePluginType {
+ config: TConfigSchema;
+ state: {
+ roleButtons: GuildRoleButtons;
+ };
+}
diff --git a/backend/src/plugins/RoleManager/RoleManagerPlugin.ts b/backend/src/plugins/RoleManager/RoleManagerPlugin.ts
new file mode 100644
index 00000000..c6d398f1
--- /dev/null
+++ b/backend/src/plugins/RoleManager/RoleManagerPlugin.ts
@@ -0,0 +1,39 @@
+import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
+import { ConfigSchema, RoleManagerPluginType } from "./types";
+import { GuildRoleQueue } from "../../data/GuildRoleQueue";
+import { mapToPublicFn } from "../../pluginUtils";
+import { addRole } from "./functions/addRole";
+import { removeRole } from "./functions/removeRole";
+import { addPriorityRole } from "./functions/addPriorityRole";
+import { removePriorityRole } from "./functions/removePriorityRole";
+import { runRoleAssignmentLoop } from "./functions/runRoleAssignmentLoop";
+import { LogsPlugin } from "../Logs/LogsPlugin";
+
+export const RoleManagerPlugin = zeppelinGuildPlugin()({
+ name: "role_manager",
+ configSchema: ConfigSchema,
+ showInDocs: false,
+
+ dependencies: () => [LogsPlugin],
+
+ public: {
+ addRole: mapToPublicFn(addRole),
+ removeRole: mapToPublicFn(removeRole),
+ addPriorityRole: mapToPublicFn(addPriorityRole),
+ removePriorityRole: mapToPublicFn(removePriorityRole),
+ },
+
+ beforeLoad(pluginData) {
+ pluginData.state.roleQueue = GuildRoleQueue.getGuildInstance(pluginData.guild.id);
+ pluginData.state.pendingRoleAssignmentPromise = Promise.resolve();
+ },
+
+ afterLoad(pluginData) {
+ runRoleAssignmentLoop(pluginData);
+ },
+
+ async afterUnload(pluginData) {
+ pluginData.state.abortRoleAssignmentLoop = true;
+ await pluginData.state.pendingRoleAssignmentPromise;
+ },
+});
diff --git a/backend/src/plugins/RoleManager/constants.ts b/backend/src/plugins/RoleManager/constants.ts
new file mode 100644
index 00000000..5a942642
--- /dev/null
+++ b/backend/src/plugins/RoleManager/constants.ts
@@ -0,0 +1 @@
+export const PRIORITY_ROLE_PRIORITY = 10;
diff --git a/backend/src/plugins/RoleManager/functions/addPriorityRole.ts b/backend/src/plugins/RoleManager/functions/addPriorityRole.ts
new file mode 100644
index 00000000..a6aab5cb
--- /dev/null
+++ b/backend/src/plugins/RoleManager/functions/addPriorityRole.ts
@@ -0,0 +1,13 @@
+import { GuildPluginData } from "knub";
+import { RoleManagerPluginType } from "../types";
+import { PRIORITY_ROLE_PRIORITY } from "../constants";
+import { runRoleAssignmentLoop } from "./runRoleAssignmentLoop";
+
+export async function addPriorityRole(
+ pluginData: GuildPluginData,
+ userId: string,
+ roleId: string,
+) {
+ await pluginData.state.roleQueue.addQueueItem(userId, roleId, true, PRIORITY_ROLE_PRIORITY);
+ runRoleAssignmentLoop(pluginData);
+}
diff --git a/backend/src/plugins/RoleManager/functions/addRole.ts b/backend/src/plugins/RoleManager/functions/addRole.ts
new file mode 100644
index 00000000..02f6d4a3
--- /dev/null
+++ b/backend/src/plugins/RoleManager/functions/addRole.ts
@@ -0,0 +1,8 @@
+import { GuildPluginData } from "knub";
+import { RoleManagerPluginType } from "../types";
+import { runRoleAssignmentLoop } from "./runRoleAssignmentLoop";
+
+export async function addRole(pluginData: GuildPluginData, userId: string, roleId: string) {
+ await pluginData.state.roleQueue.addQueueItem(userId, roleId, true);
+ runRoleAssignmentLoop(pluginData);
+}
diff --git a/backend/src/plugins/RoleManager/functions/removePriorityRole.ts b/backend/src/plugins/RoleManager/functions/removePriorityRole.ts
new file mode 100644
index 00000000..1b120659
--- /dev/null
+++ b/backend/src/plugins/RoleManager/functions/removePriorityRole.ts
@@ -0,0 +1,13 @@
+import { GuildPluginData } from "knub";
+import { RoleManagerPluginType } from "../types";
+import { PRIORITY_ROLE_PRIORITY } from "../constants";
+import { runRoleAssignmentLoop } from "./runRoleAssignmentLoop";
+
+export async function removePriorityRole(
+ pluginData: GuildPluginData,
+ userId: string,
+ roleId: string,
+) {
+ await pluginData.state.roleQueue.addQueueItem(userId, roleId, false, PRIORITY_ROLE_PRIORITY);
+ runRoleAssignmentLoop(pluginData);
+}
diff --git a/backend/src/plugins/RoleManager/functions/removeRole.ts b/backend/src/plugins/RoleManager/functions/removeRole.ts
new file mode 100644
index 00000000..2a2b6070
--- /dev/null
+++ b/backend/src/plugins/RoleManager/functions/removeRole.ts
@@ -0,0 +1,8 @@
+import { GuildPluginData } from "knub";
+import { RoleManagerPluginType } from "../types";
+import { runRoleAssignmentLoop } from "./runRoleAssignmentLoop";
+
+export async function removeRole(pluginData: GuildPluginData, userId: string, roleId: string) {
+ await pluginData.state.roleQueue.addQueueItem(userId, roleId, false);
+ runRoleAssignmentLoop(pluginData);
+}
diff --git a/backend/src/plugins/RoleManager/functions/runRoleAssignmentLoop.ts b/backend/src/plugins/RoleManager/functions/runRoleAssignmentLoop.ts
new file mode 100644
index 00000000..2ed7c2ea
--- /dev/null
+++ b/backend/src/plugins/RoleManager/functions/runRoleAssignmentLoop.ts
@@ -0,0 +1,69 @@
+import { GuildPluginData } from "knub";
+import { RoleManagerPluginType } from "../types";
+import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { logger } from "../../../logger";
+import { RoleQueueItem } from "../../../data/entities/RoleQueueItem";
+
+const ROLE_ASSIGNMENTS_PER_BATCH = 20;
+
+export async function runRoleAssignmentLoop(pluginData: GuildPluginData) {
+ if (pluginData.state.roleAssignmentLoopRunning || pluginData.state.abortRoleAssignmentLoop) {
+ return;
+ }
+ pluginData.state.roleAssignmentLoopRunning = true;
+
+ while (true) {
+ // Abort on unload
+ if (pluginData.state.abortRoleAssignmentLoop) {
+ break;
+ }
+
+ if (!pluginData.state.roleAssignmentLoopRunning) {
+ break;
+ }
+
+ await (pluginData.state.pendingRoleAssignmentPromise = (async () => {
+ // Process assignments in batches, stopping once the queue's exhausted
+ const nextAssignments = await pluginData.state.roleQueue.consumeNextRoleAssignments(ROLE_ASSIGNMENTS_PER_BATCH);
+ if (nextAssignments.length === 0) {
+ pluginData.state.roleAssignmentLoopRunning = false;
+ return;
+ }
+
+ // Remove assignments that cancel each other out (e.g. from spam-clicking a role button)
+ const validAssignments = new Map();
+ for (const assignment of nextAssignments) {
+ const key = `${assignment.should_add ? 1 : 0}|${assignment.user_id}|${assignment.role_id}`;
+ const oppositeKey = `${assignment.should_add ? 0 : 1}|${assignment.user_id}|${assignment.role_id}`;
+ if (validAssignments.has(oppositeKey)) {
+ validAssignments.delete(oppositeKey);
+ continue;
+ }
+ validAssignments.set(key, assignment);
+ }
+
+ // Apply batch in parallel
+ await Promise.all(
+ Array.from(validAssignments.values()).map(async (assignment) => {
+ const member = await pluginData.guild.members.fetch(assignment.user_id).catch(() => null);
+ if (!member) {
+ return;
+ }
+
+ const operation = assignment.should_add
+ ? member.roles.add(assignment.role_id)
+ : member.roles.remove(assignment.role_id);
+
+ await operation.catch((err) => {
+ logger.warn(err);
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Could not ${assignment.should_add ? "assign" : "remove"} role <@&${assignment.role_id}> (\`${
+ assignment.role_id
+ }\`) ${assignment.should_add ? "to" : "from"} <@!${assignment.user_id}> (\`${assignment.user_id}\`)`,
+ });
+ });
+ }),
+ );
+ })());
+ }
+}
diff --git a/backend/src/plugins/RoleManager/types.ts b/backend/src/plugins/RoleManager/types.ts
new file mode 100644
index 00000000..d3adc30b
--- /dev/null
+++ b/backend/src/plugins/RoleManager/types.ts
@@ -0,0 +1,17 @@
+import * as t from "io-ts";
+import { BasePluginType, typedGuildCommand } from "knub";
+import { GuildLogs } from "../../data/GuildLogs";
+import { GuildRoleQueue } from "../../data/GuildRoleQueue";
+
+export const ConfigSchema = t.type({});
+export type TConfigSchema = t.TypeOf;
+
+export interface RoleManagerPluginType extends BasePluginType {
+ config: TConfigSchema;
+ state: {
+ roleQueue: GuildRoleQueue;
+ roleAssignmentLoopRunning: boolean;
+ abortRoleAssignmentLoop: boolean;
+ pendingRoleAssignmentPromise: Promise;
+ };
+}
diff --git a/backend/src/plugins/availablePlugins.ts b/backend/src/plugins/availablePlugins.ts
index dc8adf25..d47df12f 100644
--- a/backend/src/plugins/availablePlugins.ts
+++ b/backend/src/plugins/availablePlugins.ts
@@ -36,6 +36,8 @@ import { WelcomeMessagePlugin } from "./WelcomeMessage/WelcomeMessagePlugin";
import { ZeppelinGlobalPluginBlueprint, ZeppelinGuildPluginBlueprint } from "./ZeppelinPluginBlueprint";
import { PhishermanPlugin } from "./Phisherman/PhishermanPlugin";
import { InternalPosterPlugin } from "./InternalPoster/InternalPosterPlugin";
+import { RoleManagerPlugin } from "./RoleManager/RoleManagerPlugin";
+import { RoleButtonsPlugin } from "./RoleButtons/RoleButtonsPlugin";
// prettier-ignore
export const guildPlugins: Array> = [
@@ -73,6 +75,8 @@ export const guildPlugins: Array> = [
ContextMenuPlugin,
PhishermanPlugin,
InternalPosterPlugin,
+ RoleManagerPlugin,
+ RoleButtonsPlugin,
];
// prettier-ignore
diff --git a/backend/src/utils.ts b/backend/src/utils.ts
index 93d52418..fb505743 100644
--- a/backend/src/utils.ts
+++ b/backend/src/utils.ts
@@ -876,7 +876,7 @@ export function chunkArray(arr: T[], chunkSize): T[][] {
for (let i = 0; i < arr.length; i++) {
currentChunk.push(arr[i]);
- if ((i !== 0 && i % chunkSize === 0) || i === arr.length - 1) {
+ if ((i !== 0 && (i + 1) % chunkSize === 0) || i === arr.length - 1) {
chunks.push(currentChunk);
currentChunk = [];
}
diff --git a/backend/src/utils/permissionNames.ts b/backend/src/utils/permissionNames.ts
index 3bf0c4f1..433fcb98 100644
--- a/backend/src/utils/permissionNames.ts
+++ b/backend/src/utils/permissionNames.ts
@@ -43,4 +43,6 @@ export const PERMISSION_NAMES: Record = {
VIEW_AUDIT_LOG: "View Audit Log",
VIEW_CHANNEL: "View Channels",
VIEW_GUILD_INSIGHTS: "View Guild Insights",
+ MODERATE_MEMBERS: "Moderate Members",
+ MANAGE_EVENTS: "Manage Events",
};
From 05334a772f37c18b74ea84a856291040820dbb8c Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 16:38:24 +0300
Subject: [PATCH 025/190] chore: remove old button roles implementation
---
.../1650721020704-RemoveButtonRolesTable.ts | 49 ++++++++++
.../ReactionRoles/ReactionRolesPlugin.ts | 74 ---------------
.../commands/ClearReactionRolesCmd.ts | 2 +-
.../commands/PostButtonRolesCmd.ts | 71 --------------
.../events/ButtonInteractionEvt.ts | 86 -----------------
.../ReactionRoles/events/MessageDeletedEvt.ts | 1 -
backend/src/plugins/ReactionRoles/types.ts | 31 ------
.../applyReactionRoleReactionsToMessage.ts | 1 -
.../util/buttonActionHandlers.ts | 94 -------------------
.../util/buttonCustomIdFunctions.ts | 45 ---------
.../ReactionRoles/util/buttonMenuActions.ts | 4 -
.../util/splitButtonsIntoRows.ts | 42 ---------
12 files changed, 50 insertions(+), 450 deletions(-)
create mode 100644 backend/src/migrations/1650721020704-RemoveButtonRolesTable.ts
delete mode 100644 backend/src/plugins/ReactionRoles/commands/PostButtonRolesCmd.ts
delete mode 100644 backend/src/plugins/ReactionRoles/events/ButtonInteractionEvt.ts
delete mode 100644 backend/src/plugins/ReactionRoles/util/buttonActionHandlers.ts
delete mode 100644 backend/src/plugins/ReactionRoles/util/buttonCustomIdFunctions.ts
delete mode 100644 backend/src/plugins/ReactionRoles/util/buttonMenuActions.ts
delete mode 100644 backend/src/plugins/ReactionRoles/util/splitButtonsIntoRows.ts
diff --git a/backend/src/migrations/1650721020704-RemoveButtonRolesTable.ts b/backend/src/migrations/1650721020704-RemoveButtonRolesTable.ts
new file mode 100644
index 00000000..ebdd0f16
--- /dev/null
+++ b/backend/src/migrations/1650721020704-RemoveButtonRolesTable.ts
@@ -0,0 +1,49 @@
+import { MigrationInterface, QueryRunner, Table } from "typeorm";
+
+export class RemoveButtonRolesTable1650721020704 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.dropTable("button_roles");
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.createTable(
+ new Table({
+ name: "button_roles",
+ columns: [
+ {
+ name: "guild_id",
+ type: "bigint",
+ isPrimary: true,
+ },
+ {
+ name: "channel_id",
+ type: "bigint",
+ isPrimary: true,
+ },
+ {
+ name: "message_id",
+ type: "bigint",
+ isPrimary: true,
+ },
+ {
+ name: "button_id",
+ type: "varchar",
+ length: "100",
+ isPrimary: true,
+ isUnique: true,
+ },
+ {
+ name: "button_group",
+ type: "varchar",
+ length: "100",
+ },
+ {
+ name: "button_name",
+ type: "varchar",
+ length: "100",
+ },
+ ],
+ }),
+ );
+ }
+}
diff --git a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
index a217c1e5..90946d92 100644
--- a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
+++ b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
@@ -1,29 +1,20 @@
import { PluginOptions } from "knub";
-import { ConfigPreprocessorFn } from "knub/dist/config/configTypes";
-import { GuildButtonRoles } from "../../data/GuildButtonRoles";
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
import { Queue } from "../../Queue";
-import { isValidSnowflake } from "../../utils";
-import { StrictValidationError } from "../../validatorUtils";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
import { InitReactionRolesCmd } from "./commands/InitReactionRolesCmd";
-import { PostButtonRolesCmd } from "./commands/PostButtonRolesCmd";
import { RefreshReactionRolesCmd } from "./commands/RefreshReactionRolesCmd";
import { AddReactionRoleEvt } from "./events/AddReactionRoleEvt";
-import { ButtonInteractionEvt } from "./events/ButtonInteractionEvt";
import { MessageDeletedEvt } from "./events/MessageDeletedEvt";
import { ConfigSchema, ReactionRolesPluginType } from "./types";
-import { autoRefreshLoop } from "./util/autoRefreshLoop";
-import { getRowCount } from "./util/splitButtonsIntoRows";
const MIN_AUTO_REFRESH = 1000 * 60 * 15; // 15min minimum, let's not abuse the API
const defaultOptions: PluginOptions = {
config: {
- button_groups: {},
auto_refresh_interval: MIN_AUTO_REFRESH,
remove_user_reactions: true,
@@ -40,67 +31,6 @@ const defaultOptions: PluginOptions = {
],
};
-const MAXIMUM_COMPONENT_ROWS = 5;
-
-const configPreprocessor: ConfigPreprocessorFn = (options) => {
- if (options.config.button_groups) {
- for (const [groupName, group] of Object.entries(options.config.button_groups)) {
- const defaultButtonNames = Object.keys(group.default_buttons);
- const defaultButtons = Object.values(group.default_buttons);
- const menuNames = Object.keys(group.button_menus ?? []);
-
- const defaultBtnRowCount = getRowCount(defaultButtons);
- if (defaultBtnRowCount > MAXIMUM_COMPONENT_ROWS || defaultBtnRowCount === 0) {
- throw new StrictValidationError([
- `Invalid row count for default_buttons: You currently have ${defaultBtnRowCount}, the maximum is 5. A new row is started automatically each 5 consecutive buttons.`,
- ]);
- }
-
- for (let i = 0; i < defaultButtons.length; i++) {
- const defBtn = defaultButtons[i];
- if (!menuNames.includes(defBtn.role_or_menu) && !isValidSnowflake(defBtn.role_or_menu)) {
- throw new StrictValidationError([
- `Invalid value for default_buttons/${defaultButtonNames[i]}/role_or_menu: ${defBtn.role_or_menu} is neither an existing menu nor a valid snowflake.`,
- ]);
- }
- if (!defBtn.label && !defBtn.emoji) {
- throw new StrictValidationError([
- `Invalid values for default_buttons/${defaultButtonNames[i]}/(label|emoji): Must have label, emoji or both set for the button to be valid.`,
- ]);
- }
- }
-
- for (const [menuName, menuButtonEntries] of Object.entries(group.button_menus ?? [])) {
- const menuButtonNames = Object.keys(menuButtonEntries);
- const menuButtons = Object.values(menuButtonEntries);
-
- const menuButtonRowCount = getRowCount(menuButtons);
- if (menuButtonRowCount > MAXIMUM_COMPONENT_ROWS || menuButtonRowCount === 0) {
- throw new StrictValidationError([
- `Invalid row count for button_menus/${menuName}: You currently have ${menuButtonRowCount}, the maximum is 5. A new row is started automatically each 5 consecutive buttons.`,
- ]);
- }
-
- for (let i = 0; i < menuButtons.length; i++) {
- const menuBtn = menuButtons[i];
- if (!menuNames.includes(menuBtn.role_or_menu) && !isValidSnowflake(menuBtn.role_or_menu)) {
- throw new StrictValidationError([
- `Invalid value for button_menus/${menuButtonNames[i]}/role_or_menu: ${menuBtn.role_or_menu} is neither an existing menu nor a valid snowflake.`,
- ]);
- }
- if (!menuBtn.label && !menuBtn.emoji) {
- throw new StrictValidationError([
- `Invalid values for default_buttons/${defaultButtonNames[i]}/(label|emoji): Must have label, emoji or both set for the button to be valid.`,
- ]);
- }
- }
- }
- }
- }
-
- return options;
-};
-
export const ReactionRolesPlugin = zeppelinGuildPlugin()({
name: "reaction_roles",
showInDocs: true,
@@ -117,23 +47,19 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin(
RefreshReactionRolesCmd,
ClearReactionRolesCmd,
InitReactionRolesCmd,
- // PostButtonRolesCmd,
],
// prettier-ignore
events: [
AddReactionRoleEvt,
- // ButtonInteractionEvt,
MessageDeletedEvt,
],
- configPreprocessor,
beforeLoad(pluginData) {
const { state, guild } = pluginData;
state.reactionRoles = GuildReactionRoles.getGuildInstance(guild.id);
state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
- state.buttonRoles = GuildButtonRoles.getGuildInstance(guild.id);
state.reactionRemoveQueue = new Queue();
state.roleChangeQueue = new Queue();
state.pendingRoleChanges = new Map();
diff --git a/backend/src/plugins/ReactionRoles/commands/ClearReactionRolesCmd.ts b/backend/src/plugins/ReactionRoles/commands/ClearReactionRolesCmd.ts
index 3bdd6243..ff88b194 100644
--- a/backend/src/plugins/ReactionRoles/commands/ClearReactionRolesCmd.ts
+++ b/backend/src/plugins/ReactionRoles/commands/ClearReactionRolesCmd.ts
@@ -1,4 +1,4 @@
-import { Message, Snowflake } from "discord.js";
+import { Message } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { isDiscordAPIError } from "../../../utils";
diff --git a/backend/src/plugins/ReactionRoles/commands/PostButtonRolesCmd.ts b/backend/src/plugins/ReactionRoles/commands/PostButtonRolesCmd.ts
deleted file mode 100644
index c9747ed2..00000000
--- a/backend/src/plugins/ReactionRoles/commands/PostButtonRolesCmd.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { createHash } from "crypto";
-import { MessageButton, Snowflake } from "discord.js";
-import moment from "moment";
-import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
-import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { reactionRolesCmd } from "../types";
-import { splitButtonsIntoRows } from "../util/splitButtonsIntoRows";
-
-export const PostButtonRolesCmd = reactionRolesCmd({
- trigger: "reaction_roles post",
- permission: "can_manage",
-
- signature: {
- channel: ct.textChannel(),
- buttonGroup: ct.string(),
- },
-
- async run({ message: msg, args, pluginData }) {
- const cfg = pluginData.config.get();
- if (!cfg.button_groups) {
- sendErrorMessage(pluginData, msg.channel, "No button groups defined in config");
- return;
- }
- const group = cfg.button_groups[args.buttonGroup];
-
- if (!group) {
- sendErrorMessage(pluginData, msg.channel, `No button group matches the name **${args.buttonGroup}**`);
- return;
- }
-
- const buttons: MessageButton[] = [];
- const toInsert: Array<{ customId; buttonGroup; buttonName }> = [];
- for (const [buttonName, button] of Object.entries(group.default_buttons)) {
- const customId = createHash("md5").update(`${buttonName}${moment.utc().valueOf()}`).digest("hex");
-
- const btn = new MessageButton()
- .setLabel(button.label ?? "")
- .setStyle(button.style ?? "PRIMARY")
- .setCustomId(customId)
- .setDisabled(button.disabled ?? false);
-
- if (button.emoji) {
- const emo = pluginData.client.emojis.resolve(button.emoji as Snowflake) ?? button.emoji;
- btn.setEmoji(emo);
- }
-
- buttons.push(btn);
- toInsert.push({ customId, buttonGroup: args.buttonGroup, buttonName });
- }
- const rows = splitButtonsIntoRows(buttons, Object.values(group.default_buttons)); // new MessageActionRow().addComponents(buttons);
-
- try {
- const newMsg = await args.channel.send({ content: group.message, components: rows });
-
- for (const btn of toInsert) {
- await pluginData.state.buttonRoles.add(
- args.channel.id,
- newMsg.id,
- btn.customId,
- btn.buttonGroup,
- btn.buttonName,
- );
- }
- } catch (e) {
- sendErrorMessage(pluginData, msg.channel, `Error trying to post message: ${e}`);
- return;
- }
-
- await sendSuccessMessage(pluginData, msg.channel, `Successfully posted message in <#${args.channel.id}>`);
- },
-});
diff --git a/backend/src/plugins/ReactionRoles/events/ButtonInteractionEvt.ts b/backend/src/plugins/ReactionRoles/events/ButtonInteractionEvt.ts
deleted file mode 100644
index 65ace443..00000000
--- a/backend/src/plugins/ReactionRoles/events/ButtonInteractionEvt.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { MessageComponentInteraction } from "discord.js";
-import humanizeDuration from "humanize-duration";
-import moment from "moment";
-import { LogType } from "src/data/LogType";
-import { logger } from "src/logger";
-import { LogsPlugin } from "src/plugins/Logs/LogsPlugin";
-import { MINUTES } from "src/utils";
-import { idToTimestamp } from "src/utils/idToTimestamp";
-import { reactionRolesEvt } from "../types";
-import { handleModifyRole, handleOpenMenu } from "../util/buttonActionHandlers";
-import { BUTTON_CONTEXT_SEPARATOR, resolveStatefulCustomId } from "../util/buttonCustomIdFunctions";
-import { ButtonMenuActions } from "../util/buttonMenuActions";
-
-const BUTTON_INVALIDATION_TIME = 15 * MINUTES;
-
-export const ButtonInteractionEvt = reactionRolesEvt({
- event: "interactionCreate",
-
- async listener(meta) {
- const int = meta.args.interaction;
- if (!int.isMessageComponent()) return;
-
- const cfg = meta.pluginData.config.get();
- const split = int.customId.split(BUTTON_CONTEXT_SEPARATOR);
- const context = (await resolveStatefulCustomId(meta.pluginData, int.customId)) ?? {
- groupName: split[0],
- action: split[1],
- roleOrMenu: split[2],
- stateless: true,
- };
-
- if (context.stateless) {
- if (context.roleOrMenu == null) {
- // Not reaction from this plugin
- return;
- }
- const timeSinceCreation = moment.utc().valueOf() - idToTimestamp(int.message.id)!;
- if (timeSinceCreation >= BUTTON_INVALIDATION_TIME) {
- sendEphemeralReply(
- int,
- `Sorry, but these buttons are invalid because they are older than ${humanizeDuration(
- BUTTON_INVALIDATION_TIME,
- )}.\nIf the menu is still available, open it again to assign yourself roles!`,
- );
- return;
- }
- }
-
- const group = cfg.button_groups[context.groupName];
- if (!group) {
- await sendEphemeralReply(int, `A configuration error was encountered, please contact the Administrators!`);
- meta.pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A configuration error occurred** on buttons for message ${int.message.id}, group **${context.groupName}** not found in config`,
- });
- return;
- }
-
- // Verify that detected action is known by us
- if (!(Object).values(ButtonMenuActions).includes(context.action)) {
- await sendEphemeralReply(int, `A internal error was encountered, please contact the Administrators!`);
- meta.pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A internal error occurred** on buttons for message ${int.message.id}, action **${context.action}** is not known`,
- });
- return;
- }
-
- if (context.action === ButtonMenuActions.MODIFY_ROLE) {
- await handleModifyRole(meta.pluginData, int, group, context);
- return;
- }
-
- if (context.action === ButtonMenuActions.OPEN_MENU) {
- await handleOpenMenu(meta.pluginData, int, group, context);
- return;
- }
-
- logger.warn(
- `Action ${context.action} on button ${int.customId} (Guild: ${int.guildId}, Channel: ${int.channelId}) is unknown!`,
- );
- await sendEphemeralReply(int, `A internal error was encountered, please contact the Administrators!`);
- },
-});
-
-async function sendEphemeralReply(interaction: MessageComponentInteraction, message: string) {
- await interaction.reply({ content: message, ephemeral: true });
-}
diff --git a/backend/src/plugins/ReactionRoles/events/MessageDeletedEvt.ts b/backend/src/plugins/ReactionRoles/events/MessageDeletedEvt.ts
index 323da037..f75195c3 100644
--- a/backend/src/plugins/ReactionRoles/events/MessageDeletedEvt.ts
+++ b/backend/src/plugins/ReactionRoles/events/MessageDeletedEvt.ts
@@ -8,7 +8,6 @@ export const MessageDeletedEvt = reactionRolesEvt({
async listener(meta) {
const pluginData = meta.pluginData;
- await pluginData.state.buttonRoles.removeAllForMessageId(meta.args.message.id);
await pluginData.state.reactionRoles.removeFromMessage(meta.args.message.id);
},
});
diff --git a/backend/src/plugins/ReactionRoles/types.ts b/backend/src/plugins/ReactionRoles/types.ts
index 27dc5d17..d77b71fb 100644
--- a/backend/src/plugins/ReactionRoles/types.ts
+++ b/backend/src/plugins/ReactionRoles/types.ts
@@ -1,40 +1,10 @@
import * as t from "io-ts";
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
-import { GuildButtonRoles } from "src/data/GuildButtonRoles";
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
import { Queue } from "../../Queue";
-import { tNullable } from "../../utils";
-
-// These need to be updated every time discord adds/removes a style,
-// but i cant figure out how to import MessageButtonStyles at runtime
-enum ButtonStyles {
- PRIMARY = 1,
- SECONDARY = 2,
- SUCCESS = 3,
- DANGER = 4,
- // LINK = 5, We do not want users to create link buttons, but it would be style 5
-}
-
-const ButtonOpts = t.type({
- label: tNullable(t.string),
- emoji: tNullable(t.string),
- role_or_menu: t.string,
- style: tNullable(t.keyof(ButtonStyles)), // https://discord.js.org/#/docs/main/master/typedef/MessageButtonStyle
- disabled: tNullable(t.boolean),
- end_row: tNullable(t.boolean),
-});
-export type TButtonOpts = t.TypeOf;
-
-const ButtonPairOpts = t.type({
- message: t.string,
- default_buttons: t.record(t.string, ButtonOpts),
- button_menus: tNullable(t.record(t.string, t.record(t.string, ButtonOpts))),
-});
-export type TButtonPairOpts = t.TypeOf;
export const ConfigSchema = t.type({
- button_groups: t.record(t.string, ButtonPairOpts),
auto_refresh_interval: t.number,
remove_user_reactions: t.boolean,
can_manage: t.boolean,
@@ -61,7 +31,6 @@ export interface ReactionRolesPluginType extends BasePluginType {
state: {
reactionRoles: GuildReactionRoles;
savedMessages: GuildSavedMessages;
- buttonRoles: GuildButtonRoles;
reactionRemoveQueue: Queue;
roleChangeQueue: Queue;
diff --git a/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts b/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts
index a2641bfe..4d41ba42 100644
--- a/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts
+++ b/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts
@@ -1,7 +1,6 @@
import { Snowflake, TextChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { ReactionRole } from "../../../data/entities/ReactionRole";
-import { LogType } from "../../../data/LogType";
import { isDiscordAPIError, sleep } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { ReactionRolesPluginType } from "../types";
diff --git a/backend/src/plugins/ReactionRoles/util/buttonActionHandlers.ts b/backend/src/plugins/ReactionRoles/util/buttonActionHandlers.ts
deleted file mode 100644
index 8c9884a9..00000000
--- a/backend/src/plugins/ReactionRoles/util/buttonActionHandlers.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-import { MessageButton, MessageComponentInteraction, Snowflake } from "discord.js";
-import { GuildPluginData } from "knub";
-import { LogType } from "../../../data/LogType";
-import { LogsPlugin } from "../../../plugins/Logs/LogsPlugin";
-import { ReactionRolesPluginType, TButtonPairOpts } from "../types";
-import { generateStatelessCustomId } from "./buttonCustomIdFunctions";
-import { splitButtonsIntoRows } from "./splitButtonsIntoRows";
-
-export async function handleOpenMenu(
- pluginData: GuildPluginData,
- int: MessageComponentInteraction,
- group: TButtonPairOpts,
- context,
-) {
- const menuButtons: MessageButton[] = [];
- if (group.button_menus == null) {
- await int.reply({
- content: `A configuration error was encountered, please contact the Administrators!`,
- ephemeral: true,
- });
- pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A configuration error occurred** on buttons for message ${int.message.id}, no menus found in config`,
- });
- return;
- }
-
- for (const menuButton of Object.values(group.button_menus[context.roleOrMenu])) {
- const customId = await generateStatelessCustomId(pluginData, context.groupName, menuButton.role_or_menu);
-
- const btn = new MessageButton()
- .setLabel(menuButton.label ?? "")
- .setStyle("PRIMARY")
- .setCustomId(customId)
- .setDisabled(menuButton.disabled ?? false);
-
- if (menuButton.emoji) {
- const emo = pluginData.client.emojis.resolve(menuButton.emoji as Snowflake) ?? menuButton.emoji;
- btn.setEmoji(emo);
- }
- menuButtons.push(btn);
- }
-
- if (menuButtons.length === 0) {
- await int.reply({
- content: `A configuration error was encountered, please contact the Administrators!`,
- ephemeral: true,
- });
- pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A configuration error occurred** on buttons for message ${int.message.id}, menu **${context.roleOrMenu}** not found in config`,
- });
- return;
- }
- const rows = splitButtonsIntoRows(menuButtons, Object.values(group.button_menus[context.roleOrMenu])); // new MessageActionRow().addComponents(menuButtons);
-
- int.reply({ content: `Click to add/remove a role`, components: rows, ephemeral: true });
-}
-
-export async function handleModifyRole(
- pluginData: GuildPluginData,
- int: MessageComponentInteraction,
- group: TButtonPairOpts,
- context,
-) {
- const role = await pluginData.guild.roles.fetch(context.roleOrMenu);
- if (!role) {
- await int.reply({
- content: `A configuration error was encountered, please contact the Administrators!`,
- ephemeral: true,
- });
- pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A configuration error occurred** on buttons for message ${int.message.id}, role **${context.roleOrMenu}** not found on server`,
- });
- return;
- }
-
- const member = await pluginData.guild.members.fetch(int.user.id);
- try {
- if (member.roles.cache.has(role.id)) {
- await member.roles.remove(role, `Button Roles on message ${int.message.id}`);
- await int.reply({ content: `Role **${role.name}** removed`, ephemeral: true });
- } else {
- await member.roles.add(role, `Button Roles on message ${int.message.id}`);
- await int.reply({ content: `Role **${role.name}** added`, ephemeral: true });
- }
- } catch (e) {
- await int.reply({
- content: "A configuration error was encountered, please contact the Administrators!",
- ephemeral: true,
- });
- pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `**A configuration error occurred** on buttons for message ${int.message.id}, error: ${e}. We might be missing permissions!`,
- });
- }
-}
diff --git a/backend/src/plugins/ReactionRoles/util/buttonCustomIdFunctions.ts b/backend/src/plugins/ReactionRoles/util/buttonCustomIdFunctions.ts
deleted file mode 100644
index fa3644da..00000000
--- a/backend/src/plugins/ReactionRoles/util/buttonCustomIdFunctions.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { Snowflake } from "discord.js";
-import { GuildPluginData } from "knub";
-import { ReactionRolesPluginType } from "../types";
-import { ButtonMenuActions } from "./buttonMenuActions";
-
-export const BUTTON_CONTEXT_SEPARATOR = ":rb:";
-
-export async function getButtonAction(pluginData: GuildPluginData, roleOrMenu: string) {
- if (await pluginData.guild.roles.fetch(roleOrMenu as Snowflake).catch(() => false)) {
- return ButtonMenuActions.MODIFY_ROLE;
- } else {
- return ButtonMenuActions.OPEN_MENU;
- }
-}
-
-export async function generateStatelessCustomId(
- pluginData: GuildPluginData,
- groupName: string,
- roleOrMenu: string,
-) {
- let id = groupName + BUTTON_CONTEXT_SEPARATOR;
-
- id += `${await getButtonAction(pluginData, roleOrMenu)}${BUTTON_CONTEXT_SEPARATOR}${roleOrMenu}`;
-
- return id;
-}
-
-export async function resolveStatefulCustomId(pluginData: GuildPluginData, id: string) {
- const button = await pluginData.state.buttonRoles.getForButtonId(id);
-
- if (button) {
- const group = pluginData.config.get().button_groups[button.button_group];
- if (!group) return null;
- const cfgButton = group.default_buttons[button.button_name];
-
- return {
- groupName: button.button_group,
- action: await getButtonAction(pluginData, cfgButton.role_or_menu),
- roleOrMenu: cfgButton.role_or_menu,
- stateless: false,
- };
- } else {
- return null;
- }
-}
diff --git a/backend/src/plugins/ReactionRoles/util/buttonMenuActions.ts b/backend/src/plugins/ReactionRoles/util/buttonMenuActions.ts
deleted file mode 100644
index 89c77ff7..00000000
--- a/backend/src/plugins/ReactionRoles/util/buttonMenuActions.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export enum ButtonMenuActions {
- OPEN_MENU = "goto",
- MODIFY_ROLE = "grant",
-}
diff --git a/backend/src/plugins/ReactionRoles/util/splitButtonsIntoRows.ts b/backend/src/plugins/ReactionRoles/util/splitButtonsIntoRows.ts
deleted file mode 100644
index 8d73ab0a..00000000
--- a/backend/src/plugins/ReactionRoles/util/splitButtonsIntoRows.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { MessageActionRow, MessageButton } from "discord.js";
-import { TButtonOpts } from "../types";
-
-export function splitButtonsIntoRows(actualButtons: MessageButton[], configButtons: TButtonOpts[]): MessageActionRow[] {
- const rows: MessageActionRow[] = [];
- let curRow = new MessageActionRow();
- let consecutive = 0;
-
- for (let i = 0; i < actualButtons.length; i++) {
- const aBtn = actualButtons[i];
- const cBtn = configButtons[i];
-
- curRow.addComponents(aBtn);
- if (((consecutive + 1) % 5 === 0 || cBtn.end_row) && i + 1 < actualButtons.length) {
- rows.push(curRow);
- curRow = new MessageActionRow();
- consecutive = 0;
- } else {
- consecutive++;
- }
- }
-
- if (curRow.components.length >= 1) rows.push(curRow);
- return rows;
-}
-
-export function getRowCount(configButtons: TButtonOpts[]): number {
- let count = 1;
- let consecutive = 0;
- for (let i = 0; i < configButtons.length; i++) {
- const cBtn = configButtons[i];
-
- if (((consecutive + 1) % 5 === 0 || cBtn.end_row) && i + 1 < configButtons.length) {
- count++;
- consecutive = 0;
- } else {
- consecutive++;
- }
- }
-
- return count;
-}
From 784c54b22a3815dd3ab55f14189329790cfa7c6d Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 17:30:37 +0300
Subject: [PATCH 026/190] feat: add 'exclusive' option for role buttons; add
documentation for role buttons; mark reaction roles as legacy
---
.../ReactionRoles/ReactionRolesPlugin.ts | 1 +
.../plugins/RoleButtons/RoleButtonsPlugin.ts | 3 +
.../RoleButtons/events/buttonInteraction.ts | 50 +++++++-----
.../functions/getAllRolesInButtons.ts | 10 +++
backend/src/plugins/RoleButtons/info.ts | 80 +++++++++++++++++++
backend/src/plugins/RoleButtons/types.ts | 1 +
.../src/plugins/ZeppelinPluginBlueprint.ts | 2 +-
dashboard/src/components/docs/Plugin.vue | 17 +++-
8 files changed, 144 insertions(+), 20 deletions(-)
create mode 100644 backend/src/plugins/RoleButtons/functions/getAllRolesInButtons.ts
create mode 100644 backend/src/plugins/RoleButtons/info.ts
diff --git a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
index 90946d92..523ab7bd 100644
--- a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
+++ b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
@@ -36,6 +36,7 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin(
showInDocs: true,
info: {
prettyName: "Reaction roles",
+ legacy: "Consider using the [Role buttons](/docs/plugins/role_buttons) plugin instead.",
},
dependencies: () => [LogsPlugin],
diff --git a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
index 35359f52..60f5a221 100644
--- a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
+++ b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
@@ -7,10 +7,13 @@ import { GuildRoleButtons } from "../../data/GuildRoleButtons";
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
import { StrictValidationError } from "../../validatorUtils";
import { onButtonInteraction } from "./events/buttonInteraction";
+import { pluginInfo } from "./info";
export const RoleButtonsPlugin = zeppelinGuildPlugin()({
name: "role_buttons",
configSchema: ConfigSchema,
+ info: pluginInfo,
+ showInDocs: true,
configPreprocessor(options) {
// Auto-fill "name" property for buttons based on the object key
diff --git a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
index 0b0c4a65..9384d5a2 100644
--- a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
+++ b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
@@ -1,6 +1,8 @@
import { typedGuildEventListener } from "knub";
import { RoleButtonsPluginType, TRoleButtonOption } from "../types";
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
+import { GuildMember } from "discord.js";
+import { getAllRolesInButtons } from "../functions/getAllRolesInButtons";
export const onButtonInteraction = typedGuildEventListener()({
event: "interactionCreate",
@@ -12,8 +14,9 @@ export const onButtonInteraction = typedGuildEventListener();
+ for (const option of buttons.options) {
+ roles.add(option.role_id);
+ }
+ return Array.from(roles);
+}
diff --git a/backend/src/plugins/RoleButtons/info.ts b/backend/src/plugins/RoleButtons/info.ts
new file mode 100644
index 00000000..7b0976a5
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/info.ts
@@ -0,0 +1,80 @@
+import { trimPluginDescription } from "../../utils";
+import { ZeppelinGuildPluginBlueprint } from "../ZeppelinPluginBlueprint";
+
+export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
+ prettyName: "Role buttons",
+ description: trimPluginDescription(`
+ Allow users to pick roles by clicking on buttons
+ `),
+ configurationGuide: trimPluginDescription(`
+ Button roles are entirely config-based; this is in contrast to the old reaction roles. They can either be added to an existing message posted by Zeppelin or posted as a new message.
+
+ ## Basic role buttons
+ ~~~yml
+ role_buttons:
+ config:
+ buttons:
+ my_roles: # You can use any name you want here, but make sure not to change it afterwards
+ messages:
+ channel_id: "967407495544983552"
+ content: "Click the reactions below to get roles! Click again to remove the role."
+ options:
+ - role_id: "878339100015489044"
+ label: "Role 1"
+ - role_id: "967410091571703808"
+ emoji: "😁" # Default emoji as a unicode emoji
+ label: "Role 2"
+ - role_id: "967410091571703234"
+ emoji: "967412591683047445" # Custom emoji ID
+ - role_id: "967410091571703567"
+ label: "Role 4"
+ style: DANGER # Button style (in all caps), see https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ ~~~
+
+ ### Or with an embed:
+ ~~~yml
+ role_buttons:
+ config:
+ buttons:
+ my_roles:
+ messages:
+ channel_id: "967407495544983552"
+ content:
+ embeds:
+ - title: "Pick your role below!"
+ color: 0x0088FF
+ description: "You can pick any role you want by clicking the buttons below."
+ options:
+ ... # See above for examples for options
+ ~~~
+
+ ## Role buttons for an existing message
+ This message must be posted by Zeppelin.
+ ~~~yml
+ role_buttons:
+ config:
+ buttons:
+ my_roles:
+ messages:
+ channel_id: "967407495544983552"
+ message_id: "967407554412040193"
+ options:
+ ... # See above for examples for options
+ ~~~
+
+ ## Limiting to one role ("exclusive" roles)
+ When the \`exclusive\` option is enabled, only one role can be selected at a time.
+ ~~~yml
+ role_buttons:
+ config:
+ buttons:
+ my_roles:
+ messages:
+ channel_id: "967407495544983552"
+ message_id: "967407554412040193"
+ exclusive: true # With this option set, only one role can be selected at a time
+ options:
+ ... # See above for examples for options
+ ~~~
+ `),
+};
diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts
index b02db577..0dbbcd07 100644
--- a/backend/src/plugins/RoleButtons/types.ts
+++ b/backend/src/plugins/RoleButtons/types.ts
@@ -32,6 +32,7 @@ const RoleButtonsConfigItem = t.type({
}),
]),
options: t.array(RoleButtonOption),
+ exclusive: tNullable(t.boolean),
});
export type TRoleButtonsConfigItem = t.TypeOf;
diff --git a/backend/src/plugins/ZeppelinPluginBlueprint.ts b/backend/src/plugins/ZeppelinPluginBlueprint.ts
index 0bc7dbce..bb8cc70d 100644
--- a/backend/src/plugins/ZeppelinPluginBlueprint.ts
+++ b/backend/src/plugins/ZeppelinPluginBlueprint.ts
@@ -27,7 +27,7 @@ export interface ZeppelinGuildPluginBlueprint
+
+
+
+
+
Note! This is a legacy plugin which is no longer actively maintained and may be removed in a future update.
+
+
+
+
+
+
+
Usage
@@ -172,12 +186,13 @@
import Tab from "../Tab.vue";
import Expandable from "../Expandable.vue";
import { DocsState } from "../../store/types";
+ import Alert from 'vue-material-design-icons/Alert.vue';
const validTabs = ['usage', 'configuration'];
const defaultTab = 'usage';
export default {
- components: { CodeBlock, MarkdownBlock, Tabs, Tab, Expandable },
+ components: { CodeBlock, MarkdownBlock, Tabs, Tab, Expandable, Alert },
async mounted() {
this.loading = true;
From b64611dd0116f9284826d1ea54c90cd2c9647195 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 17:45:47 +0300
Subject: [PATCH 027/190] feat: use a standard custom ID format in role buttons
---
.../RoleButtons/events/buttonInteraction.ts | 10 ++++++++--
.../RoleButtons/functions/applyRoleButtons.ts | 3 ++-
backend/src/utils/buildCustomId.ts | 3 +++
backend/src/utils/parseCustomId.ts | 17 +++++++++++++++++
4 files changed, 30 insertions(+), 3 deletions(-)
create mode 100644 backend/src/utils/buildCustomId.ts
create mode 100644 backend/src/utils/parseCustomId.ts
diff --git a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
index 9384d5a2..1eeb8f91 100644
--- a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
+++ b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
@@ -3,16 +3,22 @@ import { RoleButtonsPluginType, TRoleButtonOption } from "../types";
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
import { GuildMember } from "discord.js";
import { getAllRolesInButtons } from "../functions/getAllRolesInButtons";
+import { parseCustomId } from "../../../utils/parseCustomId";
export const onButtonInteraction = typedGuildEventListener()({
event: "interactionCreate",
async listener({ pluginData, args }) {
- if (!args.interaction.isButton() || !args.interaction.customId.startsWith("roleButtons:")) {
+ if (!args.interaction.isButton()) {
+ return;
+ }
+
+ const { namespace, data } = parseCustomId(args.interaction.customId);
+ if (namespace !== "roleButtons") {
return;
}
const config = pluginData.config.get();
- const [, name, optionIndex] = args.interaction.customId.split(":");
+ const { name, index: optionIndex } = data;
// For some reason TS's type inference fails here so using a type annotation
const buttons = config.buttons[name];
const option: TRoleButtonOption | undefined = buttons?.options[optionIndex];
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index 30b413ef..18c8beb5 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -5,6 +5,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
import { Message, MessageButton, MessageEditOptions, MessageOptions, Snowflake } from "discord.js";
import { RoleButtonsItem } from "../../../data/entities/RoleButtonsItem";
import { splitButtonsIntoRows } from "./splitButtonsIntoRows";
+import { buildCustomId } from "../../../utils/buildCustomId";
const channelMessageRegex = new RegExp(`^(${snowflakeRegex.source})-(${snowflakeRegex.source})$`);
@@ -107,7 +108,7 @@ export async function applyRoleButtons(
const button = new MessageButton()
.setLabel(opt.label ?? "")
.setStyle(opt.style ?? "PRIMARY")
- .setCustomId(`roleButtons:${configItem.name}:${index}:${Math.round(Date.now() / 1000)}`);
+ .setCustomId(buildCustomId("roleButtons", { name: configItem.name, index }));
if (opt.emoji) {
const emo = pluginData.client.emojis.resolve(opt.emoji as Snowflake) ?? opt.emoji;
diff --git a/backend/src/utils/buildCustomId.ts b/backend/src/utils/buildCustomId.ts
new file mode 100644
index 00000000..3930d112
--- /dev/null
+++ b/backend/src/utils/buildCustomId.ts
@@ -0,0 +1,3 @@
+export function buildCustomId(namespace: string, data: any = {}) {
+ return `${namespace}:${Date.now()}:${JSON.stringify(data)}`;
+}
diff --git a/backend/src/utils/parseCustomId.ts b/backend/src/utils/parseCustomId.ts
new file mode 100644
index 00000000..2d95a3a1
--- /dev/null
+++ b/backend/src/utils/parseCustomId.ts
@@ -0,0 +1,17 @@
+const customIdFormat = /^([^:]+):\d+:(.*)$/;
+
+export function parseCustomId(customId: string): { namespace: string; data: any } {
+ const parts = customId.match(customIdFormat);
+ if (!parts) {
+ return {
+ namespace: "",
+ data: null,
+ };
+ }
+
+ return {
+ namespace: parts[1],
+ // Skipping timestamp
+ data: JSON.parse(parts[2]),
+ };
+}
From 5042d9997fbf00f54985b4b4d596ab95437bea71 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 17:55:05 +0300
Subject: [PATCH 028/190] fix: crash hotfix
---
backend/src/plugins/LocateUser/LocateUserPlugin.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/LocateUser/LocateUserPlugin.ts b/backend/src/plugins/LocateUser/LocateUserPlugin.ts
index 506380ff..52a9b6fe 100644
--- a/backend/src/plugins/LocateUser/LocateUserPlugin.ts
+++ b/backend/src/plugins/LocateUser/LocateUserPlugin.ts
@@ -72,6 +72,6 @@ export const LocateUserPlugin = zeppelinGuildPlugin()({
},
beforeUnload(pluginData) {
- pluginData.state.unregisterGuildEventListener();
+ pluginData.state.unregisterGuildEventListener?.();
},
});
From 4a9ece8e3bd3828c6e628f714ce35b879aa4b689 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 18:51:28 +0300
Subject: [PATCH 029/190] feat: add start_new_row option for role button
options
---
.../plugins/RoleButtons/RoleButtonsPlugin.ts | 17 ++++++--
.../functions/TooManyComponentsError.ts | 1 +
.../RoleButtons/functions/applyRoleButtons.ts | 22 ++---------
.../functions/createButtonComponents.ts | 39 +++++++++++++++++++
.../functions/splitButtonsIntoRows.ts | 12 ------
backend/src/plugins/RoleButtons/types.ts | 1 +
6 files changed, 57 insertions(+), 35 deletions(-)
create mode 100644 backend/src/plugins/RoleButtons/functions/TooManyComponentsError.ts
create mode 100644 backend/src/plugins/RoleButtons/functions/createButtonComponents.ts
delete mode 100644 backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
diff --git a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
index 60f5a221..aa76140a 100644
--- a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
+++ b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
@@ -8,6 +8,8 @@ import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
import { StrictValidationError } from "../../validatorUtils";
import { onButtonInteraction } from "./events/buttonInteraction";
import { pluginInfo } from "./info";
+import { createButtonComponents } from "./functions/createButtonComponents";
+import { TooManyComponentsError } from "./functions/TooManyComponentsError";
export const RoleButtonsPlugin = zeppelinGuildPlugin()({
name: "role_buttons",
@@ -26,10 +28,6 @@ export const RoleButtonsPlugin = zeppelinGuildPlugin()({
if (buttonsConfig) {
buttonsConfig.name = name;
- // 5 action rows * 5 buttons
- if (buttonsConfig.options?.length > 25) {
- throw new StrictValidationError(["A single message can have at most 25 role buttons"]);
- }
if (buttonsConfig.message) {
if ("message_id" in buttonsConfig.message) {
@@ -39,6 +37,17 @@ export const RoleButtonsPlugin = zeppelinGuildPlugin()({
seenMessages.add(buttonsConfig.message.message_id);
}
}
+
+ if (buttonsConfig.options) {
+ try {
+ createButtonComponents(buttonsConfig);
+ } catch (err) {
+ if (err instanceof TooManyComponentsError) {
+ throw new StrictValidationError(["Too many options; can only have max 5 buttons per row on max 5 rows."]);
+ }
+ throw new StrictValidationError(["Error validating options"]);
+ }
+ }
}
}
diff --git a/backend/src/plugins/RoleButtons/functions/TooManyComponentsError.ts b/backend/src/plugins/RoleButtons/functions/TooManyComponentsError.ts
new file mode 100644
index 00000000..b79be8bb
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/functions/TooManyComponentsError.ts
@@ -0,0 +1 @@
+export class TooManyComponentsError extends Error {}
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index 18c8beb5..b171bc2b 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -4,8 +4,8 @@ import { isSnowflake, snowflakeRegex } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { Message, MessageButton, MessageEditOptions, MessageOptions, Snowflake } from "discord.js";
import { RoleButtonsItem } from "../../../data/entities/RoleButtonsItem";
-import { splitButtonsIntoRows } from "./splitButtonsIntoRows";
import { buildCustomId } from "../../../utils/buildCustomId";
+import { createButtonComponents } from "./createButtonComponents";
const channelMessageRegex = new RegExp(`^(${snowflakeRegex.source})-(${snowflakeRegex.source})$`);
@@ -104,24 +104,8 @@ export async function applyRoleButtons(
}
// Apply role buttons
- const buttons = configItem.options.map((opt, index) => {
- const button = new MessageButton()
- .setLabel(opt.label ?? "")
- .setStyle(opt.style ?? "PRIMARY")
- .setCustomId(buildCustomId("roleButtons", { name: configItem.name, index }));
-
- if (opt.emoji) {
- const emo = pluginData.client.emojis.resolve(opt.emoji as Snowflake) ?? opt.emoji;
- button.setEmoji(emo);
- }
-
- return button;
- });
- const rows = splitButtonsIntoRows(buttons);
-
- await message.edit({
- components: rows,
- });
+ const components = createButtonComponents(configItem);
+ await message.edit({ components });
return {
channel_id: message.channelId,
diff --git a/backend/src/plugins/RoleButtons/functions/createButtonComponents.ts b/backend/src/plugins/RoleButtons/functions/createButtonComponents.ts
new file mode 100644
index 00000000..05736484
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/functions/createButtonComponents.ts
@@ -0,0 +1,39 @@
+import { MessageActionRow, MessageButton, Snowflake } from "discord.js";
+import { chunkArray } from "../../../utils";
+import { RoleButtonsPluginType, TRoleButtonOption, TRoleButtonsConfigItem } from "../types";
+import { buildCustomId } from "../../../utils/buildCustomId";
+import { GuildPluginData } from "knub";
+import { TooManyComponentsError } from "./TooManyComponentsError";
+
+export function createButtonComponents(configItem: TRoleButtonsConfigItem): MessageActionRow[] {
+ const rows: MessageActionRow[] = [];
+
+ let currentRow = new MessageActionRow();
+ for (const [index, option] of configItem.options.entries()) {
+ if (currentRow.components.length === 5 || (currentRow.components.length > 0 && option.start_new_row)) {
+ rows.push(currentRow);
+ currentRow = new MessageActionRow();
+ }
+
+ const button = new MessageButton()
+ .setLabel(option.label ?? "")
+ .setStyle(option.style ?? "PRIMARY")
+ .setCustomId(buildCustomId("roleButtons", { name: configItem.name, index }));
+
+ if (option.emoji) {
+ button.setEmoji(option.emoji);
+ }
+
+ currentRow.components.push(button);
+ }
+
+ if (currentRow.components.length > 0) {
+ rows.push(currentRow);
+ }
+
+ if (rows.length > 5) {
+ throw new TooManyComponentsError();
+ }
+
+ return rows;
+}
diff --git a/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts b/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
deleted file mode 100644
index 118f20ce..00000000
--- a/backend/src/plugins/RoleButtons/functions/splitButtonsIntoRows.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { MessageActionRow, MessageButton } from "discord.js";
-import { chunkArray } from "../../../utils";
-
-export function splitButtonsIntoRows(buttons: MessageButton[]): MessageActionRow[] {
- // Max 5 buttons per row
- const buttonChunks = chunkArray(buttons, 5);
- return buttonChunks.map((chunk) => {
- const row = new MessageActionRow();
- row.setComponents(chunk);
- return row;
- });
-}
diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts
index 0dbbcd07..2b23b692 100644
--- a/backend/src/plugins/RoleButtons/types.ts
+++ b/backend/src/plugins/RoleButtons/types.ts
@@ -16,6 +16,7 @@ const RoleButtonOption = t.type({
label: tNullable(t.string),
emoji: tNullable(t.string),
style: tNullable(t.keyof(ButtonStyles)), // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle
+ start_new_row: tNullable(t.boolean),
});
export type TRoleButtonOption = t.TypeOf;
From b6ab2c7d4a90d2984eae78e310f41691a9db64f5 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 19:43:11 +0300
Subject: [PATCH 030/190] feat: add '!role_buttons reset' command
---
.../plugins/RoleButtons/RoleButtonsPlugin.ts | 18 +++++++++++++
.../RoleButtons/commands/resetButtons.ts | 27 +++++++++++++++++++
backend/src/plugins/RoleButtons/types.ts | 1 +
3 files changed, 46 insertions(+)
create mode 100644 backend/src/plugins/RoleButtons/commands/resetButtons.ts
diff --git a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
index aa76140a..f7fc72ea 100644
--- a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
+++ b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts
@@ -10,6 +10,7 @@ import { onButtonInteraction } from "./events/buttonInteraction";
import { pluginInfo } from "./info";
import { createButtonComponents } from "./functions/createButtonComponents";
import { TooManyComponentsError } from "./functions/TooManyComponentsError";
+import { resetButtonsCmd } from "./commands/resetButtons";
export const RoleButtonsPlugin = zeppelinGuildPlugin()({
name: "role_buttons",
@@ -17,6 +18,21 @@ export const RoleButtonsPlugin = zeppelinGuildPlugin()({
info: pluginInfo,
showInDocs: true,
+ defaultOptions: {
+ config: {
+ buttons: {},
+ can_reset: false,
+ },
+ overrides: [
+ {
+ level: ">=100",
+ config: {
+ can_reset: true,
+ },
+ },
+ ],
+ },
+
configPreprocessor(options) {
// Auto-fill "name" property for buttons based on the object key
const buttonsArray = Array.isArray(options.config?.buttons) ? options.config.buttons : [];
@@ -58,6 +74,8 @@ export const RoleButtonsPlugin = zeppelinGuildPlugin()({
events: [onButtonInteraction],
+ commands: [resetButtonsCmd],
+
beforeLoad(pluginData) {
pluginData.state.roleButtons = GuildRoleButtons.getGuildInstance(pluginData.guild.id);
},
diff --git a/backend/src/plugins/RoleButtons/commands/resetButtons.ts b/backend/src/plugins/RoleButtons/commands/resetButtons.ts
new file mode 100644
index 00000000..0445e5b3
--- /dev/null
+++ b/backend/src/plugins/RoleButtons/commands/resetButtons.ts
@@ -0,0 +1,27 @@
+import { typedGuildCommand } from "knub";
+import { RoleButtonsPluginType } from "../types";
+import { commandTypeHelpers as ct } from "../../../commandTypes";
+import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { applyAllRoleButtons } from "../functions/applyAllRoleButtons";
+
+export const resetButtonsCmd = typedGuildCommand()({
+ trigger: "role_buttons reset",
+ description:
+ "In case of issues, you can run this command to have Zeppelin 'forget' about specific role buttons and re-apply them. This will also repost the message, if not targeting an existing message.",
+ usage: "!role_buttons reset my_roles",
+ permission: "can_reset",
+ signature: {
+ name: ct.string(),
+ },
+ async run({ pluginData, args, message }) {
+ const config = pluginData.config.get();
+ if (!config.buttons[args.name]) {
+ sendErrorMessage(pluginData, message.channel, `Can't find role buttons with the name "${args.name}"`);
+ return;
+ }
+
+ await pluginData.state.roleButtons.deleteRoleButtonItem(args.name);
+ await applyAllRoleButtons(pluginData);
+ sendSuccessMessage(pluginData, message.channel, "Done!");
+ },
+});
diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts
index 2b23b692..2e5b5828 100644
--- a/backend/src/plugins/RoleButtons/types.ts
+++ b/backend/src/plugins/RoleButtons/types.ts
@@ -39,6 +39,7 @@ export type TRoleButtonsConfigItem = t.TypeOf;
export const ConfigSchema = t.type({
buttons: t.record(t.string, RoleButtonsConfigItem),
+ can_reset: t.boolean,
});
export type TConfigSchema = t.TypeOf;
From 123b08c191c4a254a05257c3057f4989b47730ca Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 19:43:29 +0300
Subject: [PATCH 031/190] docs: fix typo in role button examples
---
backend/src/plugins/RoleButtons/info.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/backend/src/plugins/RoleButtons/info.ts b/backend/src/plugins/RoleButtons/info.ts
index 7b0976a5..6f64806e 100644
--- a/backend/src/plugins/RoleButtons/info.ts
+++ b/backend/src/plugins/RoleButtons/info.ts
@@ -15,7 +15,7 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
config:
buttons:
my_roles: # You can use any name you want here, but make sure not to change it afterwards
- messages:
+ message:
channel_id: "967407495544983552"
content: "Click the reactions below to get roles! Click again to remove the role."
options:
@@ -37,7 +37,7 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
config:
buttons:
my_roles:
- messages:
+ message:
channel_id: "967407495544983552"
content:
embeds:
@@ -55,7 +55,7 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
config:
buttons:
my_roles:
- messages:
+ message:
channel_id: "967407495544983552"
message_id: "967407554412040193"
options:
@@ -69,7 +69,7 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = {
config:
buttons:
my_roles:
- messages:
+ message:
channel_id: "967407495544983552"
message_id: "967407554412040193"
exclusive: true # With this option set, only one role can be selected at a time
From 8db8b219956dcdc0bee3a263b46c8a7aabc14fcb Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 19:52:55 +0300
Subject: [PATCH 032/190] fix: fix crash in role_buttons if the role button
message is removed and the guild reloaded
---
backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index b171bc2b..b48e13f2 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -20,7 +20,7 @@ export async function applyRoleButtons(
if (existingSavedButtons?.channel_id) {
const existingChannel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
const existingMessage = await (existingChannel?.isText() &&
- existingChannel.messages.fetch(existingSavedButtons.message_id));
+ existingChannel.messages.fetch(existingSavedButtons.message_id).catch(() => null));
if (existingMessage && existingMessage.components.length) {
await existingMessage.edit({
components: [],
From a627c7d8594a4562198aa57fb26f79aa9c3c7fcd Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 20:01:21 +0300
Subject: [PATCH 033/190] fix: fix error if the specified role buttons message
id doesn't point to a valid message
---
backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index b48e13f2..d79f9624 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -32,7 +32,8 @@ export async function applyRoleButtons(
if ("message_id" in configItem.message) {
// channel id + message id: apply role buttons to existing message
const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
- const messageCandidate = await (channel?.isText() && channel.messages.fetch(configItem.message.message_id));
+ const messageCandidate = await (channel?.isText() &&
+ channel.messages.fetch(configItem.message.message_id).catch(() => null));
if (!messageCandidate) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Message not found for role_buttons/${configItem.name}`,
From 22bd0ec422627470ad980d4fc96b30c70be8af2f Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 20:11:46 +0300
Subject: [PATCH 034/190] fix: only allow named options for role button style
Numbered options gave an error when used.
---
backend/src/plugins/RoleButtons/types.ts | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts
index 2e5b5828..e7b4096d 100644
--- a/backend/src/plugins/RoleButtons/types.ts
+++ b/backend/src/plugins/RoleButtons/types.ts
@@ -3,19 +3,20 @@ import { BasePluginType } from "knub";
import { tMessageContent, tNullable } from "../../utils";
import { GuildRoleButtons } from "../../data/GuildRoleButtons";
-enum ButtonStyles {
- PRIMARY = 1,
- SECONDARY = 2,
- SUCCESS = 3,
- DANGER = 4,
- // LINK = 5, We do not want users to create link buttons, but it would be style 5
-}
-
const RoleButtonOption = t.type({
role_id: t.string,
label: tNullable(t.string),
emoji: tNullable(t.string),
- style: tNullable(t.keyof(ButtonStyles)), // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle
+ // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle
+ style: tNullable(
+ t.union([
+ t.literal("PRIMARY"),
+ t.literal("SECONDARY"),
+ t.literal("SUCCESS"),
+ t.literal("DANGER"),
+ // t.literal("LINK"), // Role buttons don't use link buttons, but adding this here so it's documented why it's not available
+ ]),
+ ),
start_new_row: tNullable(t.boolean),
});
export type TRoleButtonOption = t.TypeOf;
From 75bd7625a2feec51d220c1c10e7527faf2646590 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 20:17:32 +0300
Subject: [PATCH 035/190] fix: catch and report errors when applying role
button components
---
.../plugins/RoleButtons/functions/applyRoleButtons.ts | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index d79f9624..b3fc76f4 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -88,7 +88,7 @@ export async function applyRoleButtons(
candidateMessage = await channel.send(configItem.message.content as string | MessageOptions);
} catch (err) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `Error while posting message for role_buttons/${configItem.name}`,
+ body: `Error while posting message for role_buttons/${configItem.name}: ${String(err)}`,
});
return null;
}
@@ -99,14 +99,19 @@ export async function applyRoleButtons(
if (message.author.id !== pluginData.client.user?.id) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
- body: `Error applying role buttons for role_buttons/${configItem.name}: target message must be posted by the bot`,
+ body: `Error applying role buttons for role_buttons/${configItem.name}: target message must be posted by Zeppelin`,
});
return null;
}
// Apply role buttons
const components = createButtonComponents(configItem);
- await message.edit({ components });
+ await message.edit({ components }).catch((err) => {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: `Error applying role buttons for role_buttons/${configItem.name}: ${String(err)}`,
+ });
+ return null;
+ });
return {
channel_id: message.channelId,
From 44d68bf608a5a3e3b82d049a77b4d5e94f992778 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 22:55:04 +0300
Subject: [PATCH 036/190] fix: fix error when trying to fetch an unknown
channel in role buttons
---
.../src/plugins/RoleButtons/functions/applyRoleButtons.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index b3fc76f4..bbd290a2 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -18,7 +18,7 @@ export async function applyRoleButtons(
// Remove existing role buttons, if any
if (existingSavedButtons?.channel_id) {
- const existingChannel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ const existingChannel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
const existingMessage = await (existingChannel?.isText() &&
existingChannel.messages.fetch(existingSavedButtons.message_id).catch(() => null));
if (existingMessage && existingMessage.components.length) {
@@ -31,7 +31,7 @@ export async function applyRoleButtons(
// Find or create message for role buttons
if ("message_id" in configItem.message) {
// channel id + message id: apply role buttons to existing message
- const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
const messageCandidate = await (channel?.isText() &&
channel.messages.fetch(configItem.message.message_id).catch(() => null));
if (!messageCandidate) {
@@ -54,7 +54,7 @@ export async function applyRoleButtons(
return null;
}
- const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id);
+ const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
if (!channel || !channel.isText()) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Text channel not found for role_buttons/${configItem.name}`,
From d93097306c14288ac5043684247240ca421a2580 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 23 Apr 2022 23:26:16 +0300
Subject: [PATCH 037/190] fix: allow servers with button_groups in their
reaction_roles config to load with a warning
---
.../src/plugins/ReactionRoles/ReactionRolesPlugin.ts | 11 ++++++-----
backend/src/plugins/ReactionRoles/types.ts | 2 ++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
index 523ab7bd..6767e965 100644
--- a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
+++ b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
@@ -68,11 +68,12 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin(
},
afterLoad(pluginData) {
- // let autoRefreshInterval = pluginData.config.get().auto_refresh_interval;
- // if (autoRefreshInterval != null) {
- // autoRefreshInterval = Math.max(MIN_AUTO_REFRESH, autoRefreshInterval);
- // autoRefreshLoop(pluginData, autoRefreshInterval);
- // }
+ const config = pluginData.config.get();
+ if (config.button_groups) {
+ pluginData.getPlugin(LogsPlugin).logBotAlert({
+ body: "The 'button_groups' option of the 'reaction_roles' plugin is deprecated and non-functional. Consider using the new 'role_buttons' plugin instead!",
+ });
+ }
},
beforeUnload(pluginData) {
diff --git a/backend/src/plugins/ReactionRoles/types.ts b/backend/src/plugins/ReactionRoles/types.ts
index d77b71fb..412d798a 100644
--- a/backend/src/plugins/ReactionRoles/types.ts
+++ b/backend/src/plugins/ReactionRoles/types.ts
@@ -3,11 +3,13 @@ import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
import { Queue } from "../../Queue";
+import { tNullable } from "../../utils";
export const ConfigSchema = t.type({
auto_refresh_interval: t.number,
remove_user_reactions: t.boolean,
can_manage: t.boolean,
+ button_groups: tNullable(t.unknown),
});
export type TConfigSchema = t.TypeOf;
From ef78fbc0654fce071ba3eb8af9f93202b65afeb9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 24 Apr 2022 02:55:35 +0300
Subject: [PATCH 038/190] fix: fix crash when custom id data is not valid JSON
---
backend/src/utils/parseCustomId.ts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/backend/src/utils/parseCustomId.ts b/backend/src/utils/parseCustomId.ts
index 2d95a3a1..7988e5ef 100644
--- a/backend/src/utils/parseCustomId.ts
+++ b/backend/src/utils/parseCustomId.ts
@@ -1,3 +1,5 @@
+import { logger } from "../logger";
+
const customIdFormat = /^([^:]+):\d+:(.*)$/;
export function parseCustomId(customId: string): { namespace: string; data: any } {
@@ -9,6 +11,17 @@ export function parseCustomId(customId: string): { namespace: string; data: any
};
}
+ let parsedData: any;
+ try {
+ parsedData = JSON.parse(parts[2]);
+ } catch (err) {
+ logger.debug(`Error while parsing custom id data (custom id: ${customId}): ${String(err)}`);
+ return {
+ namespace: "",
+ data: null,
+ };
+ }
+
return {
namespace: parts[1],
// Skipping timestamp
From 8445c37f6410683b7b1b53811cf49eee61b9068a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 24 Apr 2022 02:56:13 +0300
Subject: [PATCH 039/190] chore: add default value for no-op button_groups
option to stop TS from complaining
---
backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
index 6767e965..53068bdc 100644
--- a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
+++ b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts
@@ -19,6 +19,8 @@ const defaultOptions: PluginOptions = {
remove_user_reactions: true,
can_manage: false,
+
+ button_groups: null,
},
overrides: [
From a31d074ba8819ac41aa4f1b5b8a4d7867a6bc91b Mon Sep 17 00:00:00 2001
From: almeidx
Date: Wed, 27 Apr 2022 10:34:16 +0100
Subject: [PATCH 040/190] fix: negative number in userinfo command
---
backend/src/plugins/Utility/functions/getUserInfoEmbed.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
index e775205c..c4922bed 100644
--- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
@@ -20,7 +20,7 @@ const MAX_ROLES_TO_DISPLAY = 15;
const trimRoles = (roles: string[]) =>
roles.length > MAX_ROLES_TO_DISPLAY
- ? roles.slice(0, MAX_ROLES_TO_DISPLAY).join(", ") + `, and ${MAX_ROLES_TO_DISPLAY - roles.length} more roles`
+ ? roles.slice(0, MAX_ROLES_TO_DISPLAY).join(", ") + `, and ${roles.length - MAX_ROLES_TO_DISPLAY} more roles`
: roles.join(", ");
export async function getUserInfoEmbed(
From 19235306f740d443d5da4ea3873b3da85bd50558 Mon Sep 17 00:00:00 2001
From: metal
Date: Wed, 11 May 2022 14:35:05 +0000
Subject: [PATCH 041/190] idk kev
Signed-off-by: GitHub
---
backend/src/plugins/Cases/functions/getCaseEmbed.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/plugins/Cases/functions/getCaseEmbed.ts b/backend/src/plugins/Cases/functions/getCaseEmbed.ts
index 93ee02ef..5a1b2ab8 100644
--- a/backend/src/plugins/Cases/functions/getCaseEmbed.ts
+++ b/backend/src/plugins/Cases/functions/getCaseEmbed.ts
@@ -1,4 +1,4 @@
-import { MessageEditOptions, MessageOptions } from "discord.js";
+import { MessageEditOptions, MessageOptions, Util } from "discord.js";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
import { CaseTypes } from "../../../data/CaseTypes";
@@ -67,7 +67,7 @@ export async function getCaseEmbed(
if (theCase.notes.length) {
for (const note of theCase.notes) {
const noteDate = moment.utc(note.created_at);
- let noteBody = note.body.trim();
+ let noteBody = Util.escapeCodeBlock(note.body.trim());
if (noteBody === "") {
noteBody = emptyEmbedValue;
}
From 7faa211d498b199576976ae8e227d6fac7b90e4b Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 12 May 2022 21:32:49 +0300
Subject: [PATCH 042/190] feat: add 'av' as alias for 'add_server_from_invite'
---
.../src/plugins/BotControl/commands/AddServerFromInviteCmd.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
index 385df13b..8175d1fe 100644
--- a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
+++ b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
@@ -8,7 +8,7 @@ import moment from "moment-timezone";
import { isEligible } from "../functions/isEligible";
export const AddServerFromInviteCmd = botControlCmd({
- trigger: ["add_server_from_invite", "allow_server_from_invite"],
+ trigger: ["add_server_from_invite", "allow_server_from_invite", "av"],
permission: "can_add_server_from_invite",
signature: {
From 10c107d5d907294bcba2cc6ba64dcdeed3a24b31 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 12 May 2022 21:38:01 +0300
Subject: [PATCH 043/190] fix: only retry reminders in case of HTTP errors
Doesn't make a lot of sense to keep trying to e.g. post a reminder in
a deleted channel or a channel we have no perms to post in.
---
.../src/plugins/Reminders/functions/postReminder.ts | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/backend/src/plugins/Reminders/functions/postReminder.ts b/backend/src/plugins/Reminders/functions/postReminder.ts
index 665fc3fb..d96ad7b6 100644
--- a/backend/src/plugins/Reminders/functions/postReminder.ts
+++ b/backend/src/plugins/Reminders/functions/postReminder.ts
@@ -1,10 +1,10 @@
import { GuildPluginData } from "knub";
import { RemindersPluginType } from "../types";
import { Reminder } from "../../../data/entities/Reminder";
-import { Snowflake, TextChannel } from "discord.js";
+import { DiscordAPIError, HTTPError, Snowflake, TextChannel } from "discord.js";
import moment from "moment-timezone";
import { disableLinkPreviews } from "knub/dist/helpers";
-import { DBDateFormat, SECONDS } from "../../../utils";
+import { DBDateFormat, isDiscordHTTPError, SECONDS } from "../../../utils";
import humanizeDuration from "humanize-duration";
export async function postReminder(pluginData: GuildPluginData, reminder: Reminder) {
@@ -31,10 +31,13 @@ export async function postReminder(pluginData: GuildPluginData= 500) {
+ // If we get a server error, try again later
+ return;
+ }
}
}
From 15e51491d829613d34ddc80b5f9ed3ae41e9ae42 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 12 May 2022 21:46:20 +0300
Subject: [PATCH 044/190] fix: fix error from 'config: null' in config
---
backend/src/pluginUtils.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts
index f9093ad1..031d1fa7 100644
--- a/backend/src/pluginUtils.ts
+++ b/backend/src/pluginUtils.ts
@@ -164,7 +164,7 @@ export function getPluginConfigPreprocessor(
if (options.overrides) {
for (const override of options.overrides) {
- const overrideConfigMergedWithBaseConfig = configUtils.mergeConfig(options.config, override.config || {});
+ const overrideConfigMergedWithBaseConfig = configUtils.mergeConfig(options.config || {}, override.config || {});
const decodedOverrideConfig = blueprint.configSchema
? decodeAndValidateStrict(blueprint.configSchema, overrideConfigMergedWithBaseConfig)
: overrideConfigMergedWithBaseConfig;
From 016330366e75641b5e8e07a5106544e8f3a2603f Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 12 May 2022 21:47:13 +0300
Subject: [PATCH 045/190] fix: change new 'av' alias to 'adv' to avoid conflict
with the 'avatar' alias
---
.../src/plugins/BotControl/commands/AddServerFromInviteCmd.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
index 8175d1fe..5bdb2ace 100644
--- a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
+++ b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
@@ -8,7 +8,7 @@ import moment from "moment-timezone";
import { isEligible } from "../functions/isEligible";
export const AddServerFromInviteCmd = botControlCmd({
- trigger: ["add_server_from_invite", "allow_server_from_invite", "av"],
+ trigger: ["add_server_from_invite", "allow_server_from_invite", "adv"],
permission: "can_add_server_from_invite",
signature: {
From 6df67da3cb858a57954efaabe066e33690ac9bc0 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 18:58:54 +0300
Subject: [PATCH 046/190] debug: catch & trace interaction reply errors
---
.../src/plugins/Mutes/commands/MutesCmd.ts | 4 ++-
.../RoleButtons/events/buttonInteraction.ts | 30 +++++++++++--------
backend/src/plugins/Utility/search.ts | 4 ++-
backend/src/utils/waitForInteraction.ts | 4 ++-
4 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/backend/src/plugins/Mutes/commands/MutesCmd.ts b/backend/src/plugins/Mutes/commands/MutesCmd.ts
index eeff2c4f..5c4e9d3a 100644
--- a/backend/src/plugins/Mutes/commands/MutesCmd.ts
+++ b/backend/src/plugins/Mutes/commands/MutesCmd.ts
@@ -205,7 +205,9 @@ export const MutesCmd = mutesCmd({
collector.on("collect", async (interaction: MessageComponentInteraction) => {
if (msg.author.id !== interaction.user.id) {
- interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true });
+ interaction
+ .reply({ content: `You are not permitted to use these buttons.`, ephemeral: true })
+ .catch((err) => console.trace(err.message));
} else {
collector.resetTimer();
await interaction.deferUpdate();
diff --git a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
index 1eeb8f91..579ea7e9 100644
--- a/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
+++ b/backend/src/plugins/RoleButtons/events/buttonInteraction.ts
@@ -23,10 +23,12 @@ export const onButtonInteraction = typedGuildEventListener console.trace(err.message));
return;
}
@@ -39,10 +41,12 @@ export const onButtonInteraction = typedGuildEventListener console.trace(err.message));
} else {
rolesToAdd.push(option.role_id);
@@ -54,10 +58,12 @@ export const onButtonInteraction = typedGuildEventListener console.trace(err.message));
}
for (const roleId of rolesToAdd) {
diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts
index b2b417b7..440652b5 100644
--- a/backend/src/plugins/Utility/search.ts
+++ b/backend/src/plugins/Utility/search.ts
@@ -192,7 +192,9 @@ export async function displaySearch(
collector.on("collect", async (interaction: MessageComponentInteraction) => {
if (msg.author.id !== interaction.user.id) {
- interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true });
+ interaction
+ .reply({ content: `You are not permitted to use these buttons.`, ephemeral: true })
+ .catch((err) => console.trace(err.message));
} else {
if (interaction.customId === `previousButton:${idMod}` && currentPage > 1) {
collector.stop();
diff --git a/backend/src/utils/waitForInteraction.ts b/backend/src/utils/waitForInteraction.ts
index d39467c9..ece841ca 100644
--- a/backend/src/utils/waitForInteraction.ts
+++ b/backend/src/utils/waitForInteraction.ts
@@ -27,7 +27,9 @@ export async function waitForButtonConfirm(
collector.on("collect", (interaction: MessageComponentInteraction) => {
if (options?.restrictToId && options.restrictToId !== interaction.user.id) {
- interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true });
+ interaction
+ .reply({ content: `You are not permitted to use these buttons.`, ephemeral: true })
+ .catch((err) => console.trace(err.message));
} else {
if (interaction.customId.startsWith(`confirmButton:${idMod}:`)) {
message.delete();
From 2a959f354c263b6aea985176e55d5503f9dd37de Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 19:11:44 +0300
Subject: [PATCH 047/190] Initial work on Docker support
---
.env.example | 37 +++++++++++++++++-
backend/api.env.example | 10 -----
backend/bot.env.example | 7 ----
docker-compose-dev.sh | 3 ++
docker/development/devenv/Dockerfile | 18 +++++++++
docker/development/docker-compose.yml | 56 +++++++++++++++++++++++++++
docker/development/nginx/Dockerfile | 12 ++++++
docker/development/nginx/default.conf | 44 +++++++++++++++++++++
8 files changed, 169 insertions(+), 18 deletions(-)
delete mode 100644 backend/api.env.example
delete mode 100644 backend/bot.env.example
create mode 100755 docker-compose-dev.sh
create mode 100644 docker/development/devenv/Dockerfile
create mode 100644 docker/development/docker-compose.yml
create mode 100644 docker/development/nginx/Dockerfile
create mode 100644 docker/development/nginx/default.conf
diff --git a/.env.example b/.env.example
index ab4597a4..917a8d65 100644
--- a/.env.example
+++ b/.env.example
@@ -1 +1,36 @@
-KEY=32_character_encryption_key
+ENCRYPTION_KEY=32_character_encryption_key
+
+CLIENT_ID=
+CLIENT_SECRET=
+BOT_TOKEN=
+
+OAUTH_CALLBACK_URL=
+DASHBOARD_DOMAIN=
+API_DOMAIN=
+PORT=443
+
+# The MySQL database running in the container is exposed to the host on this port,
+# allowing access with database tools such as DBeaver
+MYSQL_PORT=3001
+# Password for the Zeppelin database user
+MYSQL_PASSWORD=
+# Password for the MySQL root user
+MYSQL_ROOT_PASSWORD=
+
+# The development environment container has an SSH server that you can connect to.
+# This is the port that server is exposed to the host on.
+DEVELOPMENT_SSH_PORT=3002
+
+# Only required if relevant feature is used
+#PHISHERMAN_API_KEY=
+
+# In production, the newest code is pulled from a repository
+# Specify that repository URL here
+PRODUCTION_REPOSITORY=https://github.com/ZeppelinBot/Zeppelin.git
+
+# You only need to set these if you're running an external database.
+# In a standard setup, the database is run in a docker container.
+#DB_HOST=
+#DB_USER=
+#DB_PASSWORD=
+#DB_DATABASE=
diff --git a/backend/api.env.example b/backend/api.env.example
deleted file mode 100644
index 87afe866..00000000
--- a/backend/api.env.example
+++ /dev/null
@@ -1,10 +0,0 @@
-PORT=
-CLIENT_ID=
-CLIENT_SECRET=
-OAUTH_CALLBACK_URL=
-DASHBOARD_URL=
-DB_HOST=
-DB_USER=
-DB_PASSWORD=
-DB_DATABASE=
-STAFF=
diff --git a/backend/bot.env.example b/backend/bot.env.example
deleted file mode 100644
index b701f4ed..00000000
--- a/backend/bot.env.example
+++ /dev/null
@@ -1,7 +0,0 @@
-TOKEN=
-DB_HOST=
-DB_USER=
-DB_PASSWORD=
-DB_DATABASE=
-PROFILING=false
-PHISHERMAN_API_KEY=
diff --git a/docker-compose-dev.sh b/docker-compose-dev.sh
new file mode 100755
index 00000000..14af4e94
--- /dev/null
+++ b/docker-compose-dev.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+DOCKER_UID="$(id -u)" DOCKER_GID="$(id -g)" docker-compose --env-file ./.env -f ./docker/development/docker-compose.yml "$@"
diff --git a/docker/development/devenv/Dockerfile b/docker/development/devenv/Dockerfile
new file mode 100644
index 00000000..95e3e128
--- /dev/null
+++ b/docker/development/devenv/Dockerfile
@@ -0,0 +1,18 @@
+FROM ubuntu:20.04
+
+ARG DOCKER_UID
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=UTC
+
+# Set up SSH access
+RUN apt-get update && apt-get install -y openssh-server sudo git
+RUN mkdir /var/run/sshd
+RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u "${DOCKER_UID}" ubuntu
+RUN echo 'ubuntu:password' | chpasswd
+
+# Install Node.js 16
+RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
+RUN apt-get install -y nodejs
+
+CMD /usr/sbin/sshd -D -e
diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml
new file mode 100644
index 00000000..c5721914
--- /dev/null
+++ b/docker/development/docker-compose.yml
@@ -0,0 +1,56 @@
+version: '3'
+services:
+# nginx:
+# user: "${UID:?Missing UID}:${GID:?Missing GID}"
+# build:
+# context: ./nginx
+# args:
+# API_DOMAIN: ${API_DOMAIN:?Missing API_DOMAIN}
+# API_PORT: ${API_PORT:?Missing API_PORT}
+# DASHBOARD_DOMAIN: ${DASHBOARD_DOMAIN:?Missing DASHBOARD_DOMAIN}
+# DASHBOARD_PORT: ${DASHBOARD_PORT:?Missing DASHBOARD_PORT}
+# ports:
+# - ${PORT:?Missing PORT}:443
+# volumes:
+# - ./:/zeppelin
+#
+ mysql:
+ image: mysql:8.0
+ environment:
+ MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD?:Missing MYSQL_ROOT_PASSWORD}
+ MYSQL_DATABASE: zeppelin
+ MYSQL_USER: zeppelin
+ MYSQL_PASSWORD: ${MYSQL_PASSWORD?:Missing MYSQL_PASSWORD}
+ ports:
+ - ${MYSQL_PORT:?Missing MYSQL_PORT}:3306
+#
+# backend:
+# image: node:16
+# user: "${UID:?Missing UID}:${GID:?Missing GID}"
+# working_dir: /zeppelin/backend
+# restart: always
+# depends_on:
+# - mysql
+# volumes:
+# - ./:/zeppelin
+# command: sh -c "npm run migrate-dev && npm run watch"
+#
+# dashboard:
+# image: node:16
+# user: "${UID:?Missing UID}:${GID:?Missing GID}"
+# working_dir: /zeppelin/dashboard
+# restart: always
+# volumes:
+# - ./:/zeppelin
+# command: sh -c "npm run watch-build"
+
+ devenv:
+ build:
+ context: ./devenv
+ args:
+ DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
+ DOCKER_GID: ${DOCKER_GID:?Missing DOCKER_GID}
+ ports:
+ - "${DEVELOPMENT_SSH_PORT:?Missing DEVELOPMENT_SSH_PORT}:22"
+ volumes:
+ - ../../:/zeppelin
diff --git a/docker/development/nginx/Dockerfile b/docker/development/nginx/Dockerfile
new file mode 100644
index 00000000..7058f8b0
--- /dev/null
+++ b/docker/development/nginx/Dockerfile
@@ -0,0 +1,12 @@
+FROM nginx
+
+ARG API_DOMAIN
+ARG DASHBOARD_DOMAIN
+
+RUN apt-get update && apt-get install -y openssl
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/api-cert.key -out /etc/ssl/certs/api-cert.pem -days 365 -subj '/CN=*.${API_DOMAIN}' -nodes
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/dashboard-cert.key -out /etc/ssl/certs/dashboard-cert.pem -days 365 -subj '/CN=*.${DASHBOARD_DOMAIN}' -nodes
+
+COPY ./default.conf /etc/nginx/conf.d/default.conf
+RUN sed -ir "s/_API_DOMAIN_/$(echo ${API_DOMAIN} | sed -ir 's///g')/g"
+RUN sed -ir "s/_DASHBOARD_DOMAIN_/$(echo ${DASHBOARD_DOMAIN} | sed 's/\./\\\\./g')/g"
diff --git a/docker/development/nginx/default.conf b/docker/development/nginx/default.conf
new file mode 100644
index 00000000..6aea2aeb
--- /dev/null
+++ b/docker/development/nginx/default.conf
@@ -0,0 +1,44 @@
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name _API_DOMAIN_;
+
+ location / {
+ proxy_pass backend:3000;
+
+ client_max_body_size 200M;
+ }
+
+ ssl_certificate /etc/ssl/certs/api-cert.pem;
+ ssl_certificate_key /etc/ssl/private/api-cert.key;
+
+ ssl_session_timeout 1d;
+ ssl_session_cache shared:MozSSL:10m;
+ ssl_session_tickets off;
+
+ ssl_protocols TLSv1.3;
+ ssl_prefer_server_ciphers off;
+}
+
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name dashboard.dev.zeppelin.gg;
+
+ root /zeppelin/dashboard/dist;
+
+ location / {
+ index index.html;
+ try_files $uri $uri/ /index.html;
+ }
+
+ ssl_certificate /etc/ssl/certs/dashboard-cert.pem;
+ ssl_certificate_key /etc/ssl/private/dashboard-cert.key;
+
+ ssl_session_timeout 1d;
+ ssl_session_cache shared:MozSSL:10m;
+ ssl_session_tickets off;
+
+ ssl_protocols TLSv1.3;
+ ssl_prefer_server_ciphers off;
+}
From 5387d4a82acf6bb3df2a94c25f65c86d123f6fbc Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 19:26:43 +0300
Subject: [PATCH 048/190] chore: update to discord.js 13.7.0
---
backend/package-lock.json | 187 +++++++++++-------
backend/package.json | 4 +-
.../InternalPoster/functions/editMessage.ts | 11 +-
.../Utility/functions/getChannelInfoEmbed.ts | 9 +-
4 files changed, 135 insertions(+), 76 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 1647e84c..bae5e80a 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -13,8 +13,8 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.31.0",
- "discord.js": "^13.6.0",
+ "discord-api-types": "^0.33.1",
+ "discord.js": "^13.7.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -124,23 +124,25 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "0.11.0",
- "license": "Apache-2.0",
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz",
+ "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==",
"dependencies": {
- "@sindresorhus/is": "^4.2.0",
- "discord-api-types": "^0.26.0",
- "ts-mixer": "^6.0.0",
- "tslib": "^2.3.1",
- "zod": "^3.11.6"
+ "@sapphire/shapeshift": "^2.0.0",
+ "@sindresorhus/is": "^4.6.0",
+ "discord-api-types": "^0.31.1",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.1",
+ "tslib": "^2.3.1"
},
"engines": {
- "node": ">=16.0.0",
- "npm": ">=7.0.0"
+ "node": ">=16.9.0"
}
},
"node_modules/@discordjs/builders/node_modules/@sindresorhus/is": {
"version": "4.6.0",
- "license": "MIT",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
"engines": {
"node": ">=10"
},
@@ -149,22 +151,21 @@
}
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
- "version": "0.26.1",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
+ "version": "0.31.2",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz",
+ "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA=="
},
"node_modules/@discordjs/builders/node_modules/tslib": {
- "version": "2.3.1",
- "license": "0BSD"
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
},
"node_modules/@discordjs/collection": {
- "version": "0.4.0",
- "license": "Apache-2.0",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.6.0.tgz",
+ "integrity": "sha512-Ieaetb36l0nmAS5X9Upqk4W7euAO6FdXPxn3I8vBAKEcoIzEZI1mcVcPfCfagGJZSgBKpENnAnKkP4GAn+MV8w==",
"engines": {
- "node": ">=16.0.0",
- "npm": ">=7.0.0"
+ "node": ">=16.9.0"
}
},
"node_modules/@nodelib/fs.scandir": {
@@ -207,6 +208,15 @@
"npm": ">=7.0.0"
}
},
+ "node_modules/@sapphire/shapeshift": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.2.0.tgz",
+ "integrity": "sha512-UEnKgMlQyI0yY/q+lCMX0VJft9y86IsesgbIQj6e62FBYSaMVr+IaMNpi4z45Q14VnuMACbK0yrbHISNqgUYcQ==",
+ "engines": {
+ "node": ">=v15.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
"node_modules/@silvia-odwyer/photon-node": {
"version": "0.3.1",
"license": "Apache-2.0"
@@ -344,8 +354,9 @@
"license": "MIT"
},
"node_modules/@types/node-fetch": {
- "version": "2.5.12",
- "license": "MIT",
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -1693,22 +1704,24 @@
}
},
"node_modules/discord-api-types": {
- "version": "0.31.0",
- "license": "MIT"
+ "version": "0.33.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.1.tgz",
+ "integrity": "sha512-dc7Xzm3isROh77jdxikQnLzKDslOPORm2Q8odXrKgEy8Aqfd1r9ISVTU/xsHkH6bFo+Hjf1A1C5OnBtu8ghy4w=="
},
"node_modules/discord.js": {
- "version": "13.6.0",
- "license": "Apache-2.0",
+ "version": "13.7.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.7.0.tgz",
+ "integrity": "sha512-iV/An3FEB/CiBGdjWHRtgskM4UuWPq5vjhjKsrQhdVU16dbKrBxA+eIV2HWA07B3tXUGM6eco1wkr42gxxV1BA==",
"dependencies": {
- "@discordjs/builders": "^0.11.0",
- "@discordjs/collection": "^0.4.0",
- "@sapphire/async-queue": "^1.1.9",
- "@types/node-fetch": "^2.5.12",
- "@types/ws": "^8.2.2",
- "discord-api-types": "^0.26.0",
+ "@discordjs/builders": "^0.13.0",
+ "@discordjs/collection": "^0.6.0",
+ "@sapphire/async-queue": "^1.3.1",
+ "@types/node-fetch": "^2.6.1",
+ "@types/ws": "^8.5.3",
+ "discord-api-types": "^0.30.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.4.0"
+ "ws": "^8.6.0"
},
"engines": {
"node": ">=16.6.0",
@@ -1716,11 +1729,9 @@
}
},
"node_modules/discord.js/node_modules/discord-api-types": {
- "version": "0.26.1",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
+ "version": "0.30.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.30.0.tgz",
+ "integrity": "sha512-wYst0jrT8EJs2tVlwUTQ2xT0oWMjUrRMpFTkNY3NMleWyQNHgWaKhqFfxdLPdC2im9IuR5EsxcEgjhf/npeftw=="
},
"node_modules/discord.js/node_modules/form-data": {
"version": "4.0.0",
@@ -1941,6 +1952,11 @@
"node": ">= 0.10.0"
}
},
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
"node_modules/fast-diff": {
"version": "1.2.0",
"dev": true,
@@ -4506,7 +4522,8 @@
},
"node_modules/ts-mixer": {
"version": "6.0.1",
- "license": "MIT"
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
+ "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
},
"node_modules/tsc-watch": {
"version": "5.0.2",
@@ -5106,8 +5123,9 @@
}
},
"node_modules/ws": {
- "version": "8.5.0",
- "license": "MIT",
+ "version": "8.7.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz",
+ "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==",
"engines": {
"node": ">=10.0.0"
},
@@ -5305,28 +5323,39 @@
}
},
"@discordjs/builders": {
- "version": "0.11.0",
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz",
+ "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==",
"requires": {
- "@sindresorhus/is": "^4.2.0",
- "discord-api-types": "^0.26.0",
- "ts-mixer": "^6.0.0",
- "tslib": "^2.3.1",
- "zod": "^3.11.6"
+ "@sapphire/shapeshift": "^2.0.0",
+ "@sindresorhus/is": "^4.6.0",
+ "discord-api-types": "^0.31.1",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.1",
+ "tslib": "^2.3.1"
},
"dependencies": {
"@sindresorhus/is": {
- "version": "4.6.0"
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
},
"discord-api-types": {
- "version": "0.26.1"
+ "version": "0.31.2",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz",
+ "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA=="
},
"tslib": {
- "version": "2.3.1"
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
}
}
},
"@discordjs/collection": {
- "version": "0.4.0"
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.6.0.tgz",
+ "integrity": "sha512-Ieaetb36l0nmAS5X9Upqk4W7euAO6FdXPxn3I8vBAKEcoIzEZI1mcVcPfCfagGJZSgBKpENnAnKkP4GAn+MV8w=="
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
@@ -5351,6 +5380,11 @@
"@sapphire/async-queue": {
"version": "1.3.1"
},
+ "@sapphire/shapeshift": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.2.0.tgz",
+ "integrity": "sha512-UEnKgMlQyI0yY/q+lCMX0VJft9y86IsesgbIQj6e62FBYSaMVr+IaMNpi4z45Q14VnuMACbK0yrbHISNqgUYcQ=="
+ },
"@silvia-odwyer/photon-node": {
"version": "0.3.1"
},
@@ -5462,7 +5496,9 @@
"version": "14.0.14"
},
"@types/node-fetch": {
- "version": "2.5.12",
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -6346,24 +6382,30 @@
}
},
"discord-api-types": {
- "version": "0.31.0"
+ "version": "0.33.1",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.1.tgz",
+ "integrity": "sha512-dc7Xzm3isROh77jdxikQnLzKDslOPORm2Q8odXrKgEy8Aqfd1r9ISVTU/xsHkH6bFo+Hjf1A1C5OnBtu8ghy4w=="
},
"discord.js": {
- "version": "13.6.0",
+ "version": "13.7.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.7.0.tgz",
+ "integrity": "sha512-iV/An3FEB/CiBGdjWHRtgskM4UuWPq5vjhjKsrQhdVU16dbKrBxA+eIV2HWA07B3tXUGM6eco1wkr42gxxV1BA==",
"requires": {
- "@discordjs/builders": "^0.11.0",
- "@discordjs/collection": "^0.4.0",
- "@sapphire/async-queue": "^1.1.9",
- "@types/node-fetch": "^2.5.12",
- "@types/ws": "^8.2.2",
- "discord-api-types": "^0.26.0",
+ "@discordjs/builders": "^0.13.0",
+ "@discordjs/collection": "^0.6.0",
+ "@sapphire/async-queue": "^1.3.1",
+ "@types/node-fetch": "^2.6.1",
+ "@types/ws": "^8.5.3",
+ "discord-api-types": "^0.30.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.4.0"
+ "ws": "^8.6.0"
},
"dependencies": {
"discord-api-types": {
- "version": "0.26.1"
+ "version": "0.30.0",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.30.0.tgz",
+ "integrity": "sha512-wYst0jrT8EJs2tVlwUTQ2xT0oWMjUrRMpFTkNY3NMleWyQNHgWaKhqFfxdLPdC2im9IuR5EsxcEgjhf/npeftw=="
},
"form-data": {
"version": "4.0.0",
@@ -6425,7 +6467,7 @@
},
"erlpack": {
"version": "git+ssh://git@github.com/discord/erlpack.git#3b793a333dd3f6a140b9168ea91e9fa9660753ce",
- "from": "erlpack@github:discord/erlpack.git",
+ "from": "erlpack@github:discord/erlpack",
"requires": {
"bindings": "^1.5.0",
"nan": "^2.15.0"
@@ -6513,6 +6555,11 @@
"vary": "~1.1.2"
}
},
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
"fast-diff": {
"version": "1.2.0",
"dev": true
@@ -8117,7 +8164,9 @@
"requires": {}
},
"ts-mixer": {
- "version": "6.0.1"
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
+ "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
},
"tsc-watch": {
"version": "5.0.2",
@@ -8491,7 +8540,9 @@
}
},
"ws": {
- "version": "8.5.0",
+ "version": "8.7.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz",
+ "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==",
"requires": {}
},
"xdg-basedir": {
diff --git a/backend/package.json b/backend/package.json
index fbdac67f..348492c9 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -28,8 +28,8 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.31.0",
- "discord.js": "^13.6.0",
+ "discord-api-types": "^0.33.1",
+ "discord.js": "^13.7.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
diff --git a/backend/src/plugins/InternalPoster/functions/editMessage.ts b/backend/src/plugins/InternalPoster/functions/editMessage.ts
index 79165a6d..a0fc7169 100644
--- a/backend/src/plugins/InternalPoster/functions/editMessage.ts
+++ b/backend/src/plugins/InternalPoster/functions/editMessage.ts
@@ -1,4 +1,11 @@
-import { Message, MessageOptions, NewsChannel, TextChannel, WebhookClient } from "discord.js";
+import {
+ Message,
+ MessageEditOptions,
+ NewsChannel,
+ TextChannel,
+ WebhookClient,
+ WebhookEditMessageOptions,
+} from "discord.js";
import { GuildPluginData } from "knub";
import { InternalPosterPluginType } from "../types";
import { isDiscordAPIError, noop } from "../../../utils";
@@ -9,7 +16,7 @@ import { isDiscordAPIError, noop } from "../../../utils";
export async function editMessage(
pluginData: GuildPluginData,
message: Message,
- content: MessageOptions,
+ content: MessageEditOptions & WebhookEditMessageOptions,
): Promise {
if (!(message.channel instanceof TextChannel || message.channel instanceof NewsChannel)) {
return;
diff --git a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts
index 9d050b3f..5e8e916a 100644
--- a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts
@@ -70,13 +70,13 @@ export async function getChannelInfoEmbed(
channelName = channel.name;
}
- const createdAt = moment.utc(channel.createdAt, "x");
+ const createdAt = moment.utc(channel.createdAt!, "x");
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
const tzCreatedAt = requestMemberId
? await timeAndDate.inMemberTz(requestMemberId, createdAt)
: timeAndDate.inGuildTz(createdAt);
const prettyCreatedAt = tzCreatedAt.format(timeAndDate.getDateFormat("pretty_datetime"));
- const channelAge = humanizeDuration(Date.now() - channel.createdTimestamp, {
+ const channelAge = humanizeDuration(Date.now() - channel.createdTimestamp!, {
largest: 2,
round: true,
});
@@ -134,8 +134,9 @@ export async function getChannelInfoEmbed(
const memberCount = thread.memberCount ?? thread.members.cache.size;
const owner = await thread.fetchOwner().catch(() => null);
const ownerMention = owner?.user ? verboseUserMention(owner.user) : "Unknown#0000";
- const autoArchiveDuration = thread.autoArchiveDuration === "MAX" ? 10080 : thread.autoArchiveDuration; // TODO: Boost level check
- const humanizedArchiveTime = `Archive duration: **${humanizeDuration((autoArchiveDuration ?? 0) * MINUTES)}**`;
+ const humanizedArchiveTime = `Archive duration: **${humanizeDuration(
+ (thread.autoArchiveDuration ?? 0) * MINUTES,
+ )}**`;
embed.fields.push({
name: preEmbedPadding + "Thread information",
From d67dee7cfdf3f6bddcebd5ca51ccf87c2cbdb69a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 19:30:29 +0300
Subject: [PATCH 049/190] chore: remove minor version from .nvmrc
---
.nvmrc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.nvmrc b/.nvmrc
index d925544b..b6a7d89c 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-16.6
+16
From 058643f3602a57b235cf50fc933e8abd061f6af5 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 19:38:56 +0300
Subject: [PATCH 050/190] fix: fix crash in AutoReactions if a message is
posted in an uncached thread
---
backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
index a7d762a2..88dbe99e 100644
--- a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
+++ b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
@@ -16,6 +16,11 @@ export const AddReactionsEvt = autoReactionsEvt({
allowSelf: true,
async listener({ pluginData, args: { message } }) {
+ const channel = await message.guild?.channels.fetch(message.channelId);
+ if (!channel) {
+ return;
+ }
+
let autoReaction: AutoReaction | null = null;
const lock = await pluginData.locks.acquire(`auto-reactions-${message.channel.id}`);
if (pluginData.state.cache.has(message.channel.id)) {
From ba7810380730f5ec2917608567d61f0594101b97 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 1 Jun 2022 19:49:14 +0300
Subject: [PATCH 051/190] fix: fix the fix
---
.../AutoReactions/events/AddReactionsEvt.ts | 20 +++++++++----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
index 88dbe99e..0818953c 100644
--- a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
+++ b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
@@ -22,12 +22,12 @@ export const AddReactionsEvt = autoReactionsEvt({
}
let autoReaction: AutoReaction | null = null;
- const lock = await pluginData.locks.acquire(`auto-reactions-${message.channel.id}`);
- if (pluginData.state.cache.has(message.channel.id)) {
- autoReaction = pluginData.state.cache.get(message.channel.id) ?? null;
+ const lock = await pluginData.locks.acquire(`auto-reactions-${channel.id}`);
+ if (pluginData.state.cache.has(channel.id)) {
+ autoReaction = pluginData.state.cache.get(channel.id) ?? null;
} else {
- autoReaction = (await pluginData.state.autoReactions.getForChannel(message.channel.id)) ?? null;
- pluginData.state.cache.set(message.channel.id, autoReaction);
+ autoReaction = (await pluginData.state.autoReactions.getForChannel(channel.id)) ?? null;
+ pluginData.state.cache.set(channel.id, autoReaction);
}
lock.unlock();
@@ -39,15 +39,13 @@ export const AddReactionsEvt = autoReactionsEvt({
if (me) {
const missingPermissions = getMissingChannelPermissions(
me,
- message.channel as GuildChannel,
+ channel as GuildChannel,
readChannelPermissions | p.ADD_REACTIONS,
);
if (missingPermissions) {
const logs = pluginData.getPlugin(LogsPlugin);
logs.logBotAlert({
- body: `Cannot apply auto-reactions in <#${message.channel.id}>. ${missingPermissionError(
- missingPermissions,
- )}`,
+ body: `Cannot apply auto-reactions in <#${channel.id}>. ${missingPermissionError(missingPermissions)}`,
});
return;
}
@@ -61,11 +59,11 @@ export const AddReactionsEvt = autoReactionsEvt({
const logs = pluginData.getPlugin(LogsPlugin);
if (e.code === 10008) {
logs.logBotAlert({
- body: `Could not apply auto-reactions in <#${message.channel.id}> for message \`${message.id}\`. Make sure nothing is deleting the message before the reactions are applied.`,
+ body: `Could not apply auto-reactions in <#${channel.id}> for message \`${message.id}\`. Make sure nothing is deleting the message before the reactions are applied.`,
});
} else {
logs.logBotAlert({
- body: `Could not apply auto-reactions in <#${message.channel.id}> for message \`${message.id}\`. Error code ${e.code}.`,
+ body: `Could not apply auto-reactions in <#${channel.id}> for message \`${message.id}\`. Error code ${e.code}.`,
});
}
From b05fbe1d04a2d27c95088bac271d44b40407bd26 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 13 Jun 2022 21:19:56 +0300
Subject: [PATCH 052/190] Update to discord.js v13.8.0, adding support for
text-in-voice
---
backend/package-lock.json | 110 +++++++-----------
backend/package.json | 2 +-
backend/src/commandTypes.ts | 10 +-
.../commands/NewAutoReactionsCmd.ts | 4 +-
.../AutoReactions/events/AddReactionsEvt.ts | 13 +--
backend/src/plugins/Automod/actions/alert.ts | 2 +-
backend/src/plugins/Automod/actions/reply.ts | 2 +-
.../functions/resolveActionContactMethods.ts | 2 +-
.../src/plugins/Censor/util/censorMessage.ts | 6 +-
.../Counters/commands/ViewCounterCmd.ts | 8 +-
.../getOrCreateWebhookClientForChannel.ts | 6 +-
.../functions/getOrCreateWebhookForChannel.ts | 13 ++-
.../InternalPoster/functions/sendMessage.ts | 21 +++-
.../plugins/Logs/logFunctions/logCensor.ts | 4 +-
.../Logs/logFunctions/logMessageDelete.ts | 4 +-
.../Logs/logFunctions/logMessageDeleteBare.ts | 4 +-
.../Logs/logFunctions/logMessageDeleteBulk.ts | 4 +-
.../Logs/logFunctions/logMessageEdit.ts | 4 +-
.../logFunctions/logPostedScheduledMessage.ts | 4 +-
.../Logs/logFunctions/logRepeatedMessage.ts | 4 +-
.../Logs/logFunctions/logScheduledMessage.ts | 4 +-
.../logScheduledRepeatedMessage.ts | 4 +-
backend/src/plugins/Logs/util/log.ts | 2 +-
.../plugins/Logs/util/onMessageDeleteBulk.ts | 8 +-
.../src/plugins/Logs/util/onMessageUpdate.ts | 6 +-
.../src/plugins/Mutes/functions/muteUser.ts | 7 +-
.../src/plugins/Post/util/actualPostCmd.ts | 12 +-
backend/src/plugins/Post/util/postMessage.ts | 12 +-
backend/src/utils.ts | 4 +-
backend/src/utils/canReadChannel.ts | 4 +-
.../src/utils/getMissingChannelPermissions.ts | 4 +-
backend/src/utils/resolveMessageTarget.ts | 6 +-
32 files changed, 151 insertions(+), 149 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index bae5e80a..6fc0547c 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -14,7 +14,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "^13.7.0",
+ "discord.js": "^13.8.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -124,16 +124,16 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz",
- "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==",
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
+ "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
"dependencies": {
- "@sapphire/shapeshift": "^2.0.0",
+ "@sapphire/shapeshift": "^3.1.0",
"@sindresorhus/is": "^4.6.0",
- "discord-api-types": "^0.31.1",
+ "discord-api-types": "^0.33.3",
"fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1",
- "tslib": "^2.3.1"
+ "tslib": "^2.4.0"
},
"engines": {
"node": ">=16.9.0"
@@ -150,20 +150,15 @@
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
- "node_modules/@discordjs/builders/node_modules/discord-api-types": {
- "version": "0.31.2",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz",
- "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA=="
- },
"node_modules/@discordjs/builders/node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
},
"node_modules/@discordjs/collection": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.6.0.tgz",
- "integrity": "sha512-Ieaetb36l0nmAS5X9Upqk4W7euAO6FdXPxn3I8vBAKEcoIzEZI1mcVcPfCfagGJZSgBKpENnAnKkP4GAn+MV8w==",
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
+ "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==",
"engines": {
"node": ">=16.9.0"
}
@@ -209,9 +204,9 @@
}
},
"node_modules/@sapphire/shapeshift": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.2.0.tgz",
- "integrity": "sha512-UEnKgMlQyI0yY/q+lCMX0VJft9y86IsesgbIQj6e62FBYSaMVr+IaMNpi4z45Q14VnuMACbK0yrbHISNqgUYcQ==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.1.0.tgz",
+ "integrity": "sha512-PkxFXd3QJ1qAPS05Dy2UkVGYPm/asF1Ugt2Xyzmv4DHzO3+G7l+873C4XFFcJ9M5Je+eCMC7SSifgPTSur5QuA==",
"engines": {
"node": ">=v15.0.0",
"npm": ">=7.0.0"
@@ -1704,35 +1699,30 @@
}
},
"node_modules/discord-api-types": {
- "version": "0.33.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.1.tgz",
- "integrity": "sha512-dc7Xzm3isROh77jdxikQnLzKDslOPORm2Q8odXrKgEy8Aqfd1r9ISVTU/xsHkH6bFo+Hjf1A1C5OnBtu8ghy4w=="
+ "version": "0.33.4",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.4.tgz",
+ "integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"node_modules/discord.js": {
- "version": "13.7.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.7.0.tgz",
- "integrity": "sha512-iV/An3FEB/CiBGdjWHRtgskM4UuWPq5vjhjKsrQhdVU16dbKrBxA+eIV2HWA07B3tXUGM6eco1wkr42gxxV1BA==",
+ "version": "13.8.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.0.tgz",
+ "integrity": "sha512-EPAA/2VLycYN5wSzavqa4iJ6qj3UtQFtHw5TH/60Fj29ymfEsCQVn//o1mTpwDxzwb+rPIrWhkxKIGGnjfv0Iw==",
"dependencies": {
- "@discordjs/builders": "^0.13.0",
- "@discordjs/collection": "^0.6.0",
+ "@discordjs/builders": "^0.14.0",
+ "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1",
"@types/node-fetch": "^2.6.1",
"@types/ws": "^8.5.3",
- "discord-api-types": "^0.30.0",
+ "discord-api-types": "^0.33.3",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.6.0"
+ "ws": "^8.7.0"
},
"engines": {
"node": ">=16.6.0",
"npm": ">=7.0.0"
}
},
- "node_modules/discord.js/node_modules/discord-api-types": {
- "version": "0.30.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.30.0.tgz",
- "integrity": "sha512-wYst0jrT8EJs2tVlwUTQ2xT0oWMjUrRMpFTkNY3NMleWyQNHgWaKhqFfxdLPdC2im9IuR5EsxcEgjhf/npeftw=="
- },
"node_modules/discord.js/node_modules/form-data": {
"version": "4.0.0",
"license": "MIT",
@@ -5323,16 +5313,16 @@
}
},
"@discordjs/builders": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.13.0.tgz",
- "integrity": "sha512-4L9y26KRNNU8Y7J78SRUN1Uhava9D8jfit/YqEaKi8gQRc7PdqKqk2poybo6RXaiyt/BgKYPfcjxT7WvzGfYCA==",
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
+ "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
"requires": {
- "@sapphire/shapeshift": "^2.0.0",
+ "@sapphire/shapeshift": "^3.1.0",
"@sindresorhus/is": "^4.6.0",
- "discord-api-types": "^0.31.1",
+ "discord-api-types": "^0.33.3",
"fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1",
- "tslib": "^2.3.1"
+ "tslib": "^2.4.0"
},
"dependencies": {
"@sindresorhus/is": {
@@ -5340,11 +5330,6 @@
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
"integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
},
- "discord-api-types": {
- "version": "0.31.2",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.31.2.tgz",
- "integrity": "sha512-gpzXTvFVg7AjKVVJFH0oJGC0q0tO34iJGSHZNz9u3aqLxlD6LfxEs9wWVVikJqn9gra940oUTaPFizCkRDcEiA=="
- },
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -5353,9 +5338,9 @@
}
},
"@discordjs/collection": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.6.0.tgz",
- "integrity": "sha512-Ieaetb36l0nmAS5X9Upqk4W7euAO6FdXPxn3I8vBAKEcoIzEZI1mcVcPfCfagGJZSgBKpENnAnKkP4GAn+MV8w=="
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
+ "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA=="
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
@@ -5381,9 +5366,9 @@
"version": "1.3.1"
},
"@sapphire/shapeshift": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-2.2.0.tgz",
- "integrity": "sha512-UEnKgMlQyI0yY/q+lCMX0VJft9y86IsesgbIQj6e62FBYSaMVr+IaMNpi4z45Q14VnuMACbK0yrbHISNqgUYcQ=="
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.1.0.tgz",
+ "integrity": "sha512-PkxFXd3QJ1qAPS05Dy2UkVGYPm/asF1Ugt2Xyzmv4DHzO3+G7l+873C4XFFcJ9M5Je+eCMC7SSifgPTSur5QuA=="
},
"@silvia-odwyer/photon-node": {
"version": "0.3.1"
@@ -6382,31 +6367,26 @@
}
},
"discord-api-types": {
- "version": "0.33.1",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.1.tgz",
- "integrity": "sha512-dc7Xzm3isROh77jdxikQnLzKDslOPORm2Q8odXrKgEy8Aqfd1r9ISVTU/xsHkH6bFo+Hjf1A1C5OnBtu8ghy4w=="
+ "version": "0.33.4",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.4.tgz",
+ "integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"discord.js": {
- "version": "13.7.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.7.0.tgz",
- "integrity": "sha512-iV/An3FEB/CiBGdjWHRtgskM4UuWPq5vjhjKsrQhdVU16dbKrBxA+eIV2HWA07B3tXUGM6eco1wkr42gxxV1BA==",
+ "version": "13.8.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.0.tgz",
+ "integrity": "sha512-EPAA/2VLycYN5wSzavqa4iJ6qj3UtQFtHw5TH/60Fj29ymfEsCQVn//o1mTpwDxzwb+rPIrWhkxKIGGnjfv0Iw==",
"requires": {
- "@discordjs/builders": "^0.13.0",
- "@discordjs/collection": "^0.6.0",
+ "@discordjs/builders": "^0.14.0",
+ "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1",
"@types/node-fetch": "^2.6.1",
"@types/ws": "^8.5.3",
- "discord-api-types": "^0.30.0",
+ "discord-api-types": "^0.33.3",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
- "ws": "^8.6.0"
+ "ws": "^8.7.0"
},
"dependencies": {
- "discord-api-types": {
- "version": "0.30.0",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.30.0.tgz",
- "integrity": "sha512-wYst0jrT8EJs2tVlwUTQ2xT0oWMjUrRMpFTkNY3NMleWyQNHgWaKhqFfxdLPdC2im9IuR5EsxcEgjhf/npeftw=="
- },
"form-data": {
"version": "4.0.0",
"requires": {
diff --git a/backend/package.json b/backend/package.json
index 348492c9..4761ec2e 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -29,7 +29,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "^13.7.0",
+ "discord.js": "^13.8.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
diff --git a/backend/src/commandTypes.ts b/backend/src/commandTypes.ts
index e3f1ece3..75c6225c 100644
--- a/backend/src/commandTypes.ts
+++ b/backend/src/commandTypes.ts
@@ -1,4 +1,4 @@
-import { GuildChannel, GuildMember, Snowflake, Util, User } from "discord.js";
+import { GuildChannel, GuildMember, Snowflake, Util, User, GuildTextBasedChannel } from "discord.js";
import { baseCommandParameterTypeHelpers, baseTypeConverters, CommandContext, TypeConversionError } from "knub";
import { createTypeHelper } from "knub-command-manager";
import {
@@ -14,6 +14,8 @@ import {
import { isValidTimezone } from "./utils/isValidTimezone";
import { MessageTarget, resolveMessageTarget } from "./utils/resolveMessageTarget";
import { inputPatternToRegExp } from "./validatorUtils";
+import { getChannelId } from "knub/dist/utils";
+import { disableCodeBlocks } from "knub/dist/helpers";
export const commandTypes = {
...baseTypeConverters,
@@ -100,6 +102,11 @@ export const commandTypes = {
return value;
},
+
+ guildTextBasedChannel(value: string, context: CommandContext) {
+ // FIXME: Remove once Knub's types have been fixed
+ return baseTypeConverters.textChannel(value, context) as GuildTextBasedChannel;
+ },
};
export const commandTypeHelpers = {
@@ -113,4 +120,5 @@ export const commandTypeHelpers = {
anyId: createTypeHelper>(commandTypes.anyId),
regex: createTypeHelper(commandTypes.regex),
timezone: createTypeHelper(commandTypes.timezone),
+ guildTextBasedChannel: createTypeHelper(commandTypes.guildTextBasedChannel),
};
diff --git a/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts b/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
index 1ab5e123..17b377b2 100644
--- a/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
+++ b/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
@@ -15,7 +15,7 @@ export const NewAutoReactionsCmd = autoReactionsCmd({
usage: "!auto_reactions 629990160477585428 👍 👎",
signature: {
- channel: ct.channel(),
+ channel: ct.guildTextBasedChannel(),
reactions: ct.string({ rest: true }),
},
@@ -23,7 +23,7 @@ export const NewAutoReactionsCmd = autoReactionsCmd({
const finalReactions: string[] = [];
const me = pluginData.guild.members.cache.get(pluginData.client.user!.id)!;
- const missingPermissions = getMissingChannelPermissions(me, args.channel as GuildChannel, requiredPermissions);
+ const missingPermissions = getMissingChannelPermissions(me, args.channel, requiredPermissions);
if (missingPermissions) {
sendErrorMessage(
pluginData,
diff --git a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
index 0818953c..a959cdcf 100644
--- a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
+++ b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
@@ -1,4 +1,4 @@
-import { GuildChannel, Permissions } from "discord.js";
+import { GuildChannel, GuildTextBasedChannel, Permissions } from "discord.js";
import { LogType } from "../../../data/LogType";
import { isDiscordAPIError } from "../../../utils";
import { getMissingChannelPermissions } from "../../../utils/getMissingChannelPermissions";
@@ -16,7 +16,10 @@ export const AddReactionsEvt = autoReactionsEvt({
allowSelf: true,
async listener({ pluginData, args: { message } }) {
- const channel = await message.guild?.channels.fetch(message.channelId);
+ const channel = (await message.guild?.channels.fetch(message.channelId)) as
+ | GuildTextBasedChannel
+ | null
+ | undefined;
if (!channel) {
return;
}
@@ -37,11 +40,7 @@ export const AddReactionsEvt = autoReactionsEvt({
const me = pluginData.guild.members.cache.get(pluginData.client.user!.id)!;
if (me) {
- const missingPermissions = getMissingChannelPermissions(
- me,
- channel as GuildChannel,
- readChannelPermissions | p.ADD_REACTIONS,
- );
+ const missingPermissions = getMissingChannelPermissions(me, channel, readChannelPermissions | p.ADD_REACTIONS);
if (missingPermissions) {
const logs = pluginData.getPlugin(LogsPlugin);
logs.logBotAlert({
diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts
index 7c96dea5..8bfce04d 100644
--- a/backend/src/plugins/Automod/actions/alert.ts
+++ b/backend/src/plugins/Automod/actions/alert.ts
@@ -38,7 +38,7 @@ export const AlertAction = automodAction({
const channel = pluginData.guild.channels.cache.get(actionConfig.channel as Snowflake);
const logs = pluginData.getPlugin(LogsPlugin);
- if (channel && channel instanceof TextChannel) {
+ if (channel?.isText()) {
const text = actionConfig.text;
const theMessageLink =
contexts[0].message && messageLink(pluginData.guild.id, contexts[0].message.channel_id, contexts[0].message.id);
diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts
index 52aa491d..865ef127 100644
--- a/backend/src/plugins/Automod/actions/reply.ts
+++ b/backend/src/plugins/Automod/actions/reply.ts
@@ -36,7 +36,7 @@ export const ReplyAction = automodAction({
.filter((c) => c.message?.channel_id)
.filter((c) => {
const channel = pluginData.guild.channels.cache.get(c.message!.channel_id as Snowflake);
- return channel instanceof TextChannel || channel instanceof ThreadChannel;
+ return channel?.isText();
});
const contextsByChannelId = contextsWithTextChannels.reduce((map: Map, context) => {
diff --git a/backend/src/plugins/Automod/functions/resolveActionContactMethods.ts b/backend/src/plugins/Automod/functions/resolveActionContactMethods.ts
index 5ac49703..9576d149 100644
--- a/backend/src/plugins/Automod/functions/resolveActionContactMethods.ts
+++ b/backend/src/plugins/Automod/functions/resolveActionContactMethods.ts
@@ -19,7 +19,7 @@ export function resolveActionContactMethods(
}
const channel = pluginData.guild.channels.cache.get(actionConfig.notifyChannel as Snowflake);
- if (!(channel instanceof TextChannel || channel instanceof ThreadChannel)) {
+ if (!channel?.isText()) {
throw new RecoverablePluginError(ERRORS.INVALID_USER_NOTIFICATION_CHANNEL);
}
diff --git a/backend/src/plugins/Censor/util/censorMessage.ts b/backend/src/plugins/Censor/util/censorMessage.ts
index a9549974..6375da79 100644
--- a/backend/src/plugins/Censor/util/censorMessage.ts
+++ b/backend/src/plugins/Censor/util/censorMessage.ts
@@ -1,4 +1,4 @@
-import { BaseGuildTextChannel, Snowflake, TextChannel, ThreadChannel } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, Snowflake, TextChannel, ThreadChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { SavedMessage } from "../../../data/entities/SavedMessage";
@@ -22,9 +22,7 @@ export async function censorMessage(
}
const user = await resolveUser(pluginData.client, savedMessage.user_id);
- const channel = pluginData.guild.channels.resolve(savedMessage.channel_id as Snowflake)! as
- | BaseGuildTextChannel
- | ThreadChannel;
+ const channel = pluginData.guild.channels.resolve(savedMessage.channel_id as Snowflake)! as GuildTextBasedChannel;
pluginData.getPlugin(LogsPlugin).logCensor({
user,
diff --git a/backend/src/plugins/Counters/commands/ViewCounterCmd.ts b/backend/src/plugins/Counters/commands/ViewCounterCmd.ts
index 26a2fe7c..9a4cbca5 100644
--- a/backend/src/plugins/Counters/commands/ViewCounterCmd.ts
+++ b/backend/src/plugins/Counters/commands/ViewCounterCmd.ts
@@ -20,17 +20,17 @@ export const ViewCounterCmd = typedGuildCommand()({
},
{
counterName: ct.string(),
- channel: ct.textChannel(),
+ channel: ct.guildTextBasedChannel(),
},
{
counterName: ct.string(),
- channel: ct.textChannel(),
+ channel: ct.guildTextBasedChannel(),
user: ct.resolvedUser(),
},
{
counterName: ct.string(),
user: ct.resolvedUser(),
- channel: ct.textChannel(),
+ channel: ct.guildTextBasedChannel(),
},
],
@@ -68,7 +68,7 @@ export const ViewCounterCmd = typedGuildCommand()({
}
const potentialChannel = pluginData.guild.channels.resolve(reply.content as Snowflake);
- if (!potentialChannel || !(potentialChannel instanceof TextChannel)) {
+ if (!potentialChannel?.isText()) {
sendErrorMessage(pluginData, message.channel, "Channel is not a text channel, cancelling");
return;
}
diff --git a/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookClientForChannel.ts b/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookClientForChannel.ts
index cc582495..aea1523c 100644
--- a/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookClientForChannel.ts
+++ b/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookClientForChannel.ts
@@ -1,11 +1,11 @@
import { GuildPluginData } from "knub";
import { InternalPosterPluginType } from "../types";
-import { NewsChannel, TextChannel, WebhookClient } from "discord.js";
-import { getOrCreateWebhookForChannel } from "./getOrCreateWebhookForChannel";
+import { WebhookClient } from "discord.js";
+import { getOrCreateWebhookForChannel, WebhookableChannel } from "./getOrCreateWebhookForChannel";
export async function getOrCreateWebhookClientForChannel(
pluginData: GuildPluginData,
- channel: TextChannel | NewsChannel,
+ channel: WebhookableChannel,
): Promise {
if (!pluginData.state.webhookClientCache.has(channel.id)) {
const webhookInfo = await getOrCreateWebhookForChannel(pluginData, channel);
diff --git a/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookForChannel.ts b/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookForChannel.ts
index 8acd2887..9785271e 100644
--- a/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookForChannel.ts
+++ b/backend/src/plugins/InternalPoster/functions/getOrCreateWebhookForChannel.ts
@@ -1,17 +1,20 @@
import { GuildPluginData } from "knub";
import { InternalPosterPluginType } from "../types";
-import { NewsChannel, Permissions, TextChannel } from "discord.js";
+import { AnyChannel, GuildChannel, MessageManager, NewsChannel, Permissions, TextChannel } from "discord.js";
import { isDiscordAPIError } from "../../../utils";
type WebhookInfo = [id: string, token: string];
+export type WebhookableChannel = Extract any }>;
+
+export function channelIsWebhookable(channel: AnyChannel): channel is WebhookableChannel {
+ return "createWebhook" in channel;
+}
+
export async function getOrCreateWebhookForChannel(
pluginData: GuildPluginData,
- channel: TextChannel | NewsChannel,
+ channel: WebhookableChannel,
): Promise {
- // tslint:disable-next-line:no-console FIXME: Here for debugging purposes
- console.log(`getOrCreateWebhookForChannel(${channel.id})`);
-
// Database cache
const fromDb = await pluginData.state.webhooks.findByChannelId(channel.id);
if (fromDb) {
diff --git a/backend/src/plugins/InternalPoster/functions/sendMessage.ts b/backend/src/plugins/InternalPoster/functions/sendMessage.ts
index bc52ac05..283cc3dc 100644
--- a/backend/src/plugins/InternalPoster/functions/sendMessage.ts
+++ b/backend/src/plugins/InternalPoster/functions/sendMessage.ts
@@ -1,7 +1,7 @@
-import { Message, MessageOptions, NewsChannel, TextChannel, WebhookClient } from "discord.js";
+import { GuildTextBasedChannel, Message, MessageOptions, NewsChannel, TextChannel, WebhookClient } from "discord.js";
import { GuildPluginData } from "knub";
import { InternalPosterPluginType } from "../types";
-import { getOrCreateWebhookForChannel } from "./getOrCreateWebhookForChannel";
+import { channelIsWebhookable, getOrCreateWebhookForChannel } from "./getOrCreateWebhookForChannel";
import { APIMessage } from "discord-api-types";
import { isDiscordAPIError } from "../../../utils";
import { getOrCreateWebhookClientForChannel } from "./getOrCreateWebhookClientForChannel";
@@ -12,7 +12,7 @@ export type InternalPosterMessageResult = {
};
async function sendDirectly(
- channel: TextChannel | NewsChannel,
+ channel: GuildTextBasedChannel,
content: MessageOptions,
): Promise {
return channel.send(content).then((message) => ({
@@ -26,17 +26,26 @@ async function sendDirectly(
*/
export async function sendMessage(
pluginData: GuildPluginData,
- channel: TextChannel | NewsChannel,
+ channel: GuildTextBasedChannel,
content: MessageOptions,
): Promise {
return pluginData.state.queue.add(async () => {
- const webhookClient = await getOrCreateWebhookClientForChannel(pluginData, channel);
+ let webhookClient: WebhookClient | null = null;
+ let threadId: string | undefined;
+ if (channelIsWebhookable(channel)) {
+ webhookClient = await getOrCreateWebhookClientForChannel(pluginData, channel);
+ } else if (channel.isThread() && channelIsWebhookable(channel.parent!)) {
+ webhookClient = await getOrCreateWebhookClientForChannel(pluginData, channel.parent!);
+ threadId = channel.id;
+ }
+
if (!webhookClient) {
return sendDirectly(channel, content);
}
return webhookClient
.send({
+ threadId,
...content,
...(pluginData.client.user && {
username: pluginData.client.user.username,
@@ -50,7 +59,7 @@ export async function sendMessage(
.catch(async (err) => {
// Unknown Webhook
if (isDiscordAPIError(err) && err.code === 10015) {
- await pluginData.state.webhooks.delete(webhookClient.id);
+ await pluginData.state.webhooks.delete(webhookClient!.id);
pluginData.state.webhookClientCache.delete(channel.id);
// Fallback to regular message for this log message
diff --git a/backend/src/plugins/Logs/logFunctions/logCensor.ts b/backend/src/plugins/Logs/logFunctions/logCensor.ts
index 2385273f..b0131657 100644
--- a/backend/src/plugins/Logs/logFunctions/logCensor.ts
+++ b/backend/src/plugins/Logs/logFunctions/logCensor.ts
@@ -3,7 +3,7 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import {
channelToTemplateSafeChannel,
savedMessageToTemplateSafeSavedMessage,
@@ -15,7 +15,7 @@ import { deactivateMentions, disableCodeBlocks } from "knub/dist/helpers";
interface LogCensorData {
user: User | UnknownUser;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
reason: string;
message: SavedMessage;
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
index 1b752866..6a2d642c 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
@@ -3,7 +3,7 @@ import { FORMAT_NO_TIMESTAMP, LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import {
channelToTemplateSafeChannel,
savedMessageToTemplateSafeSavedMessage,
@@ -16,7 +16,7 @@ import { UnknownUser, useMediaUrls } from "../../../utils";
interface LogMessageDeleteData {
user: User | UnknownUser;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
message: SavedMessage;
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
index 6b980951..ed49d3e4 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
@@ -3,12 +3,12 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
interface LogMessageDeleteBareData {
messageId: string;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
}
export function logMessageDeleteBare(pluginData: GuildPluginData, data: LogMessageDeleteBareData) {
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
index 01f38279..b57b526b 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
@@ -3,13 +3,13 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
interface LogMessageDeleteBulkData {
count: number;
authorIds: string[];
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
archiveUrl: string;
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts b/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
index a77ce103..3aee8dbe 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
@@ -3,7 +3,7 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import {
channelToTemplateSafeChannel,
savedMessageToTemplateSafeSavedMessage,
@@ -14,7 +14,7 @@ import { UnknownUser } from "../../../utils";
interface LogMessageEditData {
user: User | UnknownUser;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
before: SavedMessage;
after: SavedMessage;
}
diff --git a/backend/src/plugins/Logs/logFunctions/logPostedScheduledMessage.ts b/backend/src/plugins/Logs/logFunctions/logPostedScheduledMessage.ts
index 52aa83ca..3000a906 100644
--- a/backend/src/plugins/Logs/logFunctions/logPostedScheduledMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logPostedScheduledMessage.ts
@@ -3,12 +3,12 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
interface LogPostedScheduledMessageData {
author: User;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
messageId: string;
}
diff --git a/backend/src/plugins/Logs/logFunctions/logRepeatedMessage.ts b/backend/src/plugins/Logs/logFunctions/logRepeatedMessage.ts
index d17b5a55..7502b6ce 100644
--- a/backend/src/plugins/Logs/logFunctions/logRepeatedMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logRepeatedMessage.ts
@@ -3,12 +3,12 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
interface LogRepeatedMessageData {
author: User;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
datetime: string;
date: string;
time: string;
diff --git a/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts b/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
index 27408798..54315e6f 100644
--- a/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
@@ -3,12 +3,12 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
interface LogScheduledMessageData {
author: User;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
datetime: string;
date: string;
time: string;
diff --git a/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts b/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
index 55d24df3..03272f5f 100644
--- a/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
@@ -3,12 +3,12 @@ import { LogsPluginType } from "../types";
import { LogType } from "../../../data/LogType";
import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
-import { BaseGuildTextChannel, ThreadChannel, User } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
interface LogScheduledRepeatedMessageData {
author: User;
- channel: BaseGuildTextChannel | ThreadChannel;
+ channel: GuildTextBasedChannel;
datetime: string;
date: string;
time: string;
diff --git a/backend/src/plugins/Logs/util/log.ts b/backend/src/plugins/Logs/util/log.ts
index 37fca40a..f95e1f07 100644
--- a/backend/src/plugins/Logs/util/log.ts
+++ b/backend/src/plugins/Logs/util/log.ts
@@ -83,7 +83,7 @@ export async function log(
logChannelLoop: for (const [channelId, opts] of Object.entries(logChannels)) {
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
- if (!channel || !(channel instanceof TextChannel)) continue;
+ if (!channel?.isText()) continue;
if (pluginData.state.channelCooldowns.isOnCooldown(channelId)) continue;
if (opts.include?.length && !opts.include.includes(typeStr)) continue;
if (opts.exclude && opts.exclude.includes(typeStr)) continue;
diff --git a/backend/src/plugins/Logs/util/onMessageDeleteBulk.ts b/backend/src/plugins/Logs/util/onMessageDeleteBulk.ts
index 1dec0101..36ad96f1 100644
--- a/backend/src/plugins/Logs/util/onMessageDeleteBulk.ts
+++ b/backend/src/plugins/Logs/util/onMessageDeleteBulk.ts
@@ -1,4 +1,4 @@
-import { BaseGuildTextChannel, Snowflake, ThreadChannel } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, Snowflake, ThreadChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { LogType } from "../../../data/LogType";
@@ -12,9 +12,9 @@ export async function onMessageDeleteBulk(pluginData: GuildPluginData `\`${item.user_id}\``)));
diff --git a/backend/src/plugins/Logs/util/onMessageUpdate.ts b/backend/src/plugins/Logs/util/onMessageUpdate.ts
index efd92d28..13d611ed 100644
--- a/backend/src/plugins/Logs/util/onMessageUpdate.ts
+++ b/backend/src/plugins/Logs/util/onMessageUpdate.ts
@@ -1,4 +1,4 @@
-import { BaseGuildTextChannel, MessageEmbed, Snowflake, ThreadChannel } from "discord.js";
+import { BaseGuildTextChannel, GuildTextBasedChannel, MessageEmbed, Snowflake, ThreadChannel } from "discord.js";
import { GuildPluginData } from "knub";
import cloneDeep from "lodash.clonedeep";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
@@ -49,9 +49,7 @@ export async function onMessageUpdate(
}
const user = await resolveUser(pluginData.client, savedMessage.user_id);
- const channel = pluginData.guild.channels.resolve(savedMessage.channel_id as Snowflake)! as
- | BaseGuildTextChannel
- | ThreadChannel;
+ const channel = pluginData.guild.channels.resolve(savedMessage.channel_id as Snowflake)! as GuildTextBasedChannel;
logMessageEdit(pluginData, {
user,
diff --git a/backend/src/plugins/Mutes/functions/muteUser.ts b/backend/src/plugins/Mutes/functions/muteUser.ts
index 68908e30..3956be8a 100644
--- a/backend/src/plugins/Mutes/functions/muteUser.ts
+++ b/backend/src/plugins/Mutes/functions/muteUser.ts
@@ -183,9 +183,10 @@ export async function muteUser(
}
const useChannel = existingMute ? config.message_on_update : config.message_on_mute;
- const channel =
- config.message_channel && pluginData.guild.channels.cache.get(config.message_channel as Snowflake);
- if (useChannel && channel instanceof TextChannel) {
+ const channel = config.message_channel
+ ? pluginData.guild.channels.cache.get(config.message_channel as Snowflake)
+ : null;
+ if (useChannel && channel?.isText()) {
contactMethods.push({ type: "channel", channel });
}
}
diff --git a/backend/src/plugins/Post/util/actualPostCmd.ts b/backend/src/plugins/Post/util/actualPostCmd.ts
index 054f655c..a63b1312 100644
--- a/backend/src/plugins/Post/util/actualPostCmd.ts
+++ b/backend/src/plugins/Post/util/actualPostCmd.ts
@@ -1,4 +1,4 @@
-import { Channel, Message, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
+import { Channel, GuildTextBasedChannel, Message, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
import humanizeDuration from "humanize-duration";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
@@ -20,7 +20,7 @@ const MAX_REPEAT_UNTIL = moment.utc().add(100, "years");
export async function actualPostCmd(
pluginData: GuildPluginData,
msg: Message,
- targetChannel: Channel,
+ targetChannel: GuildTextBasedChannel,
content: StrictMessageContent,
opts: {
"enable-mentions"?: boolean;
@@ -30,12 +30,8 @@ export async function actualPostCmd(
"repeat-times"?: number;
} = {},
) {
- if (
- !(targetChannel instanceof TextChannel) &&
- !(targetChannel instanceof NewsChannel) &&
- !(targetChannel instanceof ThreadChannel)
- ) {
- msg.channel.send(errorMessage("Specified channel is not a text channel, announcement channel, or thread"));
+ if (!targetChannel.isText()) {
+ msg.channel.send(errorMessage("Specified channel is not a text-based channel"));
return;
}
diff --git a/backend/src/plugins/Post/util/postMessage.ts b/backend/src/plugins/Post/util/postMessage.ts
index 0395867c..4a10f809 100644
--- a/backend/src/plugins/Post/util/postMessage.ts
+++ b/backend/src/plugins/Post/util/postMessage.ts
@@ -1,4 +1,12 @@
-import { Message, MessageAttachment, MessageOptions, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
+import {
+ GuildTextBasedChannel,
+ Message,
+ MessageAttachment,
+ MessageOptions,
+ NewsChannel,
+ TextChannel,
+ ThreadChannel,
+} from "discord.js";
import fs from "fs";
import { GuildPluginData } from "knub";
import { downloadFile } from "../../../utils";
@@ -9,7 +17,7 @@ const fsp = fs.promises;
export async function postMessage(
pluginData: GuildPluginData,
- channel: TextChannel | NewsChannel | ThreadChannel,
+ channel: GuildTextBasedChannel,
content: MessageOptions,
attachments: MessageAttachment[] = [],
enableMentions: boolean = false,
diff --git a/backend/src/utils.ts b/backend/src/utils.ts
index fb505743..e90c38e0 100644
--- a/backend/src/utils.ts
+++ b/backend/src/utils.ts
@@ -6,8 +6,10 @@ import {
Guild,
GuildAuditLogs,
GuildAuditLogsEntry,
+ GuildBasedChannel,
GuildChannel,
GuildMember,
+ GuildTextBasedChannel,
Invite,
InviteGuild,
LimitedCollection,
@@ -1085,7 +1087,7 @@ export type CustomEmoji = {
id: string;
} & Emoji;
-export type UserNotificationMethod = { type: "dm" } | { type: "channel"; channel: TextChannel | ThreadChannel };
+export type UserNotificationMethod = { type: "dm" } | { type: "channel"; channel: GuildTextBasedChannel };
export const disableUserNotificationStrings = ["no", "none", "off"];
diff --git a/backend/src/utils/canReadChannel.ts b/backend/src/utils/canReadChannel.ts
index 94268c4b..043a72d2 100644
--- a/backend/src/utils/canReadChannel.ts
+++ b/backend/src/utils/canReadChannel.ts
@@ -1,8 +1,8 @@
-import { GuildChannel, GuildMember } from "discord.js";
+import { GuildMember, GuildTextBasedChannel } from "discord.js";
import { getMissingChannelPermissions } from "./getMissingChannelPermissions";
import { readChannelPermissions } from "./readChannelPermissions";
-export function canReadChannel(channel: GuildChannel, member: GuildMember) {
+export function canReadChannel(channel: GuildTextBasedChannel, member: GuildMember) {
// Not missing permissions required to read the channel = can read channel
return !getMissingChannelPermissions(member, channel, readChannelPermissions);
}
diff --git a/backend/src/utils/getMissingChannelPermissions.ts b/backend/src/utils/getMissingChannelPermissions.ts
index a1a7be9a..25f1e9e7 100644
--- a/backend/src/utils/getMissingChannelPermissions.ts
+++ b/backend/src/utils/getMissingChannelPermissions.ts
@@ -1,4 +1,4 @@
-import { GuildChannel, GuildMember, ThreadChannel } from "discord.js";
+import { GuildMember, GuildTextBasedChannel } from "discord.js";
import { getMissingPermissions } from "./getMissingPermissions";
/**
@@ -7,7 +7,7 @@ import { getMissingPermissions } from "./getMissingPermissions";
*/
export function getMissingChannelPermissions(
member: GuildMember,
- channel: GuildChannel | ThreadChannel,
+ channel: GuildTextBasedChannel,
requiredPermissions: number | bigint,
): bigint {
const memberChannelPermissions = channel.permissionsFor(member.id);
diff --git a/backend/src/utils/resolveMessageTarget.ts b/backend/src/utils/resolveMessageTarget.ts
index a7c3043c..4b24b779 100644
--- a/backend/src/utils/resolveMessageTarget.ts
+++ b/backend/src/utils/resolveMessageTarget.ts
@@ -1,4 +1,4 @@
-import { Snowflake, TextChannel } from "discord.js";
+import { GuildTextBasedChannel, Snowflake, TextChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { getChannelIdFromMessageId } from "../data/getChannelIdFromMessageId";
import { isSnowflake } from "../utils";
@@ -7,7 +7,7 @@ const channelAndMessageIdRegex = /^(\d+)[\-\/](\d+)$/;
const messageLinkRegex = /^https:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/\d+\/(\d+)\/(\d+)$/i;
export interface MessageTarget {
- channel: TextChannel;
+ channel: GuildTextBasedChannel;
messageId: string;
}
@@ -47,7 +47,7 @@ export async function resolveMessageTarget(pluginData: GuildPluginData, val
}
const channel = pluginData.guild.channels.resolve(result.channelId as Snowflake);
- if (!channel || !(channel instanceof TextChannel)) {
+ if (!channel?.isText()) {
return null;
}
From d60d2bc568952941ce3bfc9580cfe0d6b0ab445e Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Tue, 14 Jun 2022 01:31:45 +0300
Subject: [PATCH 053/190] fix: fix crash when unloading reminders plugin
without running afterLoad()
---
backend/src/plugins/Reminders/RemindersPlugin.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/Reminders/RemindersPlugin.ts b/backend/src/plugins/Reminders/RemindersPlugin.ts
index 67a97035..62f6b29a 100644
--- a/backend/src/plugins/Reminders/RemindersPlugin.ts
+++ b/backend/src/plugins/Reminders/RemindersPlugin.ts
@@ -56,7 +56,7 @@ export const RemindersPlugin = zeppelinGuildPlugin()({
},
beforeUnload(pluginData) {
- pluginData.state.unregisterGuildEventListener();
+ pluginData.state.unregisterGuildEventListener?.();
pluginData.state.unloaded = true;
},
});
From 662d9cda26da008614739e31b718df154503ec8f Mon Sep 17 00:00:00 2001
From: almeidx
Date: Tue, 14 Jun 2022 18:23:36 +0100
Subject: [PATCH 054/190] fix: no response if user only has hidden cases in
`!cases @user`
---
backend/src/plugins/ModActions/commands/CasesUserCmd.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts
index 90023026..c6646711 100644
--- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts
+++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts
@@ -67,6 +67,12 @@ export const CasesUserCmd = modActionsCmd({
msg.channel.send(`No cases found for **${userName}**`);
} else {
const casesToDisplay = args.hidden ? cases : normalCases;
+ if (!casesToDisplay.length) {
+ msg.channel.send(
+ `No normal cases found for **${userName}**. Use "-hidden" to show ${cases.length} hidden cases.`,
+ );
+ return;
+ }
if (args.expand) {
if (casesToDisplay.length > 8) {
From d60c29e5a308e5c1b7d9e33446690911fc14c541 Mon Sep 17 00:00:00 2001
From: Dark <7890309+DarkView@users.noreply.github.com>
Date: Wed, 15 Jun 2022 13:40:40 +0200
Subject: [PATCH 055/190] Fix "Server voice muted" being true even if
self-muted, misleading mods
Instead split the options into all four, from mute and deaf to selfMute, selfDeaf, serverMute and serverDeaf.
This should provide a lot more clarity.
---
.../src/plugins/Utility/functions/getUserInfoEmbed.ts | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
index e775205c..6a2443fd 100644
--- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
+++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts
@@ -10,6 +10,7 @@ import {
resolveMember,
resolveUser,
sorter,
+ trimEmptyLines,
trimLines,
UnknownUser,
} from "../../../utils";
@@ -124,10 +125,12 @@ export async function getUserInfoEmbed(
if (voiceChannel || member.voice.mute || member.voice.deaf) {
embed.fields.push({
name: preEmbedPadding + "Voice information",
- value: trimLines(`
+ value: trimEmptyLines(`
${voiceChannel ? `Current voice channel: **${voiceChannel.name ?? "None"}**` : ""}
- ${member.voice.mute ? "Server voice muted: **Yes**" : ""}
- ${member.voice.deaf ? "Server voice deafened: **Yes**" : ""}
+ ${member.voice.serverMute ? "Server-muted: **Yes**" : ""}
+ ${member.voice.serverDeaf ? "Server-deafened: **Yes**" : ""}
+ ${member.voice.selfMute ? "Self-muted: **Yes**" : ""}
+ ${member.voice.selfDeaf ? "Self-deafened: **Yes**" : ""}
`),
});
}
From 5c0d607af383dbfd1be1908a2ad885e76d67dbdc Mon Sep 17 00:00:00 2001
From: Jonah Lawrence
Date: Tue, 21 Jun 2022 21:43:59 -0600
Subject: [PATCH 056/190] feat: Tag list search and improved readability
---
.../src/plugins/Tags/commands/TagListCmd.ts | 36 +++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/backend/src/plugins/Tags/commands/TagListCmd.ts b/backend/src/plugins/Tags/commands/TagListCmd.ts
index c50baaa5..4bc4691e 100644
--- a/backend/src/plugins/Tags/commands/TagListCmd.ts
+++ b/backend/src/plugins/Tags/commands/TagListCmd.ts
@@ -1,3 +1,4 @@
+import { commandTypeHelpers as ct } from "../../../commandTypes";
import { createChunkedMessage } from "../../../utils";
import { tagsCmd } from "../types";
@@ -5,7 +6,11 @@ export const TagListCmd = tagsCmd({
trigger: ["tag list", "tags", "taglist"],
permission: "can_list",
- async run({ message: msg, pluginData }) {
+ signature: {
+ search: ct.string({ required: false }),
+ },
+
+ async run({ message: msg, args, pluginData }) {
const tags = await pluginData.state.tags.all();
if (tags.length === 0) {
msg.channel.send(`No tags created yet! Use \`tag create\` command to create one.`);
@@ -15,6 +20,33 @@ export const TagListCmd = tagsCmd({
const prefix = (await pluginData.config.getForMessage(msg)).prefix;
const tagNames = tags.map((tag) => tag.tag).sort();
- createChunkedMessage(msg.channel, `Available tags (use with ${prefix}tag): \`\`\`${tagNames.join(", ")}\`\`\``);
+ const filteredTags = args.search
+ ? tagNames.filter((tag) =>
+ new RegExp(
+ args.search
+ .split("")
+ .map((char) => char.replace(/[.*+?^${}()|[\]\\]/, "\\$&"))
+ .join(".*")
+ ).test(tag)
+ )
+ : tagNames;
+
+ const tagGroups = filteredTags.reduce((acc, tag) => {
+ const obj = { ...acc };
+ const tagUpper = tag.toUpperCase();
+ const key = /[A-Z]/.test(tagUpper[0]) ? tagUpper[0] : "#";
+ if (!(key in obj)) {
+ obj[key] = [];
+ }
+ obj[key].push(tag);
+ return obj;
+ }, {});
+
+ const tagList = Object.keys(tagGroups)
+ .sort()
+ .map((key) => `[${key}] ${tagGroups[key].join(", ")}`)
+ .join("\n");
+
+ createChunkedMessage(msg.channel, `Available tags (use with ${prefix}tag): \`\`\`${tagList}\`\`\``);
},
});
From 7fb0d02adfd44a1e7a9bc9df282d11f61f4c7bfa Mon Sep 17 00:00:00 2001
From: Almeida
Date: Sun, 26 Jun 2022 12:09:27 +0100
Subject: [PATCH 057/190] fix discord-api-types imports & usage of removed
guild features (#335)
---
.../plugins/Automod/actions/startThread.ts | 28 ++++++++-----------
.../plugins/Automod/triggers/threadArchive.ts | 2 +-
.../plugins/Automod/triggers/threadCreate.ts | 2 +-
.../plugins/Automod/triggers/threadDelete.ts | 2 +-
.../Automod/triggers/threadUnarchive.ts | 2 +-
.../InternalPoster/functions/sendMessage.ts | 5 ++--
6 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts
index 0fead10b..943f9be6 100644
--- a/backend/src/plugins/Automod/actions/startThread.ts
+++ b/backend/src/plugins/Automod/actions/startThread.ts
@@ -1,4 +1,4 @@
-import { GuildFeature, ThreadAutoArchiveDuration } from "discord-api-types";
+import { GuildFeature, ThreadAutoArchiveDuration } from "discord-api-types/v9";
import { TextChannel } from "discord.js";
import * as t from "io-ts";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
@@ -7,6 +7,13 @@ import { convertDelayStringToMS, MINUTES, noop, tDelayString, tNullable } from "
import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { automodAction } from "../helpers";
+const validThreadAutoArchiveDurations: ThreadAutoArchiveDuration[] = [
+ ThreadAutoArchiveDuration.OneHour,
+ ThreadAutoArchiveDuration.OneDay,
+ ThreadAutoArchiveDuration.ThreeDays,
+ ThreadAutoArchiveDuration.OneWeek,
+];
+
export const StartThreadAction = automodAction({
configType: t.type({
name: tNullable(t.string),
@@ -41,22 +48,9 @@ export const StartThreadAction = automodAction({
const archiveSet = actionConfig.auto_archive
? Math.ceil(Math.max(convertDelayStringToMS(actionConfig.auto_archive) ?? 0, 0) / MINUTES)
: ThreadAutoArchiveDuration.OneDay;
- let autoArchive: ThreadAutoArchiveDuration;
- if (archiveSet === ThreadAutoArchiveDuration.OneDay) {
- autoArchive = ThreadAutoArchiveDuration.OneDay;
- } else if (
- archiveSet === ThreadAutoArchiveDuration.ThreeDays &&
- guild.features.includes(GuildFeature.ThreeDayThreadArchive)
- ) {
- autoArchive = ThreadAutoArchiveDuration.ThreeDays;
- } else if (
- archiveSet === ThreadAutoArchiveDuration.OneWeek &&
- guild.features.includes(GuildFeature.SevenDayThreadArchive)
- ) {
- autoArchive = ThreadAutoArchiveDuration.OneWeek;
- } else {
- autoArchive = ThreadAutoArchiveDuration.OneHour;
- }
+ const autoArchive = validThreadAutoArchiveDurations.includes(archiveSet)
+ ? (archiveSet as ThreadAutoArchiveDuration)
+ : ThreadAutoArchiveDuration.OneHour;
for (const threadContext of threads) {
const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id) as TextChannel;
diff --git a/backend/src/plugins/Automod/triggers/threadArchive.ts b/backend/src/plugins/Automod/triggers/threadArchive.ts
index 40cd43df..d4ed631b 100644
--- a/backend/src/plugins/Automod/triggers/threadArchive.ts
+++ b/backend/src/plugins/Automod/triggers/threadArchive.ts
@@ -1,4 +1,4 @@
-import { Snowflake } from "discord-api-types";
+import { Snowflake } from "discord-api-types/v9";
import { User, Util } from "discord.js";
import * as t from "io-ts";
import { tNullable } from "../../../utils";
diff --git a/backend/src/plugins/Automod/triggers/threadCreate.ts b/backend/src/plugins/Automod/triggers/threadCreate.ts
index f4bc7e7a..c0ae6ad3 100644
--- a/backend/src/plugins/Automod/triggers/threadCreate.ts
+++ b/backend/src/plugins/Automod/triggers/threadCreate.ts
@@ -1,4 +1,4 @@
-import { Snowflake } from "discord-api-types";
+import { Snowflake } from "discord-api-types/v9";
import { User, Util } from "discord.js";
import * as t from "io-ts";
import { automodTrigger } from "../helpers";
diff --git a/backend/src/plugins/Automod/triggers/threadDelete.ts b/backend/src/plugins/Automod/triggers/threadDelete.ts
index 988ee752..cecb5862 100644
--- a/backend/src/plugins/Automod/triggers/threadDelete.ts
+++ b/backend/src/plugins/Automod/triggers/threadDelete.ts
@@ -1,4 +1,4 @@
-import { Snowflake } from "discord-api-types";
+import { Snowflake } from "discord-api-types/v9";
import { User, Util } from "discord.js";
import * as t from "io-ts";
import { automodTrigger } from "../helpers";
diff --git a/backend/src/plugins/Automod/triggers/threadUnarchive.ts b/backend/src/plugins/Automod/triggers/threadUnarchive.ts
index 05e729f1..ce3adf81 100644
--- a/backend/src/plugins/Automod/triggers/threadUnarchive.ts
+++ b/backend/src/plugins/Automod/triggers/threadUnarchive.ts
@@ -1,4 +1,4 @@
-import { Snowflake } from "discord-api-types";
+import { Snowflake } from "discord-api-types/v9";
import { User, Util } from "discord.js";
import * as t from "io-ts";
import { tNullable } from "../../../utils";
diff --git a/backend/src/plugins/InternalPoster/functions/sendMessage.ts b/backend/src/plugins/InternalPoster/functions/sendMessage.ts
index 283cc3dc..3afa9614 100644
--- a/backend/src/plugins/InternalPoster/functions/sendMessage.ts
+++ b/backend/src/plugins/InternalPoster/functions/sendMessage.ts
@@ -1,8 +1,7 @@
-import { GuildTextBasedChannel, Message, MessageOptions, NewsChannel, TextChannel, WebhookClient } from "discord.js";
+import { GuildTextBasedChannel, MessageOptions, WebhookClient } from "discord.js";
import { GuildPluginData } from "knub";
import { InternalPosterPluginType } from "../types";
-import { channelIsWebhookable, getOrCreateWebhookForChannel } from "./getOrCreateWebhookForChannel";
-import { APIMessage } from "discord-api-types";
+import { channelIsWebhookable } from "./getOrCreateWebhookForChannel";
import { isDiscordAPIError } from "../../../utils";
import { getOrCreateWebhookClientForChannel } from "./getOrCreateWebhookClientForChannel";
From 3773d659cc1d773920b7b66498b3f75165bbd192 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 14:34:54 +0300
Subject: [PATCH 058/190] Consolidate .env files. More work on dev containers.
---
.env.example | 25 +++++++---
backend/src/api/auth.ts | 27 +++--------
backend/src/api/index.ts | 4 +-
backend/src/api/loadEnv.ts | 4 --
backend/src/api/start.ts | 5 +-
backend/src/data/Phisherman.ts | 3 +-
backend/src/env.ts | 44 ++++++++++++++++++
backend/src/index.ts | 10 +---
backend/src/loadEnv.ts | 4 --
backend/src/plugins/Automod/actions/clean.ts | 17 +------
backend/src/staff.ts | 4 +-
backend/src/utils/crypt.ts | 13 ++----
dashboard/webpack.config.js | 2 +-
docker/development/devenv/Dockerfile | 17 +++++--
docker/development/docker-compose.yml | 48 ++++++++++++--------
docker/development/nginx/Dockerfile | 10 ++--
docker/development/nginx/default.conf | 6 ++-
17 files changed, 137 insertions(+), 106 deletions(-)
delete mode 100644 backend/src/api/loadEnv.ts
create mode 100644 backend/src/env.ts
delete mode 100644 backend/src/loadEnv.ts
diff --git a/.env.example b/.env.example
index 917a8d65..8d8052b9 100644
--- a/.env.example
+++ b/.env.example
@@ -1,4 +1,4 @@
-ENCRYPTION_KEY=32_character_encryption_key
+KEY=32_character_encryption_key
CLIENT_ID=
CLIENT_SECRET=
@@ -7,26 +7,37 @@ BOT_TOKEN=
OAUTH_CALLBACK_URL=
DASHBOARD_DOMAIN=
API_DOMAIN=
-PORT=443
+API_PORT=3000
+
+#
+# DOCKER (DEVELOPMENT)
+#
+
+DOCKER_WEB_PORT=443
# The MySQL database running in the container is exposed to the host on this port,
# allowing access with database tools such as DBeaver
-MYSQL_PORT=3001
+DOCKER_MYSQL_PORT=3001
# Password for the Zeppelin database user
-MYSQL_PASSWORD=
+DOCKER_MYSQL_PASSWORD=
# Password for the MySQL root user
-MYSQL_ROOT_PASSWORD=
+DOCKER_MYSQL_ROOT_PASSWORD=
# The development environment container has an SSH server that you can connect to.
# This is the port that server is exposed to the host on.
-DEVELOPMENT_SSH_PORT=3002
+DOCKER_DEV_SSH_PORT=3002
+DOCKER_DEV_SSH_PASSWORD=password
# Only required if relevant feature is used
#PHISHERMAN_API_KEY=
+#
+# PRODUCTION
+#
+
# In production, the newest code is pulled from a repository
# Specify that repository URL here
-PRODUCTION_REPOSITORY=https://github.com/ZeppelinBot/Zeppelin.git
+#PRODUCTION_REPOSITORY=https://github.com/ZeppelinBot/Zeppelin.git
# You only need to set these if you're running an external database.
# In a standard setup, the database is run in a docker container.
diff --git a/backend/src/api/auth.ts b/backend/src/api/auth.ts
index c1d19b09..09029bda 100644
--- a/backend/src/api/auth.ts
+++ b/backend/src/api/auth.ts
@@ -9,6 +9,7 @@ import { ApiPermissionAssignments } from "../data/ApiPermissionAssignments";
import { ApiUserInfo } from "../data/ApiUserInfo";
import { ApiUserInfoData } from "../data/entities/ApiUserInfo";
import { ok } from "./responses";
+import { env } from "../env";
interface IPassportApiUser {
apiKey: string;
@@ -54,22 +55,6 @@ function simpleDiscordAPIRequest(bearerToken, path): Promise {
export function initAuth(app: express.Express) {
app.use(passport.initialize());
- if (!process.env.CLIENT_ID) {
- throw new Error("Auth: CLIENT ID missing");
- }
-
- if (!process.env.CLIENT_SECRET) {
- throw new Error("Auth: CLIENT SECRET missing");
- }
-
- if (!process.env.OAUTH_CALLBACK_URL) {
- throw new Error("Auth: OAUTH CALLBACK URL missing");
- }
-
- if (!process.env.DASHBOARD_URL) {
- throw new Error("DASHBOARD_URL missing!");
- }
-
passport.serializeUser((user, done) => done(null, user));
passport.deserializeUser((user, done) => done(null, user));
@@ -101,9 +86,9 @@ export function initAuth(app: express.Express) {
{
authorizationURL: "https://discord.com/api/oauth2/authorize",
tokenURL: "https://discord.com/api/oauth2/token",
- clientID: process.env.CLIENT_ID,
- clientSecret: process.env.CLIENT_SECRET,
- callbackURL: process.env.OAUTH_CALLBACK_URL,
+ clientID: env.CLIENT_ID,
+ clientSecret: env.CLIENT_SECRET,
+ callbackURL: env.OAUTH_CALLBACK_URL,
scope: ["identify"],
},
async (accessToken, refreshToken, profile, cb) => {
@@ -132,9 +117,9 @@ export function initAuth(app: express.Express) {
passport.authenticate("oauth2", { failureRedirect: "/", session: false }),
(req: Request, res: Response) => {
if (req.user && req.user.apiKey) {
- res.redirect(`${process.env.DASHBOARD_URL}/login-callback/?apiKey=${req.user.apiKey}`);
+ res.redirect(`https://${env.DASHBOARD_DOMAIN}/login-callback/?apiKey=${req.user.apiKey}`);
} else {
- res.redirect(`${process.env.DASHBOARD_URL}/login-callback/?error=noAccess`);
+ res.redirect(`https://${env.DASHBOARD_DOMAIN}/login-callback/?error=noAccess`);
}
},
);
diff --git a/backend/src/api/index.ts b/backend/src/api/index.ts
index cd2ae878..e8ed699a 100644
--- a/backend/src/api/index.ts
+++ b/backend/src/api/index.ts
@@ -1,8 +1,8 @@
import { connect } from "../data/db";
import { setIsAPI } from "../globals";
-import "./loadEnv";
+import { apiEnv } from "./loadApiEnv";
-if (!process.env.KEY) {
+if (!apiEnv.KEY) {
// tslint:disable-next-line:no-console
console.error("Project root .env with KEY is required!");
process.exit(1);
diff --git a/backend/src/api/loadEnv.ts b/backend/src/api/loadEnv.ts
deleted file mode 100644
index 0bbc5063..00000000
--- a/backend/src/api/loadEnv.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import path from "path";
-
-require("dotenv").config({ path: path.resolve(process.cwd(), "../.env") });
-require("dotenv").config({ path: path.resolve(process.cwd(), "api.env") });
diff --git a/backend/src/api/start.ts b/backend/src/api/start.ts
index 8089dac0..27d982ab 100644
--- a/backend/src/api/start.ts
+++ b/backend/src/api/start.ts
@@ -8,12 +8,13 @@ import { initGuildsAPI } from "./guilds/index";
import { clientError, error, notFound } from "./responses";
import { startBackgroundTasks } from "./tasks";
import multer from "multer";
+import { env } from "../env";
const app = express();
app.use(
cors({
- origin: process.env.DASHBOARD_URL,
+ origin: `https://${env.DASHBOARD_DOMAIN}`,
}),
);
app.use(
@@ -48,7 +49,7 @@ app.use((req, res, next) => {
return notFound(res);
});
-const port = (process.env.PORT && parseInt(process.env.PORT, 10)) || 3000;
+const port = env.API_PORT;
app.listen(port, "0.0.0.0", () => console.log(`API server listening on port ${port}`)); // tslint:disable-line
startBackgroundTasks();
diff --git a/backend/src/data/Phisherman.ts b/backend/src/data/Phisherman.ts
index 9ab1ef00..2f7b90fc 100644
--- a/backend/src/data/Phisherman.ts
+++ b/backend/src/data/Phisherman.ts
@@ -6,9 +6,10 @@ import { DAYS, DBDateFormat, HOURS, MINUTES } from "../utils";
import moment from "moment-timezone";
import { PhishermanKeyCacheEntry } from "./entities/PhishermanKeyCacheEntry";
import crypto from "crypto";
+import { env } from "../env";
const API_URL = "https://api.phisherman.gg";
-const MASTER_API_KEY = process.env.PHISHERMAN_API_KEY;
+const MASTER_API_KEY = env.PHISHERMAN_API_KEY;
let caughtDomainTrackingMap: Map> = new Map();
diff --git a/backend/src/env.ts b/backend/src/env.ts
new file mode 100644
index 00000000..4698d9b3
--- /dev/null
+++ b/backend/src/env.ts
@@ -0,0 +1,44 @@
+import path from "path";
+import fs from "fs";
+import dotenv from "dotenv";
+import { rootDir } from "./paths";
+import { z } from "zod";
+
+const envType = z.object({
+ KEY: z.string().length(32),
+
+ CLIENT_ID: z.string(),
+ CLIENT_SECRET: z.string(),
+ BOT_TOKEN: z.string(),
+
+ OAUTH_CALLBACK_URL: z.string().url(),
+ DASHBOARD_DOMAIN: z.string(),
+ API_DOMAIN: z.string(),
+
+ STAFF: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
+
+ PHISHERMAN_API_KEY: z.string().optional(),
+
+ API_PORT: z.number().min(1).max(65535),
+
+ DOCKER_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
+
+ DB_HOST: z.string().optional().default("mysql"),
+ DB_PORT: z.number().optional().default(3306),
+ DB_USER: z.string().optional().default("zeppelin"),
+ DB_PASSWORD: z.string().optional(), // Default is set to DOCKER_MYSQL_PASSWORD further below
+ DB_DATABASE: z.string().optional().default("zeppelin"),
+});
+
+let toValidate = {};
+const envPath = path.join(rootDir, "../.env");
+if (fs.existsSync(envPath)) {
+ const buf = fs.readFileSync(envPath);
+ toValidate = dotenv.parse(buf);
+}
+
+export const env = envType.parse(toValidate);
+
+if (env.DOCKER_MYSQL_PASSWORD && !env.DB_PASSWORD) {
+ env.DB_PASSWORD = env.DOCKER_MYSQL_PASSWORD;
+}
diff --git a/backend/src/index.ts b/backend/src/index.ts
index f5438991..31b2c0a8 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -10,7 +10,6 @@ import { connect } from "./data/db";
import { GuildLogs } from "./data/GuildLogs";
import { LogType } from "./data/LogType";
import { DiscordJSError } from "./DiscordJSError";
-import "./loadEnv";
import { logger } from "./logger";
import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins";
import { RecoverablePluginError } from "./RecoverablePluginError";
@@ -37,12 +36,7 @@ import { runPhishermanCacheCleanupLoop, runPhishermanReportingLoop } from "./dat
import { hasPhishermanMasterAPIKey } from "./data/Phisherman";
import { consumeQueryStats } from "./data/queryLogger";
import { EventEmitter } from "events";
-
-if (!process.env.KEY) {
- // tslint:disable-next-line:no-console
- console.error("Project root .env with KEY is required!");
- process.exit(1);
-}
+import { env } from "./env";
// Error handling
let recentPluginErrors = 0;
@@ -413,5 +407,5 @@ connect().then(async () => {
bot.initialize();
logger.info("Bot Initialized");
logger.info("Logging in...");
- await client.login(process.env.TOKEN);
+ await client.login(env.BOT_TOKEN);
});
diff --git a/backend/src/loadEnv.ts b/backend/src/loadEnv.ts
deleted file mode 100644
index d0991965..00000000
--- a/backend/src/loadEnv.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import path from "path";
-
-require("dotenv").config({ path: path.resolve(process.cwd(), "../.env") });
-require("dotenv").config({ path: path.resolve(process.cwd(), "bot.env") });
diff --git a/backend/src/plugins/Automod/actions/clean.ts b/backend/src/plugins/Automod/actions/clean.ts
index 56452d79..27ee1cb6 100644
--- a/backend/src/plugins/Automod/actions/clean.ts
+++ b/backend/src/plugins/Automod/actions/clean.ts
@@ -4,8 +4,6 @@ import { LogType } from "../../../data/LogType";
import { noop } from "../../../utils";
import { automodAction } from "../helpers";
-const cleanDebugServer = process.env.TEMP_CLEAN_DEBUG_SERVER;
-
export const CleanAction = automodAction({
configType: t.boolean,
defaultConfig: false,
@@ -29,26 +27,13 @@ export const CleanAction = automodAction({
}
}
- if (pluginData.guild.id === cleanDebugServer) {
- const toDeleteFormatted = Array.from(messageIdsToDeleteByChannelId.entries())
- .map(([channelId, messageIds]) => `- ${channelId}: ${messageIds.join(", ")}`)
- .join("\n");
- // tslint:disable-next-line:no-console
- console.log(`[DEBUG] Cleaning messages (${ruleName}):\n${toDeleteFormatted}`);
- }
-
for (const [channelId, messageIds] of messageIdsToDeleteByChannelId.entries()) {
for (const id of messageIds) {
pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id);
}
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel;
- await channel.bulkDelete(messageIds as Snowflake[]).catch((err) => {
- if (pluginData.guild.id === cleanDebugServer) {
- // tslint:disable-next-line:no-console
- console.error(`[DEBUG] Failed to bulk delete messages (${ruleName}): ${err}`);
- }
- });
+ await channel.bulkDelete(messageIds as Snowflake[]).catch(noop);
}
},
});
diff --git a/backend/src/staff.ts b/backend/src/staff.ts
index 7c14f0b6..6950ee33 100644
--- a/backend/src/staff.ts
+++ b/backend/src/staff.ts
@@ -1,6 +1,8 @@
+import { env } from "./env";
+
/**
* Zeppelin staff have full access to the dashboard
*/
export function isStaff(userId: string) {
- return (process.env.STAFF ?? "").split(",").includes(userId);
+ return (env.STAFF ?? []).includes(userId);
}
diff --git a/backend/src/utils/crypt.ts b/backend/src/utils/crypt.ts
index bba4c09a..d6208f1c 100644
--- a/backend/src/utils/crypt.ts
+++ b/backend/src/utils/crypt.ts
@@ -1,21 +1,14 @@
import { spawn, Worker, Pool } from "threads";
-import "../loadEnv";
import type { CryptFns } from "./cryptWorker";
import { MINUTES } from "../utils";
+import { env } from "../env";
-if (!process.env.KEY) {
- // tslint:disable-next-line:no-console
- console.error("Environment value KEY required for encryption");
- process.exit(1);
-}
-
-const KEY = process.env.KEY;
const pool = Pool(() => spawn(new Worker("./cryptWorker"), { timeout: 10 * MINUTES }), 8);
export async function encrypt(data: string) {
- return pool.queue((w) => w.encrypt(data, KEY));
+ return pool.queue((w) => w.encrypt(data, env.KEY));
}
export async function decrypt(data: string) {
- return pool.queue((w) => w.decrypt(data, KEY));
+ return pool.queue((w) => w.decrypt(data, env.KEY));
}
diff --git a/dashboard/webpack.config.js b/dashboard/webpack.config.js
index e4b78765..7fb9f221 100644
--- a/dashboard/webpack.config.js
+++ b/dashboard/webpack.config.js
@@ -1,4 +1,4 @@
-require("dotenv").config();
+require("dotenv").config({ path: path.resolve(process.cwd(), "../.env") });
const path = require("path");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
diff --git a/docker/development/devenv/Dockerfile b/docker/development/devenv/Dockerfile
index 95e3e128..ac278942 100644
--- a/docker/development/devenv/Dockerfile
+++ b/docker/development/devenv/Dockerfile
@@ -1,18 +1,27 @@
FROM ubuntu:20.04
ARG DOCKER_UID
+ARG DOCKER_DEV_SSH_PASSWORD
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
+# Set up some core packages
+RUN apt-get update
+RUN apt-get install -y sudo git curl
+
# Set up SSH access
-RUN apt-get update && apt-get install -y openssh-server sudo git
+RUN apt-get install -y openssh-server iptables
RUN mkdir /var/run/sshd
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u "${DOCKER_UID}" ubuntu
-RUN echo 'ubuntu:password' | chpasswd
+RUN echo "ubuntu:${DOCKER_DEV_SSH_PASSWORD}" | chpasswd
-# Install Node.js 16
+# Set up proper permissions for volumes
+RUN mkdir -p /home/ubuntu/zeppelin /home/ubuntu/.vscode-remote /home/ubuntu/.vscode-server /home/ubuntu/.cache/JetBrains
+RUN chown -R ubuntu /home/ubuntu
+
+# Install Node.js 16 and packages needed to build native packages
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
-RUN apt-get install -y nodejs
+RUN apt-get install -y nodejs gcc g++ make python3
CMD /usr/sbin/sshd -D -e
diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml
index c5721914..351cf21d 100644
--- a/docker/development/docker-compose.yml
+++ b/docker/development/docker-compose.yml
@@ -1,28 +1,33 @@
version: '3'
+volumes:
+ mysql-data: {}
+ vscode-remote: {}
+ vscode-server: {}
+ jetbrains-data: {}
services:
-# nginx:
-# user: "${UID:?Missing UID}:${GID:?Missing GID}"
-# build:
-# context: ./nginx
-# args:
-# API_DOMAIN: ${API_DOMAIN:?Missing API_DOMAIN}
-# API_PORT: ${API_PORT:?Missing API_PORT}
-# DASHBOARD_DOMAIN: ${DASHBOARD_DOMAIN:?Missing DASHBOARD_DOMAIN}
-# DASHBOARD_PORT: ${DASHBOARD_PORT:?Missing DASHBOARD_PORT}
-# ports:
-# - ${PORT:?Missing PORT}:443
-# volumes:
-# - ./:/zeppelin
-#
+ nginx:
+ build:
+ context: ./nginx
+ args:
+ API_DOMAIN: ${API_DOMAIN:?Missing API_DOMAIN}
+ API_PORT: ${API_PORT:?Missing API_PORT}
+ DASHBOARD_DOMAIN: ${DASHBOARD_DOMAIN:?Missing DASHBOARD_DOMAIN}
+ ports:
+ - ${DOCKER_WEB_PORT:?Missing DOCKER_WEB_PORT}:443
+ volumes:
+ - ../../:/zeppelin
+
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD?:Missing MYSQL_ROOT_PASSWORD}
+ MYSQL_ROOT_PASSWORD: ${DOCKER_MYSQL_ROOT_PASSWORD?:Missing DOCKER_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: zeppelin
MYSQL_USER: zeppelin
- MYSQL_PASSWORD: ${MYSQL_PASSWORD?:Missing MYSQL_PASSWORD}
+ MYSQL_PASSWORD: ${DOCKER_MYSQL_PASSWORD?:Missing DOCKER_MYSQL_PASSWORD}
ports:
- - ${MYSQL_PORT:?Missing MYSQL_PORT}:3306
+ - ${DOCKER_MYSQL_PORT:?Missing DOCKER_MYSQL_PORT}:3306
+ volumes:
+ - mysql-data:/var/lib/mysql
#
# backend:
# image: node:16
@@ -50,7 +55,12 @@ services:
args:
DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
DOCKER_GID: ${DOCKER_GID:?Missing DOCKER_GID}
+ DOCKER_DEV_SSH_PASSWORD: ${DOCKER_DEV_SSH_PASSWORD:?Missing DOCKER_DEV_SSH_PASSWORD}
ports:
- - "${DEVELOPMENT_SSH_PORT:?Missing DEVELOPMENT_SSH_PORT}:22"
+ - "${DOCKER_DEV_SSH_PORT:?Missing DOCKER_DEV_SSH_PORT}:22"
volumes:
- - ../../:/zeppelin
+ - ../../:/home/ubuntu/zeppelin
+ - ~/.ssh:/home/ubuntu/.ssh
+ - vscode-remote:/home/ubuntu/.vscode-remote
+ - vscode-server:/home/ubuntu/.vscode-server
+ - jetbrains-data:/home/ubuntu/.cache/JetBrains
diff --git a/docker/development/nginx/Dockerfile b/docker/development/nginx/Dockerfile
index 7058f8b0..2f63ba2f 100644
--- a/docker/development/nginx/Dockerfile
+++ b/docker/development/nginx/Dockerfile
@@ -2,11 +2,13 @@ FROM nginx
ARG API_DOMAIN
ARG DASHBOARD_DOMAIN
+ARG API_PORT
RUN apt-get update && apt-get install -y openssl
-RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/api-cert.key -out /etc/ssl/certs/api-cert.pem -days 365 -subj '/CN=*.${API_DOMAIN}' -nodes
-RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/dashboard-cert.key -out /etc/ssl/certs/dashboard-cert.pem -days 365 -subj '/CN=*.${DASHBOARD_DOMAIN}' -nodes
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/api-cert.key -out /etc/ssl/certs/api-cert.pem -days 3650 -subj '/CN=*.${API_DOMAIN}' -nodes
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/dashboard-cert.key -out /etc/ssl/certs/dashboard-cert.pem -days 3650 -subj '/CN=*.${DASHBOARD_DOMAIN}' -nodes
COPY ./default.conf /etc/nginx/conf.d/default.conf
-RUN sed -ir "s/_API_DOMAIN_/$(echo ${API_DOMAIN} | sed -ir 's///g')/g"
-RUN sed -ir "s/_DASHBOARD_DOMAIN_/$(echo ${DASHBOARD_DOMAIN} | sed 's/\./\\\\./g')/g"
+RUN sed -ir "s/_API_DOMAIN_/$(echo ${API_DOMAIN} | sed 's/\./\\./g')/g" /etc/nginx/conf.d/default.conf
+RUN sed -ir "s/_DASHBOARD_DOMAIN_/$(echo ${DASHBOARD_DOMAIN} | sed 's/\./\\./g')/g" /etc/nginx/conf.d/default.conf
+RUN sed -ir "s/_API_PORT_/${API_PORT}/g" /etc/nginx/conf.d/default.conf
diff --git a/docker/development/nginx/default.conf b/docker/development/nginx/default.conf
index 6aea2aeb..126df16b 100644
--- a/docker/development/nginx/default.conf
+++ b/docker/development/nginx/default.conf
@@ -4,7 +4,9 @@ server {
server_name _API_DOMAIN_;
location / {
- proxy_pass backend:3000;
+ # Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
+ set $backend_upstream devenv;
+ proxy_pass http://$backend_upstream:_API_PORT_;
client_max_body_size 200M;
}
@@ -23,7 +25,7 @@ server {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
- server_name dashboard.dev.zeppelin.gg;
+ server_name _DASHBOARD_DOMAIN_;
root /zeppelin/dashboard/dist;
From acbeddf11c7c7fa70194d8e13cfe5c35c2638047 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 14:37:37 +0300
Subject: [PATCH 059/190] Fix old/broken env import
---
backend/src/api/index.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/api/index.ts b/backend/src/api/index.ts
index e8ed699a..75bcea5e 100644
--- a/backend/src/api/index.ts
+++ b/backend/src/api/index.ts
@@ -1,8 +1,8 @@
import { connect } from "../data/db";
import { setIsAPI } from "../globals";
-import { apiEnv } from "./loadApiEnv";
+import { env } from "../env";
-if (!apiEnv.KEY) {
+if (!env.KEY) {
// tslint:disable-next-line:no-console
console.error("Project root .env with KEY is required!");
process.exit(1);
From 12274a84b27b26d36208f000f07d5c17a3f5b186 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 14:41:31 +0300
Subject: [PATCH 060/190] Fix .env number validation errors
---
backend/src/env.ts | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/backend/src/env.ts b/backend/src/env.ts
index 4698d9b3..13cbbdb7 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -19,19 +19,22 @@ const envType = z.object({
PHISHERMAN_API_KEY: z.string().optional(),
- API_PORT: z.number().min(1).max(65535),
+ API_PORT: z.preprocess((v) => Number(v), z.number().min(1).max(65535)),
DOCKER_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
DB_HOST: z.string().optional().default("mysql"),
- DB_PORT: z.number().optional().default(3306),
+ DB_PORT: z
+ .preprocess((v) => Number(v), z.number())
+ .optional()
+ .default(3306),
DB_USER: z.string().optional().default("zeppelin"),
DB_PASSWORD: z.string().optional(), // Default is set to DOCKER_MYSQL_PASSWORD further below
DB_DATABASE: z.string().optional().default("zeppelin"),
});
let toValidate = {};
-const envPath = path.join(rootDir, "../.env");
+const envPath = path.join(rootDir, ".env");
if (fs.existsSync(envPath)) {
const buf = fs.readFileSync(envPath);
toValidate = dotenv.parse(buf);
From e760654c544bb54626d404448f0eb0ffa45b0a1a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:01:54 +0300
Subject: [PATCH 061/190] Use mysql_native_password for dev database zeppelin
user
---
docker/development/docker-compose.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml
index 351cf21d..10c3caf1 100644
--- a/docker/development/docker-compose.yml
+++ b/docker/development/docker-compose.yml
@@ -28,6 +28,7 @@ services:
- ${DOCKER_MYSQL_PORT:?Missing DOCKER_MYSQL_PORT}:3306
volumes:
- mysql-data:/var/lib/mysql
+ command: --authentication-policy=mysql_native_password
#
# backend:
# image: node:16
From 6b44027eb4a0b77a0373f87ededcf6b2527a9dfa Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:02:34 +0300
Subject: [PATCH 062/190] Fix error when compiling ormconfig
---
backend/ormconfig.js | 35 ++++++++++-------------------------
backend/src/data/db.ts | 6 +++++-
backend/src/env.ts | 6 +++---
backend/tsconfig.json | 2 +-
4 files changed, 19 insertions(+), 30 deletions(-)
diff --git a/backend/ormconfig.js b/backend/ormconfig.js
index c62e60c1..f49cfb58 100644
--- a/backend/ormconfig.js
+++ b/backend/ormconfig.js
@@ -1,38 +1,23 @@
const fs = require("fs");
const path = require("path");
const pkgUp = require("pkg-up");
-
-const closestPackageJson = pkgUp.sync();
-if (!closestPackageJson) {
- throw new Error("Could not find project root from ormconfig.js");
-}
-const backendRoot = path.dirname(closestPackageJson);
-
-try {
- fs.accessSync(path.resolve(backendRoot, "bot.env"));
- require("dotenv").config({ path: path.resolve(backendRoot, "bot.env") });
-} catch {
- try {
- fs.accessSync(path.resolve(backendRoot, "api.env"));
- require("dotenv").config({ path: path.resolve(backendRoot, "api.env") });
- } catch {
- throw new Error("bot.env or api.env required");
- }
-}
+const { backendDir } = require("./dist/backend/src/paths");
+const { env } = require("./dist/backend/src/env");
const moment = require("moment-timezone");
moment.tz.setDefault("UTC");
-const entities = path.relative(process.cwd(), path.resolve(backendRoot, "dist/backend/src/data/entities/*.js"));
-const migrations = path.relative(process.cwd(), path.resolve(backendRoot, "dist/backend/src/migrations/*.js"));
-const migrationsDir = path.relative(process.cwd(), path.resolve(backendRoot, "src/migrations"));
+const entities = path.relative(process.cwd(), path.resolve(backendDir, "dist/backend/src/data/entities/*.js"));
+const migrations = path.relative(process.cwd(), path.resolve(backendDir, "dist/backend/src/migrations/*.js"));
+const migrationsDir = path.relative(process.cwd(), path.resolve(backendDir, "src/migrations"));
module.exports = {
type: "mysql",
- host: process.env.DB_HOST,
- username: process.env.DB_USER,
- password: process.env.DB_PASSWORD,
- database: process.env.DB_DATABASE,
+ host: env.DB_HOST,
+ port: env.DB_PORT,
+ username: env.DB_USER,
+ password: env.DB_PASSWORD,
+ database: env.DB_DATABASE,
charset: "utf8mb4",
supportBigNumbers: true,
bigNumberStrings: true,
diff --git a/backend/src/data/db.ts b/backend/src/data/db.ts
index b38bbc72..fd42f361 100644
--- a/backend/src/data/db.ts
+++ b/backend/src/data/db.ts
@@ -1,7 +1,11 @@
import { Connection, createConnection } from "typeorm";
import { SimpleError } from "../SimpleError";
-import connectionOptions from "../../ormconfig";
import { QueryLogger } from "./queryLogger";
+import path from "path";
+import { backendDir } from "../paths";
+
+const ormconfigPath = path.join(backendDir, "ormconfig.js");
+const connectionOptions = require(ormconfigPath);
let connectionPromise: Promise;
diff --git a/backend/src/env.ts b/backend/src/env.ts
index 13cbbdb7..b0eb3d9e 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -7,9 +7,9 @@ import { z } from "zod";
const envType = z.object({
KEY: z.string().length(32),
- CLIENT_ID: z.string(),
- CLIENT_SECRET: z.string(),
- BOT_TOKEN: z.string(),
+ CLIENT_ID: z.string().min(16),
+ CLIENT_SECRET: z.string().length(32),
+ BOT_TOKEN: z.string().min(50),
OAUTH_CALLBACK_URL: z.string().url(),
DASHBOARD_DOMAIN: z.string(),
diff --git a/backend/tsconfig.json b/backend/tsconfig.json
index 011e0217..cde827e4 100644
--- a/backend/tsconfig.json
+++ b/backend/tsconfig.json
@@ -24,5 +24,5 @@
"useUnknownInCatchVariables": false,
"allowJs": true
},
- "include": ["src/**/*.ts", "ormconfig.js"]
+ "include": ["src/**/*.ts"]
}
From f463abb3e226e2395c7a2c9fa7ab410950e1dbe7 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:23:17 +0300
Subject: [PATCH 063/190] Temporarily disable config clean-up
The current query doesn't work in MySQL 8.
---
backend/src/data/cleanup/configs.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backend/src/data/cleanup/configs.ts b/backend/src/data/cleanup/configs.ts
index 1d22ea52..58c6da24 100644
--- a/backend/src/data/cleanup/configs.ts
+++ b/backend/src/data/cleanup/configs.ts
@@ -9,6 +9,9 @@ const CLEAN_PER_LOOP = 50;
export async function cleanupConfigs() {
const configRepository = getRepository(Config);
+ // FIXME: The query below doesn't work on MySQL 8.0. Pending an update.
+ return;
+
let cleaned = 0;
let rows;
From 122f535e34fde91d7c8ade9c826e755c002d9ca9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:23:53 +0300
Subject: [PATCH 064/190] Fix API vhost in nginx container
---
docker/development/nginx/default.conf | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/docker/development/nginx/default.conf b/docker/development/nginx/default.conf
index 126df16b..3ff41fe0 100644
--- a/docker/development/nginx/default.conf
+++ b/docker/development/nginx/default.conf
@@ -3,10 +3,15 @@ server {
listen [::]:443 ssl http2;
server_name _API_DOMAIN_;
+
location / {
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
- set $backend_upstream devenv;
- proxy_pass http://$backend_upstream:_API_PORT_;
+ set $backend_upstream "http://devenv:_API_PORT_";
+ # Using a variable in proxy_pass also requires resolver to be set.
+ # This is the address of the internal docker compose DNS server.
+ resolver 127.0.0.11;
+
+ proxy_pass $backend_upstream;
client_max_body_size 200M;
}
From bc250209d84cfaecbbcddf8b2c57a3196d79d448 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:24:24 +0300
Subject: [PATCH 065/190] Fix API_URL/API_DOMAIN usage in dashboard
---
dashboard/src/api.ts | 2 +-
dashboard/src/auth.ts | 4 ++--
dashboard/src/init-vue.ts | 2 +-
dashboard/webpack.config.js | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dashboard/src/api.ts b/dashboard/src/api.ts
index f6cfd5e5..6b75d1f8 100644
--- a/dashboard/src/api.ts
+++ b/dashboard/src/api.ts
@@ -1,5 +1,5 @@
import { RootStore } from "./store";
-const apiUrl = process.env.API_URL;
+const apiUrl = `https://${process.env.API_DOMAIN}`;
type QueryParamObject = { [key: string]: string | null };
diff --git a/dashboard/src/auth.ts b/dashboard/src/auth.ts
index bb5c1b9e..e8c085d7 100644
--- a/dashboard/src/auth.ts
+++ b/dashboard/src/auth.ts
@@ -11,7 +11,7 @@ const isAuthenticated = async () => {
export const authGuard: NavigationGuard = async (to, from, next) => {
if (await isAuthenticated()) return next();
- window.location.href = `${process.env.API_URL}/auth/login`;
+ window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
};
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
@@ -25,5 +25,5 @@ export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
export const authRedirectGuard: NavigationGuard = async (to, form, next) => {
if (await isAuthenticated()) return next("/dashboard");
- window.location.href = `${process.env.API_URL}/auth/login`;
+ window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
};
diff --git a/dashboard/src/init-vue.ts b/dashboard/src/init-vue.ts
index 614b5609..25b30969 100644
--- a/dashboard/src/init-vue.ts
+++ b/dashboard/src/init-vue.ts
@@ -20,7 +20,7 @@ Vue.mixin({
return {
get env() {
return Object.freeze({
- API_URL: process.env.API_URL,
+ API_URL: `https://${process.env.API_DOMAIN}`,
});
},
};
diff --git a/dashboard/webpack.config.js b/dashboard/webpack.config.js
index 7fb9f221..2ae878ca 100644
--- a/dashboard/webpack.config.js
+++ b/dashboard/webpack.config.js
@@ -1,5 +1,3 @@
-require("dotenv").config({ path: path.resolve(process.cwd(), "../.env") });
-
const path = require("path");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
@@ -154,7 +152,9 @@ let config = {
js: ["./src/main.ts"],
},
}),
- new DotenvPlugin(),
+ new DotenvPlugin({
+ path: path.resolve(process.cwd(), "../.env"),
+ }),
],
resolve: {
extensions: [".ts", ".tsx", ".js", ".mjs", ".vue"],
From b6550851154301559fab003418c9d45823c145e9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:31:20 +0300
Subject: [PATCH 066/190] Add quick instructions for docker dev environment
---
docker/development/README.md | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 docker/development/README.md
diff --git a/docker/development/README.md b/docker/development/README.md
new file mode 100644
index 00000000..2605b108
--- /dev/null
+++ b/docker/development/README.md
@@ -0,0 +1,27 @@
+# Running the development environment
+1. Install Docker
+2. Fill the values in .env
+3. Run `./docker-compose-dev.sh up` to start the development environment
+4. Connect to the development environment with your editor's remote SSH feature (see below)
+
+## Connecting with VSCode
+1. Install the `Remote - SSH` plugin
+2. Run `Remote-SSH: Connect to Host...`
+ * As the address, use `ubuntu@127.0.0.1:3002` where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`
+ * Use the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
+3. Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`
+
+## Connecting with JetBrains Gateway
+* TODO (basically the same as VSCode instructions though)
+
+## Starting the backend (bot + api)
+These commands are run inside the dev container. You should be able to just open a terminal in your editor after connecting.
+1. `cd ~/zeppelin/backend`
+2. `npm ci`
+3. `npm run migrate-dev`
+4. `npm run watch`
+
+## Starting the dashboard
+1. `cd ~/zeppelin/dashboard`
+2. `npm ci`
+3. `npm run watch-build`
From ce2255b6b759edb2defb2d6ec8d6cddb2999581a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 19:30:46 +0300
Subject: [PATCH 067/190] Simplify dev docker setup
---
.env.example | 25 +++++++------
backend/src/api/auth.ts | 6 ++--
backend/src/api/start.ts | 2 +-
backend/src/env.ts | 14 ++++----
dashboard/src/api.ts | 2 +-
dashboard/src/auth.ts | 4 +--
dashboard/src/init-vue.ts | 2 +-
docker-compose-dev.sh | 2 +-
docker/development/README.md | 5 ++-
docker/development/devenv/Dockerfile | 4 +--
docker/development/docker-compose.yml | 35 ++++--------------
docker/development/nginx/Dockerfile | 9 ++---
docker/development/nginx/default.conf | 52 +++++++++++----------------
13 files changed, 65 insertions(+), 97 deletions(-)
diff --git a/.env.example b/.env.example
index 8d8052b9..88f8f5b5 100644
--- a/.env.example
+++ b/.env.example
@@ -1,36 +1,39 @@
-KEY=32_character_encryption_key
+# 32 character encryption key
+KEY=
+# Values from the Discord developer portal
CLIENT_ID=
CLIENT_SECRET=
BOT_TOKEN=
-OAUTH_CALLBACK_URL=
-DASHBOARD_DOMAIN=
-API_DOMAIN=
+DASHBOARD_URL=https://localhost:3300
+API_URL=https://localhost:3300/api
+
+# When using the Docker-based development environment, this is only used internally. The API will be available at localhost:DOCKER_DEV_WEB_PORT/api.
API_PORT=3000
+# Only required if relevant feature is used
+#PHISHERMAN_API_KEY=
+
#
# DOCKER (DEVELOPMENT)
#
-DOCKER_WEB_PORT=443
+DOCKER_DEV_WEB_PORT=3300
# The MySQL database running in the container is exposed to the host on this port,
# allowing access with database tools such as DBeaver
-DOCKER_MYSQL_PORT=3001
+DOCKER_DEV_MYSQL_PORT=3001
# Password for the Zeppelin database user
-DOCKER_MYSQL_PASSWORD=
+DOCKER_DEV_MYSQL_PASSWORD=
# Password for the MySQL root user
-DOCKER_MYSQL_ROOT_PASSWORD=
+DOCKER_DEV_MYSQL_ROOT_PASSWORD=
# The development environment container has an SSH server that you can connect to.
# This is the port that server is exposed to the host on.
DOCKER_DEV_SSH_PORT=3002
DOCKER_DEV_SSH_PASSWORD=password
-# Only required if relevant feature is used
-#PHISHERMAN_API_KEY=
-
#
# PRODUCTION
#
diff --git a/backend/src/api/auth.ts b/backend/src/api/auth.ts
index 09029bda..ca947d8c 100644
--- a/backend/src/api/auth.ts
+++ b/backend/src/api/auth.ts
@@ -88,7 +88,7 @@ export function initAuth(app: express.Express) {
tokenURL: "https://discord.com/api/oauth2/token",
clientID: env.CLIENT_ID,
clientSecret: env.CLIENT_SECRET,
- callbackURL: env.OAUTH_CALLBACK_URL,
+ callbackURL: `${env.API_URL}/auth/oauth-callback`,
scope: ["identify"],
},
async (accessToken, refreshToken, profile, cb) => {
@@ -117,9 +117,9 @@ export function initAuth(app: express.Express) {
passport.authenticate("oauth2", { failureRedirect: "/", session: false }),
(req: Request, res: Response) => {
if (req.user && req.user.apiKey) {
- res.redirect(`https://${env.DASHBOARD_DOMAIN}/login-callback/?apiKey=${req.user.apiKey}`);
+ res.redirect(`${env.DASHBOARD_URL}/login-callback/?apiKey=${req.user.apiKey}`);
} else {
- res.redirect(`https://${env.DASHBOARD_DOMAIN}/login-callback/?error=noAccess`);
+ res.redirect(`${env.DASHBOARD_URL}/login-callback/?error=noAccess`);
}
},
);
diff --git a/backend/src/api/start.ts b/backend/src/api/start.ts
index 27d982ab..59a20da6 100644
--- a/backend/src/api/start.ts
+++ b/backend/src/api/start.ts
@@ -14,7 +14,7 @@ const app = express();
app.use(
cors({
- origin: `https://${env.DASHBOARD_DOMAIN}`,
+ origin: env.DASHBOARD_URL,
}),
);
app.use(
diff --git a/backend/src/env.ts b/backend/src/env.ts
index b0eb3d9e..e786dd3c 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -11,17 +11,15 @@ const envType = z.object({
CLIENT_SECRET: z.string().length(32),
BOT_TOKEN: z.string().min(50),
- OAUTH_CALLBACK_URL: z.string().url(),
- DASHBOARD_DOMAIN: z.string(),
- API_DOMAIN: z.string(),
+ DASHBOARD_URL: z.string().url(),
+ API_URL: z.string().url(),
+ API_PORT: z.preprocess((v) => Number(v), z.number().min(1).max(65535)).default(3000),
STAFF: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
PHISHERMAN_API_KEY: z.string().optional(),
- API_PORT: z.preprocess((v) => Number(v), z.number().min(1).max(65535)),
-
- DOCKER_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
+ DOCKER_DEV_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
DB_HOST: z.string().optional().default("mysql"),
DB_PORT: z
@@ -42,6 +40,6 @@ if (fs.existsSync(envPath)) {
export const env = envType.parse(toValidate);
-if (env.DOCKER_MYSQL_PASSWORD && !env.DB_PASSWORD) {
- env.DB_PASSWORD = env.DOCKER_MYSQL_PASSWORD;
+if (env.DOCKER_DEV_MYSQL_PASSWORD && !env.DB_PASSWORD) {
+ env.DB_PASSWORD = env.DOCKER_DEV_MYSQL_PASSWORD;
}
diff --git a/dashboard/src/api.ts b/dashboard/src/api.ts
index 6b75d1f8..f6cfd5e5 100644
--- a/dashboard/src/api.ts
+++ b/dashboard/src/api.ts
@@ -1,5 +1,5 @@
import { RootStore } from "./store";
-const apiUrl = `https://${process.env.API_DOMAIN}`;
+const apiUrl = process.env.API_URL;
type QueryParamObject = { [key: string]: string | null };
diff --git a/dashboard/src/auth.ts b/dashboard/src/auth.ts
index e8c085d7..bb5c1b9e 100644
--- a/dashboard/src/auth.ts
+++ b/dashboard/src/auth.ts
@@ -11,7 +11,7 @@ const isAuthenticated = async () => {
export const authGuard: NavigationGuard = async (to, from, next) => {
if (await isAuthenticated()) return next();
- window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
+ window.location.href = `${process.env.API_URL}/auth/login`;
};
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
@@ -25,5 +25,5 @@ export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
export const authRedirectGuard: NavigationGuard = async (to, form, next) => {
if (await isAuthenticated()) return next("/dashboard");
- window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
+ window.location.href = `${process.env.API_URL}/auth/login`;
};
diff --git a/dashboard/src/init-vue.ts b/dashboard/src/init-vue.ts
index 25b30969..614b5609 100644
--- a/dashboard/src/init-vue.ts
+++ b/dashboard/src/init-vue.ts
@@ -20,7 +20,7 @@ Vue.mixin({
return {
get env() {
return Object.freeze({
- API_URL: `https://${process.env.API_DOMAIN}`,
+ API_URL: process.env.API_URL,
});
},
};
diff --git a/docker-compose-dev.sh b/docker-compose-dev.sh
index 14af4e94..cd039f74 100755
--- a/docker-compose-dev.sh
+++ b/docker-compose-dev.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-DOCKER_UID="$(id -u)" DOCKER_GID="$(id -g)" docker-compose --env-file ./.env -f ./docker/development/docker-compose.yml "$@"
+DOCKER_UID="$(id -u)" DOCKER_STAY_RUNNING=1 docker-compose --env-file ./.env -f ./docker/development/docker-compose.yml "$@"
diff --git a/docker/development/README.md b/docker/development/README.md
index 2605b108..ebbebf94 100644
--- a/docker/development/README.md
+++ b/docker/development/README.md
@@ -7,7 +7,7 @@
## Connecting with VSCode
1. Install the `Remote - SSH` plugin
2. Run `Remote-SSH: Connect to Host...`
- * As the address, use `ubuntu@127.0.0.1:3002` where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`
+ * As the address, use `ubuntu@127.0.0.1:3002` (where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`)
* Use the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
3. Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`
@@ -25,3 +25,6 @@ These commands are run inside the dev container. You should be able to just open
1. `cd ~/zeppelin/dashboard`
2. `npm ci`
3. `npm run watch-build`
+
+## Opening the dashboard
+Browse to https://localhost:3300 to view the dashboard
diff --git a/docker/development/devenv/Dockerfile b/docker/development/devenv/Dockerfile
index ac278942..30963fee 100644
--- a/docker/development/devenv/Dockerfile
+++ b/docker/development/devenv/Dockerfile
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
-ARG DOCKER_UID
+ARG DOCKER_UID=1000
ARG DOCKER_DEV_SSH_PASSWORD
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,7 +13,7 @@ RUN apt-get install -y sudo git curl
# Set up SSH access
RUN apt-get install -y openssh-server iptables
RUN mkdir /var/run/sshd
-RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u "${DOCKER_UID}" ubuntu
+RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $DOCKER_UID ubuntu
RUN echo "ubuntu:${DOCKER_DEV_SSH_PASSWORD}" | chpasswd
# Set up proper permissions for volumes
diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml
index 10c3caf1..7fcdd28a 100644
--- a/docker/development/docker-compose.yml
+++ b/docker/development/docker-compose.yml
@@ -9,54 +9,33 @@ services:
build:
context: ./nginx
args:
- API_DOMAIN: ${API_DOMAIN:?Missing API_DOMAIN}
+ DOCKER_DEV_WEB_PORT: ${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}
API_PORT: ${API_PORT:?Missing API_PORT}
- DASHBOARD_DOMAIN: ${DASHBOARD_DOMAIN:?Missing DASHBOARD_DOMAIN}
ports:
- - ${DOCKER_WEB_PORT:?Missing DOCKER_WEB_PORT}:443
+ - "${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}:443"
volumes:
- ../../:/zeppelin
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD: ${DOCKER_MYSQL_ROOT_PASSWORD?:Missing DOCKER_MYSQL_ROOT_PASSWORD}
+ MYSQL_ROOT_PASSWORD: ${DOCKER_DEV_MYSQL_ROOT_PASSWORD?:Missing DOCKER_DEV_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: zeppelin
MYSQL_USER: zeppelin
- MYSQL_PASSWORD: ${DOCKER_MYSQL_PASSWORD?:Missing DOCKER_MYSQL_PASSWORD}
+ MYSQL_PASSWORD: ${DOCKER_DEV_MYSQL_PASSWORD?:Missing DOCKER_DEV_MYSQL_PASSWORD}
ports:
- - ${DOCKER_MYSQL_PORT:?Missing DOCKER_MYSQL_PORT}:3306
+ - ${DOCKER_DEV_MYSQL_PORT:?Missing DOCKER_DEV_MYSQL_PORT}:3306
volumes:
- mysql-data:/var/lib/mysql
command: --authentication-policy=mysql_native_password
-#
-# backend:
-# image: node:16
-# user: "${UID:?Missing UID}:${GID:?Missing GID}"
-# working_dir: /zeppelin/backend
-# restart: always
-# depends_on:
-# - mysql
-# volumes:
-# - ./:/zeppelin
-# command: sh -c "npm run migrate-dev && npm run watch"
-#
-# dashboard:
-# image: node:16
-# user: "${UID:?Missing UID}:${GID:?Missing GID}"
-# working_dir: /zeppelin/dashboard
-# restart: always
-# volumes:
-# - ./:/zeppelin
-# command: sh -c "npm run watch-build"
devenv:
build:
context: ./devenv
args:
- DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
- DOCKER_GID: ${DOCKER_GID:?Missing DOCKER_GID}
DOCKER_DEV_SSH_PASSWORD: ${DOCKER_DEV_SSH_PASSWORD:?Missing DOCKER_DEV_SSH_PASSWORD}
+ DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
+ DOCKER_STAY_RUNNING: ${DOCKER_STAY_RUNNING}
ports:
- "${DOCKER_DEV_SSH_PORT:?Missing DOCKER_DEV_SSH_PORT}:22"
volumes:
diff --git a/docker/development/nginx/Dockerfile b/docker/development/nginx/Dockerfile
index 2f63ba2f..6df4e140 100644
--- a/docker/development/nginx/Dockerfile
+++ b/docker/development/nginx/Dockerfile
@@ -1,14 +1,11 @@
FROM nginx
-ARG API_DOMAIN
-ARG DASHBOARD_DOMAIN
ARG API_PORT
+ARG DOCKER_DEV_API_PORT
+ARG DOCKER_DEV_DASHBOARD_PORT
RUN apt-get update && apt-get install -y openssl
-RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/api-cert.key -out /etc/ssl/certs/api-cert.pem -days 3650 -subj '/CN=*.${API_DOMAIN}' -nodes
-RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/dashboard-cert.key -out /etc/ssl/certs/dashboard-cert.pem -days 3650 -subj '/CN=*.${DASHBOARD_DOMAIN}' -nodes
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/localhost-cert.key -out /etc/ssl/certs/localhost-cert.pem -days 3650 -subj '/CN=localhost' -nodes
COPY ./default.conf /etc/nginx/conf.d/default.conf
-RUN sed -ir "s/_API_DOMAIN_/$(echo ${API_DOMAIN} | sed 's/\./\\./g')/g" /etc/nginx/conf.d/default.conf
-RUN sed -ir "s/_DASHBOARD_DOMAIN_/$(echo ${DASHBOARD_DOMAIN} | sed 's/\./\\./g')/g" /etc/nginx/conf.d/default.conf
RUN sed -ir "s/_API_PORT_/${API_PORT}/g" /etc/nginx/conf.d/default.conf
diff --git a/docker/development/nginx/default.conf b/docker/development/nginx/default.conf
index 3ff41fe0..9dc3db69 100644
--- a/docker/development/nginx/default.conf
+++ b/docker/development/nginx/default.conf
@@ -1,36 +1,7 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
- server_name _API_DOMAIN_;
-
-
- location / {
- # Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
- set $backend_upstream "http://devenv:_API_PORT_";
- # Using a variable in proxy_pass also requires resolver to be set.
- # This is the address of the internal docker compose DNS server.
- resolver 127.0.0.11;
-
- proxy_pass $backend_upstream;
-
- client_max_body_size 200M;
- }
-
- ssl_certificate /etc/ssl/certs/api-cert.pem;
- ssl_certificate_key /etc/ssl/private/api-cert.key;
-
- ssl_session_timeout 1d;
- ssl_session_cache shared:MozSSL:10m;
- ssl_session_tickets off;
-
- ssl_protocols TLSv1.3;
- ssl_prefer_server_ciphers off;
-}
-
-server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- server_name _DASHBOARD_DOMAIN_;
+ server_name localhost;
root /zeppelin/dashboard/dist;
@@ -39,8 +10,25 @@ server {
try_files $uri $uri/ /index.html;
}
- ssl_certificate /etc/ssl/certs/dashboard-cert.pem;
- ssl_certificate_key /etc/ssl/private/dashboard-cert.key;
+ # Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
+ set $backend_upstream "http://devenv:_API_PORT_";
+
+ location /api {
+ # Remove /api/ from the beginning when passing the path to the API process
+ rewrite /api(/.*)$ $1 break;
+
+ # Using a variable in proxy_pass also requires resolver to be set.
+ # This is the address of the internal docker compose DNS server.
+ resolver 127.0.0.11;
+
+ proxy_pass $backend_upstream$uri$is_args$args;
+ proxy_redirect off;
+
+ client_max_body_size 200M;
+ }
+
+ ssl_certificate /etc/ssl/certs/localhost-cert.pem;
+ ssl_certificate_key /etc/ssl/private/localhost-cert.key;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
From d8b7d0cba56dba443383ca297f34694fb589ee02 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 19:33:56 +0300
Subject: [PATCH 068/190] Update Docker instructions
---
docker/development/README.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/docker/development/README.md b/docker/development/README.md
index ebbebf94..9a875434 100644
--- a/docker/development/README.md
+++ b/docker/development/README.md
@@ -1,8 +1,9 @@
# Running the development environment
1. Install Docker
-2. Fill the values in .env
-3. Run `./docker-compose-dev.sh up` to start the development environment
-4. Connect to the development environment with your editor's remote SSH feature (see below)
+2. Make a copy of `.env.example` called `.env`
+3. Fill in the missing values in `.env`
+4. Run `./docker-compose-dev.sh up` to start the development environment
+5. Connect to the development environment with your editor's remote SSH feature (see below)
## Connecting with VSCode
1. Install the `Remote - SSH` plugin
From 96101f267da3f5d7800a6173c8b15f7dd1273d3d Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 22:32:21 +0300
Subject: [PATCH 069/190] Add VSCode devcontainer support
---
.devcontainer/devcontainer.json | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 .devcontainer/devcontainer.json
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..d8b7643d
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,10 @@
+{
+ "name": "Zeppelin Development",
+
+ "dockerComposeFile": "../docker/development/docker-compose.yml",
+ "runArgs": ["--env-file", "../.env"],
+
+ "service": "devenv",
+ "remoteUser": "ubuntu",
+ "workspaceFolder": "/home/ubuntu/zeppelin"
+}
From db84d80e745b6fa74fe05a135ee9d39ed6facce5 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 22:32:39 +0300
Subject: [PATCH 070/190] Update devenv instructions
---
docker/development/README.md | 64 ++++++++++++++++++++++++++++--------
1 file changed, 51 insertions(+), 13 deletions(-)
diff --git a/docker/development/README.md b/docker/development/README.md
index 9a875434..5ffc3a0e 100644
--- a/docker/development/README.md
+++ b/docker/development/README.md
@@ -1,31 +1,69 @@
-# Running the development environment
+# Zeppelin development environment
+Zeppelin's development environment runs entirely within a Docker container.
+Below you can find instructions for setting up the environment and getting started with development!
+
+## Starting the development environment
+
+### Using VSCode devcontainers
+1. Install Docker
+2. Make a copy of `.env.example` called `.env`
+3. Fill in the missing values in `.env`
+4. In VSCode: Install the `Remote - Containers` plugin
+5. In VSCode: Run `Remote-Containers: Open Folder in Container...` and select the Zeppelin folder
+
+### Using VSCode remote SSH plugin
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
4. Run `./docker-compose-dev.sh up` to start the development environment
-5. Connect to the development environment with your editor's remote SSH feature (see below)
-
-## Connecting with VSCode
-1. Install the `Remote - SSH` plugin
-2. Run `Remote-SSH: Connect to Host...`
+5. In VSCode: Install the `Remote - SSH` plugin
+6. In VSCode: Run `Remote-SSH: Connect to Host...`
* As the address, use `ubuntu@127.0.0.1:3002` (where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`)
* Use the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
-3. Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`
+7. In VSCode: Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`
-## Connecting with JetBrains Gateway
-* TODO (basically the same as VSCode instructions though)
+### Using JetBrains Gateway
+1. Install Docker
+2. Make a copy of `.env.example` called `.env`
+3. Fill in the missing values in `.env`
+4. Run `./docker-compose-dev.sh up` to start the development environment
+5. Choose `Connect via SSH` and create a new connection:
+ * Username: `ubuntu`
+ * Host: `127.0.0.1`
+ * Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
+6. Click `Check Connection and Continue` and enter the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD` when asked
+7. In the next pane:
+ * IDE version: WebStorm, PHPStorm, or IntelliJ IDEA
+ * Project directory: `/home/ubuntu/zeppelin`
+8. Click `Download and Start IDE`
+
+### Using any other IDE with SSH development support
+1. Install Docker
+2. Make a copy of `.env.example` called `.env`
+3. Fill in the missing values in `.env`
+4. Run `./docker-compose-dev.sh up` to start the development environment
+5. Use the following credentials for connecting with your IDE:
+ * Host: `127.0.0.1`
+ * Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
+ * Username: `ubuntu`
+ * Password: As specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
+
+## Starting the project
+
+### Starting the backend (bot + api)
+These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting.
-## Starting the backend (bot + api)
-These commands are run inside the dev container. You should be able to just open a terminal in your editor after connecting.
1. `cd ~/zeppelin/backend`
2. `npm ci`
3. `npm run migrate-dev`
4. `npm run watch`
-## Starting the dashboard
+### Starting the dashboard
+These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting.
+
1. `cd ~/zeppelin/dashboard`
2. `npm ci`
3. `npm run watch-build`
-## Opening the dashboard
+### Opening the dashboard
Browse to https://localhost:3300 to view the dashboard
From 17fa8576094628bd33ee07a1aa6228f1eebc7300 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 26 Jun 2022 23:15:36 +0300
Subject: [PATCH 071/190] Remove docker-compose wrapper script; fixes to
devcontainers
---
.devcontainer/devcontainer.json | 3 +-
.env.example | 3 ++
.../development/README.md => DEVELOPMENT.md | 8 ++--
README.md | 39 +------------------
docker-compose-dev.sh | 3 --
.../docker-compose.yml => docker-compose.yml | 11 +++---
docker/development/devenv/Dockerfile | 4 +-
7 files changed, 17 insertions(+), 54 deletions(-)
rename docker/development/README.md => DEVELOPMENT.md (91%)
delete mode 100755 docker-compose-dev.sh
rename docker/development/docker-compose.yml => docker-compose.yml (85%)
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index d8b7643d..b44145a2 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,8 +1,7 @@
{
"name": "Zeppelin Development",
- "dockerComposeFile": "../docker/development/docker-compose.yml",
- "runArgs": ["--env-file", "../.env"],
+ "dockerComposeFile": "../docker-compose.yml",
"service": "devenv",
"remoteUser": "ubuntu",
diff --git a/.env.example b/.env.example
index 88f8f5b5..d98f2662 100644
--- a/.env.example
+++ b/.env.example
@@ -34,6 +34,9 @@ DOCKER_DEV_MYSQL_ROOT_PASSWORD=
DOCKER_DEV_SSH_PORT=3002
DOCKER_DEV_SSH_PASSWORD=password
+# If your user has a different UID than 1000, you might have to fill that in here to avoid permission issues
+#DOCKER_DEV_UID=1000
+
#
# PRODUCTION
#
diff --git a/docker/development/README.md b/DEVELOPMENT.md
similarity index 91%
rename from docker/development/README.md
rename to DEVELOPMENT.md
index 5ffc3a0e..0edbbc88 100644
--- a/docker/development/README.md
+++ b/DEVELOPMENT.md
@@ -2,6 +2,8 @@
Zeppelin's development environment runs entirely within a Docker container.
Below you can find instructions for setting up the environment and getting started with development!
+👉 **No support is offered for self-hosting the bot!** 👈
+
## Starting the development environment
### Using VSCode devcontainers
@@ -15,7 +17,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `./docker-compose-dev.sh up` to start the development environment
+4. Run `docker-compose up` to start the development environment
5. In VSCode: Install the `Remote - SSH` plugin
6. In VSCode: Run `Remote-SSH: Connect to Host...`
* As the address, use `ubuntu@127.0.0.1:3002` (where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`)
@@ -26,7 +28,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `./docker-compose-dev.sh up` to start the development environment
+4. Run `docker-compose up` to start the development environment
5. Choose `Connect via SSH` and create a new connection:
* Username: `ubuntu`
* Host: `127.0.0.1`
@@ -41,7 +43,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `./docker-compose-dev.sh up` to start the development environment
+4. Run `docker-compose up` to start the development environment
5. Use the following credentials for connecting with your IDE:
* Host: `127.0.0.1`
* Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
diff --git a/README.md b/README.md
index 02eae9ee..4d11bbe5 100644
--- a/README.md
+++ b/README.md
@@ -20,46 +20,9 @@ Zeppelin is a moderation bot for Discord, designed with large servers and reliab
See https://zeppelin.gg/ for more details.
## Development
-These instructions are intended for bot development only.
-
👉 **No support is offered for self-hosting the bot!** 👈
-### Running the bot
-1. `cd backend`
-2. `npm ci`
-3. Make a copy of `bot.env.example` called `bot.env`, fill in the values
-4. Run the desired start script:
- * `npm run build` followed by `npm run start-bot-dev` to run the bot in a **development** environment
- * `npm run build` followed by `npm run start-bot-prod` to run the bot in a **production** environment
- * `npm run watch` to watch files and run the **bot and api both** in a **development** environment
- with automatic restart on file changes
-5. When testing, make sure you have your test server in the `allowed_guilds` table or the guild's config won't be loaded at all
-
-### Running the API server
-1. `cd backend`
-2. `npm ci`
-3. Make a copy of `api.env.example` called `api.env`, fill in the values
-4. Run the desired start script:
- * `npm run build` followed by `npm run start-api-dev` to run the api in a **development** environment
- * `npm run build` followed by `npm run start-api-prod` to run the api in a **production** environment
- * `npm run watch` to watch files and run the **bot and api both** in a **development** environment
- with automatic restart on file changes
-
-### Running the dashboard
-1. `cd dashboard`
-2. `npm ci`
-3. Make a copy of `.env.example` called `.env`, fill in the values
-4. Run the desired start script:
- * `npm run build` compiles the dashboard's static files to `dist/` which can then be served with any web server
- * `npm run watch` runs webpack's dev server that automatically reloads on changes
-
-### Notes
-* Since we now use shared paths in `tsconfig.json`, the compiled files in `backend/dist/` have longer paths, e.g.
- `backend/dist/backend/src/index.js` instead of `backend/dist/index.js`. This is because the compiled shared files
- are placed in `backend/dist/shared`.
-* The `backend/register-tsconfig-paths.js` module takes care of registering shared paths from `tsconfig.json` for
- `ava` and compiled `.js` files
-* To run the tests for the files in the `shared/` directory, you also need to run `npm ci` there
+See [DEVELOPMENT.md](./DEVELOPMENT.md) for instructions on running the development environment!
### Config format example
Configuration is stored in the database in the `configs` table
diff --git a/docker-compose-dev.sh b/docker-compose-dev.sh
deleted file mode 100755
index cd039f74..00000000
--- a/docker-compose-dev.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-DOCKER_UID="$(id -u)" DOCKER_STAY_RUNNING=1 docker-compose --env-file ./.env -f ./docker/development/docker-compose.yml "$@"
diff --git a/docker/development/docker-compose.yml b/docker-compose.yml
similarity index 85%
rename from docker/development/docker-compose.yml
rename to docker-compose.yml
index 7fcdd28a..1c836bd2 100644
--- a/docker/development/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,14 +7,14 @@ volumes:
services:
nginx:
build:
- context: ./nginx
+ context: ./docker/development/nginx
args:
DOCKER_DEV_WEB_PORT: ${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}
API_PORT: ${API_PORT:?Missing API_PORT}
ports:
- "${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}:443"
volumes:
- - ../../:/zeppelin
+ - ./:/zeppelin
mysql:
image: mysql:8.0
@@ -31,15 +31,14 @@ services:
devenv:
build:
- context: ./devenv
+ context: ./docker/development/devenv
args:
DOCKER_DEV_SSH_PASSWORD: ${DOCKER_DEV_SSH_PASSWORD:?Missing DOCKER_DEV_SSH_PASSWORD}
- DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
- DOCKER_STAY_RUNNING: ${DOCKER_STAY_RUNNING}
+ DOCKER_DEV_UID: ${DOCKER_DEV_UID:-1000}
ports:
- "${DOCKER_DEV_SSH_PORT:?Missing DOCKER_DEV_SSH_PORT}:22"
volumes:
- - ../../:/home/ubuntu/zeppelin
+ - ./:/home/ubuntu/zeppelin
- ~/.ssh:/home/ubuntu/.ssh
- vscode-remote:/home/ubuntu/.vscode-remote
- vscode-server:/home/ubuntu/.vscode-server
diff --git a/docker/development/devenv/Dockerfile b/docker/development/devenv/Dockerfile
index 30963fee..3b9d6276 100644
--- a/docker/development/devenv/Dockerfile
+++ b/docker/development/devenv/Dockerfile
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
-ARG DOCKER_UID=1000
+ARG DOCKER_DEV_UID
ARG DOCKER_DEV_SSH_PASSWORD
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,7 +13,7 @@ RUN apt-get install -y sudo git curl
# Set up SSH access
RUN apt-get install -y openssh-server iptables
RUN mkdir /var/run/sshd
-RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $DOCKER_UID ubuntu
+RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $DOCKER_DEV_UID ubuntu
RUN echo "ubuntu:${DOCKER_DEV_SSH_PASSWORD}" | chpasswd
# Set up proper permissions for volumes
From f5125cb3c340bfff2e5b0714870fdcc8d013e442 Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Thu, 7 Jul 2022 00:49:29 +0300
Subject: [PATCH 072/190] Update applyRoleButtons.ts
---
backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index bbd290a2..b3e92f43 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -55,7 +55,7 @@ export async function applyRoleButtons(
}
const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
- if (!channel || !channel.isText()) {
+ if (!channel || !channel?.isText()) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Text channel not found for role_buttons/${configItem.name}`,
});
From 8574d61670fa59927a7ff8971c5fed54f3630f7c Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Thu, 7 Jul 2022 01:00:32 +0300
Subject: [PATCH 073/190] debug
---
.../src/plugins/RoleButtons/functions/applyRoleButtons.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index b3e92f43..bc4c5c23 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -55,7 +55,10 @@ export async function applyRoleButtons(
}
const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
- if (!channel || !channel?.isText()) {
+ if (channel && (!channel.isText || typeof channel.isText !== "function")) {
+ console.log("wtf", channel);
+ }
+ if (!channel || !channel?.isText?.()) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Text channel not found for role_buttons/${configItem.name}`,
});
From 0e6c2619f09f911f506a9e4d0b0d3169f4565eb7 Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Thu, 7 Jul 2022 01:07:17 +0300
Subject: [PATCH 074/190] Update applyRoleButtons.ts
---
backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
index bc4c5c23..66e9666e 100644
--- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
+++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts
@@ -56,7 +56,7 @@ export async function applyRoleButtons(
const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null);
if (channel && (!channel.isText || typeof channel.isText !== "function")) {
- console.log("wtf", channel);
+ console.log("wtf", pluginData.guild?.id, configItem.message.channel_id);
}
if (!channel || !channel?.isText?.()) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
From 3cf08e5a49650bb457636f599a39838121eb8cf4 Mon Sep 17 00:00:00 2001
From: Miikka <2606411+Dragory@users.noreply.github.com>
Date: Wed, 6 Jul 2022 22:21:26 +0000
Subject: [PATCH 075/190] Update discord.js
---
backend/package-lock.json | 15 ++++++++-------
backend/package.json | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 6fc0547c..ad43bb79 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -14,7 +14,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "^13.8.0",
+ "discord.js": "13.8",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -1704,9 +1704,9 @@
"integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"node_modules/discord.js": {
- "version": "13.8.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.0.tgz",
- "integrity": "sha512-EPAA/2VLycYN5wSzavqa4iJ6qj3UtQFtHw5TH/60Fj29ymfEsCQVn//o1mTpwDxzwb+rPIrWhkxKIGGnjfv0Iw==",
+ "version": "13.8.1",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
+ "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
"dependencies": {
"@discordjs/builders": "^0.14.0",
"@discordjs/collection": "^0.7.0",
@@ -5265,6 +5265,7 @@
},
"node_modules/zlib-sync": {
"version": "0.1.7",
+ "hasInstallScript": true,
"license": "MIT",
"dependencies": {
"nan": "^2.14.0"
@@ -6372,9 +6373,9 @@
"integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"discord.js": {
- "version": "13.8.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.0.tgz",
- "integrity": "sha512-EPAA/2VLycYN5wSzavqa4iJ6qj3UtQFtHw5TH/60Fj29ymfEsCQVn//o1mTpwDxzwb+rPIrWhkxKIGGnjfv0Iw==",
+ "version": "13.8.1",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
+ "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
"requires": {
"@discordjs/builders": "^0.14.0",
"@discordjs/collection": "^0.7.0",
diff --git a/backend/package.json b/backend/package.json
index 4761ec2e..3ef672bd 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -29,7 +29,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "^13.8.0",
+ "discord.js": "13.8",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
From 91f54424ed0262bde612dc26801763837ec4a74a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 16 Jul 2022 22:16:34 +0300
Subject: [PATCH 076/190] Early work on prod container
---
.devcontainer/devcontainer.json | 2 +-
.env.example | 12 ++--
backend/package.json | 4 +-
backend/src/env.ts | 9 ++-
...pose.yml => docker-compose.development.yml | 1 +
docker-compose.production.yml | 63 +++++++++++++++++++
docker/production/nginx/Dockerfile | 11 ++++
docker/production/nginx/default.conf | 39 ++++++++++++
8 files changed, 132 insertions(+), 9 deletions(-)
rename docker-compose.yml => docker-compose.development.yml (98%)
create mode 100644 docker-compose.production.yml
create mode 100644 docker/production/nginx/Dockerfile
create mode 100644 docker/production/nginx/default.conf
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index b44145a2..0d15eb29 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,7 +1,7 @@
{
"name": "Zeppelin Development",
- "dockerComposeFile": "../docker-compose.yml",
+ "dockerComposeFile": "../docker-compose.development.yml",
"service": "devenv",
"remoteUser": "ubuntu",
diff --git a/.env.example b/.env.example
index d98f2662..d2d2a2b2 100644
--- a/.env.example
+++ b/.env.example
@@ -38,12 +38,16 @@ DOCKER_DEV_SSH_PASSWORD=password
#DOCKER_DEV_UID=1000
#
-# PRODUCTION
+# DOCKER (PRODUCTION)
#
-# In production, the newest code is pulled from a repository
-# Specify that repository URL here
-#PRODUCTION_REPOSITORY=https://github.com/ZeppelinBot/Zeppelin.git
+DOCKER_PROD_DOMAIN=
+DOCKER_PROD_WEB_PORT=443
+DOCKER_PROD_MYSQL_PORT=3001
+# Password for the Zeppelin database user
+DOCKER_PROD_MYSQL_PASSWORD=
+# Password for the MySQL root user
+DOCKER_PROD_MYSQL_ROOT_PASSWORD=
# You only need to set these if you're running an external database.
# In a standard setup, the database is run in a docker container.
diff --git a/backend/package.json b/backend/package.json
index 4761ec2e..6be4713d 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -14,9 +14,9 @@
"start-api-prod": "cross-env NODE_ENV=production node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js",
"watch-api": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-api-dev\"",
"typeorm": "node -r ./register-tsconfig-paths.js ./node_modules/typeorm/cli.js",
- "migrate-prod": "npm run typeorm -- migration:run",
+ "migrate-prod": "cross-env NODE_ENV=production npm run typeorm -- migration:run",
"migrate-dev": "npm run build && npm run typeorm -- migration:run",
- "migrate-rollback-prod": "npm run typeorm -- migration:revert",
+ "migrate-rollback-prod": "cross-env NODE_ENV=production npm run typeorm -- migration:revert",
"migrate-rollback-dev": "npm run build && npm run typeorm -- migration:revert",
"test": "npm run build && npm run run-tests",
"run-tests": "ava",
diff --git a/backend/src/env.ts b/backend/src/env.ts
index e786dd3c..cd453f39 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -20,6 +20,7 @@ const envType = z.object({
PHISHERMAN_API_KEY: z.string().optional(),
DOCKER_DEV_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
+ DOCKER_PROD_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in production
DB_HOST: z.string().optional().default("mysql"),
DB_PORT: z
@@ -40,6 +41,10 @@ if (fs.existsSync(envPath)) {
export const env = envType.parse(toValidate);
-if (env.DOCKER_DEV_MYSQL_PASSWORD && !env.DB_PASSWORD) {
- env.DB_PASSWORD = env.DOCKER_DEV_MYSQL_PASSWORD;
+if (!env.DB_PASSWORD) {
+ if (process.env.NODE_ENV === "production" && env.DOCKER_PROD_MYSQL_PASSWORD) {
+ env.DB_PASSWORD = env.DOCKER_PROD_MYSQL_PASSWORD;
+ } else if (env.DOCKER_DEV_MYSQL_PASSWORD) {
+ env.DB_PASSWORD = env.DOCKER_DEV_MYSQL_PASSWORD;
+ }
}
diff --git a/docker-compose.yml b/docker-compose.development.yml
similarity index 98%
rename from docker-compose.yml
rename to docker-compose.development.yml
index 1c836bd2..4a28033e 100644
--- a/docker-compose.yml
+++ b/docker-compose.development.yml
@@ -1,4 +1,5 @@
version: '3'
+name: zeppelin-dev
volumes:
mysql-data: {}
vscode-remote: {}
diff --git a/docker-compose.production.yml b/docker-compose.production.yml
new file mode 100644
index 00000000..1b03bd00
--- /dev/null
+++ b/docker-compose.production.yml
@@ -0,0 +1,63 @@
+version: '3'
+name: zeppelin-prod
+volumes:
+ mysql-data: {}
+services:
+ nginx:
+ build:
+ context: ./docker/production/nginx
+ args:
+ API_PORT: ${API_PORT:?Missing API_PORT}
+ DOCKER_PROD_DOMAIN: ${DOCKER_PROD_DOMAIN:?Missing DOCKER_PROD_DOMAIN}
+ ports:
+ - "${DOCKER_PROD_WEB_PORT:?Missing DOCKER_PROD_WEB_PORT}:443"
+ volumes:
+ - ./:/zeppelin
+
+ mysql:
+ image: mysql:8.0
+ environment:
+ MYSQL_ROOT_PASSWORD: ${DOCKER_PROD_MYSQL_ROOT_PASSWORD?:Missing DOCKER_PROD_MYSQL_ROOT_PASSWORD}
+ MYSQL_DATABASE: zeppelin
+ MYSQL_USER: zeppelin
+ MYSQL_PASSWORD: ${DOCKER_PROD_MYSQL_PASSWORD?:Missing DOCKER_PROD_MYSQL_PASSWORD}
+ ports:
+ - ${DOCKER_PROD_MYSQL_PORT:?Missing DOCKER_PROD_MYSQL_PORT}:3306
+ volumes:
+ - mysql-data:/var/lib/mysql
+ command: --authentication-policy=mysql_native_password
+
+ prepare_backend:
+ image: node:16.16
+ depends_on:
+ - mysql
+ volumes:
+ - ./:/zeppelin
+ user: node
+ command: |-
+ bash -c "cd /zeppelin/backend && npm ci && npm run build && npm run migrate-prod"
+
+ api:
+ image: node:16.16
+ restart: on-failure
+ depends_on:
+ - prepare_backend
+ volumes:
+ - ./:/zeppelin
+
+ # Wait for the build_backend container to finish before starting the bot
+ # See: https://github.com/docker/compose/issues/5007#issuecomment-335815508
+ user: node
+ command: |-
+ bash -c ' \
+ while ping -c1 prepare_backend &>/dev/null; do sleep 1; done; \
+ cd /zeppelin/backend && npm run start-api-prod \
+ '
+
+ build_dashboard:
+ image: node:16.16
+ volumes:
+ - ./:/zeppelin
+ user: node
+ command: |-
+ bash -c "cd /zeppelin/dashboard && npm ci && npm run build"
diff --git a/docker/production/nginx/Dockerfile b/docker/production/nginx/Dockerfile
new file mode 100644
index 00000000..47df0a26
--- /dev/null
+++ b/docker/production/nginx/Dockerfile
@@ -0,0 +1,11 @@
+FROM nginx
+
+ARG API_PORT
+ARG DOCKER_PROD_DOMAIN
+
+RUN apt-get update && apt-get install -y openssl
+RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/zeppelin-self-signed-cert.key -out /etc/ssl/certs/zeppelin-self-signed-cert.pem -days 3650 -subj "/CN=${DOCKER_PROD_DOMAIN}" -nodes
+
+COPY ./default.conf /etc/nginx/conf.d/default.conf
+RUN sed -ir "s/_API_PORT_/${API_PORT}/g" /etc/nginx/conf.d/default.conf
+RUN sed -ir "s/_DOCKER_PROD_DOMAIN_/${DOCKER_PROD_DOMAIN}/g" /etc/nginx/conf.d/default.conf
diff --git a/docker/production/nginx/default.conf b/docker/production/nginx/default.conf
new file mode 100644
index 00000000..2fcc93c0
--- /dev/null
+++ b/docker/production/nginx/default.conf
@@ -0,0 +1,39 @@
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name _DOCKER_PROD_DOMAIN_;
+
+ root /zeppelin/dashboard/dist;
+
+ location / {
+ index index.html;
+ try_files $uri $uri/ /index.html;
+ }
+
+ # Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
+ set $backend_upstream "http://api:_API_PORT_";
+
+ location /api {
+ # Remove /api/ from the beginning when passing the path to the API process
+ rewrite /api(/.*)$ $1 break;
+
+ # Using a variable in proxy_pass also requires resolver to be set.
+ # This is the address of the internal docker compose DNS server.
+ resolver 127.0.0.11;
+
+ proxy_pass $backend_upstream$uri$is_args$args;
+ proxy_redirect off;
+
+ client_max_body_size 200M;
+ }
+
+ ssl_certificate /etc/ssl/certs/zeppelin-self-signed-cert.pem;
+ ssl_certificate_key /etc/ssl/private/zeppelin-self-signed-cert.key;
+
+ ssl_session_timeout 1d;
+ ssl_session_cache shared:MozSSL:10m;
+ ssl_session_tickets off;
+
+ ssl_protocols TLSv1.3;
+ ssl_prefer_server_ciphers off;
+}
From f7fede47bd49ac48731b2ff8d2f976efe6aa6b32 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 6 Aug 2022 21:31:13 +0300
Subject: [PATCH 077/190] refactor: use .env STAFF instead of global config
owners for global commands
---
.env.example | 3 +++
backend/src/pluginUtils.ts | 5 +++--
.../src/plugins/BotControl/commands/AddDashboardUserCmd.ts | 4 ++--
.../plugins/BotControl/commands/AddServerFromInviteCmd.ts | 2 +-
backend/src/plugins/BotControl/commands/AllowServerCmd.ts | 4 ++--
.../src/plugins/BotControl/commands/ChannelToServerCmd.ts | 4 ++--
backend/src/plugins/BotControl/commands/DisallowServerCmd.ts | 4 ++--
backend/src/plugins/BotControl/commands/LeaveServerCmd.ts | 4 ++--
.../src/plugins/BotControl/commands/ListDashboardPermsCmd.ts | 2 +-
.../src/plugins/BotControl/commands/ListDashboardUsersCmd.ts | 2 +-
.../plugins/BotControl/commands/ReloadGlobalPluginsCmd.ts | 4 ++--
backend/src/plugins/BotControl/commands/ReloadServerCmd.ts | 4 ++--
.../plugins/BotControl/commands/RemoveDashboardUserCmd.ts | 4 ++--
backend/src/plugins/BotControl/commands/ServersCmd.ts | 4 ++--
14 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/.env.example b/.env.example
index d2d2a2b2..a794dc46 100644
--- a/.env.example
+++ b/.env.example
@@ -9,6 +9,9 @@ BOT_TOKEN=
DASHBOARD_URL=https://localhost:3300
API_URL=https://localhost:3300/api
+# Comma-separated list of user IDs who should have access to the bot's global commands
+STAFF=
+
# When using the Docker-based development environment, this is only used internally. The API will be available at localhost:DOCKER_DEV_WEB_PORT/api.
API_PORT=3000
diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts
index 031d1fa7..17cd7631 100644
--- a/backend/src/pluginUtils.ts
+++ b/backend/src/pluginUtils.ts
@@ -14,6 +14,7 @@ import { TZeppelinKnub } from "./types";
import { deepKeyIntersect, errorMessage, successMessage, tDeepPartial, tNullable } from "./utils";
import { Tail } from "./utils/typeUtils";
import { decodeAndValidateStrict, StrictValidationError, validate } from "./validatorUtils";
+import { isStaff } from "./staff";
const { getMemberLevel } = helpers;
@@ -242,8 +243,8 @@ export function isOwner(pluginData: AnyPluginData, userId: string) {
return owners.includes(userId);
}
-export const isOwnerPreFilter = (_, context: CommandContext) => {
- return isOwner(context.pluginData, context.message.author.id);
+export const isStaffPreFilter = (_, context: CommandContext) => {
+ return isStaff(context.message.author.id);
};
type AnyFn = (...args: any[]) => any;
diff --git a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts
index b417fec6..531016a3 100644
--- a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts
+++ b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts
@@ -1,14 +1,14 @@
import { ApiPermissions } from "@shared/apiPermissions";
import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { botControlCmd } from "../types";
export const AddDashboardUserCmd = botControlCmd({
trigger: ["add_dashboard_user"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
index 5bdb2ace..1f29e822 100644
--- a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
+++ b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts
@@ -1,7 +1,7 @@
import { ApiPermissions } from "@shared/apiPermissions";
import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { DBDateFormat, isGuildInvite, isSnowflake, resolveInvite } from "../../../utils";
import { botControlCmd } from "../types";
import moment from "moment-timezone";
diff --git a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts
index 9e786b71..1aa665b5 100644
--- a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts
+++ b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts
@@ -1,7 +1,7 @@
import { ApiPermissions } from "@shared/apiPermissions";
import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { DBDateFormat, isSnowflake } from "../../../utils";
import { botControlCmd } from "../types";
import moment from "moment-timezone";
@@ -10,7 +10,7 @@ export const AllowServerCmd = botControlCmd({
trigger: ["allow_server", "allowserver", "add_server", "addserver"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/ChannelToServerCmd.ts b/backend/src/plugins/BotControl/commands/ChannelToServerCmd.ts
index 5e9dcbb8..49f0ff73 100644
--- a/backend/src/plugins/BotControl/commands/ChannelToServerCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ChannelToServerCmd.ts
@@ -1,6 +1,6 @@
import { Guild, GuildChannel, TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { GuildInvite, isGuildInvite, resolveInvite, verboseUserMention } from "../../../utils";
import { botControlCmd } from "../types";
import { isEligible } from "../functions/isEligible";
@@ -9,7 +9,7 @@ export const ChannelToServerCmd = botControlCmd({
trigger: ["channel_to_server", "channel2server"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/DisallowServerCmd.ts b/backend/src/plugins/BotControl/commands/DisallowServerCmd.ts
index 1a9cf64a..c7067341 100644
--- a/backend/src/plugins/BotControl/commands/DisallowServerCmd.ts
+++ b/backend/src/plugins/BotControl/commands/DisallowServerCmd.ts
@@ -1,6 +1,6 @@
import { Snowflake, TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { noop } from "../../../utils";
import { botControlCmd } from "../types";
@@ -8,7 +8,7 @@ export const DisallowServerCmd = botControlCmd({
trigger: ["disallow_server", "disallowserver", "remove_server", "removeserver"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/LeaveServerCmd.ts b/backend/src/plugins/BotControl/commands/LeaveServerCmd.ts
index b502c08f..20d0b14b 100644
--- a/backend/src/plugins/BotControl/commands/LeaveServerCmd.ts
+++ b/backend/src/plugins/BotControl/commands/LeaveServerCmd.ts
@@ -1,13 +1,13 @@
import { Snowflake, TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { botControlCmd } from "../types";
export const LeaveServerCmd = botControlCmd({
trigger: ["leave_server", "leave_guild"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts b/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts
index dcfb166c..590522f1 100644
--- a/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts
@@ -2,7 +2,7 @@ import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { AllowedGuild } from "../../../data/entities/AllowedGuild";
import { ApiPermissionAssignment } from "../../../data/entities/ApiPermissionAssignment";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { resolveUser } from "../../../utils";
import { botControlCmd } from "../types";
diff --git a/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts b/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts
index a97efca6..90fee6ff 100644
--- a/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts
@@ -1,6 +1,6 @@
import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { resolveUser } from "../../../utils";
import { botControlCmd } from "../types";
diff --git a/backend/src/plugins/BotControl/commands/ReloadGlobalPluginsCmd.ts b/backend/src/plugins/BotControl/commands/ReloadGlobalPluginsCmd.ts
index 1b3629ce..0cd4ec0b 100644
--- a/backend/src/plugins/BotControl/commands/ReloadGlobalPluginsCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ReloadGlobalPluginsCmd.ts
@@ -1,5 +1,5 @@
import { TextChannel } from "discord.js";
-import { isOwnerPreFilter } from "../../../pluginUtils";
+import { isStaffPreFilter } from "../../../pluginUtils";
import { getActiveReload, setActiveReload } from "../activeReload";
import { botControlCmd } from "../types";
@@ -7,7 +7,7 @@ export const ReloadGlobalPluginsCmd = botControlCmd({
trigger: "bot_reload_global_plugins",
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
async run({ pluginData, message }) {
diff --git a/backend/src/plugins/BotControl/commands/ReloadServerCmd.ts b/backend/src/plugins/BotControl/commands/ReloadServerCmd.ts
index 88193fba..645e4cf4 100644
--- a/backend/src/plugins/BotControl/commands/ReloadServerCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ReloadServerCmd.ts
@@ -1,13 +1,13 @@
import { Snowflake, TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { botControlCmd } from "../types";
export const ReloadServerCmd = botControlCmd({
trigger: ["reload_server", "reload_guild"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts
index dff4928d..d5dd674b 100644
--- a/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts
+++ b/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts
@@ -1,13 +1,13 @@
import { TextChannel } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
+import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { botControlCmd } from "../types";
export const RemoveDashboardUserCmd = botControlCmd({
trigger: ["remove_dashboard_user"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
diff --git a/backend/src/plugins/BotControl/commands/ServersCmd.ts b/backend/src/plugins/BotControl/commands/ServersCmd.ts
index f8c91b61..cee486d2 100644
--- a/backend/src/plugins/BotControl/commands/ServersCmd.ts
+++ b/backend/src/plugins/BotControl/commands/ServersCmd.ts
@@ -1,7 +1,7 @@
import { TextChannel } from "discord.js";
import escapeStringRegexp from "escape-string-regexp";
import { commandTypeHelpers as ct } from "../../../commandTypes";
-import { isOwnerPreFilter } from "../../../pluginUtils";
+import { isStaffPreFilter } from "../../../pluginUtils";
import { createChunkedMessage, getUser, sorter } from "../../../utils";
import { botControlCmd } from "../types";
@@ -9,7 +9,7 @@ export const ServersCmd = botControlCmd({
trigger: ["servers", "guilds"],
permission: null,
config: {
- preFilters: [isOwnerPreFilter],
+ preFilters: [isStaffPreFilter],
},
signature: {
From 4a5e8ded75e952e7dfff31ceb1a909f4af0ed8fc Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 6 Aug 2022 22:12:40 +0300
Subject: [PATCH 078/190] feat: add DEFAULT_ALLOWED_SERVERS .env value
---
.env.example | 3 +++
backend/src/data/AllowedGuilds.ts | 1 +
backend/src/env.ts | 2 ++
.../GuildAccessMonitorPlugin.ts | 15 ++++++++++++++-
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.env.example b/.env.example
index a794dc46..cc76ef84 100644
--- a/.env.example
+++ b/.env.example
@@ -12,6 +12,9 @@ API_URL=https://localhost:3300/api
# Comma-separated list of user IDs who should have access to the bot's global commands
STAFF=
+# A comma-separated list of server IDs that should be allowed by default
+DEFAULT_ALLOWED_SERVERS=
+
# When using the Docker-based development environment, this is only used internally. The API will be available at localhost:DOCKER_DEV_WEB_PORT/api.
API_PORT=3000
diff --git a/backend/src/data/AllowedGuilds.ts b/backend/src/data/AllowedGuilds.ts
index 747dbb87..a9d86220 100644
--- a/backend/src/data/AllowedGuilds.ts
+++ b/backend/src/data/AllowedGuilds.ts
@@ -4,6 +4,7 @@ import { BaseRepository } from "./BaseRepository";
import { AllowedGuild } from "./entities/AllowedGuild";
import moment from "moment-timezone";
import { DBDateFormat } from "../utils";
+import { env } from "../env";
export class AllowedGuilds extends BaseRepository {
private allowedGuilds: Repository;
diff --git a/backend/src/env.ts b/backend/src/env.ts
index cd453f39..5a607e45 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -17,6 +17,8 @@ const envType = z.object({
STAFF: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
+ DEFAULT_ALLOWED_SERVERS: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
+
PHISHERMAN_API_KEY: z.string().optional(),
DOCKER_DEV_MYSQL_PASSWORD: z.string().optional(), // Included here for the DB_PASSWORD default in development
diff --git a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
index d181ad7a..711a9154 100644
--- a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
+++ b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
@@ -3,6 +3,8 @@ import * as t from "io-ts";
import { BasePluginType, GlobalPluginData, typedGlobalEventListener } from "knub";
import { AllowedGuilds } from "../../data/AllowedGuilds";
import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint";
+import { env } from "../../env";
+import { Configs } from "../../data/Configs";
interface GuildAccessMonitorPluginType extends BasePluginType {
config: {};
@@ -35,8 +37,19 @@ export const GuildAccessMonitorPlugin = zeppelinGlobalPlugin
Date: Sat, 6 Aug 2022 22:13:07 +0300
Subject: [PATCH 079/190] debug: temporarily disable server auto-leaving
This is to avoid any potential funny business during the upcoming server migration.
---
.../plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
index 711a9154..80da1ebd 100644
--- a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
+++ b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts
@@ -17,7 +17,7 @@ async function checkGuild(pluginData: GlobalPluginData
Date: Sat, 6 Aug 2022 22:18:21 +0300
Subject: [PATCH 080/190] feat: more work on prod docker setup
---
.env.example | 2 +
DEVELOPMENT.md | 2 +-
MANAGEMENT.md | 34 ++++++++++++
PRODUCTION.md | 32 +++++++++++
README.md | 53 +++----------------
docker-compose.development.yml | 3 +-
docker-compose.production.yml | 23 ++++----
docker/development/data/mysql/.gitignore | 2 +
.../production/config/mysql.conf.d/.gitignore | 2 +
docker/production/data/mysql/.gitignore | 2 +
docker/production/start-api.sh | 13 +++++
docker/production/start-bot.sh | 13 +++++
update.sh | 9 +++-
13 files changed, 129 insertions(+), 61 deletions(-)
create mode 100644 MANAGEMENT.md
create mode 100644 PRODUCTION.md
create mode 100644 docker/development/data/mysql/.gitignore
create mode 100644 docker/production/config/mysql.conf.d/.gitignore
create mode 100644 docker/production/data/mysql/.gitignore
create mode 100755 docker/production/start-api.sh
create mode 100644 docker/production/start-bot.sh
diff --git a/.env.example b/.env.example
index cc76ef84..4494f3b0 100644
--- a/.env.example
+++ b/.env.example
@@ -49,6 +49,8 @@ DOCKER_DEV_SSH_PASSWORD=password
DOCKER_PROD_DOMAIN=
DOCKER_PROD_WEB_PORT=443
+# The MySQL database running in the container is exposed to the host on this port,
+# allowing access with database tools such as DBeaver
DOCKER_PROD_MYSQL_PORT=3001
# Password for the Zeppelin database user
DOCKER_PROD_MYSQL_PASSWORD=
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 0edbbc88..90f2c2ca 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -2,7 +2,7 @@
Zeppelin's development environment runs entirely within a Docker container.
Below you can find instructions for setting up the environment and getting started with development!
-👉 **No support is offered for self-hosting the bot!** 👈
+**Note:** If you'd just like to run the bot for your own server, see 👉 **[PRODUCTION.md](./PRODUCTION.md)** 👈
## Starting the development environment
diff --git a/MANAGEMENT.md b/MANAGEMENT.md
new file mode 100644
index 00000000..a6d12ef5
--- /dev/null
+++ b/MANAGEMENT.md
@@ -0,0 +1,34 @@
+# Management
+After starting Zeppelin -- either in the [development](./DEVELOPMENT.md) or [production](./PRODUCTION.md) environment -- you have several tools available to manage it.
+
+## Note
+Make sure to add yourself to the list of staff members (`STAFF`) in `.env` and allow at least one server by default (`DEFAULT_ALLOWED_SERVERS`). Then, invite the bot to the server.
+
+In all examples below, `@Bot` refers to a user mention of the bot user. Make sure to run the commands on a server with the bot, in a channel that the bot can see.
+
+In the command parameters, `` refers to a required parameter (don't include the `< >` symbols) and `[this]` refers to an optional parameter (don't include the `[ ]` symbols). `` refers to being able to list multiple values, e.g. `value1 value2 value3`.
+
+## Allow a server to invite the bot
+Run the following command:
+```
+@Bot allow_server [userId]
+```
+When specifying a user ID, that user will be given "Bot manager" level access to the server's dashboard, allowing them to manage access for other users.
+
+## Disallow a server
+Run the following command:
+```
+@Bot disallow_server
+```
+
+## Grant access to a server's dashboard
+Run the following command:
+```
+@Bot add_dashboard_user
+```
+
+## Remove access to a server's dashboard
+Run the following command:
+```
+@Bot remove_dashboard_user
+```
diff --git a/PRODUCTION.md b/PRODUCTION.md
new file mode 100644
index 00000000..a45bf50d
--- /dev/null
+++ b/PRODUCTION.md
@@ -0,0 +1,32 @@
+# Zeppelin production environment
+Zeppelin's production environment - that is, the **bot, API, and dashboard** - uses Docker.
+
+## Starting the production environment
+1. Install Docker on the machine running the bot
+2. Make a copy of `.env.example` called `.env`
+3. Fill in the missing values in `.env`
+4. Run `docker-compose -f docker-compose.production.yml -d up`
+
+## Updating the bot
+
+### One-click script
+If you've downloaded the bot's files by cloning the git repository, you can use `update.sh` to update the bot.
+
+### Manual instructions
+1. Shut the bot down: `docker-compose -f docker-compose.production.yml down`
+2. Update the files (e.g. `git pull`)
+3. Start the bot again: `docker-compose -f docker-compose.production.yml -d up`
+
+### Ephemeral hotfixes
+If you need to make a hotfix to the bot's source files directly on the server:
+1. Shut the bot down: `docker-compose -f docker-compose.production.yml down`
+2. Make your edits
+3. Start the bot again: `docker-compose -f docker-compose.production.yml -d up`
+
+Note that you can't edit the compiled files directly as they're overwritten when the environment starts.
+Only edit files in `/backend/src`, `/shared/src`, and `/dashboard/src`.
+
+Make sure to revert any hotfixes before updating the bot normally.
+
+## View logs
+To view real-time logs, run `docker-compose -f docker-compose.production.yml -t logs`
diff --git a/README.md b/README.md
index 4d11bbe5..52f60f07 100644
--- a/README.md
+++ b/README.md
@@ -19,52 +19,15 @@ Zeppelin is a moderation bot for Discord, designed with large servers and reliab
See https://zeppelin.gg/ for more details.
+## Usage documentation
+For information on how to use the bot, see https://zeppelin.gg/docs
+
## Development
-👉 **No support is offered for self-hosting the bot!** 👈
+See [DEVELOPMENT.md](./DEVELOPMENT.md) for instructions on running the development environment.
-See [DEVELOPMENT.md](./DEVELOPMENT.md) for instructions on running the development environment!
+Once you have the environment up and running, see [MANAGEMENT.md](./MANAGEMENT.md) for how to manage your bot.
-### Config format example
-Configuration is stored in the database in the `configs` table
+## Production
+See [PRODUCTION.md](./PRODUCTION.md) for instructions on how to run the bot in production.
-```yml
-prefix: '!'
-
-# role id: level
-levels:
- "12345678": 100 # Example admin
- "98765432": 50 # Example mod
-
-plugins:
- mod_plugin:
- config:
- kick_message: 'You have been kicked'
- can_kick: false
- overrides:
- - level: '>=50'
- config:
- can_kick: true
- - level: '>=100'
- config:
- kick_message: 'You have been kicked by an admin'
-
- other_plugin:
- config:
- categories:
- mycategory:
- opt: "something"
- othercategory:
- enabled: false
- opt: "hello"
- overrides:
- - level: '>=50'
- config:
- categories:
- mycategory:
- enabled: false
- - channel: '1234'
- config:
- categories:
- othercategory:
- enabled: true
-```
+Once you have the environment up and running, see [MANAGEMENT.md](./MANAGEMENT.md) for how to manage your bot.
diff --git a/docker-compose.development.yml b/docker-compose.development.yml
index 4a28033e..d64aa393 100644
--- a/docker-compose.development.yml
+++ b/docker-compose.development.yml
@@ -1,7 +1,6 @@
version: '3'
name: zeppelin-dev
volumes:
- mysql-data: {}
vscode-remote: {}
vscode-server: {}
jetbrains-data: {}
@@ -27,7 +26,7 @@ services:
ports:
- ${DOCKER_DEV_MYSQL_PORT:?Missing DOCKER_DEV_MYSQL_PORT}:3306
volumes:
- - mysql-data:/var/lib/mysql
+ - ./docker/development/data/mysql:/var/lib/mysql
command: --authentication-policy=mysql_native_password
devenv:
diff --git a/docker-compose.production.yml b/docker-compose.production.yml
index 1b03bd00..109cb3bb 100644
--- a/docker-compose.production.yml
+++ b/docker-compose.production.yml
@@ -1,7 +1,5 @@
version: '3'
name: zeppelin-prod
-volumes:
- mysql-data: {}
services:
nginx:
build:
@@ -24,7 +22,7 @@ services:
ports:
- ${DOCKER_PROD_MYSQL_PORT:?Missing DOCKER_PROD_MYSQL_PORT}:3306
volumes:
- - mysql-data:/var/lib/mysql
+ - ./docker/production/data/mysql:/var/lib/mysql
command: --authentication-policy=mysql_native_password
prepare_backend:
@@ -44,15 +42,18 @@ services:
- prepare_backend
volumes:
- ./:/zeppelin
-
- # Wait for the build_backend container to finish before starting the bot
- # See: https://github.com/docker/compose/issues/5007#issuecomment-335815508
user: node
- command: |-
- bash -c ' \
- while ping -c1 prepare_backend &>/dev/null; do sleep 1; done; \
- cd /zeppelin/backend && npm run start-api-prod \
- '
+ command: ["/bin/bash", "/zeppelin/docker/production/start-api.sh"]
+
+ bot:
+ image: node:16.16
+ restart: on-failure
+ depends_on:
+ - prepare_backend
+ volumes:
+ - ./:/zeppelin
+ user: node
+ command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]
build_dashboard:
image: node:16.16
diff --git a/docker/development/data/mysql/.gitignore b/docker/development/data/mysql/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/docker/development/data/mysql/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/docker/production/config/mysql.conf.d/.gitignore b/docker/production/config/mysql.conf.d/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/docker/production/config/mysql.conf.d/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/docker/production/data/mysql/.gitignore b/docker/production/data/mysql/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/docker/production/data/mysql/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/docker/production/start-api.sh b/docker/production/start-api.sh
new file mode 100755
index 00000000..00e9359a
--- /dev/null
+++ b/docker/production/start-api.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This wrapper script is used for two purposes:
+# 1. Waiting for the prepare_backend container to finish before starting (see https://github.com/docker/compose/issues/5007#issuecomment-335815508)
+# 2. Forwarding signals to the app (see https://unix.stackexchange.com/a/196053)
+
+# Wait for the backend preparations to finish before continuing
+echo "Waiting for prepare_backend to finish before starting the API..."
+while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
+
+echo "Starting the API"
+cd /zeppelin/backend
+exec npm run start-api-prod
diff --git a/docker/production/start-bot.sh b/docker/production/start-bot.sh
new file mode 100644
index 00000000..d9214465
--- /dev/null
+++ b/docker/production/start-bot.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This wrapper script is used for two purposes:
+# 1. Waiting for the prepare_backend container to finish before starting (see https://github.com/docker/compose/issues/5007#issuecomment-335815508)
+# 2. Forwarding signals to the app (see https://unix.stackexchange.com/a/196053)
+
+# Wait for the backend preparations to finish before continuing
+echo "Waiting for prepare_backend to finish before starting the bot..."
+while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
+
+echo "Starting the bot"
+cd /zeppelin/backend
+exec npm run start-bot-prod
diff --git a/update.sh b/update.sh
index bf615aa5..8a32cf94 100755
--- a/update.sh
+++ b/update.sh
@@ -1,4 +1,9 @@
#!/bin/bash
-. ./update-backend.sh
-. ./update-dashboard.sh
+echo Updating Zeppelin...
+
+docker-compose -f docker-compose.production.yml down
+git pull
+docker-compose -f docker-compose.production.yml -d up
+
+echo Update finished!
From a9cf019d2943ea84fe64bf8b120e7d76fc2cb51f Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 6 Aug 2022 22:28:26 +0300
Subject: [PATCH 081/190] chore: add LICENCE.md
---
LICENCE.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 LICENCE.md
diff --git a/LICENCE.md b/LICENCE.md
new file mode 100644
index 00000000..3d910e33
--- /dev/null
+++ b/LICENCE.md
@@ -0,0 +1,55 @@
+# Elastic License 2.0 (ELv2)
+
+## Elastic License
+
+### Acceptance
+
+By using the software, you agree to all of the terms and conditions below.
+
+### Copyright License
+
+The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.
+
+### Limitations
+
+You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
+
+You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
+
+You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
+
+### Patents
+
+The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
+
+### Notices
+
+You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
+
+If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
+
+### No Other Rights
+
+These terms do not imply any licenses other than those expressly granted in these terms.
+
+### Termination
+
+If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
+
+### No Liability
+
+***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
+
+### Definitions
+
+The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.
+
+**you** refers to the individual or entity agreeing to these terms.
+
+**your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
+
+**your licenses** are all the licenses granted to you for the software under these terms.
+
+**use** means anything you do with the software requiring one of your licenses.
+
+**trademark** means trademarks, service marks, and similar rights.
From ad1f5b8fde75db3527c71223506eeee9b175bb59 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 6 Aug 2022 22:31:10 +0300
Subject: [PATCH 082/190] chore: rename LICENCE.md to LICENSE.md
---
LICENCE.md => LICENSE.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename LICENCE.md => LICENSE.md (100%)
diff --git a/LICENCE.md b/LICENSE.md
similarity index 100%
rename from LICENCE.md
rename to LICENSE.md
From 22d0b14ef16ea3d95095c9300cd5992b294bbf00 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 12:23:27 +0300
Subject: [PATCH 083/190] docker: allow configuring UID/GID used inside the
containers
---
.env.example | 5 +++++
docker-compose.production.yml | 28 ++++++++++++++++++++--------
docker/production/node/Dockerfile | 10 ++++++++++
3 files changed, 35 insertions(+), 8 deletions(-)
create mode 100644 docker/production/node/Dockerfile
diff --git a/.env.example b/.env.example
index 4494f3b0..363e617f 100644
--- a/.env.example
+++ b/.env.example
@@ -21,6 +21,11 @@ API_PORT=3000
# Only required if relevant feature is used
#PHISHERMAN_API_KEY=
+# The user ID and group ID that should be used within the Docker containers
+# This should match your own user ID and group ID. Run `id -u` and `id -g` to find them.
+DOCKER_USER_UID=
+DOCKER_USER_GID=
+
#
# DOCKER (DEVELOPMENT)
#
diff --git a/docker-compose.production.yml b/docker-compose.production.yml
index 109cb3bb..6ab79342 100644
--- a/docker-compose.production.yml
+++ b/docker-compose.production.yml
@@ -26,39 +26,51 @@ services:
command: --authentication-policy=mysql_native_password
prepare_backend:
- image: node:16.16
+ build:
+ context: ./docker/production/node
+ args:
+ DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
+ DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
depends_on:
- mysql
volumes:
- ./:/zeppelin
- user: node
command: |-
bash -c "cd /zeppelin/backend && npm ci && npm run build && npm run migrate-prod"
api:
- image: node:16.16
+ build:
+ context: ./docker/production/node
+ args:
+ DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
+ DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
restart: on-failure
depends_on:
- prepare_backend
volumes:
- ./:/zeppelin
- user: node
command: ["/bin/bash", "/zeppelin/docker/production/start-api.sh"]
bot:
- image: node:16.16
+ build:
+ context: ./docker/production/node
+ args:
+ DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
+ DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
restart: on-failure
depends_on:
- prepare_backend
volumes:
- ./:/zeppelin
- user: node
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]
build_dashboard:
- image: node:16.16
+ build:
+ context: ./docker/production/node
+ args:
+ DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
+ DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
volumes:
- ./:/zeppelin
- user: node
command: |-
bash -c "cd /zeppelin/dashboard && npm ci && npm run build"
diff --git a/docker/production/node/Dockerfile b/docker/production/node/Dockerfile
new file mode 100644
index 00000000..22b46e45
--- /dev/null
+++ b/docker/production/node/Dockerfile
@@ -0,0 +1,10 @@
+FROM node:16.16
+
+ARG DOCKER_USER_UID
+ARG DOCKER_USER_GID
+
+# This custom Dockerfile is needed for the Node image so we can change the uid/gid used for the node user
+# See https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user
+RUN groupmod -g "${DOCKER_USER_GID}" node && usermod -u "${DOCKER_USER_UID}" -g "${DOCKER_USER_GID}" node
+
+USER node
From 9bd1b97a11b1f0e4bfd4ccd1a70d406538c5676c Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 12:45:52 +0300
Subject: [PATCH 084/190] fix: ignore empty values for
STAFF/DEFAULT_ALLOWED_SERVERS
---
backend/src/env.ts | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/backend/src/env.ts b/backend/src/env.ts
index 5a607e45..a125a744 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -15,9 +15,27 @@ const envType = z.object({
API_URL: z.string().url(),
API_PORT: z.preprocess((v) => Number(v), z.number().min(1).max(65535)).default(3000),
- STAFF: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
+ STAFF: z
+ .preprocess(
+ (v) =>
+ String(v)
+ .split(",")
+ .map((s) => s.trim())
+ .filter((s) => s !== ""),
+ z.array(z.string()),
+ )
+ .optional(),
- DEFAULT_ALLOWED_SERVERS: z.preprocess((v) => String(v).split(","), z.array(z.string())).optional(),
+ DEFAULT_ALLOWED_SERVERS: z
+ .preprocess(
+ (v) =>
+ String(v)
+ .split(",")
+ .map((s) => s.trim())
+ .filter((s) => s !== ""),
+ z.array(z.string()),
+ )
+ .optional(),
PHISHERMAN_API_KEY: z.string().optional(),
From 561f91949d3e5255c0f70ee18131a36fc9ca5e2c Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 13:52:04 +0300
Subject: [PATCH 085/190] docs: fixes/tweaks to docker docs
---
DEVELOPMENT.md | 6 +++---
PRODUCTION.md | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 90f2c2ca..62e3b66a 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -17,7 +17,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `docker-compose up` to start the development environment
+4. Run `docker compose -f docker-compose.development.yml up` to start the development environment
5. In VSCode: Install the `Remote - SSH` plugin
6. In VSCode: Run `Remote-SSH: Connect to Host...`
* As the address, use `ubuntu@127.0.0.1:3002` (where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`)
@@ -28,7 +28,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `docker-compose up` to start the development environment
+4. Run `docker compose -f docker-compose.development.yml up` to start the development environment
5. Choose `Connect via SSH` and create a new connection:
* Username: `ubuntu`
* Host: `127.0.0.1`
@@ -43,7 +43,7 @@ Below you can find instructions for setting up the environment and getting start
1. Install Docker
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `docker-compose up` to start the development environment
+4. Run `docker compose -f docker-compose.development.yml up` to start the development environment
5. Use the following credentials for connecting with your IDE:
* Host: `127.0.0.1`
* Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
diff --git a/PRODUCTION.md b/PRODUCTION.md
index a45bf50d..2a9b1baa 100644
--- a/PRODUCTION.md
+++ b/PRODUCTION.md
@@ -5,7 +5,7 @@ Zeppelin's production environment - that is, the **bot, API, and dashboard** - u
1. Install Docker on the machine running the bot
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env`
-4. Run `docker-compose -f docker-compose.production.yml -d up`
+4. Run `docker compose -f docker-compose.production.yml up -d`
## Updating the bot
@@ -13,15 +13,15 @@ Zeppelin's production environment - that is, the **bot, API, and dashboard** - u
If you've downloaded the bot's files by cloning the git repository, you can use `update.sh` to update the bot.
### Manual instructions
-1. Shut the bot down: `docker-compose -f docker-compose.production.yml down`
+1. Shut the bot down: `docker compose -f docker-compose.production.yml stop`
2. Update the files (e.g. `git pull`)
-3. Start the bot again: `docker-compose -f docker-compose.production.yml -d up`
+3. Start the bot again: `docker compose -f docker-compose.production.yml start`
### Ephemeral hotfixes
If you need to make a hotfix to the bot's source files directly on the server:
-1. Shut the bot down: `docker-compose -f docker-compose.production.yml down`
+1. Shut the bot down: `docker compose -f docker-compose.production.yml stop`
2. Make your edits
-3. Start the bot again: `docker-compose -f docker-compose.production.yml -d up`
+3. Start the bot again: `docker compose -f docker-compose.production.yml start`
Note that you can't edit the compiled files directly as they're overwritten when the environment starts.
Only edit files in `/backend/src`, `/shared/src`, and `/dashboard/src`.
@@ -29,4 +29,4 @@ Only edit files in `/backend/src`, `/shared/src`, and `/dashboard/src`.
Make sure to revert any hotfixes before updating the bot normally.
## View logs
-To view real-time logs, run `docker-compose -f docker-compose.production.yml -t logs`
+To view real-time logs, run `docker compose -f docker-compose.production.yml -t -f logs`
From 1308054d6903b433dc4d4cbcd1d49d28e10099c9 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 13:52:41 +0300
Subject: [PATCH 086/190] fix: use docker compose v2 syntax in update.sh; only
stop/start the containers rather than recreating them
---
update.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/update.sh b/update.sh
index 8a32cf94..870e2e2e 100755
--- a/update.sh
+++ b/update.sh
@@ -2,8 +2,8 @@
echo Updating Zeppelin...
-docker-compose -f docker-compose.production.yml down
+docker compose -f docker-compose.production.yml stop
git pull
-docker-compose -f docker-compose.production.yml -d up
+docker compose -f docker-compose.production.yml start
echo Update finished!
From 030da51da1c95f143f180eb1c6f3d42e7e780d53 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 13:53:02 +0300
Subject: [PATCH 087/190] chore: remove deprecated .env.example from /dashboard
---
dashboard/.env.example | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 dashboard/.env.example
diff --git a/dashboard/.env.example b/dashboard/.env.example
deleted file mode 100644
index fb6be76e..00000000
--- a/dashboard/.env.example
+++ /dev/null
@@ -1 +0,0 @@
-API_URL=
From c01a4027bda0a2e528b1b3ac9f5a124ca83190d1 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 13:55:07 +0300
Subject: [PATCH 088/190] chore: remove files that are no longer needed with
the docker environment
---
process-api.json | 12 ------------
process-bot.json | 12 ------------
update-backend-hotfix.sh | 16 ----------------
update-backend.sh | 25 -------------------------
update-dashboard.sh | 18 ------------------
5 files changed, 83 deletions(-)
delete mode 100644 process-api.json
delete mode 100644 process-bot.json
delete mode 100755 update-backend-hotfix.sh
delete mode 100755 update-backend.sh
delete mode 100755 update-dashboard.sh
diff --git a/process-api.json b/process-api.json
deleted file mode 100644
index 2feaf75f..00000000
--- a/process-api.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "apps": [
- {
- "name": "zeppelin-api",
- "cwd": "./backend",
- "script": "npm",
- "args": "run start-api-prod",
- "log_date_format": "YYYY-MM-DD HH:mm:ss.SSS",
- "exp_backoff_restart_delay": 2500
- }
- ]
-}
diff --git a/process-bot.json b/process-bot.json
deleted file mode 100644
index b8667e2d..00000000
--- a/process-bot.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "apps": [
- {
- "name": "zeppelin",
- "cwd": "./backend",
- "script": "npm",
- "args": "run start-bot-prod",
- "log_date_format": "YYYY-MM-DD HH:mm:ss.SSS",
- "exp_backoff_restart_delay": 2500
- }
- ]
-}
diff --git a/update-backend-hotfix.sh b/update-backend-hotfix.sh
deleted file mode 100755
index e692d7a9..00000000
--- a/update-backend-hotfix.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# Load nvm
-. ~/.nvm/nvm.sh
-
-# Run hotfix update
-cd backend
-nvm use
-git pull
-npm run build
-
-# Restart processes
-cd ..
-nvm use
-pm2 restart process-bot.json
-pm2 restart process-api.json
diff --git a/update-backend.sh b/update-backend.sh
deleted file mode 100755
index 4da51186..00000000
--- a/update-backend.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# Load nvm
-. ~/.nvm/nvm.sh
-
-# Stop current processes
-nvm use
-pm2 delete process-bot.json
-pm2 delete process-api.json
-
-# Run update
-nvm use
-git pull
-npm ci
-
-cd backend
-npm ci
-npm run build
-npm run migrate-prod
-
-# Start processes again
-cd ..
-nvm use
-pm2 start process-bot.json
-pm2 start process-api.json
diff --git a/update-dashboard.sh b/update-dashboard.sh
deleted file mode 100755
index 34a47fc6..00000000
--- a/update-dashboard.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-TARGET_DIR=/var/www/zeppelin.gg
-
-# Load nvm
-. ~/.nvm/nvm.sh
-
-# Update dashboard
-cd dashboard
-git pull
-nvm use
-npm ci
-npm run build
-rm -r $TARGET_DIR/*
-cp -R dist/* $TARGET_DIR
-
-# Return
-cd ..
From 7d47f36d991e539d83c4ddc2a59c095451731a00 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 7 Aug 2022 13:58:47 +0300
Subject: [PATCH 089/190] docs: documentation updates
---
.env.example | 4 ++++
PRODUCTION.md | 2 ++
2 files changed, 6 insertions(+)
diff --git a/.env.example b/.env.example
index 363e617f..aadba71b 100644
--- a/.env.example
+++ b/.env.example
@@ -6,6 +6,8 @@ CLIENT_ID=
CLIENT_SECRET=
BOT_TOKEN=
+# The defaults here automatically work for the development environment.
+# For production, change localhost:3300 to your domain.
DASHBOARD_URL=https://localhost:3300
API_URL=https://localhost:3300/api
@@ -28,6 +30,7 @@ DOCKER_USER_GID=
#
# DOCKER (DEVELOPMENT)
+# NOTE: You only need to fill in these values for running the development environment. See production config further below.
#
DOCKER_DEV_WEB_PORT=3300
@@ -50,6 +53,7 @@ DOCKER_DEV_SSH_PASSWORD=password
#
# DOCKER (PRODUCTION)
+# NOTE: You only need to fill in these values for running the production environment. See development config above.
#
DOCKER_PROD_DOMAIN=
diff --git a/PRODUCTION.md b/PRODUCTION.md
index 2a9b1baa..e05d5cc3 100644
--- a/PRODUCTION.md
+++ b/PRODUCTION.md
@@ -7,6 +7,8 @@ Zeppelin's production environment - that is, the **bot, API, and dashboard** - u
3. Fill in the missing values in `.env`
4. Run `docker compose -f docker-compose.production.yml up -d`
+**Note:** The dashboard and API are exposed with a self-signed certificate. It is recommended to set up a proxy with a proper certificate in front of them. Cloudflare is a popular choice here.
+
## Updating the bot
### One-click script
From 265764866ed50e93845f28ade8fd63f2258d422e Mon Sep 17 00:00:00 2001
From: k200 <85361508+k200-1@users.noreply.github.com>
Date: Sat, 13 Aug 2022 13:38:11 +0100
Subject: [PATCH 090/190] Change order of flags in command
Fixes the order of the flags so that the command works
---
PRODUCTION.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PRODUCTION.md b/PRODUCTION.md
index e05d5cc3..f3bc8b6b 100644
--- a/PRODUCTION.md
+++ b/PRODUCTION.md
@@ -31,4 +31,4 @@ Only edit files in `/backend/src`, `/shared/src`, and `/dashboard/src`.
Make sure to revert any hotfixes before updating the bot normally.
## View logs
-To view real-time logs, run `docker compose -f docker-compose.production.yml -t -f logs`
+To view real-time logs, run `docker compose -f docker-compose.production.yml logs -t -f`
From d472fd4fa6a2111fe71f88715d269386f3f6fadc Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 13 Aug 2022 23:19:06 +0300
Subject: [PATCH 091/190] fix(logs): fix inconsistent thread/channel/category
exclusions; add excluded_threads log channel option
---
.../plugins/Logs/logFunctions/logCensor.ts | 4 +-
.../Logs/logFunctions/logChannelCreate.ts | 4 +-
.../Logs/logFunctions/logChannelDelete.ts | 4 +-
.../Logs/logFunctions/logChannelUpdate.ts | 4 +-
.../src/plugins/Logs/logFunctions/logClean.ts | 4 +-
.../Logs/logFunctions/logMessageDelete.ts | 4 +-
.../Logs/logFunctions/logMessageDeleteAuto.ts | 4 +-
.../Logs/logFunctions/logMessageDeleteBare.ts | 4 +-
.../Logs/logFunctions/logMessageDeleteBulk.ts | 4 +-
.../Logs/logFunctions/logMessageEdit.ts | 3 +-
.../logFunctions/logMessageSpamDetected.ts | 4 +-
.../logFunctions/logPostedScheduledMessage.ts | 4 +-
.../Logs/logFunctions/logRepeatedMessage.ts | 4 +-
.../Logs/logFunctions/logScheduledMessage.ts | 4 +-
.../logScheduledRepeatedMessage.ts | 4 +-
.../logFunctions/logStageInstanceCreate.ts | 4 +-
.../logFunctions/logStageInstanceDelete.ts | 4 +-
.../logFunctions/logStageInstanceUpdate.ts | 4 +-
.../Logs/logFunctions/logThreadCreate.ts | 4 +-
.../Logs/logFunctions/logThreadDelete.ts | 4 +-
.../Logs/logFunctions/logThreadUpdate.ts | 4 +-
.../logVoiceChannelForceDisconnect.ts | 4 +-
.../logFunctions/logVoiceChannelForceMove.ts | 4 +-
.../Logs/logFunctions/logVoiceChannelJoin.ts | 4 +-
.../Logs/logFunctions/logVoiceChannelLeave.ts | 4 +-
.../Logs/logFunctions/logVoiceChannelMove.ts | 4 +-
backend/src/plugins/Logs/types.ts | 1 +
backend/src/plugins/Logs/util/log.ts | 5 ++
backend/src/utils/isDmChannel.ts | 6 +++
backend/src/utils/isGuildChannel.ts | 5 ++
backend/src/utils/isThreadChannel.ts | 10 ++++
backend/src/utils/resolveChannelIds.ts | 53 +++++++++++++++++++
32 files changed, 132 insertions(+), 51 deletions(-)
create mode 100644 backend/src/utils/isDmChannel.ts
create mode 100644 backend/src/utils/isGuildChannel.ts
create mode 100644 backend/src/utils/isThreadChannel.ts
create mode 100644 backend/src/utils/resolveChannelIds.ts
diff --git a/backend/src/plugins/Logs/logFunctions/logCensor.ts b/backend/src/plugins/Logs/logFunctions/logCensor.ts
index b0131657..c5048730 100644
--- a/backend/src/plugins/Logs/logFunctions/logCensor.ts
+++ b/backend/src/plugins/Logs/logFunctions/logCensor.ts
@@ -12,6 +12,7 @@ import {
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { UnknownUser } from "../../../utils";
import { deactivateMentions, disableCodeBlocks } from "knub/dist/helpers";
+import { resolveChannelIds } from "src/utils/resolveChannelIds";
interface LogCensorData {
user: User | UnknownUser;
@@ -33,9 +34,8 @@ export function logCensor(pluginData: GuildPluginData, data: Log
}),
{
userId: data.user.id,
- channel: data.channel.id,
- category: data.channel.parentId,
bot: data.user instanceof User ? data.user.bot : false,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logChannelCreate.ts b/backend/src/plugins/Logs/logFunctions/logChannelCreate.ts
index 02ccba3d..a95ffb48 100644
--- a/backend/src/plugins/Logs/logFunctions/logChannelCreate.ts
+++ b/backend/src/plugins/Logs/logFunctions/logChannelCreate.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { GuildChannel, NewsChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogChannelCreateData {
channel: GuildChannel | NewsChannel;
@@ -18,8 +19,7 @@ export function logChannelCreate(pluginData: GuildPluginData, da
channel: channelToTemplateSafeChannel(data.channel),
}),
{
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logChannelDelete.ts b/backend/src/plugins/Logs/logFunctions/logChannelDelete.ts
index 547ed963..25bd4374 100644
--- a/backend/src/plugins/Logs/logFunctions/logChannelDelete.ts
+++ b/backend/src/plugins/Logs/logFunctions/logChannelDelete.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { GuildChannel, NewsChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogChannelDeleteData {
channel: GuildChannel | NewsChannel;
@@ -18,8 +19,7 @@ export function logChannelDelete(pluginData: GuildPluginData, da
channel: channelToTemplateSafeChannel(data.channel),
}),
{
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logChannelUpdate.ts b/backend/src/plugins/Logs/logFunctions/logChannelUpdate.ts
index ebe2ceb5..7942501e 100644
--- a/backend/src/plugins/Logs/logFunctions/logChannelUpdate.ts
+++ b/backend/src/plugins/Logs/logFunctions/logChannelUpdate.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { GuildChannel, NewsChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogChannelUpdateData {
oldChannel: GuildChannel | NewsChannel;
@@ -22,8 +23,7 @@ export function logChannelUpdate(pluginData: GuildPluginData, da
differenceString: data.differenceString,
}),
{
- channel: data.newChannel.id,
- category: data.newChannel.parentId,
+ ...resolveChannelIds(data.newChannel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logClean.ts b/backend/src/plugins/Logs/logFunctions/logClean.ts
index 4ef2077e..6486873f 100644
--- a/backend/src/plugins/Logs/logFunctions/logClean.ts
+++ b/backend/src/plugins/Logs/logFunctions/logClean.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogCleanData {
mod: User;
@@ -24,8 +25,7 @@ export function logClean(pluginData: GuildPluginData, data: LogC
archiveUrl: data.archiveUrl,
}),
{
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
index 6a2d642c..e103b13b 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts
@@ -13,6 +13,7 @@ import moment from "moment-timezone";
import { ISavedMessageAttachmentData, SavedMessage } from "../../../data/entities/SavedMessage";
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { UnknownUser, useMediaUrls } from "../../../utils";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageDeleteData {
user: User | UnknownUser;
@@ -47,10 +48,9 @@ export function logMessageDelete(pluginData: GuildPluginData, da
}),
{
userId: data.user.id,
- channel: data.channel.id,
- category: data.channel.parentId,
messageTextContent: data.message.data.content,
bot: data.user instanceof User ? data.user.bot : false,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDeleteAuto.ts b/backend/src/plugins/Logs/logFunctions/logMessageDeleteAuto.ts
index 4ce4694c..d4e66f28 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDeleteAuto.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDeleteAuto.ts
@@ -11,6 +11,7 @@ import {
} from "../../../utils/templateSafeObjects";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { UnknownUser } from "../../../utils";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageDeleteAutoData {
message: SavedMessage;
@@ -32,8 +33,7 @@ export function logMessageDeleteAuto(pluginData: GuildPluginData
{
userId: data.user.id,
bot: data.user instanceof User ? data.user.bot : false,
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
index ed49d3e4..ad9320e3 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBare.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageDeleteBareData {
messageId: string;
@@ -20,8 +21,7 @@ export function logMessageDeleteBare(pluginData: GuildPluginData
channel: channelToTemplateSafeChannel(data.channel),
}),
{
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
index b57b526b..2ffe36bf 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageDeleteBulk.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageDeleteBulkData {
count: number;
@@ -24,8 +25,7 @@ export function logMessageDeleteBulk(pluginData: GuildPluginData
archiveUrl: data.archiveUrl,
}),
{
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts b/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
index 3aee8dbe..64f12e8f 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageEdit.ts
@@ -11,6 +11,7 @@ import {
} from "../../../utils/templateSafeObjects";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { UnknownUser } from "../../../utils";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageEditData {
user: User | UnknownUser;
@@ -31,9 +32,9 @@ export function logMessageEdit(pluginData: GuildPluginData, data
}),
{
userId: data.user.id,
- channel: data.channel.id,
messageTextContent: data.after.data.content,
bot: data.user instanceof User ? data.user.bot : false,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logMessageSpamDetected.ts b/backend/src/plugins/Logs/logFunctions/logMessageSpamDetected.ts
index 94e41eda..a18f197c 100644
--- a/backend/src/plugins/Logs/logFunctions/logMessageSpamDetected.ts
+++ b/backend/src/plugins/Logs/logFunctions/logMessageSpamDetected.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildChannel, GuildMember, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageSpamDetectedData {
member: GuildMember;
@@ -30,9 +31,8 @@ export function logMessageSpamDetected(pluginData: GuildPluginData,
{
userId: data.author.id,
bot: data.author.bot,
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts b/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
index 54315e6f..8067dd6a 100644
--- a/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logScheduledMessage.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogScheduledMessageData {
author: User;
@@ -28,8 +29,7 @@ export function logScheduledMessage(pluginData: GuildPluginData,
{
userId: data.author.id,
bot: data.author.bot,
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts b/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
index 03272f5f..849b1a4a 100644
--- a/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
+++ b/backend/src/plugins/Logs/logFunctions/logScheduledRepeatedMessage.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildTextBasedChannel, ThreadChannel, User } from "discord.js";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogScheduledRepeatedMessageData {
author: User;
@@ -35,8 +36,7 @@ export function logScheduledRepeatedMessage(
{
userId: data.author.id,
bot: data.author.bot,
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logStageInstanceCreate.ts b/backend/src/plugins/Logs/logFunctions/logStageInstanceCreate.ts
index f1602c3b..6172a2bc 100644
--- a/backend/src/plugins/Logs/logFunctions/logStageInstanceCreate.ts
+++ b/backend/src/plugins/Logs/logFunctions/logStageInstanceCreate.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { StageChannel, StageInstance } from "discord.js";
import { channelToTemplateSafeChannel, stageToTemplateSafeStage } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogStageInstanceCreateData {
stageInstance: StageInstance;
@@ -20,8 +21,7 @@ export function logStageInstanceCreate(pluginData: GuildPluginData, dat
thread: channelToTemplateSafeChannel(data.thread),
}),
{
- channel: data.thread.parentId,
- category: data.thread.parent?.parentId,
+ ...resolveChannelIds(data.thread),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logThreadDelete.ts b/backend/src/plugins/Logs/logFunctions/logThreadDelete.ts
index 2467682f..04827083 100644
--- a/backend/src/plugins/Logs/logFunctions/logThreadDelete.ts
+++ b/backend/src/plugins/Logs/logFunctions/logThreadDelete.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogThreadDeleteData {
thread: ThreadChannel;
@@ -18,8 +19,7 @@ export function logThreadDelete(pluginData: GuildPluginData, dat
thread: channelToTemplateSafeChannel(data.thread),
}),
{
- channel: data.thread.parentId,
- category: data.thread.parent?.parentId,
+ ...resolveChannelIds(data.thread),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logThreadUpdate.ts b/backend/src/plugins/Logs/logFunctions/logThreadUpdate.ts
index 80e20acc..c359a683 100644
--- a/backend/src/plugins/Logs/logFunctions/logThreadUpdate.ts
+++ b/backend/src/plugins/Logs/logFunctions/logThreadUpdate.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogThreadUpdateData {
oldThread: ThreadChannel;
@@ -22,8 +23,7 @@ export function logThreadUpdate(pluginData: GuildPluginData, dat
differenceString: data.differenceString,
}),
{
- channel: data.newThread.parentId,
- category: data.newThread.parent?.parentId,
+ ...resolveChannelIds(data.newThread),
},
);
}
diff --git a/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceDisconnect.ts b/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceDisconnect.ts
index 4bdca809..9940a1a3 100644
--- a/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceDisconnect.ts
+++ b/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceDisconnect.ts
@@ -9,6 +9,7 @@ import {
memberToTemplateSafeMember,
userToTemplateSafeUser,
} from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogVoiceChannelForceDisconnectData {
mod: User;
@@ -31,8 +32,7 @@ export function logVoiceChannelForceDisconnect(
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
- channel: data.oldChannel.id,
- category: data.oldChannel.parentId,
+ ...resolveChannelIds(data.oldChannel),
bot: data.member.user.bot,
},
);
diff --git a/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceMove.ts b/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceMove.ts
index 5f5ec1e7..90b5478c 100644
--- a/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceMove.ts
+++ b/backend/src/plugins/Logs/logFunctions/logVoiceChannelForceMove.ts
@@ -9,6 +9,7 @@ import {
memberToTemplateSafeMember,
userToTemplateSafeUser,
} from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogVoiceChannelForceMoveData {
mod: User;
@@ -33,8 +34,7 @@ export function logVoiceChannelForceMove(
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
- channel: data.newChannel.id,
- category: data.newChannel.parentId,
+ ...resolveChannelIds(data.newChannel),
bot: data.member.user.bot,
},
);
diff --git a/backend/src/plugins/Logs/logFunctions/logVoiceChannelJoin.ts b/backend/src/plugins/Logs/logFunctions/logVoiceChannelJoin.ts
index 07c44309..71d5ea0c 100644
--- a/backend/src/plugins/Logs/logFunctions/logVoiceChannelJoin.ts
+++ b/backend/src/plugins/Logs/logFunctions/logVoiceChannelJoin.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildVoiceChannel, GuildMember } from "discord.js";
import { channelToTemplateSafeChannel, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogVoiceChannelJoinData {
member: GuildMember;
@@ -22,8 +23,7 @@ export function logVoiceChannelJoin(pluginData: GuildPluginData,
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
bot: data.member.user.bot,
},
);
diff --git a/backend/src/plugins/Logs/logFunctions/logVoiceChannelLeave.ts b/backend/src/plugins/Logs/logFunctions/logVoiceChannelLeave.ts
index 3fc67abb..509494fc 100644
--- a/backend/src/plugins/Logs/logFunctions/logVoiceChannelLeave.ts
+++ b/backend/src/plugins/Logs/logFunctions/logVoiceChannelLeave.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildVoiceChannel, GuildMember } from "discord.js";
import { channelToTemplateSafeChannel, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogVoiceChannelLeaveData {
member: GuildMember;
@@ -22,8 +23,7 @@ export function logVoiceChannelLeave(pluginData: GuildPluginData
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
- channel: data.channel.id,
- category: data.channel.parentId,
+ ...resolveChannelIds(data.channel),
bot: data.member.user.bot,
},
);
diff --git a/backend/src/plugins/Logs/logFunctions/logVoiceChannelMove.ts b/backend/src/plugins/Logs/logFunctions/logVoiceChannelMove.ts
index 14e47ccd..56090907 100644
--- a/backend/src/plugins/Logs/logFunctions/logVoiceChannelMove.ts
+++ b/backend/src/plugins/Logs/logFunctions/logVoiceChannelMove.ts
@@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildVoiceChannel, GuildMember } from "discord.js";
import { channelToTemplateSafeChannel, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
+import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogVoiceChannelMoveData {
member: GuildMember;
@@ -24,8 +25,7 @@ export function logVoiceChannelMove(pluginData: GuildPluginData,
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
- channel: data.newChannel.id,
- category: data.newChannel.parentId,
+ ...resolveChannelIds(data.newChannel),
bot: data.member.user.bot,
},
);
diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts
index d1905b8e..511636a6 100644
--- a/backend/src/plugins/Logs/types.ts
+++ b/backend/src/plugins/Logs/types.ts
@@ -42,6 +42,7 @@ const LogChannel = t.partial({
excluded_message_regexes: t.array(TRegex),
excluded_channels: t.array(t.string),
excluded_categories: t.array(t.string),
+ excluded_threads: t.array(t.string),
exclude_bots: t.boolean,
excluded_roles: t.array(t.string),
format: tNullable(tLogFormats),
diff --git a/backend/src/plugins/Logs/util/log.ts b/backend/src/plugins/Logs/util/log.ts
index f95e1f07..26be9585 100644
--- a/backend/src/plugins/Logs/util/log.ts
+++ b/backend/src/plugins/Logs/util/log.ts
@@ -22,6 +22,7 @@ interface ExclusionData {
roles?: Snowflake[] | null;
channel?: Snowflake | null;
category?: Snowflake | null;
+ thread?: Snowflake | null;
messageTextContent?: string | null;
}
@@ -58,6 +59,10 @@ async function shouldExclude(
return true;
}
+ if (opts.excluded_threads && exclusionData.thread && opts.excluded_threads.includes(exclusionData.thread)) {
+ return true;
+ }
+
if (opts.excluded_message_regexes && exclusionData.messageTextContent) {
for (const regex of opts.excluded_message_regexes) {
const matches = await pluginData.state.regexRunner
diff --git a/backend/src/utils/isDmChannel.ts b/backend/src/utils/isDmChannel.ts
new file mode 100644
index 00000000..ad1a5781
--- /dev/null
+++ b/backend/src/utils/isDmChannel.ts
@@ -0,0 +1,6 @@
+import { Channel, DMChannel } from "discord.js";
+import { ChannelTypeStrings } from "src/types";
+
+export function isDmChannel(channel: Channel): channel is DMChannel {
+ return channel.type === ChannelTypeStrings.DM || channel.type === ChannelTypeStrings.GROUP;
+}
diff --git a/backend/src/utils/isGuildChannel.ts b/backend/src/utils/isGuildChannel.ts
new file mode 100644
index 00000000..fa5a5199
--- /dev/null
+++ b/backend/src/utils/isGuildChannel.ts
@@ -0,0 +1,5 @@
+import { Channel, GuildChannel } from "discord.js";
+
+export function isGuildChannel(channel: Channel): channel is GuildChannel {
+ return channel.type.startsWith("GUILD_");
+}
diff --git a/backend/src/utils/isThreadChannel.ts b/backend/src/utils/isThreadChannel.ts
new file mode 100644
index 00000000..6a1060df
--- /dev/null
+++ b/backend/src/utils/isThreadChannel.ts
@@ -0,0 +1,10 @@
+import { Channel, ThreadChannel } from "discord.js";
+import { ChannelTypeStrings } from "src/types";
+
+export function isThreadChannel(channel: Channel): channel is ThreadChannel {
+ return (
+ channel.type === ChannelTypeStrings.NEWS_THREAD ||
+ channel.type === ChannelTypeStrings.PUBLIC_THREAD ||
+ channel.type === ChannelTypeStrings.PRIVATE_THREAD
+ );
+}
diff --git a/backend/src/utils/resolveChannelIds.ts b/backend/src/utils/resolveChannelIds.ts
new file mode 100644
index 00000000..bc7493e9
--- /dev/null
+++ b/backend/src/utils/resolveChannelIds.ts
@@ -0,0 +1,53 @@
+import { ChannelType } from "discord-api-types/v9";
+import { CategoryChannel, Channel } from "discord.js";
+import { ChannelTypes } from "discord.js/typings/enums";
+import { ChannelTypeStrings } from "src/types";
+import { isDmChannel } from "./isDmChannel";
+import { isGuildChannel } from "./isGuildChannel";
+import { isThreadChannel } from "./isThreadChannel";
+
+type ResolvedChannelIds = {
+ category: string | null;
+ channel: string | null;
+ thread: string | null;
+};
+
+export function resolveChannelIds(channel: Channel): ResolvedChannelIds {
+ if (isDmChannel(channel)) {
+ return {
+ category: null,
+ channel: channel.id,
+ thread: null,
+ };
+ }
+
+ if (isThreadChannel(channel)) {
+ return {
+ category: channel.parent?.parentId || null,
+ channel: channel.parentId,
+ thread: channel.id,
+ };
+ }
+
+ if (channel instanceof CategoryChannel) {
+ return {
+ category: channel.id,
+ channel: null,
+ thread: null,
+ };
+ }
+
+ if (isGuildChannel(channel)) {
+ return {
+ category: channel.parentId,
+ channel: channel.id,
+ thread: null,
+ };
+ }
+
+ return {
+ category: null,
+ channel: channel.id,
+ thread: null,
+ };
+}
From ec8523ce751891affafb376380c40facc4e89cac Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 13 Aug 2022 23:23:44 +0300
Subject: [PATCH 092/190] fix(docker): add mysql container health check
This makes the prepare_backend container (which runs migrations) wait
until the mysql server is actually running, not just the container.
Thanks to Skyz on Discord for the implementation.
---
docker-compose.production.yml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/docker-compose.production.yml b/docker-compose.production.yml
index 6ab79342..9b6a477d 100644
--- a/docker-compose.production.yml
+++ b/docker-compose.production.yml
@@ -24,6 +24,11 @@ services:
volumes:
- ./docker/production/data/mysql:/var/lib/mysql
command: --authentication-policy=mysql_native_password
+ healthcheck:
+ test: "/usr/bin/mysql --user=root --password=\"${DOCKER_PROD_MYSQL_ROOT_PASSWORD}\" --execute \"SHOW DATABASES;\""
+ interval: 5s
+ timeout: 300s
+ retries: 60
prepare_backend:
build:
@@ -32,7 +37,8 @@ services:
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
depends_on:
- - mysql
+ mysql:
+ condition: service_healthy
volumes:
- ./:/zeppelin
command: |-
From 3f16214ae00bc0f39eb1659ee27543fd4573d288 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sat, 13 Aug 2022 23:29:15 +0300
Subject: [PATCH 093/190] chore: update .clabot contributors list
---
.clabot | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/.clabot b/.clabot
index e4625a4a..6ca4d958 100644
--- a/.clabot
+++ b/.clabot
@@ -1,19 +1,22 @@
{
"contributors": [
- "dependabot",
+ "BanTheNons",
"CleverSource",
"DarkView",
+ "DenverCoder1",
"Jernik",
- "WeebHiroyuki",
+ "Rstar284",
"almeidx",
"axisiscool",
"dexbiobot",
"greenbigfrog",
+ "k200-1",
"metal0",
+ "paolojpa",
"roflmaoqwerty",
+ "thewilloftheshadow",
"usoka",
- "vcokltfre",
- "Rstar284"
+ "vcokltfre"
],
"message": "Thank you for contributing to Zeppelin! We require contributors to sign our Contributor License Agreement (CLA). To let us review and merge your code, please visit https://github.com/ZeppelinBot/CLA to sign the CLA!"
}
From 00591510ffcf300ac393e850b8190cc8eac32fd9 Mon Sep 17 00:00:00 2001
From: metal
Date: Sat, 13 Aug 2022 21:47:24 +0100
Subject: [PATCH 094/190] Automod add changeperms action (#309)
* initial
* fix typings UwU
* check no perms for overrides
* cleanup & add template rendering
* remove defaults
Co-authored-by: Almeida
* Update backend/src/plugins/Automod/actions/changePerms.ts
Co-authored-by: Almeida
* Update backend/src/plugins/Automod/actions/changePerms.ts
Co-authored-by: Almeida
* Update backend/src/plugins/Automod/actions/changePerms.ts
Co-authored-by: Almeida
* .resolve instead of .fetch
Co-authored-by: Almeida
* fix
* add more template variables
* rename msg to message
* .edit instead of .create
Signed-off-by: GitHub
Signed-off-by: GitHub
Co-authored-by: metal
Co-authored-by: Almeida
---
.../Automod/actions/availableActions.ts | 3 +
.../plugins/Automod/actions/changePerms.ts | 96 +++++++++++++++++++
2 files changed, 99 insertions(+)
create mode 100644 backend/src/plugins/Automod/actions/changePerms.ts
diff --git a/backend/src/plugins/Automod/actions/availableActions.ts b/backend/src/plugins/Automod/actions/availableActions.ts
index c37f3a39..3f253bc0 100644
--- a/backend/src/plugins/Automod/actions/availableActions.ts
+++ b/backend/src/plugins/Automod/actions/availableActions.ts
@@ -6,6 +6,7 @@ import { AlertAction } from "./alert";
import { ArchiveThreadAction } from "./archiveThread";
import { BanAction } from "./ban";
import { ChangeNicknameAction } from "./changeNickname";
+import { ChangePermsAction } from "./changePerms";
import { CleanAction } from "./clean";
import { KickAction } from "./kick";
import { LogAction } from "./log";
@@ -36,6 +37,7 @@ export const availableActions: Record> = {
set_slowmode: SetSlowmodeAction,
start_thread: StartThreadAction,
archive_thread: ArchiveThreadAction,
+ change_perms: ChangePermsAction,
};
export const AvailableActions = t.type({
@@ -56,4 +58,5 @@ export const AvailableActions = t.type({
set_slowmode: SetSlowmodeAction.configType,
start_thread: StartThreadAction.configType,
archive_thread: ArchiveThreadAction.configType,
+ change_perms: ChangePermsAction.configType,
});
diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts
new file mode 100644
index 00000000..ad060879
--- /dev/null
+++ b/backend/src/plugins/Automod/actions/changePerms.ts
@@ -0,0 +1,96 @@
+import { Permissions, PermissionString } from "discord.js";
+import * as t from "io-ts";
+import { automodAction } from "../helpers";
+import { tNullable, isValidSnowflake, tPartialDictionary } from "../../../utils";
+import { noop } from "knub/dist/utils";
+import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
+import {
+ guildToTemplateSafeGuild,
+ savedMessageToTemplateSafeSavedMessage,
+ userToTemplateSafeUser,
+} from "../../../utils/templateSafeObjects";
+
+export const ChangePermsAction = automodAction({
+ configType: t.type({
+ target: t.string,
+ channel: tNullable(t.string),
+ perms: tPartialDictionary(t.keyof(Permissions.FLAGS), tNullable(t.boolean)),
+ }),
+ defaultConfig: {},
+
+ async apply({ pluginData, contexts, actionConfig, ruleName }) {
+ const user = contexts.find((c) => c.user)?.user;
+ const message = contexts.find((c) => c.message)?.message;
+
+ const renderTarget = async (str: string) =>
+ renderTemplate(
+ str,
+ new TemplateSafeValueContainer({
+ user: user ? userToTemplateSafeUser(user) : null,
+ guild: guildToTemplateSafeGuild(pluginData.guild),
+ message: message ? savedMessageToTemplateSafeSavedMessage(message) : null,
+ }),
+ );
+ const renderChannel = async (str: string) =>
+ renderTemplate(
+ str,
+ new TemplateSafeValueContainer({
+ user: user ? userToTemplateSafeUser(user) : null,
+ guild: guildToTemplateSafeGuild(pluginData.guild),
+ message: message ? savedMessageToTemplateSafeSavedMessage(message) : null,
+ }),
+ );
+ const target = await renderTarget(actionConfig.target);
+ const channelId = actionConfig.channel ? await renderChannel(actionConfig.channel) : null;
+ const role = pluginData.guild.roles.resolve(target);
+ if (!role) {
+ const member = await pluginData.guild.members.fetch(target).catch(noop);
+ if (!member) return;
+ }
+
+ if (channelId && isValidSnowflake(channelId)) {
+ const channel = pluginData.guild.channels.resolve(channelId);
+ if (!channel || channel.isThread()) return;
+ const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target);
+ const allow = new Permissions(overwrite?.allow ?? 0n).serialize();
+ const deny = new Permissions(overwrite?.deny ?? 0n).serialize();
+ const newPerms: Partial> = {};
+
+ for (const key in allow) {
+ if (typeof actionConfig.perms[key] !== "undefined") {
+ newPerms[key] = actionConfig.perms[key];
+ continue;
+ }
+ if (allow[key]) {
+ newPerms[key] = true;
+ } else if (deny[key]) {
+ newPerms[key] = false;
+ }
+ }
+
+ // takes more code lines but looks cleaner imo
+ let hasPerms = false;
+ for (const key in newPerms) {
+ if (typeof newPerms[key] === "boolean") {
+ hasPerms = true;
+ break;
+ }
+ }
+ if (overwrite && !hasPerms) {
+ await channel.permissionOverwrites.delete(target).catch(noop);
+ return;
+ }
+ await channel.permissionOverwrites.edit(target, newPerms).catch(noop);
+ return;
+ }
+
+ if (!role) return;
+
+ const perms = new Permissions(role.permissions).serialize();
+ for (const key in actionConfig.perms) {
+ perms[key] = actionConfig.perms[key];
+ }
+ const permsArray = Object.keys(perms).filter((key) => perms[key]);
+ await role.setPermissions(new Permissions(permsArray)).catch(noop);
+ },
+});
From d846231855792bc426a0acebe12c4f9256490468 Mon Sep 17 00:00:00 2001
From: metal
Date: Sat, 13 Aug 2022 21:47:47 +0100
Subject: [PATCH 095/190] Fix automod alert in news channels (#290)
* yeah yeah
* my prettier was f'ed up
Co-authored-by: metal
From 94802a665c66cc6946c8cea1586095ae0640bf5a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 14 Aug 2022 00:06:20 +0300
Subject: [PATCH 096/190] fix: fix expired api permissions not being deleted
---
backend/src/data/ApiPermissionAssignments.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/src/data/ApiPermissionAssignments.ts b/backend/src/data/ApiPermissionAssignments.ts
index d6cf11db..a83a91f9 100644
--- a/backend/src/data/ApiPermissionAssignments.ts
+++ b/backend/src/data/ApiPermissionAssignments.ts
@@ -80,7 +80,8 @@ export class ApiPermissionAssignments extends BaseRepository {
.createQueryBuilder()
.where("expires_at IS NOT NULL")
.andWhere("expires_at <= NOW()")
- .delete();
+ .delete()
+ .execute();
}
async applyOwnerChange(guildId: string, newOwnerId: string) {
From a15b2f02a91c8ef2a5410888d5f8665bcc3a6c96 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Sun, 14 Aug 2022 00:21:21 +0300
Subject: [PATCH 097/190] feat: small tweaks to tag list search
---
.../src/plugins/Tags/commands/TagListCmd.ts | 21 ++++++++-----------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/backend/src/plugins/Tags/commands/TagListCmd.ts b/backend/src/plugins/Tags/commands/TagListCmd.ts
index 4bc4691e..aaa42ec4 100644
--- a/backend/src/plugins/Tags/commands/TagListCmd.ts
+++ b/backend/src/plugins/Tags/commands/TagListCmd.ts
@@ -1,6 +1,7 @@
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { createChunkedMessage } from "../../../utils";
import { tagsCmd } from "../types";
+import escapeStringRegexp from "escape-string-regexp";
export const TagListCmd = tagsCmd({
trigger: ["tag list", "tags", "taglist"],
@@ -19,20 +20,16 @@ export const TagListCmd = tagsCmd({
const prefix = (await pluginData.config.getForMessage(msg)).prefix;
const tagNames = tags.map((tag) => tag.tag).sort();
+ const searchRegex = args.search ? new RegExp([...args.search].map((s) => escapeStringRegexp(s)).join(".*")) : null;
- const filteredTags = args.search
- ? tagNames.filter((tag) =>
- new RegExp(
- args.search
- .split("")
- .map((char) => char.replace(/[.*+?^${}()|[\]\\]/, "\\$&"))
- .join(".*")
- ).test(tag)
- )
- : tagNames;
+ const filteredTags = args.search ? tagNames.filter((tag) => searchRegex!.test(tag)) : tagNames;
- const tagGroups = filteredTags.reduce((acc, tag) => {
- const obj = { ...acc };
+ if (filteredTags.length === 0) {
+ msg.channel.send("No tags matched the filter");
+ return;
+ }
+
+ const tagGroups = filteredTags.reduce((obj, tag) => {
const tagUpper = tag.toUpperCase();
const key = /[A-Z]/.test(tagUpper[0]) ? tagUpper[0] : "#";
if (!(key in obj)) {
From ccd1d3d69eee8868f94d25573b174c6daa4e45ad Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Mon, 15 Aug 2022 19:07:55 +0300
Subject: [PATCH 098/190] fix: fix error if automod unloads after beforeLoad()
but without running afterLoad()
---
backend/src/plugins/Automod/AutomodPlugin.ts | 36 +++++++++++++++-----
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts
index 72cb7aa5..b485b4b9 100644
--- a/backend/src/plugins/Automod/AutomodPlugin.ts
+++ b/backend/src/plugins/Automod/AutomodPlugin.ts
@@ -310,26 +310,44 @@ export const AutomodPlugin = zeppelinGuildPlugin()({
async beforeUnload(pluginData) {
const countersPlugin = pluginData.getPlugin(CountersPlugin);
- countersPlugin.offCounterEvent("trigger", pluginData.state.onCounterTrigger);
- countersPlugin.offCounterEvent("reverseTrigger", pluginData.state.onCounterReverseTrigger);
+ if (pluginData.state.onCounterTrigger) {
+ countersPlugin.offCounterEvent("trigger", pluginData.state.onCounterTrigger);
+ }
+ if (pluginData.state.onCounterReverseTrigger) {
+ countersPlugin.offCounterEvent("reverseTrigger", pluginData.state.onCounterReverseTrigger);
+ }
const modActionsEvents = pluginData.getPlugin(ModActionsPlugin).getEventEmitter();
- unregisterEventListenersFromMap(modActionsEvents, pluginData.state.modActionsListeners);
+ if (pluginData.state.modActionsListeners) {
+ unregisterEventListenersFromMap(modActionsEvents, pluginData.state.modActionsListeners);
+ }
const mutesEvents = pluginData.getPlugin(MutesPlugin).getEventEmitter();
- unregisterEventListenersFromMap(mutesEvents, pluginData.state.mutesListeners);
+ if (pluginData.state.mutesListeners) {
+ unregisterEventListenersFromMap(mutesEvents, pluginData.state.mutesListeners);
+ }
pluginData.state.queue.clear();
discardRegExpRunner(`guild-${pluginData.guild.id}`);
- clearInterval(pluginData.state.clearRecentActionsInterval);
+ if (pluginData.state.clearRecentActionsInterval) {
+ clearInterval(pluginData.state.clearRecentActionsInterval);
+ }
- clearInterval(pluginData.state.clearRecentSpamInterval);
+ if (pluginData.state.clearRecentSpamInterval) {
+ clearInterval(pluginData.state.clearRecentSpamInterval);
+ }
- clearInterval(pluginData.state.clearRecentNicknameChangesInterval);
+ if (pluginData.state.clearRecentNicknameChangesInterval) {
+ clearInterval(pluginData.state.clearRecentNicknameChangesInterval);
+ }
- pluginData.state.savedMessages.events.off("create", pluginData.state.onMessageCreateFn);
- pluginData.state.savedMessages.events.off("update", pluginData.state.onMessageUpdateFn);
+ if (pluginData.state.onMessageCreateFn) {
+ pluginData.state.savedMessages.events.off("create", pluginData.state.onMessageCreateFn);
+ }
+ if (pluginData.state.onMessageUpdateFn) {
+ pluginData.state.savedMessages.events.off("update", pluginData.state.onMessageUpdateFn);
+ }
},
});
From 0dafc7756b3dc39a19299aec11d7c22a3deef403 Mon Sep 17 00:00:00 2001
From: zay <87788699+zayKenyon@users.noreply.github.com>
Date: Fri, 28 Oct 2022 18:06:42 +0100
Subject: [PATCH 099/190] Update Repo URL on Privacy Policy
---
dashboard/src/components/PrivacyPolicy.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dashboard/src/components/PrivacyPolicy.vue b/dashboard/src/components/PrivacyPolicy.vue
index 9e652bc2..be563dd1 100644
--- a/dashboard/src/components/PrivacyPolicy.vue
+++ b/dashboard/src/components/PrivacyPolicy.vue
@@ -16,8 +16,8 @@
The bot's source code is available at
-
- https://github.com/Dragory/ZeppelinBot
+
+ https://github.com/ZeppelinBot/Zeppelin
From 801cd2630b5d75dd3c2d132d13a87cd05da0931a Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 15 Dec 2022 00:38:24 +0200
Subject: [PATCH 100/190] fix: fix crash when decay period is 0
---
backend/src/data/GuildCounters.ts | 2 +-
backend/src/plugins/Counters/CountersPlugin.ts | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/backend/src/data/GuildCounters.ts b/backend/src/data/GuildCounters.ts
index 52f20293..a87861b1 100644
--- a/backend/src/data/GuildCounters.ts
+++ b/backend/src/data/GuildCounters.ts
@@ -161,7 +161,7 @@ export class GuildCounters extends BaseGuildRepository {
}
const decayAmountToApply = Math.round((diffFromLastDecayMs / decayPeriodMs) * decayAmount);
- if (decayAmountToApply === 0) {
+ if (decayAmountToApply === 0 || Number.isNaN(decayAmountToApply)) {
return;
}
diff --git a/backend/src/plugins/Counters/CountersPlugin.ts b/backend/src/plugins/Counters/CountersPlugin.ts
index 6d4bf708..adec8b84 100644
--- a/backend/src/plugins/Counters/CountersPlugin.ts
+++ b/backend/src/plugins/Counters/CountersPlugin.ts
@@ -203,6 +203,10 @@ export const CountersPlugin = zeppelinGuildPlugin()({
const decay = counter.decay;
const decayPeriodMs = convertDelayStringToMS(decay.every)!;
+ if (decayPeriodMs === 0) {
+ continue;
+ }
+
pluginData.state.decayTimers.push(
setInterval(() => {
decayCounter(pluginData, counterName, decayPeriodMs, decay.amount);
From 293115af22a6db8bc5035956c5f8f3bc35c54729 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 30 Mar 2023 00:19:32 +0300
Subject: [PATCH 101/190] fix: crash on older discord.js version
---
backend/package-lock.json | 174 ++++++++++++++++++++------------------
backend/package.json | 2 +-
2 files changed, 95 insertions(+), 81 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index ad43bb79..3f8c6f55 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -14,7 +14,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "13.8",
+ "discord.js": "^13.14.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -124,13 +124,13 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "0.14.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
- "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
+ "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
+ "deprecated": "no longer supported",
"dependencies": {
- "@sapphire/shapeshift": "^3.1.0",
- "@sindresorhus/is": "^4.6.0",
- "discord-api-types": "^0.33.3",
+ "@sapphire/shapeshift": "^3.5.1",
+ "discord-api-types": "^0.36.2",
"fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1",
"tslib": "^2.4.0"
@@ -139,21 +139,15 @@
"node": ">=16.9.0"
}
},
- "node_modules/@discordjs/builders/node_modules/@sindresorhus/is": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
+ "node_modules/@discordjs/builders/node_modules/discord-api-types": {
+ "version": "0.36.3",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
+ "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
},
"node_modules/@discordjs/builders/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"node_modules/@discordjs/collection": {
"version": "0.7.0",
@@ -196,19 +190,24 @@
}
},
"node_modules/@sapphire/async-queue": {
- "version": "1.3.1",
- "license": "MIT",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
+ "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@sapphire/shapeshift": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.1.0.tgz",
- "integrity": "sha512-PkxFXd3QJ1qAPS05Dy2UkVGYPm/asF1Ugt2Xyzmv4DHzO3+G7l+873C4XFFcJ9M5Je+eCMC7SSifgPTSur5QuA==",
+ "version": "3.8.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.8.1.tgz",
+ "integrity": "sha512-xG1oXXBhCjPKbxrRTlox9ddaZTvVpOhYLmKmApD/vIWOV1xEYXnpoFs68zHIZBGbqztq6FrUPNPerIrO1Hqeaw==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ },
"engines": {
- "node": ">=v15.0.0",
+ "node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
@@ -349,9 +348,9 @@
"license": "MIT"
},
"node_modules/@types/node-fetch": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
- "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
+ "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -1704,25 +1703,30 @@
"integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"node_modules/discord.js": {
- "version": "13.8.1",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
- "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
+ "version": "13.14.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.14.0.tgz",
+ "integrity": "sha512-EXHAZmFHMf6qBHDsIANwSG792SYJpzEFv2nssfakyDqEn0HLxFLLXMaOxBtVohdkUMgtD+dzyeBlbDvAW/A0AA==",
"dependencies": {
- "@discordjs/builders": "^0.14.0",
+ "@discordjs/builders": "^0.16.0",
"@discordjs/collection": "^0.7.0",
- "@sapphire/async-queue": "^1.3.1",
- "@types/node-fetch": "^2.6.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@types/node-fetch": "^2.6.2",
"@types/ws": "^8.5.3",
- "discord-api-types": "^0.33.3",
+ "discord-api-types": "^0.33.5",
"form-data": "^4.0.0",
- "node-fetch": "^2.6.1",
- "ws": "^8.7.0"
+ "node-fetch": "^2.6.7",
+ "ws": "^8.9.0"
},
"engines": {
"node": ">=16.6.0",
"npm": ">=7.0.0"
}
},
+ "node_modules/discord.js/node_modules/discord-api-types": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
+ "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
+ },
"node_modules/discord.js/node_modules/form-data": {
"version": "4.0.0",
"license": "MIT",
@@ -4511,9 +4515,9 @@
}
},
"node_modules/ts-mixer": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
- "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
+ "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
},
"node_modules/tsc-watch": {
"version": "5.0.2",
@@ -5113,15 +5117,15 @@
}
},
"node_modules/ws": {
- "version": "8.7.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz",
- "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==",
+ "version": "8.13.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
+ "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
+ "utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
@@ -5314,27 +5318,26 @@
}
},
"@discordjs/builders": {
- "version": "0.14.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
- "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
+ "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
"requires": {
- "@sapphire/shapeshift": "^3.1.0",
- "@sindresorhus/is": "^4.6.0",
- "discord-api-types": "^0.33.3",
+ "@sapphire/shapeshift": "^3.5.1",
+ "discord-api-types": "^0.36.2",
"fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1",
"tslib": "^2.4.0"
},
"dependencies": {
- "@sindresorhus/is": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
+ "discord-api-types": {
+ "version": "0.36.3",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
+ "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
},
"tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
}
}
},
@@ -5364,12 +5367,18 @@
}
},
"@sapphire/async-queue": {
- "version": "1.3.1"
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
+ "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA=="
},
"@sapphire/shapeshift": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.1.0.tgz",
- "integrity": "sha512-PkxFXd3QJ1qAPS05Dy2UkVGYPm/asF1Ugt2Xyzmv4DHzO3+G7l+873C4XFFcJ9M5Je+eCMC7SSifgPTSur5QuA=="
+ "version": "3.8.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.8.1.tgz",
+ "integrity": "sha512-xG1oXXBhCjPKbxrRTlox9ddaZTvVpOhYLmKmApD/vIWOV1xEYXnpoFs68zHIZBGbqztq6FrUPNPerIrO1Hqeaw==",
+ "requires": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ }
},
"@silvia-odwyer/photon-node": {
"version": "0.3.1"
@@ -5482,9 +5491,9 @@
"version": "14.0.14"
},
"@types/node-fetch": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
- "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
+ "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -6373,21 +6382,26 @@
"integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
},
"discord.js": {
- "version": "13.8.1",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
- "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
+ "version": "13.14.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.14.0.tgz",
+ "integrity": "sha512-EXHAZmFHMf6qBHDsIANwSG792SYJpzEFv2nssfakyDqEn0HLxFLLXMaOxBtVohdkUMgtD+dzyeBlbDvAW/A0AA==",
"requires": {
- "@discordjs/builders": "^0.14.0",
+ "@discordjs/builders": "^0.16.0",
"@discordjs/collection": "^0.7.0",
- "@sapphire/async-queue": "^1.3.1",
- "@types/node-fetch": "^2.6.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@types/node-fetch": "^2.6.2",
"@types/ws": "^8.5.3",
- "discord-api-types": "^0.33.3",
+ "discord-api-types": "^0.33.5",
"form-data": "^4.0.0",
- "node-fetch": "^2.6.1",
- "ws": "^8.7.0"
+ "node-fetch": "^2.6.7",
+ "ws": "^8.9.0"
},
"dependencies": {
+ "discord-api-types": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
+ "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
+ },
"form-data": {
"version": "4.0.0",
"requires": {
@@ -8145,9 +8159,9 @@
"requires": {}
},
"ts-mixer": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
- "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
+ "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
},
"tsc-watch": {
"version": "5.0.2",
@@ -8521,9 +8535,9 @@
}
},
"ws": {
- "version": "8.7.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz",
- "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==",
+ "version": "8.13.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
+ "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
"requires": {}
},
"xdg-basedir": {
diff --git a/backend/package.json b/backend/package.json
index 8d13567b..acc5851f 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -29,7 +29,7 @@
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
"discord-api-types": "^0.33.1",
- "discord.js": "13.8",
+ "discord.js": "^13.14.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
From 9386696f4b5377e5a1ffb563a21d99e36e6f6f9e Mon Sep 17 00:00:00 2001
From: rubyowo
Date: Mon, 9 Jan 2023 17:02:41 +0400
Subject: [PATCH 102/190] fix: crash when the arr argument for concatArr isn't
specified
fix: formatting
Co-authored-by: Almeida
---
backend/src/templateFormatter.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/src/templateFormatter.ts b/backend/src/templateFormatter.ts
index 0dcb7bde..af30fd4e 100644
--- a/backend/src/templateFormatter.ts
+++ b/backend/src/templateFormatter.ts
@@ -346,6 +346,7 @@ const baseValues = {
return [...args].join("");
},
concatArr(arr, separator = "") {
+ if (!Array.isArray(arr)) return "";
return arr.join(separator);
},
eq(...args) {
From 06877e90cc541f4bcff4f56233f4aa327fd63690 Mon Sep 17 00:00:00 2001
From: Tiago R
Date: Sat, 1 Apr 2023 12:58:17 +0100
Subject: [PATCH 103/190] Update djs & knub (#395)
* update pkgs
Signed-off-by: GitHub
* new knub typings
Signed-off-by: GitHub
* more pkg updates
Signed-off-by: GitHub
* more fixes
Signed-off-by: GitHub
* channel typings
Signed-off-by: GitHub
* more message utils typings fixes
Signed-off-by: GitHub
* migrate permissions
Signed-off-by: GitHub
* fix: InternalPoster webhookables
Signed-off-by: GitHub
* djs typings: Attachment & Util
Signed-off-by: GitHub
* more typings
Signed-off-by: GitHub
* fix: rename permissionNames
Signed-off-by: GitHub
* more fixes
Signed-off-by: GitHub
* half the number of errors
* knub commands => messageCommands
Signed-off-by: GitHub
* configPreprocessor => configParser
Signed-off-by: GitHub
* fix channel.messages
Signed-off-by: GitHub
* revert automod any typing
Signed-off-by: GitHub
* more configParser typings
Signed-off-by: GitHub
* revert
Signed-off-by: GitHub
* remove knub type params
Signed-off-by: GitHub
* fix more MessageEmbed / MessageOptions
Signed-off-by: GitHub
* dumb commit for @almeidx to see why this is stupid
Signed-off-by: GitHub
* temp disable custom_events
Signed-off-by: GitHub
* more minor typings fixes - 23 err left
Signed-off-by: GitHub
* update djs dep
* +debug build method (revert this)
Signed-off-by: GitHub
* Revert "+debug build method (revert this)"
This reverts commit a80af1e729b742d1aad1097df538d224fbd32ce7.
* Redo +debug build (Revert this)
Signed-off-by: GitHub
* uniform before/after Load shorthands
Signed-off-by: GitHub
* remove unused imports & add prettier plugin
Signed-off-by: GitHub
* env fixes for web platform hosting
Signed-off-by: GitHub
* feat: knub v32-next; related fixes
* fix: allow legacy keys in change_perms action
* fix: request Message Content intent
* fix: use Knub's config validation logic in API
* fix(dashboard): fix error when there are no message and/or slash commands in a plugin
* fix(automod): start_thread action thread options
* fix(CustomEvents): message command types
* chore: remove unneeded type annotation
* feat: add forum channel icon; use thread icon for news threads
* chore: make tslint happy
* chore: fix formatting
---------
Signed-off-by: GitHub
Co-authored-by: almeidx
Co-authored-by: Dragory <2606411+Dragory@users.noreply.github.com>
---
backend/package-lock.json | 575 +++++++++++++-----
backend/package.json | 6 +-
backend/src/api/auth.ts | 2 +-
backend/src/api/docs.ts | 4 +-
backend/src/api/guilds.ts | 14 +-
backend/src/api/guilds/importExport.ts | 10 +-
backend/src/api/guilds/index.ts | 2 +-
backend/src/api/guilds/misc.ts | 19 +-
backend/src/api/index.ts | 4 +-
backend/src/api/start.ts | 4 +-
backend/src/commandTypes.ts | 40 +-
backend/src/configValidator.ts | 9 +-
backend/src/data/AllowedGuilds.ts | 5 +-
backend/src/data/ApiAuditLog.ts | 5 +-
backend/src/data/ApiPermissionAssignments.ts | 5 +-
backend/src/data/Archives.ts | 2 +-
backend/src/data/GuildArchives.ts | 10 +-
backend/src/data/GuildCases.ts | 5 +-
backend/src/data/GuildEvents.ts | 2 +-
backend/src/data/GuildRoleButtons.ts | 6 -
backend/src/data/GuildRoleQueue.ts | 6 +-
backend/src/data/GuildSavedMessages.ts | 14 +-
backend/src/data/Mutes.ts | 4 +-
backend/src/data/Phisherman.ts | 14 +-
backend/src/data/Reminders.ts | 6 +-
backend/src/data/ScheduledPosts.ts | 6 +-
backend/src/data/Tempbans.ts | 4 +-
backend/src/data/VCAlerts.ts | 6 +-
backend/src/data/Webhooks.ts | 4 +-
backend/src/data/db.ts | 4 +-
backend/src/data/entities/ApiAuditLogEntry.ts | 3 +-
.../data/entities/ApiPermissionAssignment.ts | 2 +-
backend/src/data/entities/CounterTrigger.ts | 2 +-
backend/src/data/entities/Reminder.ts | 2 +-
backend/src/data/entities/SavedMessage.ts | 6 +-
backend/src/data/entities/ScheduledPost.ts | 6 +-
backend/src/data/entities/VCAlert.ts | 2 +-
.../data/loops/expiredArchiveDeletionLoop.ts | 1 -
backend/src/data/loops/expiringMutesLoop.ts | 6 +-
.../src/data/loops/expiringTempbansLoop.ts | 4 +-
.../src/data/loops/expiringVCAlertsLoop.ts | 8 +-
backend/src/data/loops/phishermanLoops.ts | 2 +-
.../src/data/loops/upcomingRemindersLoop.ts | 4 +-
.../data/loops/upcomingScheduledPostsLoop.ts | 4 +-
backend/src/data/queryLogger.ts | 2 +-
backend/src/env.ts | 10 +-
backend/src/index.ts | 100 +--
backend/src/pluginUtils.ts | 135 +---
.../plugins/AutoDelete/AutoDeletePlugin.ts | 12 +-
.../plugins/AutoDelete/util/deleteNextItem.ts | 15 +-
.../AutoDelete/util/onMessageCreate.ts | 3 +-
.../AutoReactions/AutoReactionsPlugin.ts | 14 +-
.../commands/NewAutoReactionsCmd.ts | 4 +-
.../AutoReactions/events/AddReactionsEvt.ts | 9 +-
backend/src/plugins/AutoReactions/types.ts | 8 +-
backend/src/plugins/Automod/AutomodPlugin.ts | 186 +++---
.../src/plugins/Automod/actions/addRoles.ts | 7 +-
.../plugins/Automod/actions/addToCounter.ts | 3 +-
backend/src/plugins/Automod/actions/alert.ts | 20 +-
.../plugins/Automod/actions/archiveThread.ts | 4 +-
.../plugins/Automod/actions/changeNickname.ts | 1 -
.../plugins/Automod/actions/changePerms.ts | 83 ++-
backend/src/plugins/Automod/actions/clean.ts | 4 +-
backend/src/plugins/Automod/actions/log.ts | 4 +-
backend/src/plugins/Automod/actions/mute.ts | 1 -
.../plugins/Automod/actions/removeRoles.ts | 7 +-
backend/src/plugins/Automod/actions/reply.ts | 25 +-
.../src/plugins/Automod/actions/setCounter.ts | 3 +-
.../plugins/Automod/actions/setSlowmode.ts | 22 +-
.../plugins/Automod/actions/startThread.ts | 62 +-
.../Automod/commands/AntiraidClearCmd.ts | 4 +-
.../Automod/commands/SetAntiraidCmd.ts | 4 +-
.../Automod/commands/ViewAntiraidCmd.ts | 4 +-
.../events/RunAutomodOnJoinLeaveEvt.ts | 6 +-
.../events/RunAutomodOnMemberUpdate.ts | 4 +-
.../events/runAutomodOnCounterTrigger.ts | 1 -
.../Automod/events/runAutomodOnMessage.ts | 5 +-
.../events/runAutomodOnThreadEvents.ts | 8 +-
.../functions/clearOldRecentActions.ts | 2 +-
.../Automod/functions/clearOldRecentSpam.ts | 2 +-
.../functions/clearRecentActionsForMessage.ts | 2 +-
.../Automod/functions/findRecentSpam.ts | 2 +-
.../getMatchingMessageRecentActions.ts | 2 +-
.../functions/getMatchingRecentActions.ts | 2 +-
.../functions/getTextMatchPartialSummary.ts | 8 +-
.../matchMultipleTextTypesOnMessage.ts | 7 +-
.../functions/resolveActionContactMethods.ts | 4 +-
.../plugins/Automod/functions/runAutomod.ts | 8 +-
.../Automod/functions/setAntiraidLevel.ts | 2 -
backend/src/plugins/Automod/helpers.ts | 2 +-
backend/src/plugins/Automod/info.ts | 2 +
.../plugins/Automod/triggers/anyMessage.ts | 4 +-
.../Automod/triggers/availableTriggers.ts | 6 +-
.../Automod/triggers/matchAttachmentType.ts | 6 +-
.../plugins/Automod/triggers/matchLinks.ts | 13 +-
.../plugins/Automod/triggers/matchMimeType.ts | 10 +-
.../plugins/Automod/triggers/matchRegex.ts | 2 +-
.../plugins/Automod/triggers/matchWords.ts | 1 -
.../plugins/Automod/triggers/threadArchive.ts | 5 +-
.../plugins/Automod/triggers/threadCreate.ts | 5 +-
.../plugins/Automod/triggers/threadDelete.ts | 5 +-
.../Automod/triggers/threadUnarchive.ts | 5 +-
backend/src/plugins/Automod/types.ts | 4 +-
.../plugins/BotControl/BotControlPlugin.ts | 28 +-
.../commands/AddDashboardUserCmd.ts | 5 +-
.../commands/AddServerFromInviteCmd.ts | 25 +-
.../BotControl/commands/AllowServerCmd.ts | 11 +-
.../BotControl/commands/ChannelToServerCmd.ts | 11 +-
.../BotControl/commands/DisallowServerCmd.ts | 6 +-
.../BotControl/commands/EligibleCmd.ts | 11 +-
.../BotControl/commands/LeaveServerCmd.ts | 8 +-
.../commands/ListDashboardPermsCmd.ts | 19 +-
.../commands/ListDashboardUsersCmd.ts | 7 +-
.../BotControl/commands/ProfilerDataCmd.ts | 11 +-
.../commands/RateLimitPerformanceCmd.ts | 11 +-
.../commands/ReloadGlobalPluginsCmd.ts | 11 +-
.../BotControl/commands/ReloadServerCmd.ts | 8 +-
.../commands/RemoveDashboardUserCmd.ts | 5 +-
.../BotControl/commands/RestPerformanceCmd.ts | 8 +-
.../plugins/BotControl/commands/ServersCmd.ts | 3 +-
.../BotControl/functions/isEligible.ts | 2 +-
backend/src/plugins/BotControl/types.ts | 6 +-
backend/src/plugins/Cases/CasesPlugin.ts | 27 +-
.../src/plugins/Cases/functions/createCase.ts | 2 +-
.../plugins/Cases/functions/getCaseEmbed.ts | 6 +-
.../plugins/Cases/functions/getCaseSummary.ts | 2 +-
.../Cases/functions/postToCaseLogChannel.ts | 31 +-
backend/src/plugins/Censor/CensorPlugin.ts | 14 +-
.../plugins/Censor/util/applyFiltersToMsg.ts | 4 +-
.../src/plugins/Censor/util/censorMessage.ts | 9 +-
.../ChannelArchiver/ChannelArchiverPlugin.ts | 7 +-
.../commands/ArchiveChannelCmd.ts | 2 +-
.../ChannelArchiver/rehostAttachment.ts | 9 +-
backend/src/plugins/ChannelArchiver/types.ts | 4 +-
.../CompanionChannelsPlugin.ts | 4 +-
.../functions/handleCompanionPermissions.ts | 6 +-
.../src/plugins/CompanionChannels/types.ts | 4 +-
.../plugins/ContextMenus/ContextMenuPlugin.ts | 5 +-
.../src/plugins/ContextMenus/actions/clean.ts | 5 +-
.../src/plugins/ContextMenus/actions/mute.ts | 5 +-
.../plugins/ContextMenus/actions/userInfo.ts | 4 +-
.../ContextMenus/events/ContextClickedEvt.ts | 5 +-
backend/src/plugins/ContextMenus/types.ts | 4 +-
.../ContextMenus/utils/contextRouter.ts | 4 +-
.../ContextMenus/utils/loadAllCommands.ts | 9 +-
.../src/plugins/Counters/CountersPlugin.ts | 134 ++--
.../Counters/commands/AddCounterCmd.ts | 6 +-
.../Counters/commands/CountersListCmd.ts | 6 +-
.../commands/ResetAllCounterValuesCmd.ts | 4 +-
.../Counters/commands/ResetCounterCmd.ts | 6 +-
.../Counters/commands/SetCounterCmd.ts | 6 +-
.../Counters/commands/ViewCounterCmd.ts | 10 +-
.../CustomEvents/CustomEventsPlugin.ts | 28 +-
.../CustomEvents/actions/addRoleAction.ts | 1 -
.../actions/makeRoleMentionableAction.ts | 18 +-
.../actions/makeRoleUnmentionableAction.ts | 9 +-
.../actions/setChannelPermissionOverrides.ts | 14 +-
.../CustomEvents/functions/runEvent.ts | 6 +-
.../GuildAccessMonitorPlugin.ts | 19 +-
.../GuildConfigReloaderPlugin.ts | 9 +-
.../src/plugins/GuildConfigReloader/types.ts | 3 +-
.../GuildInfoSaver/GuildInfoSaverPlugin.ts | 11 +-
backend/src/plugins/GuildInfoSaver/types.ts | 1 -
.../InternalPoster/InternalPosterPlugin.ts | 29 +-
.../InternalPoster/functions/editMessage.ts | 18 +-
.../getOrCreateWebhookClientForChannel.ts | 2 +-
.../functions/getOrCreateWebhookForChannel.ts | 12 +-
.../InternalPoster/functions/sendMessage.ts | 10 +-
backend/src/plugins/InternalPoster/types.ts | 2 +-
.../plugins/LocateUser/LocateUserPlugin.ts | 18 +-
.../plugins/LocateUser/commands/FollowCmd.ts | 2 +-
.../LocateUser/commands/ListFollowCmd.ts | 2 +-
.../LocateUser/events/BanRemoveAlertsEvt.ts | 2 +-
.../LocateUser/events/SendAlertsEvts.ts | 14 +-
backend/src/plugins/LocateUser/types.ts | 7 +-
.../LocateUser/utils/clearExpiredAlert.ts | 2 +-
.../plugins/LocateUser/utils/moveMember.ts | 4 +-
.../plugins/LocateUser/utils/sendAlerts.ts | 12 +-
.../src/plugins/LocateUser/utils/sendWhere.ts | 6 +-
backend/src/plugins/Logs/LogsPlugin.ts | 75 ++-
.../Logs/events/LogsChannelModifyEvts.ts | 8 +-
.../events/LogsEmojiAndStickerModifyEvts.ts | 6 +-
.../plugins/Logs/events/LogsGuildBanEvts.ts | 23 +-
.../Logs/events/LogsGuildMemberAddEvt.ts | 7 +-
.../Logs/events/LogsGuildMemberRemoveEvt.ts | 4 +-
.../plugins/Logs/events/LogsRoleModifyEvts.ts | 8 +-
.../events/LogsStageInstanceModifyEvts.ts | 8 +-
.../Logs/events/LogsThreadModifyEvts.ts | 8 +-
.../plugins/Logs/events/LogsUserUpdateEvts.ts | 6 +-
.../Logs/events/LogsVoiceChannelEvts.ts | 6 +-
.../Logs/logFunctions/logAutomodAction.ts | 10 +-
.../plugins/Logs/logFunctions/logBotAlert.ts | 4 +-
.../Logs/logFunctions/logCaseCreate.ts | 10 +-
.../Logs/logFunctions/logCaseDelete.ts | 12 +-
.../Logs/logFunctions/logCaseUpdate.ts | 10 +-
.../plugins/Logs/logFunctions/logCensor.ts | 14 +-
.../Logs/logFunctions/logChannelCreate.ts | 10 +-
.../Logs/logFunctions/logChannelDelete.ts | 10 +-
.../Logs/logFunctions/logChannelUpdate.ts | 12 +-
.../src/plugins/Logs/logFunctions/logClean.ts | 10 +-
.../plugins/Logs/logFunctions/logDmFailed.ts | 6 +-
.../Logs/logFunctions/logEmojiCreate.ts | 10 +-
.../Logs/logFunctions/logEmojiDelete.ts | 10 +-
.../Logs/logFunctions/logEmojiUpdate.ts | 10 +-
.../plugins/Logs/logFunctions/logMassBan.ts | 10 +-
.../plugins/Logs/logFunctions/logMassMute.ts | 10 +-
.../plugins/Logs/logFunctions/logMassUnban.ts | 10 +-
.../plugins/Logs/logFunctions/logMemberBan.ts | 12 +-
.../Logs/logFunctions/logMemberForceban.ts | 10 +-
.../Logs/logFunctions/logMemberJoin.ts | 14 +-
.../logMemberJoinWithPriorRecords.ts | 10 +-
.../Logs/logFunctions/logMemberKick.ts | 8 +-
.../Logs/logFunctions/logMemberLeave.ts | 10 +-
.../Logs/logFunctions/logMemberMute.ts | 8 +-
.../Logs/logFunctions/logMemberMuteExpired.ts | 12 +-
.../Logs/logFunctions/logMemberMuteRejoin.ts | 10 +-
.../Logs/logFunctions/logMemberNickChange.ts | 10 +-
.../Logs/logFunctions/logMemberNote.ts | 12 +-
.../Logs/logFunctions/logMemberRestore.ts | 10 +-
.../Logs/logFunctions/logMemberRoleAdd.ts | 10 +-
.../Logs/logFunctions/logMemberRoleChanges.ts | 12 +-
.../Logs/logFunctions/logMemberRoleRemove.ts | 10 +-
.../Logs/logFunctions/logMemberTimedBan.ts | 12 +-
.../Logs/logFunctions/logMemberTimedMute.ts | 12 +-
.../Logs/logFunctions/logMemberTimedUnban.ts | 12 +-
.../Logs/logFunctions/logMemberTimedUnmute.ts | 12 +-
.../Logs/logFunctions/logMemberUnban.ts | 8 +-
.../Logs/logFunctions/logMemberUnmute.ts | 8 +-
.../Logs/logFunctions/logMemberWarn.ts | 10 +-
.../Logs/logFunctions/logMessageDelete.ts | 14 +-
.../Logs/logFunctions/logMessageDeleteAuto.ts | 14 +-
.../Logs/logFunctions/logMessageDeleteBare.ts | 8 +-
.../Logs/logFunctions/logMessageDeleteBulk.ts | 8 +-
.../Logs/logFunctions/logMessageEdit.ts | 12 +-
.../logFunctions/logMessageSpamDetected.ts | 10 +-
.../Logs/logFunctions/logOtherSpamDetected.ts | 10 +-
.../logFunctions/logPostedScheduledMessage.ts | 8 +-
.../Logs/logFunctions/logRepeatedMessage.ts | 8 +-
.../Logs/logFunctions/logRoleCreate.ts | 10 +-
.../Logs/logFunctions/logRoleDelete.ts | 10 +-
.../Logs/logFunctions/logRoleUpdate.ts | 10 +-
.../Logs/logFunctions/logScheduledMessage.ts | 8 +-
.../logScheduledRepeatedMessage.ts | 8 +-
.../Logs/logFunctions/logSetAntiraidAuto.ts | 4 +-
.../Logs/logFunctions/logSetAntiraidUser.ts | 10 +-
.../logFunctions/logStageInstanceCreate.ts | 12 +-
.../logFunctions/logStageInstanceDelete.ts | 12 +-
.../logFunctions/logStageInstanceUpdate.ts | 16 +-
.../Logs/logFunctions/logStickerCreate.ts | 10 +-
.../Logs/logFunctions/logStickerDelete.ts | 10 +-
.../Logs/logFunctions/logStickerUpdate.ts | 10 +-
.../Logs/logFunctions/logThreadCreate.ts | 10 +-
.../Logs/logFunctions/logThreadDelete.ts | 10 +-
.../Logs/logFunctions/logThreadUpdate.ts | 12 +-
.../logVoiceChannelForceDisconnect.ts | 10 +-
.../logFunctions/logVoiceChannelForceMove.ts | 12 +-
.../Logs/logFunctions/logVoiceChannelJoin.ts | 10 +-
.../Logs/logFunctions/logVoiceChannelLeave.ts | 10 +-
.../Logs/logFunctions/logVoiceChannelMove.ts | 12 +-
backend/src/plugins/Logs/types.ts | 20 +-
.../src/plugins/Logs/util/getLogMessage.ts | 10 +-
backend/src/plugins/Logs/util/isLogIgnored.ts | 2 +-
backend/src/plugins/Logs/util/log.ts | 16 +-
.../src/plugins/Logs/util/onMessageDelete.ts | 13 +-
.../plugins/Logs/util/onMessageDeleteBulk.ts | 12 +-
.../src/plugins/Logs/util/onMessageUpdate.ts | 14 +-
.../MessageSaver/MessageSaverPlugin.ts | 6 +-
.../MessageSaver/events/SaveMessagesEvts.ts | 6 +-
.../plugins/MessageSaver/saveMessagesToDB.ts | 4 +-
backend/src/plugins/MessageSaver/types.ts | 7 +-
.../plugins/ModActions/ModActionsPlugin.ts | 25 +-
.../plugins/ModActions/commands/AddCaseCmd.ts | 4 +-
.../src/plugins/ModActions/commands/BanCmd.ts | 8 +-
.../ModActions/commands/CasesModCmd.ts | 8 +-
.../ModActions/commands/CasesUserCmd.ts | 6 +-
.../ModActions/commands/DeleteCaseCmd.ts | 12 +-
.../ModActions/commands/ForcebanCmd.ts | 7 +-
.../plugins/ModActions/commands/MassBanCmd.ts | 15 +-
.../ModActions/commands/MassUnbanCmd.ts | 9 +-
.../ModActions/commands/MassmuteCmd.ts | 9 +-
.../plugins/ModActions/commands/NoteCmd.ts | 4 +-
.../plugins/ModActions/commands/UnbanCmd.ts | 5 +-
.../plugins/ModActions/commands/WarnCmd.ts | 3 +-
.../events/CreateBanCaseOnManualBanEvt.ts | 15 +-
.../events/CreateKickCaseOnManualKickEvt.ts | 10 +-
.../events/CreateUnbanCaseOnManualUnbanEvt.ts | 14 +-
.../events/PostAlertOnMemberJoinEvt.ts | 5 +-
.../functions/actualKickMemberCmd.ts | 10 +-
.../ModActions/functions/actualMuteUserCmd.ts | 18 +-
.../functions/actualUnmuteUserCmd.ts | 10 +-
.../plugins/ModActions/functions/banUserId.ts | 11 +-
.../ModActions/functions/clearTempban.ts | 6 +-
.../functions/formatReasonWithAttachments.ts | 4 +-
.../plugins/ModActions/functions/isBanned.ts | 5 +-
.../ModActions/functions/kickMember.ts | 4 +-
.../functions/readContactMethodsFromArgs.ts | 4 +-
.../ModActions/functions/updateCase.ts | 11 +-
.../ModActions/functions/warnMember.ts | 5 +-
backend/src/plugins/ModActions/types.ts | 12 +-
backend/src/plugins/Mutes/MutesPlugin.ts | 36 +-
.../Mutes/commands/ClearBannedMutesCmd.ts | 2 +-
.../src/plugins/Mutes/commands/MutesCmd.ts | 21 +-
.../events/ReapplyActiveMuteOnJoinEvt.ts | 4 +-
.../src/plugins/Mutes/functions/clearMute.ts | 6 +-
.../src/plugins/Mutes/functions/muteUser.ts | 10 +-
.../src/plugins/Mutes/functions/unmuteUser.ts | 7 +-
backend/src/plugins/Mutes/types.ts | 8 +-
.../plugins/NameHistory/NameHistoryPlugin.ts | 6 +-
.../plugins/NameHistory/commands/NamesCmd.ts | 2 +-
backend/src/plugins/NameHistory/types.ts | 6 +-
backend/src/plugins/Persist/PersistPlugin.ts | 4 +-
.../src/plugins/Persist/events/LoadDataEvt.ts | 16 +-
backend/src/plugins/Persist/types.ts | 4 +-
.../plugins/Phisherman/PhishermanPlugin.ts | 20 +-
.../Phisherman/functions/getDomainInfo.ts | 4 +-
backend/src/plugins/Phisherman/info.ts | 2 +
.../PingableRoles/PingableRolesPlugin.ts | 7 +-
.../events/ChangePingableEvts.ts | 2 +-
backend/src/plugins/PingableRoles/types.ts | 6 +-
.../utils/disablePingableRoles.ts | 7 +-
.../utils/enablePingableRoles.ts | 7 +-
backend/src/plugins/Post/PostPlugin.ts | 18 +-
backend/src/plugins/Post/commands/EditCmd.ts | 1 -
.../src/plugins/Post/commands/EditEmbedCmd.ts | 4 +-
.../src/plugins/Post/commands/PostEmbedCmd.ts | 4 +-
.../Post/commands/ScheduledPostsDeleteCmd.ts | 2 +-
.../Post/commands/ScheduledPostsListCmd.ts | 4 +-
.../Post/commands/ScheduledPostsShowCmd.ts | 3 +-
backend/src/plugins/Post/types.ts | 4 +-
.../src/plugins/Post/util/actualPostCmd.ts | 48 +-
backend/src/plugins/Post/util/postMessage.ts | 14 +-
.../plugins/Post/util/postScheduledPost.ts | 14 +-
.../ReactionRoles/ReactionRolesPlugin.ts | 12 +-
backend/src/plugins/ReactionRoles/types.ts | 6 +-
.../util/addMemberPendingRoleChange.ts | 7 +-
.../applyReactionRoleReactionsToMessage.ts | 8 +-
.../src/plugins/Reminders/RemindersPlugin.ts | 20 +-
.../plugins/Reminders/commands/RemindCmd.ts | 2 +-
.../Reminders/commands/RemindersDeleteCmd.ts | 2 +-
.../Reminders/functions/postReminder.ts | 15 +-
backend/src/plugins/Reminders/types.ts | 4 +-
.../plugins/RoleButtons/RoleButtonsPlugin.ts | 31 +-
.../RoleButtons/commands/resetButtons.ts | 6 +-
.../RoleButtons/events/buttonInteraction.ts | 13 +-
.../functions/applyAllRoleButtons.ts | 2 +-
.../RoleButtons/functions/applyRoleButtons.ts | 22 +-
.../convertButtonStyleStringToEnum.ts | 17 +
.../functions/createButtonComponents.ts | 19 +-
backend/src/plugins/RoleButtons/info.ts | 2 +
backend/src/plugins/RoleButtons/types.ts | 9 +-
.../plugins/RoleManager/RoleManagerPlugin.ts | 30 +-
.../RoleManager/functions/addPriorityRole.ts | 2 +-
.../functions/removePriorityRole.ts | 2 +-
.../functions/runRoleAssignmentLoop.ts | 6 +-
backend/src/plugins/RoleManager/types.ts | 3 +-
backend/src/plugins/Roles/RolesPlugin.ts | 8 +-
.../src/plugins/Roles/commands/AddRoleCmd.ts | 3 +-
.../plugins/Roles/commands/MassAddRoleCmd.ts | 3 +-
.../Roles/commands/MassRemoveRoleCmd.ts | 3 +-
.../plugins/Roles/commands/RemoveRoleCmd.ts | 3 +-
backend/src/plugins/Roles/types.ts | 4 +-
.../SelfGrantableRolesPlugin.ts | 32 +-
.../src/plugins/SelfGrantableRoles/types.ts | 4 +-
.../src/plugins/Slowmode/SlowmodePlugin.ts | 12 +-
.../Slowmode/commands/SlowmodeClearCmd.ts | 7 +-
.../Slowmode/commands/SlowmodeGetCmd.ts | 3 +-
.../Slowmode/commands/SlowmodeListCmd.ts | 2 +-
.../Slowmode/commands/SlowmodeSetCmd.ts | 31 +-
.../plugins/Slowmode/requiredPermissions.ts | 12 +-
backend/src/plugins/Slowmode/types.ts | 8 +-
.../Slowmode/util/actualDisableSlowmodeCmd.ts | 10 +-
.../Slowmode/util/applyBotSlowmodeToUserId.ts | 14 +-
.../util/clearBotSlowmodeFromUserId.ts | 4 +-
.../Slowmode/util/clearExpiredSlowmodes.ts | 4 +-
.../util/disableBotSlowmodeForChannel.ts | 4 +-
.../plugins/Slowmode/util/onMessageCreate.ts | 8 +-
backend/src/plugins/Spam/SpamPlugin.ts | 11 +-
backend/src/plugins/Spam/types.ts | 4 +-
.../Spam/util/logAndDetectMessageSpam.ts | 7 +-
.../Spam/util/logAndDetectOtherSpam.ts | 2 -
.../src/plugins/Starboard/StarboardPlugin.ts | 55 +-
backend/src/plugins/Starboard/types.ts | 6 +-
.../util/createStarboardEmbedFromMessage.ts | 4 +-
.../util/removeMessageFromStarboard.ts | 3 +-
.../Starboard/util/saveMessageToStarboard.ts | 6 +-
backend/src/plugins/Tags/TagsPlugin.ts | 40 +-
.../src/plugins/Tags/commands/TagEvalCmd.ts | 7 +-
.../src/plugins/Tags/commands/TagListCmd.ts | 2 +-
backend/src/plugins/Tags/types.ts | 6 +-
.../src/plugins/Tags/util/findTagByName.ts | 3 +-
.../Tags/util/matchAndRenderTagFromString.ts | 3 +-
.../src/plugins/Tags/util/onMessageCreate.ts | 7 +-
.../src/plugins/Tags/util/onMessageDelete.ts | 16 +-
.../src/plugins/Tags/util/renderTagBody.ts | 3 +-
.../plugins/Tags/util/renderTagFromString.ts | 2 +-
.../plugins/TimeAndDate/TimeAndDatePlugin.ts | 11 +-
.../TimeAndDate/commands/SetTimezoneCmd.ts | 4 +-
backend/src/plugins/TimeAndDate/types.ts | 4 +-
.../UsernameSaver/UsernameSaverPlugin.ts | 5 +-
backend/src/plugins/UsernameSaver/types.ts | 4 +-
backend/src/plugins/Utility/UtilityPlugin.ts | 11 +-
.../src/plugins/Utility/commands/AboutCmd.ts | 36 +-
.../src/plugins/Utility/commands/AvatarCmd.ts | 6 +-
.../src/plugins/Utility/commands/CleanCmd.ts | 6 +-
.../plugins/Utility/commands/EmojiInfoCmd.ts | 2 +-
.../src/plugins/Utility/commands/HelpCmd.ts | 5 +-
.../src/plugins/Utility/commands/InfoCmd.ts | 10 +-
.../src/plugins/Utility/commands/JumboCmd.ts | 12 +-
.../plugins/Utility/commands/NicknameCmd.ts | 6 +-
.../src/plugins/Utility/commands/SourceCmd.ts | 1 -
.../Utility/commands/VcdisconnectCmd.ts | 8 +-
.../src/plugins/Utility/commands/VcmoveCmd.ts | 15 +-
.../Utility/functions/getChannelInfoEmbed.ts | 75 +--
.../Utility/functions/getEmojiInfoEmbed.ts | 17 +-
.../Utility/functions/getInviteInfoEmbed.ts | 23 +-
.../Utility/functions/getMessageInfoEmbed.ts | 43 +-
.../Utility/functions/getRoleInfoEmbed.ts | 22 +-
.../Utility/functions/getServerInfoEmbed.ts | 61 +-
.../functions/getSnowflakeInfoEmbed.ts | 15 +-
.../Utility/functions/getUserInfoEmbed.ts | 4 +-
backend/src/plugins/Utility/search.ts | 44 +-
backend/src/plugins/Utility/types.ts | 6 +-
.../WelcomeMessage/WelcomeMessagePlugin.ts | 6 +-
.../events/SendWelcomeMessageEvt.ts | 10 +-
backend/src/plugins/WelcomeMessage/types.ts | 4 +-
.../src/plugins/ZeppelinPluginBlueprint.ts | 45 +-
backend/src/plugins/availablePlugins.ts | 8 +-
backend/src/profiler.ts | 3 +-
backend/src/types.ts | 43 +-
backend/src/utils.ts | 57 +-
backend/src/utils/MessageBuffer.ts | 2 +-
backend/src/utils/async.ts | 2 +-
backend/src/utils/calculateEmbedSize.ts | 4 +-
backend/src/utils/canAssignRole.ts | 6 +-
backend/src/utils/createPaginatedMessage.ts | 10 +-
backend/src/utils/crypt.ts | 5 +-
backend/src/utils/easyProfiler.ts | 6 +-
backend/src/utils/filterObject.ts | 2 +-
.../src/utils/findMatchingAuditLogEntry.ts | 7 +-
backend/src/utils/getGuildPrefix.ts | 5 +-
backend/src/utils/getMissingPermissions.ts | 6 +-
backend/src/utils/getPermissionNames.ts | 6 +-
backend/src/utils/hasDiscordPermissions.ts | 6 +-
backend/src/utils/idToTimestamp.ts | 4 +-
backend/src/utils/isDmChannel.ts | 5 +-
backend/src/utils/isGuildChannel.ts | 6 +-
backend/src/utils/isThreadChannel.ts | 11 +-
backend/src/utils/messageHasContent.ts | 5 +-
backend/src/utils/messageIsEmpty.ts | 5 +-
backend/src/utils/permissionNames.ts | 90 ++-
backend/src/utils/readChannelPermissions.ts | 5 +-
backend/src/utils/resolveChannelIds.ts | 3 -
backend/src/utils/resolveMessageTarget.ts | 4 +-
backend/src/utils/templateSafeObjects.ts | 20 +-
backend/src/utils/typeUtils.ts | 6 +
backend/src/utils/validateNoObjectAliases.ts | 2 -
backend/src/utils/waitForInteraction.ts | 29 +-
backend/tsconfig.json | 8 +-
dashboard/src/components/docs/Plugin.vue | 13 +-
dashboard/src/init-vue.ts | 4 +-
dashboard/src/routes.ts | 2 +-
dashboard/src/store/auth.ts | 4 +-
dashboard/src/store/docs.ts | 6 +-
dashboard/src/store/guilds.ts | 7 +-
dashboard/src/store/index.ts | 4 +-
dashboard/src/store/staff.ts | 2 +-
dashboard/src/store/types.ts | 3 +-
dashboard/webpack.config.js | 3 +
package-lock.json | 552 ++---------------
package.json | 8 +-
presetup-configurator/src/App.tsx | 2 +-
presetup-configurator/src/Configurator.tsx | 4 +-
presetup-configurator/src/Levels.tsx | 2 +-
presetup-configurator/src/LogChannels.tsx | 2 +-
shared/src/apiPermissions.test.ts | 2 +-
shared/tsconfig.json | 8 +-
476 files changed, 2965 insertions(+), 3251 deletions(-)
create mode 100644 backend/src/plugins/RoleButtons/functions/convertButtonStyleStringToEnum.ts
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 3f8c6f55..dae025ac 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -13,8 +13,7 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.33.1",
- "discord.js": "^13.14.0",
+ "discord.js": "^14.8.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -24,7 +23,7 @@
"humanize-duration": "^3.15.0",
"io-ts": "^2.0.0",
"js-yaml": "^3.13.1",
- "knub": "^30.0.0-beta.46",
+ "knub": "^32.0.0-next.4",
"knub-command-manager": "^9.1.0",
"last-commit-log": "^2.1.0",
"lodash.chunk": "^4.2.0",
@@ -53,6 +52,7 @@
"tsconfig-paths": "^3.9.0",
"twemoji": "^12.1.4",
"typeorm": "^0.2.31",
+ "typescript": "~4.9.5",
"utf-8-validate": "^5.0.5",
"uuid": "^3.3.2",
"yawn-yaml": "github:dragory/yawn-yaml#string-number-fix-build",
@@ -124,35 +124,73 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
- "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
- "deprecated": "no longer supported",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.5.0.tgz",
+ "integrity": "sha512-7XxT78mnNBPigHn2y6KAXkicxIBFtZREGWaRZ249EC1l6gBUEP8IyVY5JTciIjJArxkF+tg675aZvsTNTKBpmA==",
"dependencies": {
- "@sapphire/shapeshift": "^3.5.1",
- "discord-api-types": "^0.36.2",
+ "@discordjs/formatters": "^0.2.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/shapeshift": "^3.8.1",
+ "discord-api-types": "^0.37.35",
"fast-deep-equal": "^3.1.3",
- "ts-mixer": "^6.0.1",
- "tslib": "^2.4.0"
+ "ts-mixer": "^6.0.3",
+ "tslib": "^2.5.0"
},
"engines": {
"node": ">=16.9.0"
}
},
- "node_modules/@discordjs/builders/node_modules/discord-api-types": {
- "version": "0.36.3",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
- "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
- },
"node_modules/@discordjs/builders/node_modules/tslib": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"node_modules/@discordjs/collection": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
- "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.4.0.tgz",
+ "integrity": "sha512-hiOJyk2CPFf1+FL3a4VKCuu1f448LlROVuu8nLz1+jCOAPokUcdFAV+l4pd3B3h6uJlJQSASoZzrdyNdjdtfzQ==",
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/@discordjs/formatters": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.2.0.tgz",
+ "integrity": "sha512-vn4oMSXuMZUm8ITqVOtvE7/fMMISj4cI5oLsR09PEQXHKeKDAMLltG/DWeeIs7Idfy6V8Fk3rn1e69h7NfzuNA==",
+ "dependencies": {
+ "discord-api-types": "^0.37.35"
+ },
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/@discordjs/rest": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.6.0.tgz",
+ "integrity": "sha512-HGvqNCZ5Z5j0tQHjmT1lFvE5ETO4hvomJ1r0cbnpC1zM23XhCpZ9wgTCiEmaxKz05cyf2CI9p39+9LL+6Yz1bA==",
+ "dependencies": {
+ "@discordjs/collection": "^1.4.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/async-queue": "^1.5.0",
+ "@sapphire/snowflake": "^3.4.0",
+ "discord-api-types": "^0.37.35",
+ "file-type": "^18.2.1",
+ "tslib": "^2.5.0",
+ "undici": "^5.20.0"
+ },
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/@discordjs/rest/node_modules/tslib": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
+ },
+ "node_modules/@discordjs/util": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz",
+ "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg==",
"engines": {
"node": ">=16.9.0"
}
@@ -211,6 +249,15 @@
"npm": ">=7.0.0"
}
},
+ "node_modules/@sapphire/snowflake": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.4.0.tgz",
+ "integrity": "sha512-zZxymtVO6zeXVMPds+6d7gv/OfnCc25M1Z+7ZLB0oPmeMTPeRWVPQSS16oDJy5ZsyCOLj7M6mbZml5gWXcVRNw==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
"node_modules/@silvia-odwyer/photon-node": {
"version": "0.3.1",
"license": "Apache-2.0"
@@ -238,6 +285,11 @@
"node": ">=6"
}
},
+ "node_modules/@tokenizer/token": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
+ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
+ },
"node_modules/@types/body-parser": {
"version": "1.17.1",
"dev": true,
@@ -348,9 +400,10 @@
"license": "MIT"
},
"node_modules/@types/node-fetch": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
- "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
+ "dev": true,
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -426,8 +479,9 @@
"license": "MIT"
},
"node_modules/@types/ws": {
- "version": "8.5.3",
- "license": "MIT",
+ "version": "8.5.4",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",
+ "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==",
"dependencies": {
"@types/node": "*"
}
@@ -580,6 +634,7 @@
},
"node_modules/asynckit": {
"version": "0.4.0",
+ "dev": true,
"license": "MIT"
},
"node_modules/ava": {
@@ -1351,6 +1406,7 @@
},
"node_modules/combined-stream": {
"version": "1.0.8",
+ "dev": true,
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
@@ -1642,6 +1698,7 @@
},
"node_modules/delayed-stream": {
"version": "1.0.0",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
@@ -1698,46 +1755,37 @@
}
},
"node_modules/discord-api-types": {
- "version": "0.33.4",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.4.tgz",
- "integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
+ "version": "0.37.35",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.35.tgz",
+ "integrity": "sha512-iyKZ/82k7FX3lcmHiAvvWu5TmyfVo78RtghBV/YsehK6CID83k5SI03DKKopBcln+TiEIYw5MGgq7SJXSpNzMg=="
},
"node_modules/discord.js": {
- "version": "13.14.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.14.0.tgz",
- "integrity": "sha512-EXHAZmFHMf6qBHDsIANwSG792SYJpzEFv2nssfakyDqEn0HLxFLLXMaOxBtVohdkUMgtD+dzyeBlbDvAW/A0AA==",
+ "version": "14.8.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.8.0.tgz",
+ "integrity": "sha512-UOxYtc/YnV7jAJ2gISluJyYeBw4e+j8gWn+IoqG8unaHAVuvZ13DdYN0M1f9fbUgUvSarV798inIrYFtDNDjwQ==",
"dependencies": {
- "@discordjs/builders": "^0.16.0",
- "@discordjs/collection": "^0.7.0",
- "@sapphire/async-queue": "^1.5.0",
- "@types/node-fetch": "^2.6.2",
- "@types/ws": "^8.5.3",
- "discord-api-types": "^0.33.5",
- "form-data": "^4.0.0",
- "node-fetch": "^2.6.7",
- "ws": "^8.9.0"
+ "@discordjs/builders": "^1.5.0",
+ "@discordjs/collection": "^1.4.0",
+ "@discordjs/formatters": "^0.2.0",
+ "@discordjs/rest": "^1.6.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/snowflake": "^3.4.0",
+ "@types/ws": "^8.5.4",
+ "discord-api-types": "^0.37.35",
+ "fast-deep-equal": "^3.1.3",
+ "lodash.snakecase": "^4.1.1",
+ "tslib": "^2.5.0",
+ "undici": "^5.20.0",
+ "ws": "^8.12.1"
},
"engines": {
- "node": ">=16.6.0",
- "npm": ">=7.0.0"
+ "node": ">=16.9.0"
}
},
- "node_modules/discord.js/node_modules/discord-api-types": {
- "version": "0.33.5",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
- "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
- },
- "node_modules/discord.js/node_modules/form-data": {
- "version": "4.0.0",
- "license": "MIT",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
+ "node_modules/discord.js/node_modules/tslib": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"node_modules/dot-prop": {
"version": "5.3.0",
@@ -2001,6 +2049,22 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/file-type": {
+ "version": "18.2.1",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.2.1.tgz",
+ "integrity": "sha512-Yw5MtnMv7vgD2/6Bjmmuegc8bQEVA9GmAyaR18bMYWKqsWDG9wgYZ1j4I6gNMF5Y5JBDcUcjRQqNQx7Y8uotcg==",
+ "dependencies": {
+ "readable-web-to-node-stream": "^3.0.2",
+ "strtok3": "^7.0.0",
+ "token-types": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/file-type?sponsor=1"
+ }
+ },
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"license": "MIT"
@@ -2044,6 +2108,7 @@
},
"node_modules/form-data": {
"version": "3.0.1",
+ "dev": true,
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
@@ -2639,13 +2704,17 @@
}
},
"node_modules/knub": {
- "version": "30.0.0-beta.46",
- "license": "MIT",
+ "version": "32.0.0-next.4",
+ "resolved": "https://registry.npmjs.org/knub/-/knub-32.0.0-next.4.tgz",
+ "integrity": "sha512-ywZbwcGFSr4Erl/nEUDVmziQHXKVIykWtI2Z05DLt01YmxDS+rTO8l/E6LYx7ZL3m+f2DbtLH0HB8zaZb0pUag==",
"dependencies": {
- "discord-api-types": "^0.22.0",
- "discord.js": "^13.0.1",
+ "discord.js": "^14.8.0",
"knub-command-manager": "^9.1.0",
- "ts-essentials": "^6.0.7"
+ "ts-essentials": "^9",
+ "zod": "^3.19.1"
+ },
+ "engines": {
+ "node": ">=16"
}
},
"node_modules/knub-command-manager": {
@@ -2662,13 +2731,6 @@
"node": ">=8"
}
},
- "node_modules/knub/node_modules/discord-api-types": {
- "version": "0.22.0",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/last-commit-log": {
"version": "2.1.0",
"license": "MIT",
@@ -2749,6 +2811,11 @@
"version": "4.4.0",
"license": "MIT"
},
+ "node_modules/lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
+ },
"node_modules/log-symbols": {
"version": "4.1.0",
"dev": true,
@@ -3577,6 +3644,18 @@
"through": "~2.3"
}
},
+ "node_modules/peek-readable": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",
+ "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ }
+ },
"node_modules/picomatch": {
"version": "2.2.2",
"dev": true,
@@ -3846,6 +3925,34 @@
"util-deprecate": "~1.0.1"
}
},
+ "node_modules/readable-web-to-node-stream": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
+ "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
+ "dependencies": {
+ "readable-stream": "^3.6.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ }
+ },
+ "node_modules/readable-web-to-node-stream/node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/readdirp": {
"version": "3.6.0",
"dev": true,
@@ -4344,6 +4451,22 @@
"node": ">=0.10.0"
}
},
+ "node_modules/strtok3": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz",
+ "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==",
+ "dependencies": {
+ "@tokenizer/token": "^0.3.0",
+ "peek-readable": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ }
+ },
"node_modules/supertap": {
"version": "2.0.0",
"dev": true,
@@ -4494,6 +4617,22 @@
"node": ">=0.6"
}
},
+ "node_modules/token-types": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
+ "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",
+ "dependencies": {
+ "@tokenizer/token": "^0.3.0",
+ "ieee754": "^1.2.1"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ }
+ },
"node_modules/tr46": {
"version": "0.0.3",
"license": "MIT"
@@ -4508,10 +4647,11 @@
}
},
"node_modules/ts-essentials": {
- "version": "6.0.7",
- "license": "MIT",
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-9.3.1.tgz",
+ "integrity": "sha512-9CChSvQMyVRo29Vb1A2jbs+LKo3d/bAf+ndSaX0T8cEiy/HChVaRN/HY5DqUryZ8hZ6uol9bEgCnGmnDbwBR9Q==",
"peerDependencies": {
- "typescript": ">=3.7.0"
+ "typescript": ">=4.1.0"
}
},
"node_modules/ts-mixer": {
@@ -4797,9 +4937,9 @@
}
},
"node_modules/typescript": {
- "version": "4.4.4",
- "license": "Apache-2.0",
- "peer": true,
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -4811,6 +4951,36 @@
"node_modules/uid2": {
"version": "0.0.3"
},
+ "node_modules/undici": {
+ "version": "5.20.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz",
+ "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==",
+ "dependencies": {
+ "busboy": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=12.18"
+ }
+ },
+ "node_modules/undici/node_modules/busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=10.16.0"
+ }
+ },
+ "node_modules/undici/node_modules/streamsearch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
"node_modules/unique-string": {
"version": "2.0.0",
"dev": true,
@@ -5276,8 +5446,9 @@
}
},
"node_modules/zod": {
- "version": "3.14.4",
- "license": "MIT",
+ "version": "3.21.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",
+ "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -5318,22 +5489,19 @@
}
},
"@discordjs/builders": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
- "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.5.0.tgz",
+ "integrity": "sha512-7XxT78mnNBPigHn2y6KAXkicxIBFtZREGWaRZ249EC1l6gBUEP8IyVY5JTciIjJArxkF+tg675aZvsTNTKBpmA==",
"requires": {
- "@sapphire/shapeshift": "^3.5.1",
- "discord-api-types": "^0.36.2",
+ "@discordjs/formatters": "^0.2.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/shapeshift": "^3.8.1",
+ "discord-api-types": "^0.37.35",
"fast-deep-equal": "^3.1.3",
- "ts-mixer": "^6.0.1",
- "tslib": "^2.4.0"
+ "ts-mixer": "^6.0.3",
+ "tslib": "^2.5.0"
},
"dependencies": {
- "discord-api-types": {
- "version": "0.36.3",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
- "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
- },
"tslib": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
@@ -5342,9 +5510,44 @@
}
},
"@discordjs/collection": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
- "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA=="
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.4.0.tgz",
+ "integrity": "sha512-hiOJyk2CPFf1+FL3a4VKCuu1f448LlROVuu8nLz1+jCOAPokUcdFAV+l4pd3B3h6uJlJQSASoZzrdyNdjdtfzQ=="
+ },
+ "@discordjs/formatters": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.2.0.tgz",
+ "integrity": "sha512-vn4oMSXuMZUm8ITqVOtvE7/fMMISj4cI5oLsR09PEQXHKeKDAMLltG/DWeeIs7Idfy6V8Fk3rn1e69h7NfzuNA==",
+ "requires": {
+ "discord-api-types": "^0.37.35"
+ }
+ },
+ "@discordjs/rest": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.6.0.tgz",
+ "integrity": "sha512-HGvqNCZ5Z5j0tQHjmT1lFvE5ETO4hvomJ1r0cbnpC1zM23XhCpZ9wgTCiEmaxKz05cyf2CI9p39+9LL+6Yz1bA==",
+ "requires": {
+ "@discordjs/collection": "^1.4.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/async-queue": "^1.5.0",
+ "@sapphire/snowflake": "^3.4.0",
+ "discord-api-types": "^0.37.35",
+ "file-type": "^18.2.1",
+ "tslib": "^2.5.0",
+ "undici": "^5.20.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
+ }
+ }
+ },
+ "@discordjs/util": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.2.0.tgz",
+ "integrity": "sha512-/8qNbebFzLWKOOg+UV+RB8itp4SmU5jw0tBUD3ifElW6rYNOj1Ku5JaSW7lLl/WgjjxF01l/1uQPCzkwr110vg=="
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
@@ -5380,6 +5583,11 @@
"lodash": "^4.17.21"
}
},
+ "@sapphire/snowflake": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.4.0.tgz",
+ "integrity": "sha512-zZxymtVO6zeXVMPds+6d7gv/OfnCc25M1Z+7ZLB0oPmeMTPeRWVPQSS16oDJy5ZsyCOLj7M6mbZml5gWXcVRNw=="
+ },
"@silvia-odwyer/photon-node": {
"version": "0.3.1"
},
@@ -5397,6 +5605,11 @@
"defer-to-connect": "^1.0.1"
}
},
+ "@tokenizer/token": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
+ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
+ },
"@types/body-parser": {
"version": "1.17.1",
"dev": true,
@@ -5491,9 +5704,10 @@
"version": "14.0.14"
},
"@types/node-fetch": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
- "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
+ "dev": true,
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
@@ -5559,7 +5773,9 @@
"dev": true
},
"@types/ws": {
- "version": "8.5.3",
+ "version": "8.5.4",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",
+ "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==",
"requires": {
"@types/node": "*"
}
@@ -5651,7 +5867,8 @@
"dev": true
},
"asynckit": {
- "version": "0.4.0"
+ "version": "0.4.0",
+ "dev": true
},
"ava": {
"version": "3.15.0",
@@ -6146,6 +6363,7 @@
},
"combined-stream": {
"version": "1.0.8",
+ "dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -6337,7 +6555,8 @@
}
},
"delayed-stream": {
- "version": "1.0.0"
+ "version": "1.0.0",
+ "dev": true
},
"depd": {
"version": "1.1.2"
@@ -6377,38 +6596,34 @@
}
},
"discord-api-types": {
- "version": "0.33.4",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.4.tgz",
- "integrity": "sha512-Y6RMvXsHKiBgQhm/q5MgRieXc4Tzh5p/JuDyqreI48lmy+AQfO+g9Xhz0tuGBaN1FtsrLT7mD+lbFONPo5vdwA=="
+ "version": "0.37.35",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.35.tgz",
+ "integrity": "sha512-iyKZ/82k7FX3lcmHiAvvWu5TmyfVo78RtghBV/YsehK6CID83k5SI03DKKopBcln+TiEIYw5MGgq7SJXSpNzMg=="
},
"discord.js": {
- "version": "13.14.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.14.0.tgz",
- "integrity": "sha512-EXHAZmFHMf6qBHDsIANwSG792SYJpzEFv2nssfakyDqEn0HLxFLLXMaOxBtVohdkUMgtD+dzyeBlbDvAW/A0AA==",
+ "version": "14.8.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.8.0.tgz",
+ "integrity": "sha512-UOxYtc/YnV7jAJ2gISluJyYeBw4e+j8gWn+IoqG8unaHAVuvZ13DdYN0M1f9fbUgUvSarV798inIrYFtDNDjwQ==",
"requires": {
- "@discordjs/builders": "^0.16.0",
- "@discordjs/collection": "^0.7.0",
- "@sapphire/async-queue": "^1.5.0",
- "@types/node-fetch": "^2.6.2",
- "@types/ws": "^8.5.3",
- "discord-api-types": "^0.33.5",
- "form-data": "^4.0.0",
- "node-fetch": "^2.6.7",
- "ws": "^8.9.0"
+ "@discordjs/builders": "^1.5.0",
+ "@discordjs/collection": "^1.4.0",
+ "@discordjs/formatters": "^0.2.0",
+ "@discordjs/rest": "^1.6.0",
+ "@discordjs/util": "^0.2.0",
+ "@sapphire/snowflake": "^3.4.0",
+ "@types/ws": "^8.5.4",
+ "discord-api-types": "^0.37.35",
+ "fast-deep-equal": "^3.1.3",
+ "lodash.snakecase": "^4.1.1",
+ "tslib": "^2.5.0",
+ "undici": "^5.20.0",
+ "ws": "^8.12.1"
},
"dependencies": {
- "discord-api-types": {
- "version": "0.33.5",
- "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
- "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
- },
- "form-data": {
- "version": "4.0.0",
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- }
+ "tslib": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
}
}
},
@@ -6588,6 +6803,16 @@
"escape-string-regexp": "^1.0.5"
}
},
+ "file-type": {
+ "version": "18.2.1",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.2.1.tgz",
+ "integrity": "sha512-Yw5MtnMv7vgD2/6Bjmmuegc8bQEVA9GmAyaR18bMYWKqsWDG9wgYZ1j4I6gNMF5Y5JBDcUcjRQqNQx7Y8uotcg==",
+ "requires": {
+ "readable-web-to-node-stream": "^3.0.2",
+ "strtok3": "^7.0.0",
+ "token-types": "^5.0.1"
+ }
+ },
"file-uri-to-path": {
"version": "1.0.0"
},
@@ -6618,6 +6843,7 @@
},
"form-data": {
"version": "3.0.1",
+ "dev": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@@ -6975,17 +7201,14 @@
}
},
"knub": {
- "version": "30.0.0-beta.46",
+ "version": "32.0.0-next.4",
+ "resolved": "https://registry.npmjs.org/knub/-/knub-32.0.0-next.4.tgz",
+ "integrity": "sha512-ywZbwcGFSr4Erl/nEUDVmziQHXKVIykWtI2Z05DLt01YmxDS+rTO8l/E6LYx7ZL3m+f2DbtLH0HB8zaZb0pUag==",
"requires": {
- "discord-api-types": "^0.22.0",
- "discord.js": "^13.0.1",
+ "discord.js": "^14.8.0",
"knub-command-manager": "^9.1.0",
- "ts-essentials": "^6.0.7"
- },
- "dependencies": {
- "discord-api-types": {
- "version": "0.22.0"
- }
+ "ts-essentials": "^9",
+ "zod": "^3.19.1"
}
},
"knub-command-manager": {
@@ -7055,6 +7278,11 @@
"lodash.pick": {
"version": "4.4.0"
},
+ "lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
+ },
"log-symbols": {
"version": "4.1.0",
"dev": true,
@@ -7556,6 +7784,11 @@
"through": "~2.3"
}
},
+ "peek-readable": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",
+ "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A=="
+ },
"picomatch": {
"version": "2.2.2",
"dev": true
@@ -7726,6 +7959,26 @@
"util-deprecate": "~1.0.1"
}
},
+ "readable-web-to-node-stream": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
+ "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
+ "requires": {
+ "readable-stream": "^3.6.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
"readdirp": {
"version": "3.6.0",
"dev": true,
@@ -8052,6 +8305,15 @@
"version": "2.0.1",
"dev": true
},
+ "strtok3": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz",
+ "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==",
+ "requires": {
+ "@tokenizer/token": "^0.3.0",
+ "peek-readable": "^5.0.0"
+ }
+ },
"supertap": {
"version": "2.0.0",
"dev": true,
@@ -8145,6 +8407,15 @@
"toidentifier": {
"version": "1.0.0"
},
+ "token-types": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
+ "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",
+ "requires": {
+ "@tokenizer/token": "^0.3.0",
+ "ieee754": "^1.2.1"
+ }
+ },
"tr46": {
"version": "0.0.3"
},
@@ -8155,7 +8426,9 @@
"dev": true
},
"ts-essentials": {
- "version": "6.0.7",
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-9.3.1.tgz",
+ "integrity": "sha512-9CChSvQMyVRo29Vb1A2jbs+LKo3d/bAf+ndSaX0T8cEiy/HChVaRN/HY5DqUryZ8hZ6uol9bEgCnGmnDbwBR9Q==",
"requires": {}
},
"ts-mixer": {
@@ -8333,12 +8606,36 @@
}
},
"typescript": {
- "version": "4.4.4",
- "peer": true
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g=="
},
"uid2": {
"version": "0.0.3"
},
+ "undici": {
+ "version": "5.20.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz",
+ "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==",
+ "requires": {
+ "busboy": "^1.6.0"
+ },
+ "dependencies": {
+ "busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "requires": {
+ "streamsearch": "^1.1.0"
+ }
+ },
+ "streamsearch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="
+ }
+ }
+ },
"unique-string": {
"version": "2.0.0",
"dev": true,
@@ -8631,7 +8928,9 @@
}
},
"zod": {
- "version": "3.14.4"
+ "version": "3.21.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",
+ "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw=="
}
}
}
diff --git a/backend/package.json b/backend/package.json
index acc5851f..b307b431 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -28,8 +28,7 @@
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"deep-diff": "^1.0.2",
- "discord-api-types": "^0.33.1",
- "discord.js": "^13.14.0",
+ "discord.js": "^14.8.0",
"dotenv": "^4.0.0",
"emoji-regex": "^8.0.0",
"erlpack": "github:discord/erlpack",
@@ -39,7 +38,7 @@
"humanize-duration": "^3.15.0",
"io-ts": "^2.0.0",
"js-yaml": "^3.13.1",
- "knub": "^30.0.0-beta.46",
+ "knub": "^32.0.0-next.4",
"knub-command-manager": "^9.1.0",
"last-commit-log": "^2.1.0",
"lodash.chunk": "^4.2.0",
@@ -68,6 +67,7 @@
"tsconfig-paths": "^3.9.0",
"twemoji": "^12.1.4",
"typeorm": "^0.2.31",
+ "typescript": "~4.9.5",
"utf-8-validate": "^5.0.5",
"uuid": "^3.3.2",
"yawn-yaml": "github:dragory/yawn-yaml#string-number-fix-build",
diff --git a/backend/src/api/auth.ts b/backend/src/api/auth.ts
index ca947d8c..9bb6e3f1 100644
--- a/backend/src/api/auth.ts
+++ b/backend/src/api/auth.ts
@@ -8,8 +8,8 @@ import { ApiLogins } from "../data/ApiLogins";
import { ApiPermissionAssignments } from "../data/ApiPermissionAssignments";
import { ApiUserInfo } from "../data/ApiUserInfo";
import { ApiUserInfoData } from "../data/entities/ApiUserInfo";
-import { ok } from "./responses";
import { env } from "../env";
+import { ok } from "./responses";
interface IPassportApiUser {
apiKey: string;
diff --git a/backend/src/api/docs.ts b/backend/src/api/docs.ts
index 29a3dba9..e2dd63a8 100644
--- a/backend/src/api/docs.ts
+++ b/backend/src/api/docs.ts
@@ -56,7 +56,7 @@ export function initDocs(app: express.Express) {
const name = plugin.name;
const info = plugin.info || {};
- const commands = (plugin.commands || []).map((cmd) => ({
+ const commands = (plugin.messageCommands || []).map((cmd) => ({
trigger: cmd.trigger,
permission: cmd.permission,
signature: cmd.signature,
@@ -66,7 +66,7 @@ export function initDocs(app: express.Express) {
}));
const defaultOptions = plugin.defaultOptions || {};
- const configSchema = plugin.configSchema && formatConfigSchema(plugin.configSchema);
+ const configSchema = plugin.info?.configSchema && formatConfigSchema(plugin.info.configSchema);
res.json({
name,
diff --git a/backend/src/api/guilds.ts b/backend/src/api/guilds.ts
index 0706b4be..c85f5b1e 100644
--- a/backend/src/api/guilds.ts
+++ b/backend/src/api/guilds.ts
@@ -1,20 +1,20 @@
import { ApiPermissions } from "@shared/apiPermissions";
import express, { Request, Response } from "express";
import { YAMLException } from "js-yaml";
+import moment from "moment-timezone";
import { validateGuildConfig } from "../configValidator";
import { AllowedGuilds } from "../data/AllowedGuilds";
+import { ApiAuditLog } from "../data/ApiAuditLog";
+import { AuditLogEventTypes } from "../data/apiAuditLogTypes";
import { ApiPermissionAssignments, ApiPermissionTypes } from "../data/ApiPermissionAssignments";
import { Configs } from "../data/Configs";
+import { Queue } from "../Queue";
+import { isSnowflake } from "../utils";
+import { loadYamlSafely } from "../utils/loadYamlSafely";
+import { ObjectAliasError } from "../utils/validateNoObjectAliases";
import { apiTokenAuthHandlers } from "./auth";
import { hasGuildPermission, requireGuildPermission } from "./permissions";
import { clientError, ok, serverError, unauthorized } from "./responses";
-import { loadYamlSafely } from "../utils/loadYamlSafely";
-import { ObjectAliasError } from "../utils/validateNoObjectAliases";
-import { isSnowflake } from "../utils";
-import moment from "moment-timezone";
-import { ApiAuditLog } from "../data/ApiAuditLog";
-import { AuditLogEventTypes } from "../data/apiAuditLogTypes";
-import { Queue } from "../Queue";
const apiPermissionAssignments = new ApiPermissionAssignments();
const auditLog = new ApiAuditLog();
diff --git a/backend/src/api/guilds/importExport.ts b/backend/src/api/guilds/importExport.ts
index 8bb46748..9e91f4af 100644
--- a/backend/src/api/guilds/importExport.ts
+++ b/backend/src/api/guilds/importExport.ts
@@ -1,13 +1,13 @@
import { ApiPermissions } from "@shared/apiPermissions";
import express, { Request, Response } from "express";
-import { requireGuildPermission } from "../permissions";
-import { clientError, ok } from "../responses";
-import { GuildCases } from "../../data/GuildCases";
+import moment from "moment-timezone";
import { z } from "zod";
import { Case } from "../../data/entities/Case";
-import { rateLimit } from "../rateLimits";
+import { GuildCases } from "../../data/GuildCases";
import { MINUTES } from "../../utils";
-import moment from "moment-timezone";
+import { requireGuildPermission } from "../permissions";
+import { rateLimit } from "../rateLimits";
+import { clientError, ok } from "../responses";
const caseHandlingModeSchema = z.union([
z.literal("replace"),
diff --git a/backend/src/api/guilds/index.ts b/backend/src/api/guilds/index.ts
index 36fe4383..1f37aca8 100644
--- a/backend/src/api/guilds/index.ts
+++ b/backend/src/api/guilds/index.ts
@@ -1,7 +1,7 @@
import express from "express";
import { apiTokenAuthHandlers } from "../auth";
-import { initGuildsMiscAPI } from "./misc";
import { initGuildsImportExportAPI } from "./importExport";
+import { initGuildsMiscAPI } from "./misc";
export function initGuildsAPI(app: express.Express) {
const guildRouter = express.Router();
diff --git a/backend/src/api/guilds/misc.ts b/backend/src/api/guilds/misc.ts
index c4083c05..8ec25d56 100644
--- a/backend/src/api/guilds/misc.ts
+++ b/backend/src/api/guilds/misc.ts
@@ -1,22 +1,19 @@
import { ApiPermissions } from "@shared/apiPermissions";
import express, { Request, Response } from "express";
import { YAMLException } from "js-yaml";
+import moment from "moment-timezone";
import { validateGuildConfig } from "../../configValidator";
import { AllowedGuilds } from "../../data/AllowedGuilds";
-import { ApiPermissionAssignments, ApiPermissionTypes } from "../../data/ApiPermissionAssignments";
-import { Configs } from "../../data/Configs";
-import { apiTokenAuthHandlers } from "../auth";
-import { hasGuildPermission, requireGuildPermission } from "../permissions";
-import { clientError, ok, serverError, unauthorized } from "../responses";
-import { loadYamlSafely } from "../../utils/loadYamlSafely";
-import { ObjectAliasError } from "../../utils/validateNoObjectAliases";
-import { isSnowflake } from "../../utils";
-import moment from "moment-timezone";
import { ApiAuditLog } from "../../data/ApiAuditLog";
import { AuditLogEventTypes } from "../../data/apiAuditLogTypes";
+import { ApiPermissionAssignments, ApiPermissionTypes } from "../../data/ApiPermissionAssignments";
+import { Configs } from "../../data/Configs";
import { Queue } from "../../Queue";
-import { GuildCases } from "../../data/GuildCases";
-import { z } from "zod";
+import { isSnowflake } from "../../utils";
+import { loadYamlSafely } from "../../utils/loadYamlSafely";
+import { ObjectAliasError } from "../../utils/validateNoObjectAliases";
+import { hasGuildPermission, requireGuildPermission } from "../permissions";
+import { clientError, ok, serverError, unauthorized } from "../responses";
const apiPermissionAssignments = new ApiPermissionAssignments();
const auditLog = new ApiAuditLog();
diff --git a/backend/src/api/index.ts b/backend/src/api/index.ts
index 75bcea5e..649a3c0b 100644
--- a/backend/src/api/index.ts
+++ b/backend/src/api/index.ts
@@ -1,6 +1,6 @@
import { connect } from "../data/db";
-import { setIsAPI } from "../globals";
import { env } from "../env";
+import { setIsAPI } from "../globals";
if (!env.KEY) {
// tslint:disable-next-line:no-console
@@ -20,5 +20,5 @@ setIsAPI(true);
// Connect to the database before loading the rest of the code (that depend on the database connection)
console.log("Connecting to database..."); // tslint:disable-line
connect().then(() => {
- import("./start");
+ import("./start.js");
});
diff --git a/backend/src/api/start.ts b/backend/src/api/start.ts
index 59a20da6..8e542cc0 100644
--- a/backend/src/api/start.ts
+++ b/backend/src/api/start.ts
@@ -1,14 +1,14 @@
import cors from "cors";
import express from "express";
+import multer from "multer";
import { TokenError } from "passport-oauth2";
+import { env } from "../env";
import { initArchives } from "./archives";
import { initAuth } from "./auth";
import { initDocs } from "./docs";
import { initGuildsAPI } from "./guilds/index";
import { clientError, error, notFound } from "./responses";
import { startBackgroundTasks } from "./tasks";
-import multer from "multer";
-import { env } from "../env";
const app = express();
diff --git a/backend/src/commandTypes.ts b/backend/src/commandTypes.ts
index 75c6225c..bdc25f17 100644
--- a/backend/src/commandTypes.ts
+++ b/backend/src/commandTypes.ts
@@ -1,5 +1,18 @@
-import { GuildChannel, GuildMember, Snowflake, Util, User, GuildTextBasedChannel } from "discord.js";
-import { baseCommandParameterTypeHelpers, baseTypeConverters, CommandContext, TypeConversionError } from "knub";
+import {
+ escapeCodeBlock,
+ escapeInlineCode,
+ GuildChannel,
+ GuildMember,
+ GuildTextBasedChannel,
+ Snowflake,
+ User,
+} from "discord.js";
+import {
+ baseCommandParameterTypeHelpers,
+ CommandContext,
+ messageCommandBaseTypeConverters,
+ TypeConversionError,
+} from "knub";
import { createTypeHelper } from "knub-command-manager";
import {
channelMentionRegex,
@@ -14,11 +27,9 @@ import {
import { isValidTimezone } from "./utils/isValidTimezone";
import { MessageTarget, resolveMessageTarget } from "./utils/resolveMessageTarget";
import { inputPatternToRegExp } from "./validatorUtils";
-import { getChannelId } from "knub/dist/utils";
-import { disableCodeBlocks } from "knub/dist/helpers";
export const commandTypes = {
- ...baseTypeConverters,
+ ...messageCommandBaseTypeConverters,
delay(value) {
const result = convertDelayStringToMS(value);
@@ -32,7 +43,7 @@ export const commandTypes = {
async resolvedUser(value, context: CommandContext) {
const result = await resolveUser(context.pluginData.client, value);
if (result == null || result instanceof UnknownUser) {
- throw new TypeConversionError(`User \`${Util.escapeCodeBlock(value)}\` was not found`);
+ throw new TypeConversionError(`User \`${escapeCodeBlock(value)}\` was not found`);
}
return result;
},
@@ -40,7 +51,7 @@ export const commandTypes = {
async resolvedUserLoose(value, context: CommandContext) {
const result = await resolveUser(context.pluginData.client, value);
if (result == null) {
- throw new TypeConversionError(`Invalid user: \`${Util.escapeCodeBlock(value)}\``);
+ throw new TypeConversionError(`Invalid user: \`${escapeCodeBlock(value)}\``);
}
return result;
},
@@ -52,9 +63,7 @@ export const commandTypes = {
const result = await resolveMember(context.pluginData.client, context.message.channel.guild, value);
if (result == null) {
- throw new TypeConversionError(
- `Member \`${Util.escapeCodeBlock(value)}\` was not found or they have left the server`,
- );
+ throw new TypeConversionError(`Member \`${escapeCodeBlock(value)}\` was not found or they have left the server`);
}
return result;
},
@@ -64,7 +73,7 @@ export const commandTypes = {
const result = await resolveMessageTarget(context.pluginData, value);
if (!result) {
- throw new TypeConversionError(`Unknown message \`${Util.escapeInlineCode(value)}\``);
+ throw new TypeConversionError(`Unknown message \`${escapeInlineCode(value)}\``);
}
return result;
@@ -84,28 +93,27 @@ export const commandTypes = {
return value as Snowflake;
}
- throw new TypeConversionError(`Could not parse ID: \`${Util.escapeInlineCode(value)}\``);
+ throw new TypeConversionError(`Could not parse ID: \`${escapeInlineCode(value)}\``);
},
regex(value: string, context: CommandContext): RegExp {
try {
return inputPatternToRegExp(value);
} catch (e) {
- throw new TypeConversionError(`Could not parse RegExp: \`${Util.escapeInlineCode(e.message)}\``);
+ throw new TypeConversionError(`Could not parse RegExp: \`${escapeInlineCode(e.message)}\``);
}
},
timezone(value: string) {
if (!isValidTimezone(value)) {
- throw new TypeConversionError(`Invalid timezone: ${Util.escapeInlineCode(value)}`);
+ throw new TypeConversionError(`Invalid timezone: ${escapeInlineCode(value)}`);
}
return value;
},
guildTextBasedChannel(value: string, context: CommandContext) {
- // FIXME: Remove once Knub's types have been fixed
- return baseTypeConverters.textChannel(value, context) as GuildTextBasedChannel;
+ return messageCommandBaseTypeConverters.textChannel(value, context);
},
};
diff --git a/backend/src/configValidator.ts b/backend/src/configValidator.ts
index b5543dc4..4d62536f 100644
--- a/backend/src/configValidator.ts
+++ b/backend/src/configValidator.ts
@@ -1,4 +1,4 @@
-import { configUtils, ConfigValidationError, PluginOptions } from "knub";
+import { ConfigValidationError, PluginConfigManager } from "knub";
import moment from "moment-timezone";
import { guildPlugins } from "./plugins/availablePlugins";
import { ZeppelinPlugin } from "./plugins/ZeppelinPlugin";
@@ -34,9 +34,12 @@ export async function validateGuildConfig(config: any): Promise {
}
const plugin = pluginNameToPlugin.get(pluginName)!;
+ const configManager = new PluginConfigManager(plugin.defaultOptions || { config: {} }, pluginOptions, {
+ levels: {},
+ parser: plugin.configParser,
+ });
try {
- const mergedOptions = configUtils.mergeConfig(plugin.defaultOptions || {}, pluginOptions);
- await plugin.configPreprocessor?.(mergedOptions as unknown as PluginOptions, true);
+ await configManager.init();
} catch (err) {
if (err instanceof ConfigValidationError || err instanceof StrictValidationError) {
return `${pluginName}: ${err.message}`;
diff --git a/backend/src/data/AllowedGuilds.ts b/backend/src/data/AllowedGuilds.ts
index a9d86220..63941d4b 100644
--- a/backend/src/data/AllowedGuilds.ts
+++ b/backend/src/data/AllowedGuilds.ts
@@ -1,10 +1,9 @@
+import moment from "moment-timezone";
import { getRepository, Repository } from "typeorm";
+import { DBDateFormat } from "../utils";
import { ApiPermissionTypes } from "./ApiPermissionAssignments";
import { BaseRepository } from "./BaseRepository";
import { AllowedGuild } from "./entities/AllowedGuild";
-import moment from "moment-timezone";
-import { DBDateFormat } from "../utils";
-import { env } from "../env";
export class AllowedGuilds extends BaseRepository {
private allowedGuilds: Repository;
diff --git a/backend/src/data/ApiAuditLog.ts b/backend/src/data/ApiAuditLog.ts
index 199747ef..e6d33999 100644
--- a/backend/src/data/ApiAuditLog.ts
+++ b/backend/src/data/ApiAuditLog.ts
@@ -1,8 +1,7 @@
-import { BaseRepository } from "./BaseRepository";
import { getRepository, Repository } from "typeorm/index";
-import { ApiAuditLogEntry } from "./entities/ApiAuditLogEntry";
-import { ApiLogin } from "./entities/ApiLogin";
import { AuditLogEventData, AuditLogEventType } from "./apiAuditLogTypes";
+import { BaseRepository } from "./BaseRepository";
+import { ApiAuditLogEntry } from "./entities/ApiAuditLogEntry";
export class ApiAuditLog extends BaseRepository {
private auditLog: Repository>;
diff --git a/backend/src/data/ApiPermissionAssignments.ts b/backend/src/data/ApiPermissionAssignments.ts
index a83a91f9..03ba7c4f 100644
--- a/backend/src/data/ApiPermissionAssignments.ts
+++ b/backend/src/data/ApiPermissionAssignments.ts
@@ -1,10 +1,9 @@
import { ApiPermissions } from "@shared/apiPermissions";
import { getRepository, Repository } from "typeorm";
-import { BaseRepository } from "./BaseRepository";
-import { ApiPermissionAssignment } from "./entities/ApiPermissionAssignment";
-import { Permissions } from "discord.js";
import { ApiAuditLog } from "./ApiAuditLog";
import { AuditLogEventTypes } from "./apiAuditLogTypes";
+import { BaseRepository } from "./BaseRepository";
+import { ApiPermissionAssignment } from "./entities/ApiPermissionAssignment";
export enum ApiPermissionTypes {
User = "USER",
diff --git a/backend/src/data/Archives.ts b/backend/src/data/Archives.ts
index 06ed0760..b696c33e 100644
--- a/backend/src/data/Archives.ts
+++ b/backend/src/data/Archives.ts
@@ -1,6 +1,6 @@
import { getRepository, Repository } from "typeorm";
-import { ArchiveEntry } from "./entities/ArchiveEntry";
import { BaseRepository } from "./BaseRepository";
+import { ArchiveEntry } from "./entities/ArchiveEntry";
export class Archives extends BaseRepository {
protected archives: Repository;
diff --git a/backend/src/data/GuildArchives.ts b/backend/src/data/GuildArchives.ts
index b9ae4c05..297028a3 100644
--- a/backend/src/data/GuildArchives.ts
+++ b/backend/src/data/GuildArchives.ts
@@ -1,18 +1,14 @@
-import { Guild, Snowflake, User } from "discord.js";
+import { Guild, Snowflake } from "discord.js";
import moment from "moment-timezone";
import { isDefaultSticker } from "src/utils/isDefaultSticker";
import { getRepository, Repository } from "typeorm";
import { renderTemplate, TemplateSafeValueContainer } from "../templateFormatter";
import { trimLines } from "../utils";
+import { decrypt, encrypt } from "../utils/crypt";
+import { channelToTemplateSafeChannel, guildToTemplateSafeGuild } from "../utils/templateSafeObjects";
import { BaseGuildRepository } from "./BaseGuildRepository";
import { ArchiveEntry } from "./entities/ArchiveEntry";
-import {
- channelToTemplateSafeChannel,
- guildToTemplateSafeGuild,
- userToTemplateSafeUser,
-} from "../utils/templateSafeObjects";
import { SavedMessage } from "./entities/SavedMessage";
-import { decrypt, encrypt } from "../utils/crypt";
const DEFAULT_EXPIRY_DAYS = 30;
diff --git a/backend/src/data/GuildCases.ts b/backend/src/data/GuildCases.ts
index 9c41c8b6..22b389e7 100644
--- a/backend/src/data/GuildCases.ts
+++ b/backend/src/data/GuildCases.ts
@@ -1,12 +1,11 @@
import { getRepository, In, InsertResult, Repository } from "typeorm";
+import { Queue } from "../Queue";
+import { chunkArray } from "../utils";
import { BaseGuildRepository } from "./BaseGuildRepository";
import { CaseTypes } from "./CaseTypes";
import { connection } from "./db";
import { Case } from "./entities/Case";
import { CaseNote } from "./entities/CaseNote";
-import moment from "moment-timezone";
-import { chunkArray } from "../utils";
-import { Queue } from "../Queue";
const CASE_SUMMARY_REASON_MAX_LENGTH = 300;
diff --git a/backend/src/data/GuildEvents.ts b/backend/src/data/GuildEvents.ts
index 24f14858..4d5a8705 100644
--- a/backend/src/data/GuildEvents.ts
+++ b/backend/src/data/GuildEvents.ts
@@ -1,6 +1,6 @@
import { Mute } from "./entities/Mute";
-import { ScheduledPost } from "./entities/ScheduledPost";
import { Reminder } from "./entities/Reminder";
+import { ScheduledPost } from "./entities/ScheduledPost";
import { Tempban } from "./entities/Tempban";
import { VCAlert } from "./entities/VCAlert";
diff --git a/backend/src/data/GuildRoleButtons.ts b/backend/src/data/GuildRoleButtons.ts
index 106e0055..833fb775 100644
--- a/backend/src/data/GuildRoleButtons.ts
+++ b/backend/src/data/GuildRoleButtons.ts
@@ -1,11 +1,5 @@
import { getRepository, Repository } from "typeorm";
-import { Reminder } from "./entities/Reminder";
-import { BaseRepository } from "./BaseRepository";
-import moment from "moment-timezone";
-import { DBDateFormat } from "../utils";
import { BaseGuildRepository } from "./BaseGuildRepository";
-import { RoleQueueItem } from "./entities/RoleQueueItem";
-import { connection } from "./db";
import { RoleButtonsItem } from "./entities/RoleButtonsItem";
export class GuildRoleButtons extends BaseGuildRepository {
diff --git a/backend/src/data/GuildRoleQueue.ts b/backend/src/data/GuildRoleQueue.ts
index 20d84012..116df838 100644
--- a/backend/src/data/GuildRoleQueue.ts
+++ b/backend/src/data/GuildRoleQueue.ts
@@ -1,11 +1,7 @@
import { getRepository, Repository } from "typeorm";
-import { Reminder } from "./entities/Reminder";
-import { BaseRepository } from "./BaseRepository";
-import moment from "moment-timezone";
-import { DBDateFormat } from "../utils";
import { BaseGuildRepository } from "./BaseGuildRepository";
-import { RoleQueueItem } from "./entities/RoleQueueItem";
import { connection } from "./db";
+import { RoleQueueItem } from "./entities/RoleQueueItem";
export class GuildRoleQueue extends BaseGuildRepository {
private roleQueue: Repository;
diff --git a/backend/src/data/GuildSavedMessages.ts b/backend/src/data/GuildSavedMessages.ts
index e6c51e91..5ea29cd7 100644
--- a/backend/src/data/GuildSavedMessages.ts
+++ b/backend/src/data/GuildSavedMessages.ts
@@ -1,15 +1,13 @@
import { GuildChannel, Message } from "discord.js";
import moment from "moment-timezone";
import { getRepository, Repository } from "typeorm";
-import { QueryDeepPartialEntity } from "typeorm/query-builder/QueryPartialEntity";
import { QueuedEventEmitter } from "../QueuedEventEmitter";
-import { BaseGuildRepository } from "./BaseGuildRepository";
-import { ISavedMessageData, SavedMessage } from "./entities/SavedMessage";
-import { buildEntity } from "./buildEntity";
import { noop } from "../utils";
-import { decrypt } from "../utils/crypt";
-import { decryptJson, encryptJson } from "../utils/cryptHelpers";
import { asyncMap } from "../utils/async";
+import { decryptJson, encryptJson } from "../utils/cryptHelpers";
+import { BaseGuildRepository } from "./BaseGuildRepository";
+import { buildEntity } from "./buildEntity";
+import { ISavedMessageData, SavedMessage } from "./entities/SavedMessage";
export class GuildSavedMessages extends BaseGuildRepository {
private messages: Repository;
@@ -53,13 +51,13 @@ export class GuildSavedMessages extends BaseGuildRepository {
title: embed.title,
description: embed.description,
url: embed.url,
- timestamp: embed.timestamp,
+ timestamp: embed.timestamp ? Date.parse(embed.timestamp) : null,
color: embed.color,
fields: embed.fields.map((field) => ({
name: field.name,
value: field.value,
- inline: field.inline,
+ inline: field.inline ?? false,
})),
author: embed.author
diff --git a/backend/src/data/Mutes.ts b/backend/src/data/Mutes.ts
index 5734f334..17efed37 100644
--- a/backend/src/data/Mutes.ts
+++ b/backend/src/data/Mutes.ts
@@ -1,8 +1,8 @@
import moment from "moment-timezone";
-import { Brackets, getRepository, Repository } from "typeorm";
-import { Mute } from "./entities/Mute";
+import { getRepository, Repository } from "typeorm";
import { DAYS, DBDateFormat } from "../utils";
import { BaseRepository } from "./BaseRepository";
+import { Mute } from "./entities/Mute";
const OLD_EXPIRED_MUTE_THRESHOLD = 7 * DAYS;
diff --git a/backend/src/data/Phisherman.ts b/backend/src/data/Phisherman.ts
index 2f7b90fc..b3e16e36 100644
--- a/backend/src/data/Phisherman.ts
+++ b/backend/src/data/Phisherman.ts
@@ -1,12 +1,12 @@
-import { getRepository, Repository } from "typeorm";
-import { PhishermanCacheEntry } from "./entities/PhishermanCacheEntry";
-import { PhishermanDomainInfo, PhishermanUnknownDomain } from "./types/phisherman";
-import fetch, { Headers } from "node-fetch";
-import { DAYS, DBDateFormat, HOURS, MINUTES } from "../utils";
-import moment from "moment-timezone";
-import { PhishermanKeyCacheEntry } from "./entities/PhishermanKeyCacheEntry";
import crypto from "crypto";
+import moment from "moment-timezone";
+import fetch, { Headers } from "node-fetch";
+import { getRepository, Repository } from "typeorm";
import { env } from "../env";
+import { DAYS, DBDateFormat, HOURS, MINUTES } from "../utils";
+import { PhishermanCacheEntry } from "./entities/PhishermanCacheEntry";
+import { PhishermanKeyCacheEntry } from "./entities/PhishermanKeyCacheEntry";
+import { PhishermanDomainInfo, PhishermanUnknownDomain } from "./types/phisherman";
const API_URL = "https://api.phisherman.gg";
const MASTER_API_KEY = env.PHISHERMAN_API_KEY;
diff --git a/backend/src/data/Reminders.ts b/backend/src/data/Reminders.ts
index 7f8d2f1a..0c35c4e2 100644
--- a/backend/src/data/Reminders.ts
+++ b/backend/src/data/Reminders.ts
@@ -1,8 +1,8 @@
-import { getRepository, Repository } from "typeorm";
-import { Reminder } from "./entities/Reminder";
-import { BaseRepository } from "./BaseRepository";
import moment from "moment-timezone";
+import { getRepository, Repository } from "typeorm";
import { DBDateFormat } from "../utils";
+import { BaseRepository } from "./BaseRepository";
+import { Reminder } from "./entities/Reminder";
export class Reminders extends BaseRepository {
private reminders: Repository;
diff --git a/backend/src/data/ScheduledPosts.ts b/backend/src/data/ScheduledPosts.ts
index 72f1dda4..1931ce6e 100644
--- a/backend/src/data/ScheduledPosts.ts
+++ b/backend/src/data/ScheduledPosts.ts
@@ -1,8 +1,8 @@
-import { getRepository, Repository } from "typeorm";
-import { ScheduledPost } from "./entities/ScheduledPost";
-import { BaseRepository } from "./BaseRepository";
import moment from "moment-timezone";
+import { getRepository, Repository } from "typeorm";
import { DBDateFormat } from "../utils";
+import { BaseRepository } from "./BaseRepository";
+import { ScheduledPost } from "./entities/ScheduledPost";
export class ScheduledPosts extends BaseRepository {
private scheduledPosts: Repository;
diff --git a/backend/src/data/Tempbans.ts b/backend/src/data/Tempbans.ts
index 5a78c30e..a24d3fd8 100644
--- a/backend/src/data/Tempbans.ts
+++ b/backend/src/data/Tempbans.ts
@@ -1,8 +1,8 @@
import moment from "moment-timezone";
import { getRepository, Repository } from "typeorm";
-import { Tempban } from "./entities/Tempban";
-import { BaseRepository } from "./BaseRepository";
import { DBDateFormat } from "../utils";
+import { BaseRepository } from "./BaseRepository";
+import { Tempban } from "./entities/Tempban";
export class Tempbans extends BaseRepository {
private tempbans: Repository;
diff --git a/backend/src/data/VCAlerts.ts b/backend/src/data/VCAlerts.ts
index 27e85f90..1296b033 100644
--- a/backend/src/data/VCAlerts.ts
+++ b/backend/src/data/VCAlerts.ts
@@ -1,8 +1,8 @@
-import { getRepository, Repository } from "typeorm";
-import { VCAlert } from "./entities/VCAlert";
-import { BaseRepository } from "./BaseRepository";
import moment from "moment-timezone";
+import { getRepository, Repository } from "typeorm";
import { DBDateFormat } from "../utils";
+import { BaseRepository } from "./BaseRepository";
+import { VCAlert } from "./entities/VCAlert";
export class VCAlerts extends BaseRepository {
private allAlerts: Repository;
diff --git a/backend/src/data/Webhooks.ts b/backend/src/data/Webhooks.ts
index ce69b2c8..fb1e92ac 100644
--- a/backend/src/data/Webhooks.ts
+++ b/backend/src/data/Webhooks.ts
@@ -1,7 +1,7 @@
import { getRepository, Repository } from "typeorm";
-import { Webhook } from "./entities/Webhook";
-import { BaseRepository } from "./BaseRepository";
import { decrypt, encrypt } from "../utils/crypt";
+import { BaseRepository } from "./BaseRepository";
+import { Webhook } from "./entities/Webhook";
export class Webhooks extends BaseRepository {
repository: Repository = getRepository(Webhook);
diff --git a/backend/src/data/db.ts b/backend/src/data/db.ts
index fd42f361..decfb431 100644
--- a/backend/src/data/db.ts
+++ b/backend/src/data/db.ts
@@ -1,8 +1,8 @@
+import path from "path";
import { Connection, createConnection } from "typeorm";
+import { backendDir } from "../paths";
import { SimpleError } from "../SimpleError";
import { QueryLogger } from "./queryLogger";
-import path from "path";
-import { backendDir } from "../paths";
const ormconfigPath = path.join(backendDir, "ormconfig.js");
const connectionOptions = require(ormconfigPath);
diff --git a/backend/src/data/entities/ApiAuditLogEntry.ts b/backend/src/data/entities/ApiAuditLogEntry.ts
index 0491c313..6c142bd8 100644
--- a/backend/src/data/entities/ApiAuditLogEntry.ts
+++ b/backend/src/data/entities/ApiAuditLogEntry.ts
@@ -1,5 +1,4 @@
-import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
-import { ApiUserInfo } from "./ApiUserInfo";
+import { Column, Entity, PrimaryColumn } from "typeorm";
import { AuditLogEventData, AuditLogEventType } from "../apiAuditLogTypes";
@Entity("api_audit_log")
diff --git a/backend/src/data/entities/ApiPermissionAssignment.ts b/backend/src/data/entities/ApiPermissionAssignment.ts
index 0160241f..49e07878 100644
--- a/backend/src/data/entities/ApiPermissionAssignment.ts
+++ b/backend/src/data/entities/ApiPermissionAssignment.ts
@@ -1,6 +1,6 @@
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
-import { ApiUserInfo } from "./ApiUserInfo";
import { ApiPermissionTypes } from "../ApiPermissionAssignments";
+import { ApiUserInfo } from "./ApiUserInfo";
@Entity("api_permissions")
export class ApiPermissionAssignment {
diff --git a/backend/src/data/entities/CounterTrigger.ts b/backend/src/data/entities/CounterTrigger.ts
index 91cbf995..90cdf488 100644
--- a/backend/src/data/entities/CounterTrigger.ts
+++ b/backend/src/data/entities/CounterTrigger.ts
@@ -2,7 +2,7 @@ import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
export const TRIGGER_COMPARISON_OPS = ["=", "!=", ">", "<", ">=", "<="] as const;
-export type TriggerComparisonOp = typeof TRIGGER_COMPARISON_OPS[number];
+export type TriggerComparisonOp = (typeof TRIGGER_COMPARISON_OPS)[number];
const REVERSE_OPS: Record = {
"=": "!=",
diff --git a/backend/src/data/entities/Reminder.ts b/backend/src/data/entities/Reminder.ts
index e7ce506b..e876efd7 100644
--- a/backend/src/data/entities/Reminder.ts
+++ b/backend/src/data/entities/Reminder.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
+import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("reminders")
export class Reminder {
diff --git a/backend/src/data/entities/SavedMessage.ts b/backend/src/data/entities/SavedMessage.ts
index 5456970b..67ac729b 100644
--- a/backend/src/data/entities/SavedMessage.ts
+++ b/backend/src/data/entities/SavedMessage.ts
@@ -1,4 +1,4 @@
-import { Snowflake } from "discord.js";
+import { Snowflake, StickerFormatType, StickerType } from "discord.js";
import { Column, Entity, PrimaryColumn } from "typeorm";
export interface ISavedMessageAttachmentData {
@@ -55,13 +55,13 @@ export interface ISavedMessageEmbedData {
}
export interface ISavedMessageStickerData {
- format: string;
+ format: StickerFormatType;
guildId: Snowflake | null;
id: Snowflake;
name: string;
description: string | null;
available: boolean | null;
- type: string | null;
+ type: StickerType | null;
}
export interface ISavedMessageData {
diff --git a/backend/src/data/entities/ScheduledPost.ts b/backend/src/data/entities/ScheduledPost.ts
index 1729bca7..45ba547e 100644
--- a/backend/src/data/entities/ScheduledPost.ts
+++ b/backend/src/data/entities/ScheduledPost.ts
@@ -1,5 +1,5 @@
-import { MessageAttachment } from "discord.js";
-import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
+import { Attachment } from "discord.js";
+import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { StrictMessageContent } from "../../utils";
@Entity("scheduled_posts")
@@ -17,7 +17,7 @@ export class ScheduledPost {
@Column("simple-json") content: StrictMessageContent;
- @Column("simple-json") attachments: MessageAttachment[];
+ @Column("simple-json") attachments: Attachment[];
@Column({ type: String, nullable: true }) post_at: string | null;
diff --git a/backend/src/data/entities/VCAlert.ts b/backend/src/data/entities/VCAlert.ts
index 5f0011d7..d82ae033 100644
--- a/backend/src/data/entities/VCAlert.ts
+++ b/backend/src/data/entities/VCAlert.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
+import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("vc_alerts")
export class VCAlert {
diff --git a/backend/src/data/loops/expiredArchiveDeletionLoop.ts b/backend/src/data/loops/expiredArchiveDeletionLoop.ts
index 7aa794ed..be39ab27 100644
--- a/backend/src/data/loops/expiredArchiveDeletionLoop.ts
+++ b/backend/src/data/loops/expiredArchiveDeletionLoop.ts
@@ -2,7 +2,6 @@
import { lazyMemoize, MINUTES } from "../../utils";
import { Archives } from "../Archives";
-import moment from "moment-timezone";
const LOOP_INTERVAL = 15 * MINUTES;
const getArchivesRepository = lazyMemoize(() => new Archives());
diff --git a/backend/src/data/loops/expiringMutesLoop.ts b/backend/src/data/loops/expiringMutesLoop.ts
index 027a3ac9..9060e853 100644
--- a/backend/src/data/loops/expiringMutesLoop.ts
+++ b/backend/src/data/loops/expiringMutesLoop.ts
@@ -1,11 +1,11 @@
// tslint:disable:no-console
-import { lazyMemoize, memoize, MINUTES } from "../../utils";
-import { Mutes } from "../Mutes";
-import Timeout = NodeJS.Timeout;
import moment from "moment-timezone";
+import { lazyMemoize, MINUTES } from "../../utils";
import { Mute } from "../entities/Mute";
import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
+import { Mutes } from "../Mutes";
+import Timeout = NodeJS.Timeout;
const LOOP_INTERVAL = 15 * MINUTES;
const MAX_TRIES_PER_SERVER = 3;
diff --git a/backend/src/data/loops/expiringTempbansLoop.ts b/backend/src/data/loops/expiringTempbansLoop.ts
index cef9b547..3929125d 100644
--- a/backend/src/data/loops/expiringTempbansLoop.ts
+++ b/backend/src/data/loops/expiringTempbansLoop.ts
@@ -1,10 +1,10 @@
// tslint:disable:no-console
-import { lazyMemoize, MINUTES } from "../../utils";
import moment from "moment-timezone";
+import { lazyMemoize, MINUTES } from "../../utils";
+import { Tempban } from "../entities/Tempban";
import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
import { Tempbans } from "../Tempbans";
-import { Tempban } from "../entities/Tempban";
import Timeout = NodeJS.Timeout;
const LOOP_INTERVAL = 15 * MINUTES;
diff --git a/backend/src/data/loops/expiringVCAlertsLoop.ts b/backend/src/data/loops/expiringVCAlertsLoop.ts
index 54bb7032..dbf8c2ef 100644
--- a/backend/src/data/loops/expiringVCAlertsLoop.ts
+++ b/backend/src/data/loops/expiringVCAlertsLoop.ts
@@ -1,11 +1,11 @@
// tslint:disable:no-console
-import { lazyMemoize, MINUTES } from "../../utils";
import moment from "moment-timezone";
-import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
-import Timeout = NodeJS.Timeout;
-import { VCAlerts } from "../VCAlerts";
+import { lazyMemoize, MINUTES } from "../../utils";
import { VCAlert } from "../entities/VCAlert";
+import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
+import { VCAlerts } from "../VCAlerts";
+import Timeout = NodeJS.Timeout;
const LOOP_INTERVAL = 15 * MINUTES;
const MAX_TRIES_PER_SERVER = 3;
diff --git a/backend/src/data/loops/phishermanLoops.ts b/backend/src/data/loops/phishermanLoops.ts
index 1ed9a2d2..6ab89488 100644
--- a/backend/src/data/loops/phishermanLoops.ts
+++ b/backend/src/data/loops/phishermanLoops.ts
@@ -1,6 +1,6 @@
// tslint:disable:no-console
-import { HOURS, MINUTES } from "../../utils";
+import { MINUTES } from "../../utils";
import {
deleteStalePhishermanCacheEntries,
deleteStalePhishermanKeyCacheEntries,
diff --git a/backend/src/data/loops/upcomingRemindersLoop.ts b/backend/src/data/loops/upcomingRemindersLoop.ts
index b3aa2f4b..3ecc661c 100644
--- a/backend/src/data/loops/upcomingRemindersLoop.ts
+++ b/backend/src/data/loops/upcomingRemindersLoop.ts
@@ -1,9 +1,9 @@
// tslint:disable:no-console
-import { lazyMemoize, MINUTES } from "../../utils";
import moment from "moment-timezone";
-import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
+import { lazyMemoize, MINUTES } from "../../utils";
import { Reminder } from "../entities/Reminder";
+import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
import { Reminders } from "../Reminders";
import Timeout = NodeJS.Timeout;
diff --git a/backend/src/data/loops/upcomingScheduledPostsLoop.ts b/backend/src/data/loops/upcomingScheduledPostsLoop.ts
index 465939f4..edd9fdad 100644
--- a/backend/src/data/loops/upcomingScheduledPostsLoop.ts
+++ b/backend/src/data/loops/upcomingScheduledPostsLoop.ts
@@ -1,10 +1,10 @@
// tslint:disable:no-console
-import { lazyMemoize, MINUTES } from "../../utils";
import moment from "moment-timezone";
+import { lazyMemoize, MINUTES } from "../../utils";
+import { ScheduledPost } from "../entities/ScheduledPost";
import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents";
import { ScheduledPosts } from "../ScheduledPosts";
-import { ScheduledPost } from "../entities/ScheduledPost";
import Timeout = NodeJS.Timeout;
const LOOP_INTERVAL = 15 * MINUTES;
diff --git a/backend/src/data/queryLogger.ts b/backend/src/data/queryLogger.ts
index bc38cc0e..269c19bf 100644
--- a/backend/src/data/queryLogger.ts
+++ b/backend/src/data/queryLogger.ts
@@ -1,5 +1,5 @@
-import { AdvancedConsoleLogger } from "typeorm/logger/AdvancedConsoleLogger";
import type { QueryRunner } from "typeorm";
+import { AdvancedConsoleLogger } from "typeorm/logger/AdvancedConsoleLogger";
let groupedQueryStats: Map = new Map();
diff --git a/backend/src/env.ts b/backend/src/env.ts
index a125a744..3d98506d 100644
--- a/backend/src/env.ts
+++ b/backend/src/env.ts
@@ -1,8 +1,8 @@
-import path from "path";
-import fs from "fs";
import dotenv from "dotenv";
-import { rootDir } from "./paths";
+import fs from "fs";
+import path from "path";
import { z } from "zod";
+import { rootDir } from "./paths";
const envType = z.object({
KEY: z.string().length(32),
@@ -52,11 +52,11 @@ const envType = z.object({
DB_DATABASE: z.string().optional().default("zeppelin"),
});
-let toValidate = {};
+let toValidate = { ...process.env };
const envPath = path.join(rootDir, ".env");
if (fs.existsSync(envPath)) {
const buf = fs.readFileSync(envPath);
- toValidate = dotenv.parse(buf);
+ toValidate = { ...toValidate, ...dotenv.parse(buf) };
}
export const env = envType.parse(toValidate);
diff --git a/backend/src/index.ts b/backend/src/index.ts
index 31b2c0a8..ed0d4c9e 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -1,42 +1,45 @@
-import { Client, Constants, Intents, Options, TextChannel, ThreadChannel } from "discord.js";
-import { Knub, PluginError } from "knub";
-import { PluginLoadError } from "knub/dist/plugins/PluginLoadError";
-// Always use UTC internally
-// This is also enforced for the database in data/db.ts
+import {
+ Client,
+ Events,
+ GatewayIntentBits,
+ Options,
+ Partials,
+ RESTEvents,
+ TextChannel,
+ ThreadChannel,
+} from "discord.js";
+import { EventEmitter } from "events";
+import { Knub, PluginError, PluginLoadError, PluginNotLoadedError } from "knub";
import moment from "moment-timezone";
+import { performance } from "perf_hooks";
import { AllowedGuilds } from "./data/AllowedGuilds";
import { Configs } from "./data/Configs";
import { connect } from "./data/db";
import { GuildLogs } from "./data/GuildLogs";
import { LogType } from "./data/LogType";
-import { DiscordJSError } from "./DiscordJSError";
-import { logger } from "./logger";
-import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins";
-import { RecoverablePluginError } from "./RecoverablePluginError";
-import { SimpleError } from "./SimpleError";
-import { ZeppelinGlobalConfig, ZeppelinGuildConfig } from "./types";
-import { startUptimeCounter } from "./uptime";
-import { errorMessage, isDiscordAPIError, isDiscordHTTPError, MINUTES, SECONDS, sleep, successMessage } from "./utils";
-import { loadYamlSafely } from "./utils/loadYamlSafely";
-import { DecayingCounter } from "./utils/DecayingCounter";
-import { PluginNotLoadedError } from "knub/dist/plugins/PluginNotLoadedError";
-import { logRestCall } from "./restCallStats";
-import { logRateLimit } from "./rateLimitStats";
+import { runExpiredArchiveDeletionLoop } from "./data/loops/expiredArchiveDeletionLoop";
import { runExpiringMutesLoop } from "./data/loops/expiringMutesLoop";
-import { runUpcomingRemindersLoop } from "./data/loops/upcomingRemindersLoop";
-import { runUpcomingScheduledPostsLoop } from "./data/loops/upcomingScheduledPostsLoop";
import { runExpiringTempbansLoop } from "./data/loops/expiringTempbansLoop";
import { runExpiringVCAlertsLoop } from "./data/loops/expiringVCAlertsLoop";
-import { runExpiredArchiveDeletionLoop } from "./data/loops/expiredArchiveDeletionLoop";
-import { runSavedMessageCleanupLoop } from "./data/loops/savedMessageCleanupLoop";
-import { performance } from "perf_hooks";
-import { setProfiler } from "./profiler";
-import { enableProfiling } from "./utils/easyProfiler";
import { runPhishermanCacheCleanupLoop, runPhishermanReportingLoop } from "./data/loops/phishermanLoops";
+import { runSavedMessageCleanupLoop } from "./data/loops/savedMessageCleanupLoop";
+import { runUpcomingRemindersLoop } from "./data/loops/upcomingRemindersLoop";
+import { runUpcomingScheduledPostsLoop } from "./data/loops/upcomingScheduledPostsLoop";
import { hasPhishermanMasterAPIKey } from "./data/Phisherman";
import { consumeQueryStats } from "./data/queryLogger";
-import { EventEmitter } from "events";
+import { DiscordJSError } from "./DiscordJSError";
import { env } from "./env";
+import { logger } from "./logger";
+import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins";
+import { setProfiler } from "./profiler";
+import { logRateLimit } from "./rateLimitStats";
+import { RecoverablePluginError } from "./RecoverablePluginError";
+import { SimpleError } from "./SimpleError";
+import { startUptimeCounter } from "./uptime";
+import { errorMessage, isDiscordAPIError, isDiscordHTTPError, MINUTES, SECONDS, sleep, successMessage } from "./utils";
+import { DecayingCounter } from "./utils/DecayingCounter";
+import { enableProfiling } from "./utils/easyProfiler";
+import { loadYamlSafely } from "./utils/loadYamlSafely";
// Error handling
let recentPluginErrors = 0;
@@ -162,6 +165,8 @@ for (const [i, part] of actualVersionParts.entries()) {
throw new SimpleError(`Unsupported Node.js version! Must be at least ${REQUIRED_NODE_VERSION}`);
}
+// Always use UTC internally
+// This is also enforced for the database in data/db.ts
moment.tz.setDefault("UTC");
// Blocking check
@@ -188,17 +193,19 @@ setInterval(() => {
logger.info("Connecting to database");
connect().then(async () => {
const client = new Client({
- partials: ["USER", "CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION"],
+ partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction],
makeCache: Options.cacheWithLimits({
- ...Options.defaultMakeCacheSettings,
+ ...Options.DefaultMakeCacheSettings,
MessageManager: 1,
// GuildMemberManager: 15000,
GuildInviteManager: 0,
}),
- restGlobalRateLimit: 50,
- // restTimeOffset: 1000,
+ rest: {
+ // globalRequestsPerSecond: 50,
+ // offset: 1000,
+ },
// Disable mentions by default
allowedMentions: {
@@ -209,25 +216,26 @@ connect().then(async () => {
},
intents: [
// Privileged
- Intents.FLAGS.GUILD_MEMBERS,
- // Intents.FLAGS.GUILD_PRESENCES,
- Intents.FLAGS.GUILD_MESSAGE_TYPING,
+ GatewayIntentBits.GuildMembers,
+ GatewayIntentBits.MessageContent,
+ // GatewayIntentBits.GuildPresences,
// Regular
- Intents.FLAGS.DIRECT_MESSAGES,
- Intents.FLAGS.GUILD_BANS,
- Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
- Intents.FLAGS.GUILD_INVITES,
- Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
- Intents.FLAGS.GUILD_MESSAGES,
- Intents.FLAGS.GUILDS,
- Intents.FLAGS.GUILD_VOICE_STATES,
+ GatewayIntentBits.GuildMessageTyping,
+ GatewayIntentBits.DirectMessages,
+ GatewayIntentBits.GuildModeration,
+ GatewayIntentBits.GuildEmojisAndStickers,
+ GatewayIntentBits.GuildInvites,
+ GatewayIntentBits.GuildMessageReactions,
+ GatewayIntentBits.GuildMessages,
+ GatewayIntentBits.Guilds,
+ GatewayIntentBits.GuildVoiceStates,
],
});
// FIXME: TS doesn't see Client as a child of EventEmitter for some reason
(client as unknown as EventEmitter).setMaxListeners(200);
- client.on(Constants.Events.RATE_LIMIT, (data) => {
+ client.rest.on(RESTEvents.RateLimited, (data) => {
// tslint:disable-next-line:no-console
// console.log(`[DEBUG] [RATE_LIMIT] ${JSON.stringify(data)}`);
});
@@ -235,7 +243,7 @@ connect().then(async () => {
const safe429DecayInterval = 5 * SECONDS;
const safe429MaxCount = 5;
const safe429Counter = new DecayingCounter(safe429DecayInterval);
- client.on(Constants.Events.DEBUG, (errorText) => {
+ client.on(Events.Debug, (errorText) => {
if (!errorText.includes("429")) {
return;
}
@@ -258,7 +266,7 @@ connect().then(async () => {
const allowedGuilds = new AllowedGuilds();
const guildConfigs = new Configs();
- const bot = new Knub(client, {
+ const bot = new Knub(client, {
guildPlugins,
globalPlugins,
@@ -329,6 +337,7 @@ connect().then(async () => {
sendSuccessMessageFn(channel, body) {
const guildId =
channel instanceof TextChannel || channel instanceof ThreadChannel ? channel.guild.id : undefined;
+ // @ts-expect-error
const emoji = guildId ? bot.getLoadedGuild(guildId)!.config.success_emoji : undefined;
channel.send(successMessage(body, emoji));
},
@@ -336,6 +345,7 @@ connect().then(async () => {
sendErrorMessageFn(channel, body) {
const guildId =
channel instanceof TextChannel || channel instanceof ThreadChannel ? channel.guild.id : undefined;
+ // @ts-expect-error
const emoji = guildId ? bot.getLoadedGuild(guildId)!.config.error_emoji : undefined;
channel.send(errorMessage(body, emoji));
},
@@ -346,7 +356,7 @@ connect().then(async () => {
startUptimeCounter();
});
- client.on(Constants.Events.RATE_LIMIT, (data) => {
+ client.rest.on(RESTEvents.RateLimited, (data) => {
logRateLimit(data);
});
diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts
index 17cd7631..c58b08ba 100644
--- a/backend/src/pluginUtils.ts
+++ b/backend/src/pluginUtils.ts
@@ -2,19 +2,23 @@
* @file Utility functions that are plugin-instance-specific (i.e. use PluginData)
*/
-import { GuildMember, Message, MessageMentionOptions, MessageOptions, TextChannel } from "discord.js";
+import { GuildMember, Message, MessageCreateOptions, MessageMentionOptions, TextBasedChannel } from "discord.js";
import * as t from "io-ts";
-import { CommandContext, configUtils, ConfigValidationError, GuildPluginData, helpers, PluginOptions } from "knub";
-import { PluginOverrideCriteria } from "knub/dist/config/configTypes";
-import { ExtendedMatchParams } from "knub/dist/config/PluginConfigManager"; // TODO: Export from Knub index
-import { AnyPluginData } from "knub/dist/plugins/PluginData";
+import {
+ AnyPluginData,
+ CommandContext,
+ ConfigValidationError,
+ ExtendedMatchParams,
+ GuildPluginData,
+ helpers,
+ PluginOverrideCriteria,
+} from "knub";
import { logger } from "./logger";
-import { ZeppelinPlugin } from "./plugins/ZeppelinPlugin";
-import { TZeppelinKnub } from "./types";
-import { deepKeyIntersect, errorMessage, successMessage, tDeepPartial, tNullable } from "./utils";
-import { Tail } from "./utils/typeUtils";
-import { decodeAndValidateStrict, StrictValidationError, validate } from "./validatorUtils";
import { isStaff } from "./staff";
+import { TZeppelinKnub } from "./types";
+import { errorMessage, successMessage, tNullable } from "./utils";
+import { Tail } from "./utils/typeUtils";
+import { StrictValidationError, validate } from "./validatorUtils";
const { getMemberLevel } = helpers;
@@ -91,117 +95,32 @@ export function strictValidationErrorToConfigValidationError(err: StrictValidati
);
}
-export function getPluginConfigPreprocessor(
- blueprint: ZeppelinPlugin,
- customPreprocessor?: ZeppelinPlugin["configPreprocessor"],
-) {
- return async (options: PluginOptions, strict?: boolean) => {
- // 1. Validate the basic structure of plugin config
- const basicOptionsValidation = validate(BasicPluginStructureType, options);
- if (basicOptionsValidation instanceof StrictValidationError) {
- throw strictValidationErrorToConfigValidationError(basicOptionsValidation);
+export function makeIoTsConfigParser>(schema: Schema): (input: unknown) => t.TypeOf {
+ return (input: unknown) => {
+ const error = validate(schema, input);
+ if (error) {
+ throw error;
}
-
- // 2. Validate config/overrides against *partial* config schema. This ensures valid properties have valid types.
- const partialConfigSchema = tDeepPartial(blueprint.configSchema);
-
- if (options.config) {
- const partialConfigValidation = validate(partialConfigSchema, options.config);
- if (partialConfigValidation instanceof StrictValidationError) {
- throw strictValidationErrorToConfigValidationError(partialConfigValidation);
- }
- }
-
- if (options.overrides) {
- for (const override of options.overrides) {
- // Validate criteria and extra criteria
- // FIXME: This is ugly
- for (const key of Object.keys(override)) {
- if (!validTopLevelOverrideKeys.includes(key)) {
- if (strict) {
- throw new ConfigValidationError(`Unknown override criterion '${key}'`);
- }
-
- delete override[key];
- }
- }
- if (override.extra != null) {
- for (const extraCriterion of Object.keys(override.extra)) {
- if (!blueprint.customOverrideCriteriaFunctions?.[extraCriterion]) {
- if (strict) {
- throw new ConfigValidationError(`Unknown override extra criterion '${extraCriterion}'`);
- }
-
- delete override.extra[extraCriterion];
- }
- }
- }
-
- // Validate override config
- const partialOverrideConfigValidation = decodeAndValidateStrict(partialConfigSchema, override.config || {});
- if (partialOverrideConfigValidation instanceof StrictValidationError) {
- throw strictValidationErrorToConfigValidationError(partialOverrideConfigValidation);
- }
- }
- }
-
- // 3. Run custom preprocessor, if any
- if (customPreprocessor) {
- options = await customPreprocessor(options);
- }
-
- // 4. Merge with default options and validate/decode the entire config
- let decodedConfig = {};
- const decodedOverrides: Array & { config: any }> = [];
-
- if (options.config) {
- decodedConfig = blueprint.configSchema
- ? decodeAndValidateStrict(blueprint.configSchema, options.config)
- : options.config;
- if (decodedConfig instanceof StrictValidationError) {
- throw strictValidationErrorToConfigValidationError(decodedConfig);
- }
- }
-
- if (options.overrides) {
- for (const override of options.overrides) {
- const overrideConfigMergedWithBaseConfig = configUtils.mergeConfig(options.config || {}, override.config || {});
- const decodedOverrideConfig = blueprint.configSchema
- ? decodeAndValidateStrict(blueprint.configSchema, overrideConfigMergedWithBaseConfig)
- : overrideConfigMergedWithBaseConfig;
- if (decodedOverrideConfig instanceof StrictValidationError) {
- throw strictValidationErrorToConfigValidationError(decodedOverrideConfig);
- }
- decodedOverrides.push({
- ...override,
- config: deepKeyIntersect(decodedOverrideConfig, override.config || {}),
- });
- }
- }
-
- return {
- config: decodedConfig,
- overrides: decodedOverrides,
- };
+ return input as t.TypeOf;
};
}
export async function sendSuccessMessage(
pluginData: AnyPluginData,
- channel: TextChannel,
+ channel: TextBasedChannel,
body: string,
allowedMentions?: MessageMentionOptions,
): Promise {
const emoji = pluginData.fullConfig.success_emoji || undefined;
const formattedBody = successMessage(body, emoji);
- const content: MessageOptions = allowedMentions
+ const content: MessageCreateOptions = allowedMentions
? { content: formattedBody, allowedMentions }
: { content: formattedBody };
return channel
.send({ ...content }) // Force line break
.catch((err) => {
- const channelInfo = channel.guild ? `${channel.id} (${channel.guild.id})` : channel.id;
+ const channelInfo = "guild" in channel ? `${channel.id} (${channel.guild.id})` : channel.id;
logger.warn(`Failed to send success message to ${channelInfo}): ${err.code} ${err.message}`);
return undefined;
});
@@ -209,20 +128,20 @@ export async function sendSuccessMessage(
export async function sendErrorMessage(
pluginData: AnyPluginData,
- channel: TextChannel,
+ channel: TextBasedChannel,
body: string,
allowedMentions?: MessageMentionOptions,
): Promise {
const emoji = pluginData.fullConfig.error_emoji || undefined;
const formattedBody = errorMessage(body, emoji);
- const content: MessageOptions = allowedMentions
+ const content: MessageCreateOptions = allowedMentions
? { content: formattedBody, allowedMentions }
: { content: formattedBody };
return channel
.send({ ...content }) // Force line break
.catch((err) => {
- const channelInfo = channel.guild ? `${channel.id} (${channel.guild.id})` : channel.id;
+ const channelInfo = "guild" in channel ? `${channel.id} (${channel.guild.id})` : channel.id;
logger.warn(`Failed to send error message to ${channelInfo}): ${err.code} ${err.message}`);
return undefined;
});
@@ -230,11 +149,13 @@ export async function sendErrorMessage(
export function getBaseUrl(pluginData: AnyPluginData) {
const knub = pluginData.getKnubInstance() as TZeppelinKnub;
+ // @ts-expect-error
return knub.getGlobalConfig().url;
}
export function isOwner(pluginData: AnyPluginData, userId: string) {
const knub = pluginData.getKnubInstance() as TZeppelinKnub;
+ // @ts-expect-error
const owners = knub.getGlobalConfig()?.owners;
if (!owners) {
return false;
diff --git a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts
index 6c8251b8..af3ff607 100644
--- a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts
+++ b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts
@@ -1,6 +1,7 @@
import { PluginOptions } from "knub";
import { GuildLogs } from "../../data/GuildLogs";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
+import { makeIoTsConfigParser } from "../../pluginUtils";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
@@ -23,10 +24,11 @@ export const AutoDeletePlugin = zeppelinGuildPlugin()({
prettyName: "Auto-delete",
description: "Allows Zeppelin to auto-delete messages from a channel after a delay",
configurationGuide: "Maximum deletion delay is currently 5 minutes",
+ configSchema: ConfigSchema,
},
dependencies: () => [TimeAndDatePlugin, LogsPlugin],
- configSchema: ConfigSchema,
+ configParser: makeIoTsConfigParser(ConfigSchema),
defaultOptions,
beforeLoad(pluginData) {
@@ -56,8 +58,10 @@ export const AutoDeletePlugin = zeppelinGuildPlugin()({
},
beforeUnload(pluginData) {
- pluginData.state.guildSavedMessages.events.off("create", pluginData.state.onMessageCreateFn);
- pluginData.state.guildSavedMessages.events.off("delete", pluginData.state.onMessageDeleteFn);
- pluginData.state.guildSavedMessages.events.off("deleteBulk", pluginData.state.onMessageDeleteBulkFn);
+ const { state, guild } = pluginData;
+
+ state.guildSavedMessages.events.off("create", state.onMessageCreateFn);
+ state.guildSavedMessages.events.off("delete", state.onMessageDeleteFn);
+ state.guildSavedMessages.events.off("deleteBulk", state.onMessageDeleteBulkFn);
},
});
diff --git a/backend/src/plugins/AutoDelete/util/deleteNextItem.ts b/backend/src/plugins/AutoDelete/util/deleteNextItem.ts
index 9ff6a8f0..c3aa6f72 100644
--- a/backend/src/plugins/AutoDelete/util/deleteNextItem.ts
+++ b/backend/src/plugins/AutoDelete/util/deleteNextItem.ts
@@ -1,7 +1,6 @@
-import { Permissions, Snowflake, TextChannel } from "discord.js";
+import { ChannelType, PermissionsBitField, Snowflake } from "discord.js";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
-import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { LogType } from "../../../data/LogType";
import { logger } from "../../../logger";
import { resolveUser, verboseChannelMention } from "../../../utils";
@@ -17,8 +16,8 @@ export async function deleteNextItem(pluginData: GuildPluginData {
+ channel.messages.delete(itemToDelete.message.id as Snowflake).catch((err) => {
if (err.code === 10008) {
// "Unknown Message", probably already deleted by automod or another bot, ignore
return;
diff --git a/backend/src/plugins/AutoDelete/util/onMessageCreate.ts b/backend/src/plugins/AutoDelete/util/onMessageCreate.ts
index 1fb07295..024e3cf0 100644
--- a/backend/src/plugins/AutoDelete/util/onMessageCreate.ts
+++ b/backend/src/plugins/AutoDelete/util/onMessageCreate.ts
@@ -1,10 +1,9 @@
import { GuildPluginData } from "knub";
import { SavedMessage } from "../../../data/entities/SavedMessage";
-import { LogType } from "../../../data/LogType";
import { convertDelayStringToMS, resolveMember } from "../../../utils";
+import { LogsPlugin } from "../../Logs/LogsPlugin";
import { AutoDeletePluginType, MAX_DELAY } from "../types";
import { addMessageToDeletionQueue } from "./addMessageToDeletionQueue";
-import { LogsPlugin } from "../../Logs/LogsPlugin";
export async function onMessageCreate(pluginData: GuildPluginData, msg: SavedMessage) {
const member = await resolveMember(pluginData.client, pluginData.guild, msg.user_id);
diff --git a/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts b/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts
index b8575cc4..8ec1ecd7 100644
--- a/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts
+++ b/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts
@@ -1,6 +1,7 @@
import { PluginOptions } from "knub";
import { GuildAutoReactions } from "../../data/GuildAutoReactions";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
+import { makeIoTsConfigParser } from "../../pluginUtils";
import { trimPluginDescription } from "../../utils";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
@@ -31,6 +32,7 @@ export const AutoReactionsPlugin = zeppelinGuildPlugin(
description: trimPluginDescription(`
Allows setting up automatic reactions to all new messages on a channel
`),
+ configSchema: ConfigSchema,
},
// prettier-ignore
@@ -38,11 +40,11 @@ export const AutoReactionsPlugin = zeppelinGuildPlugin(
LogsPlugin,
],
- configSchema: ConfigSchema,
+ configParser: makeIoTsConfigParser(ConfigSchema),
defaultOptions,
// prettier-ignore
- commands: [
+ messageCommands: [
NewAutoReactionsCmd,
DisableAutoReactionsCmd,
],
@@ -53,8 +55,10 @@ export const AutoReactionsPlugin = zeppelinGuildPlugin(
],
beforeLoad(pluginData) {
- pluginData.state.savedMessages = GuildSavedMessages.getGuildInstance(pluginData.guild.id);
- pluginData.state.autoReactions = GuildAutoReactions.getGuildInstance(pluginData.guild.id);
- pluginData.state.cache = new Map();
+ const { state, guild } = pluginData;
+
+ state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
+ state.autoReactions = GuildAutoReactions.getGuildInstance(guild.id);
+ state.cache = new Map();
},
});
diff --git a/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts b/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
index 17b377b2..a64cb95c 100644
--- a/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
+++ b/backend/src/plugins/AutoReactions/commands/NewAutoReactionsCmd.ts
@@ -1,4 +1,4 @@
-import { GuildChannel, Permissions } from "discord.js";
+import { PermissionsBitField } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { canUseEmoji, customEmojiRegex, isEmoji } from "../../../utils";
@@ -7,7 +7,7 @@ import { missingPermissionError } from "../../../utils/missingPermissionError";
import { readChannelPermissions } from "../../../utils/readChannelPermissions";
import { autoReactionsCmd } from "../types";
-const requiredPermissions = readChannelPermissions | Permissions.FLAGS.ADD_REACTIONS;
+const requiredPermissions = readChannelPermissions | PermissionsBitField.Flags.AddReactions;
export const NewAutoReactionsCmd = autoReactionsCmd({
trigger: "auto_reactions",
diff --git a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
index a959cdcf..574e500f 100644
--- a/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
+++ b/backend/src/plugins/AutoReactions/events/AddReactionsEvt.ts
@@ -1,14 +1,13 @@
-import { GuildChannel, GuildTextBasedChannel, Permissions } from "discord.js";
-import { LogType } from "../../../data/LogType";
+import { GuildTextBasedChannel, PermissionsBitField } from "discord.js";
+import { AutoReaction } from "../../../data/entities/AutoReaction";
import { isDiscordAPIError } from "../../../utils";
import { getMissingChannelPermissions } from "../../../utils/getMissingChannelPermissions";
import { missingPermissionError } from "../../../utils/missingPermissionError";
import { readChannelPermissions } from "../../../utils/readChannelPermissions";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { autoReactionsEvt } from "../types";
-import { AutoReaction } from "../../../data/entities/AutoReaction";
-const p = Permissions.FLAGS;
+const p = PermissionsBitField.Flags;
export const AddReactionsEvt = autoReactionsEvt({
event: "messageCreate",
@@ -40,7 +39,7 @@ export const AddReactionsEvt = autoReactionsEvt({
const me = pluginData.guild.members.cache.get(pluginData.client.user!.id)!;
if (me) {
- const missingPermissions = getMissingChannelPermissions(me, channel, readChannelPermissions | p.ADD_REACTIONS);
+ const missingPermissions = getMissingChannelPermissions(me, channel, readChannelPermissions | p.AddReactions);
if (missingPermissions) {
const logs = pluginData.getPlugin(LogsPlugin);
logs.logBotAlert({
diff --git a/backend/src/plugins/AutoReactions/types.ts b/backend/src/plugins/AutoReactions/types.ts
index 4751fa94..99bbe8c8 100644
--- a/backend/src/plugins/AutoReactions/types.ts
+++ b/backend/src/plugins/AutoReactions/types.ts
@@ -1,9 +1,9 @@
import * as t from "io-ts";
-import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
+import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
+import { AutoReaction } from "../../data/entities/AutoReaction";
import { GuildAutoReactions } from "../../data/GuildAutoReactions";
import { GuildLogs } from "../../data/GuildLogs";
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
-import { AutoReaction } from "../../data/entities/AutoReaction";
export const ConfigSchema = t.type({
can_manage: t.boolean,
@@ -20,5 +20,5 @@ export interface AutoReactionsPluginType extends BasePluginType {
};
}
-export const autoReactionsCmd = typedGuildCommand();
-export const autoReactionsEvt = typedGuildEventListener();
+export const autoReactionsCmd = guildPluginMessageCommand();
+export const autoReactionsEvt = guildPluginEventListener();
diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts
index b485b4b9..81a7792c 100644
--- a/backend/src/plugins/Automod/AutomodPlugin.ts
+++ b/backend/src/plugins/Automod/AutomodPlugin.ts
@@ -1,5 +1,5 @@
+import * as t from "io-ts";
import { configUtils, CooldownManager } from "knub";
-import { ConfigPreprocessorFn } from "knub/dist/config/configTypes";
import { GuildAntiraidLevels } from "../../data/GuildAntiraidLevels";
import { GuildArchives } from "../../data/GuildArchives";
import { GuildLogs } from "../../data/GuildLogs";
@@ -9,11 +9,13 @@ import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
import { MINUTES, SECONDS } from "../../utils";
import { registerEventListenersFromMap } from "../../utils/registerEventListenersFromMap";
import { unregisterEventListenersFromMap } from "../../utils/unregisterEventListenersFromMap";
-import { StrictValidationError } from "../../validatorUtils";
+import { StrictValidationError, validate } from "../../validatorUtils";
import { CountersPlugin } from "../Counters/CountersPlugin";
+import { InternalPosterPlugin } from "../InternalPoster/InternalPosterPlugin";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { ModActionsPlugin } from "../ModActions/ModActionsPlugin";
import { MutesPlugin } from "../Mutes/MutesPlugin";
+import { PhishermanPlugin } from "../Phisherman/PhishermanPlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { availableActions } from "./actions/availableActions";
import { AntiraidClearCmd } from "./commands/AntiraidClearCmd";
@@ -35,8 +37,6 @@ import { clearOldRecentSpam } from "./functions/clearOldRecentSpam";
import { pluginInfo } from "./info";
import { availableTriggers } from "./triggers/availableTriggers";
import { AutomodPluginType, ConfigSchema } from "./types";
-import { PhishermanPlugin } from "../Phisherman/PhishermanPlugin";
-import { InternalPosterPlugin } from "../InternalPoster/InternalPosterPlugin";
const defaultOptions = {
config: {
@@ -63,13 +63,15 @@ const defaultOptions = {
/**
* Config preprocessor to set default values for triggers and perform extra validation
+ * TODO: Separate input and output types
*/
-const configPreprocessor: ConfigPreprocessorFn = (options) => {
- if (options.config?.rules) {
+const configParser = (input: unknown) => {
+ const rules = (input as any).rules;
+ if (rules) {
// Loop through each rule
- for (const [name, rule] of Object.entries(options.config.rules)) {
+ for (const [name, rule] of Object.entries(rules)) {
if (rule == null) {
- delete options.config.rules[name];
+ delete rules[name];
continue;
}
@@ -97,7 +99,7 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
for (const triggerObj of rule["triggers"]) {
for (const triggerName in triggerObj) {
if (!availableTriggers[triggerName]) {
- throw new StrictValidationError([`Unknown trigger '${triggerName}' in rule '${rule.name}'`]);
+ throw new StrictValidationError([`Unknown trigger '${triggerName}' in rule '${rule["name"]}'`]);
}
const triggerBlueprint = availableTriggers[triggerName];
@@ -117,11 +119,11 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
if (white && black) {
throw new StrictValidationError([
- `Cannot have both blacklist and whitelist enabled at rule <${rule.name}/match_attachment_type>`,
+ `Cannot have both blacklist and whitelist enabled at rule <${rule["name"]}/match_attachment_type>`,
]);
} else if (!white && !black) {
throw new StrictValidationError([
- `Must have either blacklist or whitelist enabled at rule <${rule.name}/match_attachment_type>`,
+ `Must have either blacklist or whitelist enabled at rule <${rule["name"]}/match_attachment_type>`,
]);
}
}
@@ -132,11 +134,11 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
if (white && black) {
throw new StrictValidationError([
- `Cannot have both blacklist and whitelist enabled at rule <${rule.name}/match_mime_type>`,
+ `Cannot have both blacklist and whitelist enabled at rule <${rule["name"]}/match_mime_type>`,
]);
} else if (!white && !black) {
throw new StrictValidationError([
- `Must have either blacklist or whitelist enabled at rule <${rule.name}/match_mime_type>`,
+ `Must have either blacklist or whitelist enabled at rule <${rule["name"]}/match_mime_type>`,
]);
}
}
@@ -147,7 +149,7 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
if (rule["actions"]) {
for (const actionName in rule["actions"]) {
if (!availableActions[actionName]) {
- throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule.name}'`]);
+ throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule["name"]}'`]);
}
const actionBlueprint = availableActions[actionName];
@@ -163,9 +165,9 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
// Enable logging of automod actions by default
if (rule["actions"]) {
- for (const actionName in rule.actions) {
+ for (const actionName in rule["actions"]) {
if (!availableActions[actionName]) {
- throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule.name}'`]);
+ throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule["name"]}'`]);
}
}
@@ -173,13 +175,18 @@ const configPreprocessor: ConfigPreprocessorFn = (options) =>
rule["actions"]["log"] = true;
}
if (rule["actions"]["clean"] && rule["actions"]["start_thread"]) {
- throw new StrictValidationError([`Cannot have both clean and start_thread at rule '${rule.name}'`]);
+ throw new StrictValidationError([`Cannot have both clean and start_thread at rule '${rule["name"]}'`]);
}
}
}
}
- return options;
+ const error = validate(ConfigSchema, input);
+ if (error) {
+ throw error;
+ }
+
+ return input as t.TypeOf;
};
export const AutomodPlugin = zeppelinGuildPlugin()({
@@ -197,9 +204,8 @@ export const AutomodPlugin = zeppelinGuildPlugin()({
InternalPosterPlugin,
],
- configSchema: ConfigSchema,
defaultOptions,
- configPreprocessor,
+ configParser,
customOverrideCriteriaFunctions: {
antiraid_level: (pluginData, matchParams, value) => {
@@ -218,136 +224,126 @@ export const AutomodPlugin = zeppelinGuildPlugin()({
// Messages use message events from SavedMessages, see onLoad below
],
- commands: [AntiraidClearCmd, SetAntiraidCmd, ViewAntiraidCmd],
+ messageCommands: [AntiraidClearCmd, SetAntiraidCmd, ViewAntiraidCmd],
async beforeLoad(pluginData) {
- pluginData.state.queue = new Queue();
+ const { state, guild } = pluginData;
- pluginData.state.regexRunner = getRegExpRunner(`guild-${pluginData.guild.id}`);
+ state.queue = new Queue();
- pluginData.state.recentActions = [];
+ state.regexRunner = getRegExpRunner(`guild-${guild.id}`);
- pluginData.state.recentSpam = [];
+ state.recentActions = [];
- pluginData.state.recentNicknameChanges = new Map();
+ state.recentSpam = [];
- pluginData.state.ignoredRoleChanges = new Set();
+ state.recentNicknameChanges = new Map();
- pluginData.state.cooldownManager = new CooldownManager();
+ state.ignoredRoleChanges = new Set();
- pluginData.state.logs = new GuildLogs(pluginData.guild.id);
- pluginData.state.savedMessages = GuildSavedMessages.getGuildInstance(pluginData.guild.id);
- pluginData.state.antiraidLevels = GuildAntiraidLevels.getGuildInstance(pluginData.guild.id);
- pluginData.state.archives = GuildArchives.getGuildInstance(pluginData.guild.id);
+ state.cooldownManager = new CooldownManager();
- pluginData.state.cachedAntiraidLevel = await pluginData.state.antiraidLevels.get();
+ state.logs = new GuildLogs(guild.id);
+ state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
+ state.antiraidLevels = GuildAntiraidLevels.getGuildInstance(guild.id);
+ state.archives = GuildArchives.getGuildInstance(guild.id);
+
+ state.cachedAntiraidLevel = await state.antiraidLevels.get();
},
async afterLoad(pluginData) {
- pluginData.state.clearRecentActionsInterval = setInterval(() => clearOldRecentActions(pluginData), 1 * MINUTES);
- pluginData.state.clearRecentSpamInterval = setInterval(() => clearOldRecentSpam(pluginData), 1 * SECONDS);
- pluginData.state.clearRecentNicknameChangesInterval = setInterval(
+ const { state, guild } = pluginData;
+
+ state.clearRecentActionsInterval = setInterval(() => clearOldRecentActions(pluginData), 1 * MINUTES);
+ state.clearRecentSpamInterval = setInterval(() => clearOldRecentSpam(pluginData), 1 * SECONDS);
+ state.clearRecentNicknameChangesInterval = setInterval(
() => clearOldRecentNicknameChanges(pluginData),
30 * SECONDS,
);
- pluginData.state.onMessageCreateFn = (message) => runAutomodOnMessage(pluginData, message, false);
- pluginData.state.savedMessages.events.on("create", pluginData.state.onMessageCreateFn);
-
- pluginData.state.onMessageUpdateFn = (message) => runAutomodOnMessage(pluginData, message, true);
- pluginData.state.savedMessages.events.on("update", pluginData.state.onMessageUpdateFn);
+ state.onMessageCreateFn = (message) => runAutomodOnMessage(pluginData, message, false);
+ state.savedMessages.events.on("create", state.onMessageCreateFn);
+ state.onMessageUpdateFn = (message) => runAutomodOnMessage(pluginData, message, true);
+ state.savedMessages.events.on("update", state.onMessageUpdateFn);
const countersPlugin = pluginData.getPlugin(CountersPlugin);
- pluginData.state.onCounterTrigger = (name, triggerName, channelId, userId) => {
+ state.onCounterTrigger = (name, triggerName, channelId, userId) => {
runAutomodOnCounterTrigger(pluginData, name, triggerName, channelId, userId, false);
};
- pluginData.state.onCounterReverseTrigger = (name, triggerName, channelId, userId) => {
+ state.onCounterReverseTrigger = (name, triggerName, channelId, userId) => {
runAutomodOnCounterTrigger(pluginData, name, triggerName, channelId, userId, true);
};
-
- countersPlugin.onCounterEvent("trigger", pluginData.state.onCounterTrigger);
- countersPlugin.onCounterEvent("reverseTrigger", pluginData.state.onCounterReverseTrigger);
+ countersPlugin.onCounterEvent("trigger", state.onCounterTrigger);
+ countersPlugin.onCounterEvent("reverseTrigger", state.onCounterReverseTrigger);
const modActionsEvents = pluginData.getPlugin(ModActionsPlugin).getEventEmitter();
- pluginData.state.modActionsListeners = new Map();
- pluginData.state.modActionsListeners.set("note", (userId: string) =>
- runAutomodOnModAction(pluginData, "note", userId),
+ state.modActionsListeners = new Map();
+ state.modActionsListeners.set("note", (userId: string) => runAutomodOnModAction(pluginData, "note", userId));
+ state.modActionsListeners.set("warn", (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
+ runAutomodOnModAction(pluginData, "warn", userId, reason, isAutomodAction),
);
- pluginData.state.modActionsListeners.set(
- "warn",
- (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
- runAutomodOnModAction(pluginData, "warn", userId, reason, isAutomodAction),
+ state.modActionsListeners.set("kick", (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
+ runAutomodOnModAction(pluginData, "kick", userId, reason, isAutomodAction),
);
- pluginData.state.modActionsListeners.set(
- "kick",
- (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
- runAutomodOnModAction(pluginData, "kick", userId, reason, isAutomodAction),
+ state.modActionsListeners.set("ban", (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
+ runAutomodOnModAction(pluginData, "ban", userId, reason, isAutomodAction),
);
- pluginData.state.modActionsListeners.set(
- "ban",
- (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
- runAutomodOnModAction(pluginData, "ban", userId, reason, isAutomodAction),
- );
- pluginData.state.modActionsListeners.set("unban", (userId: string) =>
- runAutomodOnModAction(pluginData, "unban", userId),
- );
- registerEventListenersFromMap(modActionsEvents, pluginData.state.modActionsListeners);
+ state.modActionsListeners.set("unban", (userId: string) => runAutomodOnModAction(pluginData, "unban", userId));
+ registerEventListenersFromMap(modActionsEvents, state.modActionsListeners);
const mutesEvents = pluginData.getPlugin(MutesPlugin).getEventEmitter();
- pluginData.state.mutesListeners = new Map();
- pluginData.state.mutesListeners.set(
- "mute",
- (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
- runAutomodOnModAction(pluginData, "mute", userId, reason, isAutomodAction),
+ state.mutesListeners = new Map();
+ state.mutesListeners.set("mute", (userId: string, reason: string | undefined, isAutomodAction: boolean) =>
+ runAutomodOnModAction(pluginData, "mute", userId, reason, isAutomodAction),
);
- pluginData.state.mutesListeners.set("unmute", (userId: string) =>
- runAutomodOnModAction(pluginData, "unmute", userId),
- );
- registerEventListenersFromMap(mutesEvents, pluginData.state.mutesListeners);
+ state.mutesListeners.set("unmute", (userId: string) => runAutomodOnModAction(pluginData, "unmute", userId));
+ registerEventListenersFromMap(mutesEvents, state.mutesListeners);
},
async beforeUnload(pluginData) {
+ const { state, guild } = pluginData;
+
const countersPlugin = pluginData.getPlugin(CountersPlugin);
- if (pluginData.state.onCounterTrigger) {
- countersPlugin.offCounterEvent("trigger", pluginData.state.onCounterTrigger);
+ if (state.onCounterTrigger) {
+ countersPlugin.offCounterEvent("trigger", state.onCounterTrigger);
}
- if (pluginData.state.onCounterReverseTrigger) {
- countersPlugin.offCounterEvent("reverseTrigger", pluginData.state.onCounterReverseTrigger);
+ if (state.onCounterReverseTrigger) {
+ countersPlugin.offCounterEvent("reverseTrigger", state.onCounterReverseTrigger);
}
const modActionsEvents = pluginData.getPlugin(ModActionsPlugin).getEventEmitter();
- if (pluginData.state.modActionsListeners) {
- unregisterEventListenersFromMap(modActionsEvents, pluginData.state.modActionsListeners);
+ if (state.modActionsListeners) {
+ unregisterEventListenersFromMap(modActionsEvents, state.modActionsListeners);
}
const mutesEvents = pluginData.getPlugin(MutesPlugin).getEventEmitter();
- if (pluginData.state.mutesListeners) {
- unregisterEventListenersFromMap(mutesEvents, pluginData.state.mutesListeners);
+ if (state.mutesListeners) {
+ unregisterEventListenersFromMap(mutesEvents, state.mutesListeners);
}
- pluginData.state.queue.clear();
+ state.queue.clear();
- discardRegExpRunner(`guild-${pluginData.guild.id}`);
+ discardRegExpRunner(`guild-${guild.id}`);
- if (pluginData.state.clearRecentActionsInterval) {
- clearInterval(pluginData.state.clearRecentActionsInterval);
+ if (state.clearRecentActionsInterval) {
+ clearInterval(state.clearRecentActionsInterval);
}
- if (pluginData.state.clearRecentSpamInterval) {
- clearInterval(pluginData.state.clearRecentSpamInterval);
+ if (state.clearRecentSpamInterval) {
+ clearInterval(state.clearRecentSpamInterval);
}
- if (pluginData.state.clearRecentNicknameChangesInterval) {
- clearInterval(pluginData.state.clearRecentNicknameChangesInterval);
+ if (state.clearRecentNicknameChangesInterval) {
+ clearInterval(state.clearRecentNicknameChangesInterval);
}
- if (pluginData.state.onMessageCreateFn) {
- pluginData.state.savedMessages.events.off("create", pluginData.state.onMessageCreateFn);
+ if (state.onMessageCreateFn) {
+ state.savedMessages.events.off("create", state.onMessageCreateFn);
}
- if (pluginData.state.onMessageUpdateFn) {
- pluginData.state.savedMessages.events.off("update", pluginData.state.onMessageUpdateFn);
+ if (state.onMessageUpdateFn) {
+ state.savedMessages.events.off("update", state.onMessageUpdateFn);
}
},
});
diff --git a/backend/src/plugins/Automod/actions/addRoles.ts b/backend/src/plugins/Automod/actions/addRoles.ts
index ee577ae9..ce2f02d9 100644
--- a/backend/src/plugins/Automod/actions/addRoles.ts
+++ b/backend/src/plugins/Automod/actions/addRoles.ts
@@ -1,6 +1,5 @@
-import { Permissions, Snowflake } from "discord.js";
+import { PermissionFlagsBits, Snowflake } from "discord.js";
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { nonNullish, unique } from "../../../utils";
import { canAssignRole } from "../../../utils/canAssignRole";
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
@@ -10,7 +9,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
import { ignoreRoleChange } from "../functions/ignoredRoleChanges";
import { automodAction } from "../helpers";
-const p = Permissions.FLAGS;
+const p = PermissionFlagsBits;
export const AddRolesAction = automodAction({
configType: t.array(t.string),
@@ -20,7 +19,7 @@ export const AddRolesAction = automodAction({
const members = unique(contexts.map((c) => c.member).filter(nonNullish));
const me = pluginData.guild.members.cache.get(pluginData.client.user!.id)!;
- const missingPermissions = getMissingPermissions(me.permissions, p.MANAGE_ROLES);
+ const missingPermissions = getMissingPermissions(me.permissions, p.ManageRoles);
if (missingPermissions) {
const logs = pluginData.getPlugin(LogsPlugin);
logs.logBotAlert({
diff --git a/backend/src/plugins/Automod/actions/addToCounter.ts b/backend/src/plugins/Automod/actions/addToCounter.ts
index 04d73f83..842534ef 100644
--- a/backend/src/plugins/Automod/actions/addToCounter.ts
+++ b/backend/src/plugins/Automod/actions/addToCounter.ts
@@ -1,8 +1,7 @@
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { CountersPlugin } from "../../Counters/CountersPlugin";
-import { automodAction } from "../helpers";
import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { automodAction } from "../helpers";
export const AddToCounterAction = automodAction({
configType: t.type({
diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts
index 8bfce04d..eb6f3348 100644
--- a/backend/src/plugins/Automod/actions/alert.ts
+++ b/backend/src/plugins/Automod/actions/alert.ts
@@ -1,4 +1,4 @@
-import { Snowflake, TextChannel, ThreadChannel } from "discord.js";
+import { Snowflake } from "discord.js";
import * as t from "io-ts";
import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions";
import { LogType } from "../../../data/LogType";
@@ -9,21 +9,19 @@ import {
TemplateSafeValueContainer,
} from "../../../templateFormatter";
import {
- createChunkedMessage,
+ chunkMessageLines,
+ isTruthy,
messageLink,
- stripObjectToScalars,
tAllowedMentions,
tNormalizedNullOptional,
- isTruthy,
- verboseChannelMention,
validateAndParseMessageContent,
- chunkMessageLines,
+ verboseChannelMention,
} from "../../../utils";
+import { messageIsEmpty } from "../../../utils/messageIsEmpty";
+import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
+import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
-import { TemplateSafeUser, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
-import { messageIsEmpty } from "../../../utils/messageIsEmpty";
-import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin";
export const AlertAction = automodAction({
configType: t.type({
@@ -38,7 +36,7 @@ export const AlertAction = automodAction({
const channel = pluginData.guild.channels.cache.get(actionConfig.channel as Snowflake);
const logs = pluginData.getPlugin(LogsPlugin);
- if (channel?.isText()) {
+ if (channel?.isTextBased()) {
const text = actionConfig.text;
const theMessageLink =
contexts[0].message && messageLink(pluginData.guild.id, contexts[0].message.channel_id, contexts[0].message.id);
@@ -96,7 +94,7 @@ export const AlertAction = automodAction({
const chunks = chunkMessageLines(rendered);
for (const chunk of chunks) {
await poster.sendMessage(channel, {
- content: rendered,
+ content: chunk,
allowedMentions: erisAllowedMentionsToDjsMentionOptions(actionConfig.allowed_mentions),
});
}
diff --git a/backend/src/plugins/Automod/actions/archiveThread.ts b/backend/src/plugins/Automod/actions/archiveThread.ts
index 6fe871a5..d94afdf7 100644
--- a/backend/src/plugins/Automod/actions/archiveThread.ts
+++ b/backend/src/plugins/Automod/actions/archiveThread.ts
@@ -1,4 +1,4 @@
-import { ThreadChannel } from "discord.js";
+import { AnyThreadChannel } from "discord.js";
import * as t from "io-ts";
import { noop } from "../../../utils";
import { automodAction } from "../helpers";
@@ -11,7 +11,7 @@ export const ArchiveThreadAction = automodAction({
const threads = contexts
.filter((c) => c.message?.channel_id)
.map((c) => pluginData.guild.channels.cache.get(c.message!.channel_id))
- .filter((c): c is ThreadChannel => c?.isThread() ?? false);
+ .filter((c): c is AnyThreadChannel => c?.isThread() ?? false);
for (const thread of threads) {
await thread.setArchived().catch(noop);
diff --git a/backend/src/plugins/Automod/actions/changeNickname.ts b/backend/src/plugins/Automod/actions/changeNickname.ts
index 0a368355..9cd4790e 100644
--- a/backend/src/plugins/Automod/actions/changeNickname.ts
+++ b/backend/src/plugins/Automod/actions/changeNickname.ts
@@ -1,5 +1,4 @@
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { nonNullish, unique } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts
index ad060879..3f22948c 100644
--- a/backend/src/plugins/Automod/actions/changePerms.ts
+++ b/backend/src/plugins/Automod/actions/changePerms.ts
@@ -1,20 +1,72 @@
-import { Permissions, PermissionString } from "discord.js";
+import { PermissionsBitField, PermissionsString } from "discord.js";
import * as t from "io-ts";
-import { automodAction } from "../helpers";
-import { tNullable, isValidSnowflake, tPartialDictionary } from "../../../utils";
-import { noop } from "knub/dist/utils";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
+import { isValidSnowflake, noop, tNullable, tPartialDictionary } from "../../../utils";
import {
guildToTemplateSafeGuild,
savedMessageToTemplateSafeSavedMessage,
userToTemplateSafeUser,
} from "../../../utils/templateSafeObjects";
+import { automodAction } from "../helpers";
+
+type LegacyPermMap = Record;
+const legacyPermMap = {
+ CREATE_INSTANT_INVITE: "CreateInstantInvite",
+ KICK_MEMBERS: "KickMembers",
+ BAN_MEMBERS: "BanMembers",
+ ADMINISTRATOR: "Administrator",
+ MANAGE_CHANNELS: "ManageChannels",
+ MANAGE_GUILD: "ManageGuild",
+ ADD_REACTIONS: "AddReactions",
+ VIEW_AUDIT_LOG: "ViewAuditLog",
+ PRIORITY_SPEAKER: "PrioritySpeaker",
+ STREAM: "Stream",
+ VIEW_CHANNEL: "ViewChannel",
+ SEND_MESSAGES: "SendMessages",
+ SEND_TTSMESSAGES: "SendTTSMessages",
+ MANAGE_MESSAGES: "ManageMessages",
+ EMBED_LINKS: "EmbedLinks",
+ ATTACH_FILES: "AttachFiles",
+ READ_MESSAGE_HISTORY: "ReadMessageHistory",
+ MENTION_EVERYONE: "MentionEveryone",
+ USE_EXTERNAL_EMOJIS: "UseExternalEmojis",
+ VIEW_GUILD_INSIGHTS: "ViewGuildInsights",
+ CONNECT: "Connect",
+ SPEAK: "Speak",
+ MUTE_MEMBERS: "MuteMembers",
+ DEAFEN_MEMBERS: "DeafenMembers",
+ MOVE_MEMBERS: "MoveMembers",
+ USE_VAD: "UseVAD",
+ CHANGE_NICKNAME: "ChangeNickname",
+ MANAGE_NICKNAMES: "ManageNicknames",
+ MANAGE_ROLES: "ManageRoles",
+ MANAGE_WEBHOOKS: "ManageWebhooks",
+ MANAGE_EMOJIS_AND_STICKERS: "ManageEmojisAndStickers",
+ USE_APPLICATION_COMMANDS: "UseApplicationCommands",
+ REQUEST_TO_SPEAK: "RequestToSpeak",
+ MANAGE_EVENTS: "ManageEvents",
+ MANAGE_THREADS: "ManageThreads",
+ CREATE_PUBLIC_THREADS: "CreatePublicThreads",
+ CREATE_PRIVATE_THREADS: "CreatePrivateThreads",
+ USE_EXTERNAL_STICKERS: "UseExternalStickers",
+ SEND_MESSAGES_IN_THREADS: "SendMessagesInThreads",
+ USE_EMBEDDED_ACTIVITIES: "UseEmbeddedActivities",
+ MODERATE_MEMBERS: "ModerateMembers",
+} satisfies LegacyPermMap;
+
+const realToLegacyMap = Object.entries(legacyPermMap).reduce((map, pair) => {
+ map[pair[1]] = pair[0];
+ return map;
+}, {}) as Record;
export const ChangePermsAction = automodAction({
configType: t.type({
target: t.string,
channel: tNullable(t.string),
- perms: tPartialDictionary(t.keyof(Permissions.FLAGS), tNullable(t.boolean)),
+ perms: tPartialDictionary(
+ t.union([t.keyof(PermissionsBitField.Flags), t.keyof(legacyPermMap)]),
+ tNullable(t.boolean),
+ ),
}),
defaultConfig: {},
@@ -52,13 +104,15 @@ export const ChangePermsAction = automodAction({
const channel = pluginData.guild.channels.resolve(channelId);
if (!channel || channel.isThread()) return;
const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target);
- const allow = new Permissions(overwrite?.allow ?? 0n).serialize();
- const deny = new Permissions(overwrite?.deny ?? 0n).serialize();
- const newPerms: Partial> = {};
+ const allow = new PermissionsBitField(overwrite?.allow ?? 0n).serialize();
+ const deny = new PermissionsBitField(overwrite?.deny ?? 0n).serialize();
+ const newPerms: Partial> = {};
for (const key in allow) {
- if (typeof actionConfig.perms[key] !== "undefined") {
- newPerms[key] = actionConfig.perms[key];
+ const legacyKey = realToLegacyMap[key];
+ const configEntry = actionConfig.perms[key] ?? actionConfig.perms[legacyKey];
+ if (typeof configEntry !== "undefined") {
+ newPerms[key] = configEntry;
continue;
}
if (allow[key]) {
@@ -86,11 +140,12 @@ export const ChangePermsAction = automodAction({
if (!role) return;
- const perms = new Permissions(role.permissions).serialize();
+ const perms = new PermissionsBitField(role.permissions).serialize();
for (const key in actionConfig.perms) {
- perms[key] = actionConfig.perms[key];
+ const realKey = legacyPermMap[key] ?? key;
+ perms[realKey] = actionConfig.perms[key];
}
- const permsArray = Object.keys(perms).filter((key) => perms[key]);
- await role.setPermissions(new Permissions(permsArray)).catch(noop);
+ const permsArray = Object.keys(perms).filter((key) => perms[key]);
+ await role.setPermissions(new PermissionsBitField(permsArray)).catch(noop);
},
});
diff --git a/backend/src/plugins/Automod/actions/clean.ts b/backend/src/plugins/Automod/actions/clean.ts
index 27ee1cb6..91bf37ac 100644
--- a/backend/src/plugins/Automod/actions/clean.ts
+++ b/backend/src/plugins/Automod/actions/clean.ts
@@ -1,4 +1,4 @@
-import { Snowflake, TextChannel } from "discord.js";
+import { GuildTextBasedChannel, Snowflake } from "discord.js";
import * as t from "io-ts";
import { LogType } from "../../../data/LogType";
import { noop } from "../../../utils";
@@ -32,7 +32,7 @@ export const CleanAction = automodAction({
pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id);
}
- const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel;
+ const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as GuildTextBasedChannel;
await channel.bulkDelete(messageIds as Snowflake[]).catch(noop);
}
},
diff --git a/backend/src/plugins/Automod/actions/log.ts b/backend/src/plugins/Automod/actions/log.ts
index 62f57a20..82075a2e 100644
--- a/backend/src/plugins/Automod/actions/log.ts
+++ b/backend/src/plugins/Automod/actions/log.ts
@@ -1,9 +1,7 @@
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
-import { isTruthy, stripObjectToScalars, unique } from "../../../utils";
+import { isTruthy, unique } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
-import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
export const LogAction = automodAction({
configType: t.boolean,
diff --git a/backend/src/plugins/Automod/actions/mute.ts b/backend/src/plugins/Automod/actions/mute.ts
index a1bb9299..3219c712 100644
--- a/backend/src/plugins/Automod/actions/mute.ts
+++ b/backend/src/plugins/Automod/actions/mute.ts
@@ -1,5 +1,4 @@
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
import { convertDelayStringToMS, nonNullish, tDelayString, tNullable, unique } from "../../../utils";
import { CaseArgs } from "../../Cases/types";
diff --git a/backend/src/plugins/Automod/actions/removeRoles.ts b/backend/src/plugins/Automod/actions/removeRoles.ts
index 62b71480..a46d8262 100644
--- a/backend/src/plugins/Automod/actions/removeRoles.ts
+++ b/backend/src/plugins/Automod/actions/removeRoles.ts
@@ -1,6 +1,5 @@
-import { Permissions, Snowflake } from "discord.js";
+import { PermissionFlagsBits, Snowflake } from "discord.js";
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { nonNullish, unique } from "../../../utils";
import { canAssignRole } from "../../../utils/canAssignRole";
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
@@ -10,7 +9,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
import { ignoreRoleChange } from "../functions/ignoredRoleChanges";
import { automodAction } from "../helpers";
-const p = Permissions.FLAGS;
+const p = PermissionFlagsBits;
export const RemoveRolesAction = automodAction({
configType: t.array(t.string),
@@ -21,7 +20,7 @@ export const RemoveRolesAction = automodAction({
const members = unique(contexts.map((c) => c.member).filter(nonNullish));
const me = pluginData.guild.members.cache.get(pluginData.client.user!.id)!;
- const missingPermissions = getMissingPermissions(me.permissions, p.MANAGE_ROLES);
+ const missingPermissions = getMissingPermissions(me.permissions, p.ManageRoles);
if (missingPermissions) {
const logs = pluginData.getPlugin(LogsPlugin);
logs.logBotAlert({
diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts
index 865ef127..ec7ffc1b 100644
--- a/backend/src/plugins/Automod/actions/reply.ts
+++ b/backend/src/plugins/Automod/actions/reply.ts
@@ -1,6 +1,5 @@
-import { MessageOptions, Permissions, Snowflake, TextChannel, ThreadChannel, User } from "discord.js";
+import { GuildTextBasedChannel, MessageCreateOptions, PermissionsBitField, Snowflake, User } from "discord.js";
import * as t from "io-ts";
-import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
import {
convertDelayStringToMS,
@@ -14,10 +13,11 @@ import {
verboseChannelMention,
} from "../../../utils";
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
+import { messageIsEmpty } from "../../../utils/messageIsEmpty";
+import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
+import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
import { AutomodContext } from "../types";
-import { LogsPlugin } from "../../Logs/LogsPlugin";
-import { messageIsEmpty } from "../../../utils/messageIsEmpty";
export const ReplyAction = automodAction({
configType: t.union([
@@ -36,7 +36,7 @@ export const ReplyAction = automodAction({
.filter((c) => c.message?.channel_id)
.filter((c) => {
const channel = pluginData.guild.channels.cache.get(c.message!.channel_id as Snowflake);
- return channel?.isText();
+ return channel?.isTextBased();
});
const contextsByChannelId = contextsWithTextChannels.reduce((map: Map, context) => {
@@ -63,16 +63,16 @@ export const ReplyAction = automodAction({
const formatted =
typeof actionConfig === "string"
? await renderReplyText(actionConfig)
- : ((await renderRecursively(actionConfig.text, renderReplyText)) as MessageOptions);
+ : ((await renderRecursively(actionConfig.text, renderReplyText)) as MessageCreateOptions);
if (formatted) {
- const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel;
+ const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as GuildTextBasedChannel;
// Check for basic Send Messages and View Channel permissions
if (
!hasDiscordPermissions(
channel.permissionsFor(pluginData.client.user!.id),
- Permissions.FLAGS.SEND_MESSAGES | Permissions.FLAGS.VIEW_CHANNEL,
+ PermissionsBitField.Flags.SendMessages | PermissionsBitField.Flags.ViewChannel,
)
) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
@@ -84,7 +84,10 @@ export const ReplyAction = automodAction({
// If the message is an embed, check for embed permissions
if (
typeof formatted !== "string" &&
- !hasDiscordPermissions(channel.permissionsFor(pluginData.client.user!.id), Permissions.FLAGS.EMBED_LINKS)
+ !hasDiscordPermissions(
+ channel.permissionsFor(pluginData.client.user!.id),
+ PermissionsBitField.Flags.EmbedLinks,
+ )
) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Missing permissions to reply **with an embed** in ${verboseChannelMention(
@@ -96,7 +99,7 @@ export const ReplyAction = automodAction({
const messageContent = validateAndParseMessageContent(formatted);
- const messageOpts: MessageOptions = {
+ const messageOpts: MessageCreateOptions = {
...messageContent,
allowedMentions: {
users: [user.id],
@@ -118,7 +121,7 @@ export const ReplyAction = automodAction({
if (typeof actionConfig === "object" && actionConfig.auto_delete) {
const delay = convertDelayStringToMS(String(actionConfig.auto_delete))!;
- setTimeout(() => !replyMsg.deleted && replyMsg.delete().catch(noop), delay);
+ setTimeout(() => replyMsg.deletable && replyMsg.delete().catch(noop), delay);
}
}
}
diff --git a/backend/src/plugins/Automod/actions/setCounter.ts b/backend/src/plugins/Automod/actions/setCounter.ts
index 5be82cf6..3088f848 100644
--- a/backend/src/plugins/Automod/actions/setCounter.ts
+++ b/backend/src/plugins/Automod/actions/setCounter.ts
@@ -1,8 +1,7 @@
import * as t from "io-ts";
-import { LogType } from "../../../data/LogType";
import { CountersPlugin } from "../../Counters/CountersPlugin";
-import { automodAction } from "../helpers";
import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { automodAction } from "../helpers";
export const SetCounterAction = automodAction({
configType: t.type({
diff --git a/backend/src/plugins/Automod/actions/setSlowmode.ts b/backend/src/plugins/Automod/actions/setSlowmode.ts
index ad333e6d..7b527f10 100644
--- a/backend/src/plugins/Automod/actions/setSlowmode.ts
+++ b/backend/src/plugins/Automod/actions/setSlowmode.ts
@@ -1,10 +1,8 @@
-import { Snowflake, TextChannel } from "discord.js";
+import { ChannelType, GuildTextBasedChannel, Snowflake } from "discord.js";
import * as t from "io-ts";
-import { ChannelTypeStrings } from "src/types";
-import { LogType } from "../../../data/LogType";
import { convertDelayStringToMS, isDiscordAPIError, tDelayString, tNullable } from "../../../utils";
-import { automodAction } from "../helpers";
import { LogsPlugin } from "../../Logs/LogsPlugin";
+import { automodAction } from "../helpers";
export const SetSlowmodeAction = automodAction({
configType: t.type({
@@ -23,29 +21,27 @@ export const SetSlowmodeAction = automodAction({
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
// Only text channels and text channels within categories support slowmodes
- if (!channel || !(channel.type === ChannelTypeStrings.TEXT || ChannelTypeStrings.CATEGORY)) {
+ if (!channel || (!channel.isTextBased() && channel.type !== ChannelType.GuildCategory)) {
continue;
}
- const channelsToSlowmode: TextChannel[] = [];
- if (channel.type === ChannelTypeStrings.CATEGORY) {
+ const channelsToSlowmode: GuildTextBasedChannel[] = [];
+ if (channel.type === ChannelType.GuildCategory) {
// Find all text channels within the category
for (const ch of pluginData.guild.channels.cache.values()) {
- if (ch.parentId === channel.id && ch.type === ChannelTypeStrings.TEXT) {
- channelsToSlowmode.push(ch as TextChannel);
+ if (ch.parentId === channel.id && ch.type === ChannelType.GuildText) {
+ channelsToSlowmode.push(ch);
}
}
} else {
- channelsToSlowmode.push(channel as TextChannel);
+ channelsToSlowmode.push(channel);
}
const slowmodeSeconds = Math.ceil(slowmodeMs / 1000);
try {
for (const chan of channelsToSlowmode) {
- await chan.edit({
- rateLimitPerUser: slowmodeSeconds,
- });
+ await chan.setRateLimitPerUser(slowmodeSeconds);
}
} catch (e) {
// Check for invalid form body -> indicates duration was too large
diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts
index 943f9be6..055c9493 100644
--- a/backend/src/plugins/Automod/actions/startThread.ts
+++ b/backend/src/plugins/Automod/actions/startThread.ts
@@ -1,8 +1,12 @@
-import { GuildFeature, ThreadAutoArchiveDuration } from "discord-api-types/v9";
-import { TextChannel } from "discord.js";
+import {
+ ChannelType,
+ GuildFeature,
+ GuildTextThreadCreateOptions,
+ ThreadAutoArchiveDuration,
+ ThreadChannel,
+} from "discord.js";
import * as t from "io-ts";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
-import { ChannelTypeStrings } from "../../../types";
import { convertDelayStringToMS, MINUTES, noop, tDelayString, tNullable } from "../../../utils";
import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { automodAction } from "../helpers";
@@ -32,12 +36,11 @@ export const StartThreadAction = automodAction({
const threads = contexts.filter((c) => {
if (!c.message || !c.user) return false;
const channel = pluginData.guild.channels.cache.get(c.message.channel_id);
- if (channel?.type !== ChannelTypeStrings.TEXT || !channel.isText()) return false; // for some reason the typing here for channel.type defaults to ThreadChannelTypes (?)
+ if (channel?.type !== ChannelType.GuildText || !channel.isTextBased()) return false; // for some reason the typing here for channel.type defaults to ThreadChannelTypes (?)
// check against max threads per channel
if (actionConfig.limit_per_channel && actionConfig.limit_per_channel > 0) {
const threadCount = channel.threads.cache.filter(
- (tr) =>
- tr.ownerId === pluginData.client.user!.id && !tr.deleted && !tr.archived && tr.parentId === channel.id,
+ (tr) => tr.ownerId === pluginData.client.user!.id && !tr.archived && tr.parentId === channel.id,
).size;
if (threadCount >= actionConfig.limit_per_channel) return false;
}
@@ -53,7 +56,9 @@ export const StartThreadAction = automodAction({
: ThreadAutoArchiveDuration.OneHour;
for (const threadContext of threads) {
- const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id) as TextChannel;
+ const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id);
+ if (!channel || !("threads" in channel) || channel.type === ChannelType.GuildForum) continue;
+
const renderThreadName = async (str: string) =>
renderTemplate(
str,
@@ -63,20 +68,35 @@ export const StartThreadAction = automodAction({
}),
);
const threadName = await renderThreadName(actionConfig.name ?? "{user.tag}s thread");
- const thread = await channel.threads
- .create({
- name: threadName,
- autoArchiveDuration: autoArchive,
- type:
- actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
- ? ChannelTypeStrings.PRIVATE_THREAD
- : ChannelTypeStrings.PUBLIC_THREAD,
- startMessage:
- !actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
- ? threadContext.message!.id
- : undefined,
- })
- .catch(noop);
+ const threadOptions: GuildTextThreadCreateOptions = {
+ name: threadName,
+ autoArchiveDuration: autoArchive,
+ startMessage:
+ !actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
+ ? threadContext.message!.id
+ : undefined,
+ };
+
+ let thread: ThreadChannel | undefined;
+ if (channel.type === ChannelType.GuildNews) {
+ thread = await channel.threads
+ .create({
+ ...threadOptions,
+ type: ChannelType.AnnouncementThread,
+ })
+ .catch(() => undefined);
+ } else {
+ thread = await channel.threads
+ .create({
+ ...threadOptions,
+ type: actionConfig.private ? ChannelType.PrivateThread : ChannelType.PublicThread,
+ startMessage:
+ !actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
+ ? threadContext.message!.id
+ : undefined,
+ })
+ .catch(() => undefined);
+ }
if (actionConfig.slowmode && thread) {
const dur = Math.ceil(Math.max(convertDelayStringToMS(actionConfig.slowmode) ?? 0, 0) / 1000);
if (dur > 0) {
diff --git a/backend/src/plugins/Automod/commands/AntiraidClearCmd.ts b/backend/src/plugins/Automod/commands/AntiraidClearCmd.ts
index 3f119b6b..fd31d4b1 100644
--- a/backend/src/plugins/Automod/commands/AntiraidClearCmd.ts
+++ b/backend/src/plugins/Automod/commands/AntiraidClearCmd.ts
@@ -1,9 +1,9 @@
-import { typedGuildCommand } from "knub";
+import { guildPluginMessageCommand } from "knub";
import { sendSuccessMessage } from "../../../pluginUtils";
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
import { AutomodPluginType } from "../types";
-export const AntiraidClearCmd = typedGuildCommand()({
+export const AntiraidClearCmd = guildPluginMessageCommand()({
trigger: ["antiraid clear", "antiraid reset", "antiraid none", "antiraid off"],
permission: "can_set_antiraid",
diff --git a/backend/src/plugins/Automod/commands/SetAntiraidCmd.ts b/backend/src/plugins/Automod/commands/SetAntiraidCmd.ts
index 3ec0f2f9..159ff576 100644
--- a/backend/src/plugins/Automod/commands/SetAntiraidCmd.ts
+++ b/backend/src/plugins/Automod/commands/SetAntiraidCmd.ts
@@ -1,10 +1,10 @@
-import { typedGuildCommand } from "knub";
+import { guildPluginMessageCommand } from "knub";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
import { AutomodPluginType } from "../types";
-export const SetAntiraidCmd = typedGuildCommand()({
+export const SetAntiraidCmd = guildPluginMessageCommand()({
trigger: "antiraid",
permission: "can_set_antiraid",
diff --git a/backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts b/backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts
index 5c208497..f25f8e96 100644
--- a/backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts
+++ b/backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts
@@ -1,7 +1,7 @@
-import { typedGuildCommand } from "knub";
+import { guildPluginMessageCommand } from "knub";
import { AutomodPluginType } from "../types";
-export const ViewAntiraidCmd = typedGuildCommand()({
+export const ViewAntiraidCmd = guildPluginMessageCommand()({
trigger: "antiraid",
permission: "can_view_antiraid",
diff --git a/backend/src/plugins/Automod/events/RunAutomodOnJoinLeaveEvt.ts b/backend/src/plugins/Automod/events/RunAutomodOnJoinLeaveEvt.ts
index faaff383..4cf34db2 100644
--- a/backend/src/plugins/Automod/events/RunAutomodOnJoinLeaveEvt.ts
+++ b/backend/src/plugins/Automod/events/RunAutomodOnJoinLeaveEvt.ts
@@ -1,9 +1,9 @@
-import { typedGuildEventListener } from "knub";
+import { guildPluginEventListener } from "knub";
import { RecentActionType } from "../constants";
import { runAutomod } from "../functions/runAutomod";
import { AutomodContext, AutomodPluginType } from "../types";
-export const RunAutomodOnJoinEvt = typedGuildEventListener()({
+export const RunAutomodOnJoinEvt = guildPluginEventListener()({
event: "guildMemberAdd",
listener({ pluginData, args: { member } }) {
const context: AutomodContext = {
@@ -26,7 +26,7 @@ export const RunAutomodOnJoinEvt = typedGuildEventListener()(
},
});
-export const RunAutomodOnLeaveEvt = typedGuildEventListener()({
+export const RunAutomodOnLeaveEvt = guildPluginEventListener()({
event: "guildMemberRemove",
listener({ pluginData, args: { member } }) {
const context: AutomodContext = {
diff --git a/backend/src/plugins/Automod/events/RunAutomodOnMemberUpdate.ts b/backend/src/plugins/Automod/events/RunAutomodOnMemberUpdate.ts
index 86e8ad46..f6c3518a 100644
--- a/backend/src/plugins/Automod/events/RunAutomodOnMemberUpdate.ts
+++ b/backend/src/plugins/Automod/events/RunAutomodOnMemberUpdate.ts
@@ -1,10 +1,10 @@
-import { typedGuildEventListener } from "knub";
+import { guildPluginEventListener } from "knub";
import diff from "lodash.difference";
import isEqual from "lodash.isequal";
import { runAutomod } from "../functions/runAutomod";
import { AutomodContext, AutomodPluginType } from "../types";
-export const RunAutomodOnMemberUpdate = typedGuildEventListener()({
+export const RunAutomodOnMemberUpdate = guildPluginEventListener()({
event: "guildMemberUpdate",
listener({ pluginData, args: { oldMember, newMember } }) {
if (!oldMember) return;
diff --git a/backend/src/plugins/Automod/events/runAutomodOnCounterTrigger.ts b/backend/src/plugins/Automod/events/runAutomodOnCounterTrigger.ts
index 01f75116..9de3dae0 100644
--- a/backend/src/plugins/Automod/events/runAutomodOnCounterTrigger.ts
+++ b/backend/src/plugins/Automod/events/runAutomodOnCounterTrigger.ts
@@ -14,7 +14,6 @@ export async function runAutomodOnCounterTrigger(
) {
const user = userId ? await resolveUser(pluginData.client, userId) : undefined;
const member = (userId && (await resolveMember(pluginData.client, pluginData.guild, userId))) || undefined;
-
const prettyCounterName = pluginData.getPlugin(CountersPlugin).getPrettyNameForCounter(counterName);
const prettyTriggerName = pluginData
.getPlugin(CountersPlugin)
diff --git a/backend/src/plugins/Automod/events/runAutomodOnMessage.ts b/backend/src/plugins/Automod/events/runAutomodOnMessage.ts
index 4b595036..915a0cd7 100644
--- a/backend/src/plugins/Automod/events/runAutomodOnMessage.ts
+++ b/backend/src/plugins/Automod/events/runAutomodOnMessage.ts
@@ -1,13 +1,12 @@
-import { Snowflake } from "discord.js";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
+import { performance } from "perf_hooks";
import { SavedMessage } from "../../../data/entities/SavedMessage";
+import { profilingEnabled } from "../../../utils/easyProfiler";
import { addRecentActionsFromMessage } from "../functions/addRecentActionsFromMessage";
import { clearRecentActionsForMessage } from "../functions/clearRecentActionsForMessage";
import { runAutomod } from "../functions/runAutomod";
import { AutomodContext, AutomodPluginType } from "../types";
-import { performance } from "perf_hooks";
-import { profilingEnabled } from "../../../utils/easyProfiler";
export async function runAutomodOnMessage(
pluginData: GuildPluginData,
diff --git a/backend/src/plugins/Automod/events/runAutomodOnThreadEvents.ts b/backend/src/plugins/Automod/events/runAutomodOnThreadEvents.ts
index 2687778e..977c8426 100644
--- a/backend/src/plugins/Automod/events/runAutomodOnThreadEvents.ts
+++ b/backend/src/plugins/Automod/events/runAutomodOnThreadEvents.ts
@@ -1,9 +1,9 @@
-import { typedGuildEventListener } from "knub";
+import { guildPluginEventListener } from "knub";
import { RecentActionType } from "../constants";
import { runAutomod } from "../functions/runAutomod";
import { AutomodContext, AutomodPluginType } from "../types";
-export const RunAutomodOnThreadCreate = typedGuildEventListener()({
+export const RunAutomodOnThreadCreate = guildPluginEventListener()({
event: "threadCreate",
async listener({ pluginData, args: { thread } }) {
const user = thread.ownerId
@@ -32,7 +32,7 @@ export const RunAutomodOnThreadCreate = typedGuildEventListener()({
+export const RunAutomodOnThreadDelete = guildPluginEventListener()({
event: "threadDelete",
async listener({ pluginData, args: { thread } }) {
const user = thread.ownerId
@@ -54,7 +54,7 @@ export const RunAutomodOnThreadDelete = typedGuildEventListener()({
+export const RunAutomodOnThreadUpdate = guildPluginEventListener()({
event: "threadUpdate",
async listener({ pluginData, args: { oldThread, newThread: thread } }) {
const user = thread.ownerId
diff --git a/backend/src/plugins/Automod/functions/clearOldRecentActions.ts b/backend/src/plugins/Automod/functions/clearOldRecentActions.ts
index 5d75e68d..881f3ff1 100644
--- a/backend/src/plugins/Automod/functions/clearOldRecentActions.ts
+++ b/backend/src/plugins/Automod/functions/clearOldRecentActions.ts
@@ -1,7 +1,7 @@
import { GuildPluginData } from "knub";
+import { startProfiling } from "../../../utils/easyProfiler";
import { RECENT_ACTION_EXPIRY_TIME } from "../constants";
import { AutomodPluginType } from "../types";
-import { startProfiling } from "../../../utils/easyProfiler";
export function clearOldRecentActions(pluginData: GuildPluginData) {
const stopProfiling = startProfiling(pluginData.getKnubInstance().profiler, "automod:fns:clearOldRecentActions");
diff --git a/backend/src/plugins/Automod/functions/clearOldRecentSpam.ts b/backend/src/plugins/Automod/functions/clearOldRecentSpam.ts
index a4b9ad1b..f240b2da 100644
--- a/backend/src/plugins/Automod/functions/clearOldRecentSpam.ts
+++ b/backend/src/plugins/Automod/functions/clearOldRecentSpam.ts
@@ -1,7 +1,7 @@
import { GuildPluginData } from "knub";
+import { startProfiling } from "../../../utils/easyProfiler";
import { RECENT_SPAM_EXPIRY_TIME } from "../constants";
import { AutomodPluginType } from "../types";
-import { startProfiling } from "../../../utils/easyProfiler";
export function clearOldRecentSpam(pluginData: GuildPluginData) {
const stopProfiling = startProfiling(pluginData.getKnubInstance().profiler, "automod:fns:clearOldRecentSpam");
diff --git a/backend/src/plugins/Automod/functions/clearRecentActionsForMessage.ts b/backend/src/plugins/Automod/functions/clearRecentActionsForMessage.ts
index 8a21f8ad..6f1fcdb6 100644
--- a/backend/src/plugins/Automod/functions/clearRecentActionsForMessage.ts
+++ b/backend/src/plugins/Automod/functions/clearRecentActionsForMessage.ts
@@ -1,6 +1,6 @@
import { GuildPluginData } from "knub";
-import { AutomodContext, AutomodPluginType } from "../types";
import { startProfiling } from "../../../utils/easyProfiler";
+import { AutomodContext, AutomodPluginType } from "../types";
export function clearRecentActionsForMessage(pluginData: GuildPluginData, context: AutomodContext) {
const stopProfiling = startProfiling(
diff --git a/backend/src/plugins/Automod/functions/findRecentSpam.ts b/backend/src/plugins/Automod/functions/findRecentSpam.ts
index 809fbefd..93553b83 100644
--- a/backend/src/plugins/Automod/functions/findRecentSpam.ts
+++ b/backend/src/plugins/Automod/functions/findRecentSpam.ts
@@ -1,7 +1,7 @@
import { GuildPluginData } from "knub";
+import { startProfiling } from "../../../utils/easyProfiler";
import { RecentActionType } from "../constants";
import { AutomodPluginType } from "../types";
-import { startProfiling } from "../../../utils/easyProfiler";
export function findRecentSpam(
pluginData: GuildPluginData,
diff --git a/backend/src/plugins/Automod/functions/getMatchingMessageRecentActions.ts b/backend/src/plugins/Automod/functions/getMatchingMessageRecentActions.ts
index 48ad51d7..99dae716 100644
--- a/backend/src/plugins/Automod/functions/getMatchingMessageRecentActions.ts
+++ b/backend/src/plugins/Automod/functions/getMatchingMessageRecentActions.ts
@@ -1,10 +1,10 @@
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
import { SavedMessage } from "../../../data/entities/SavedMessage";
+import { startProfiling } from "../../../utils/easyProfiler";
import { RecentActionType } from "../constants";
import { AutomodPluginType } from "../types";
import { getMatchingRecentActions } from "./getMatchingRecentActions";
-import { startProfiling } from "../../../utils/easyProfiler";
export function getMatchingMessageRecentActions(
pluginData: GuildPluginData,
diff --git a/backend/src/plugins/Automod/functions/getMatchingRecentActions.ts b/backend/src/plugins/Automod/functions/getMatchingRecentActions.ts
index e8ecb6c2..b22817c4 100644
--- a/backend/src/plugins/Automod/functions/getMatchingRecentActions.ts
+++ b/backend/src/plugins/Automod/functions/getMatchingRecentActions.ts
@@ -1,7 +1,7 @@
import { GuildPluginData } from "knub";
+import { startProfiling } from "../../../utils/easyProfiler";
import { RecentActionType } from "../constants";
import { AutomodPluginType } from "../types";
-import { startProfiling } from "../../../utils/easyProfiler";
export function getMatchingRecentActions(
pluginData: GuildPluginData,
diff --git a/backend/src/plugins/Automod/functions/getTextMatchPartialSummary.ts b/backend/src/plugins/Automod/functions/getTextMatchPartialSummary.ts
index 31ece554..3d7e993f 100644
--- a/backend/src/plugins/Automod/functions/getTextMatchPartialSummary.ts
+++ b/backend/src/plugins/Automod/functions/getTextMatchPartialSummary.ts
@@ -1,4 +1,4 @@
-import { Snowflake, TextChannel } from "discord.js";
+import { ActivityType, Snowflake } from "discord.js";
import { GuildPluginData } from "knub";
import { messageSummary, verboseChannelMention } from "../../../utils";
import { AutomodContext, AutomodPluginType } from "../types";
@@ -11,13 +11,13 @@ export function getTextMatchPartialSummary(
) {
if (type === "message") {
const message = context.message!;
- const channel = pluginData.guild.channels.cache.get(message.channel_id as Snowflake) as TextChannel;
+ const channel = pluginData.guild.channels.cache.get(message.channel_id as Snowflake);
const channelMention = channel ? verboseChannelMention(channel) : `\`#${message.channel_id}\``;
return `message in ${channelMention}:\n${messageSummary(message)}`;
} else if (type === "embed") {
const message = context.message!;
- const channel = pluginData.guild.channels.cache.get(message.channel_id as Snowflake) as TextChannel;
+ const channel = pluginData.guild.channels.cache.get(message.channel_id as Snowflake);
const channelMention = channel ? verboseChannelMention(channel) : `\`#${message.channel_id}\``;
return `message embed in ${channelMention}:\n${messageSummary(message)}`;
@@ -29,6 +29,6 @@ export function getTextMatchPartialSummary(
const visibleName = context.member?.nickname || context.user!.username;
return `visible name: ${visibleName}`;
} else if (type === "customstatus") {
- return `custom status: ${context.member!.presence?.activities.find((a) => a.type === "CUSTOM")?.name}`;
+ return `custom status: ${context.member!.presence?.activities.find((a) => a.type === ActivityType.Custom)?.name}`;
}
}
diff --git a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts
index 08492589..29d07cd9 100644
--- a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts
+++ b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts
@@ -1,7 +1,8 @@
-import { Constants, MessageEmbed } from "discord.js";
+import { ActivityType, Embed } from "discord.js";
import { GuildPluginData } from "knub";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { resolveMember } from "../../../utils";
+import { DeepMutable } from "../../../utils/typeUtils.js";
import { AutomodPluginType } from "../types";
type TextTriggerWithMultipleMatchTypes = {
@@ -33,7 +34,7 @@ export async function* matchMultipleTextTypesOnMessage(
}
if (trigger.match_embeds && msg.data.embeds?.length) {
- const copiedEmbed: MessageEmbed = JSON.parse(JSON.stringify(msg.data.embeds[0]));
+ const copiedEmbed: DeepMutable